Maker Pro
Maker Pro

push buttons + led interface to avr pins

sherazi

Mar 8, 2010
91
Joined
Mar 8, 2010
Messages
91
i am interfacing push buttons and leds to avr in such a way that when the button is pressed the led also glows.. now the point is that i want it to glow by itself and not by mcu ... check the circuit ...attached..
84_1286179499.png


when i used the same circuit during testing using 5mm LEDs the system worked.. a valid zero was avaible on pin of mcu, but hwen i made some prototype boards using SMD LEDs the PIN doesnt get valid zero, i checked the Voltage across the LED when it was on and that was 2.1 V ... what i can i do to make it valid one...
 

darkman1969

Jun 23, 2010
18
Joined
Jun 23, 2010
Messages
18
A 2.1v drop across a led sounds like your using a Green or Blue LED. Try using a Red LED and see what happens.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
A better option is to place the connection to the AVR at a point between the switch and the LED. Then place a high value resistor (47K should be fine) across the LED. This will ensure the input sees a full rail to rail swing, regardless of the colour of LED you use.
 

darkman1969

Jun 23, 2010
18
Joined
Jun 23, 2010
Messages
18
'Across the led' means, place the resistor so it is connected in 'parallel' with the led.
 
Top