Maker Pro
Maker Pro

LED ruins logic levels!..

alexhbg

Apr 16, 2010
2
Joined
Apr 16, 2010
Messages
2
Hi,

I'm using Yenka to simulate my circuit, and have got a problem: Whenever I connect an LED to a certain point in my circuit it ruins my logic level:

This is without the LED connected:
simg1.png


This is with:
simg2.png


Logic level 1 is 5V, and logic level 0 is 0V. When I connect the LED the highest voltage I get is 2.5V, therefore it produces an 'x' (undefined).

Is there some way I should be connecting it in parallel?
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
The voltage across the LED is never going to exceed 2.5 V. Just think of the LED as a forward-biased diode where the forward voltage is 2.5 V instead of the usual 0.7 V. I would replace that diode with a current limiting resistor, and route the input of the gate directly to the output of the gate which drives it. Select the value of the resistor so the LED current is within that specified for your logic gate drive, and everything should be OK.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
That diode is going to cause problems. If your circuit is designed using TTL then the input of the gate following will never go low without the LED (and *might* with it).

If it's CMOS it's just really really bad and may work as if the diode isn't even there if the diode has any leakage at all, and will probably change with humidity and phase of the moon.

The software may model the gates assuming a certain sink and source capability. The resistor connected tot he LED may be too low a value and is (predicted to) load the gate's output too much.
 

Resqueline

Jul 31, 2009
2,848
Joined
Jul 31, 2009
Messages
2,848
First, what is the point of the diode? You loose 0.6V there and it serves no logic purpose, other than to mess up the logic levels as steve says.
Second, what family of logic gates are you using?
Third, what is the value of the series resistor? A too low value will load the output too much.
It's not good design practice to put an LED on the same output as is used as an input for other logic. Use a transistor or an extra gate as a buffer for the LED.
 
Top