Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] switch not working with controller

Status
Not open for further replies.

venkates2218

Full Member level 6
Joined
Sep 30, 2016
Messages
354
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
4,306
Slider switch.png

At initial PIN 32 will be in high state.when the switch is turned ON an sequence will execute in the controller and the LED connected with the switch have to glow which indicate the sequence is turned ON.

But when the SWITCH is TURNED ON the LED not glowing and their is no action in the controller also.If I checked the controller without the LED part means working fine.

How to solve this issue..?
 

R16 (470 ohms) looks as though it could be a pull-up resistor. Is that correct?
Try a higher ohm value because 470 ohms wastes 10mA and moreover may alter voltage levels thus disrupting the circuit's operation.
 

Hi,
I'm not sure but I think you haven't connected the three terminals or the switch - one to pull-up resistor, one to GND and one to the control signal. It looks like terminal 1 is not connected.
 

Hi,

The highlighted green pieces of signals show that you don´t use EAGLE correctly.

--> use the EAGLE tutorial how to connect, route and name signals. It´s as easy as can be.

Klaus
 

Hi,
The effects which you are talking about are of hardware or in the simulator?? If in simulator, try fixing it by redrawing the schematic.
 

R16 (470 ohms) looks as though it could be a pull-up resistor. Is that correct?
Try a higher ohm value because 470 ohms wastes 10mA and moreover may alter voltage levels thus disrupting the circuit's operation.

Tried it with 10K also but facing the same issue.

- - - Updated - - -

Hi,

The highlighted green pieces of signals show that you don´t use EAGLE correctly.

--> use the EAGLE tutorial how to connect, route and name signals. It´s as easy as can be.

Klaus

While taking screenshot I selected the wire.So only looking green.

- - - Updated - - -

Hi,
The effects which you are talking about are of hardware or in the simulator?? If in simulator, try fixing it by redrawing the schematic.

Its not working in real time hardware also.
 

The LED logic is:
1. switch open, LED has no voltage across it,
2. switch closed, 10mA bypasses the LED so there may not be enough current.

Solution:
Make R16 at least 1K and preferably around 10K.
Make sure MCU pin 32 is an input.

Brian.
 

Hi,
I'm not sure but I think you haven't connected the three terminals or the switch - one to pull-up resistor, one to GND and one to the control signal. It looks like terminal 1 is not connected.

I wrote this before. I was thinking it was some kind of three-terminal switch controlled by some other logic. Now I realize it's some kind of push-button.

First of all, consider whether the switch is a momentary push-button or not. If it is a momentary push button, then your code has to look at it momentarily too, if not the controller will see a "high" after the switch has been released, meanwhile you are expecting it to see a "low".

Another thing is that you have used 0 and 1 to represent the switch state in your code. It is easy to mistake 0 for 1 and vise versa in this representation.

Maybe we need to take a cold-eye look at your code.
 

Hi,
To fully analyse the circuit you provided, I need to know what is there connected with those three control terminals.
If it's not possible to provide those details then all I can suggest is that
1. voltage level is not enough at the switching terminal
OR
2. Due to some logic error, LED is becoming reversed biased.
Please check these once to be sure.
Thank You.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top