do I use a gate or not?

Thread Starter

clangray

Joined Nov 4, 2018
261
I have a fairly straight circuit that works. I need to add (if possible) some circuit design in which if the rail is "hot" and the junction of the LED and ground is "hot" then conditions are met to declare this circuit as running fine. If either rail or junction of the LED and ground is "not hot" the declaration of the circuit is "faulted". A condition that would cause this is a blown LED. Not included in the drawing but intended is a green LED for "fine" and a red for "faulted".

I've tried the logic gate and, for a sanity test, I connect both pins to the hot line and my virtual voltmeter output displays "5" - which is correct. But if I try to compare a signal from the hot side with a signal from a lead connected to an area in between the resistor and LED, I get an output measuring near 1.25V. Of course the result I want is 5v from the login gate because I've got current in both areas but the improper voltage in one being 1.25 (presence of voltage just not high enough for the pin but still the presence of current in both areas. Do I need to create a "digital" circuit here?

SS3.png
 
Last edited:

MrChips

Joined Oct 2, 2009
34,807
A logic AND gate is not the appropriate circuit to use.

It is not clear exactly what you are attempting to achieve.
If you want to sense the current flowing in a circuit, a better solution would be to use an analog comparator (or op-amp) that measures the voltage difference across the current-sense resistor.
 

Audioguru again

Joined Oct 21, 2019
6,826
The negative image covered with Falstad dots is a nightmare to look at.
I prefer looking at a "normal" black lines on a white background circuit, without any moving dots.
 

dl324

Joined Mar 30, 2015
18,326
Do I need to create a "digital" circuit here?
What are you trying to accomplish? What logic family are you using?

Schematics are easier to read if you follow the widely used conventions. Avoid unnecessary wire jogs, no wires at 45 degrees (with one important exception), and draw schematics so the flow is primarily left to right and top to bottom. Colored schematics look childish.

EDIT: OP replaced the schematics.
 
Last edited:

BobTPH

Joined Jun 5, 2013
11,514
have a fairly straight circuit that works. I need to add (if possible) some circuit design in which if the rail is "hot"
So far so good
and the junction of the LED and ground is "hot"
The junction of the LED and ground is at ground. How can that be “hot?”
then conditions are met to declare this circuit as running fine. If either rail or junction of the LED and ground is "not hot" the declaration of the circuit is "faulted".
A condition that would cause this is a blown LED.
No, a blown LED would usually be open, the voltage on neither the rail nor ground would change.
Not included in the drawing but intended is a green LED for "fine" and a red for "faulted".
I think what you are trying to do is detect if the LED is lit. In your circuit, the easiest way do that is by measuring the voltage at the junction of The LED and the resistor. It will be close to the forward voltage of the LED when it is lit. A window comparator can establish that.
 

Thread Starter

clangray

Joined Nov 4, 2018
261
So far so good

The junction of the LED and ground is at ground. How can that be “hot?”

No, a blown LED would usually be open, the voltage on neither the rail nor ground would change.

I think what you are trying to do is detect if the LED is lit. In your circuit, the easiest way do that is by measuring the voltage at the junction of The LED and the resistor. It will be close to the forward voltage of the LED when it is lit. A window comparator can establish that.
As it turns out the board is quite crowded and I may not use it after all. If I wanted to strategically place an LED in this circuit to see if its on/damaged/off where would you put it if at all (maybe there is no way this way)..
 
Last edited:

Thread Starter

clangray

Joined Nov 4, 2018
261
What are you trying to accomplish? What logic family are you using?

Schematics are easier to read if you follow the widely used conventions. Avoid unnecessary wire jogs, no wires at 45 degrees (with one important exception), and draw schematics so the flow is primarily left to right and top to bottom. Colored schematics look childish.
There you go. Its improved. Some of the wire jogs I couldn't avoid.
 

Thread Starter

clangray

Joined Nov 4, 2018
261
We usually do this with an LED and current limiting series resistor.
Ah, to quote:
A popular use is a power indicator to let the user know if a device is on. But connecting an LED directly to a power source can cause an LED to burn out. You have to utilize a current limiting resistor in series with the LED for protection.

Thx
 

MrChips

Joined Oct 2, 2009
34,807
Ah, to quote:
A popular use is a power indicator to let the user know if a device is on. But connecting an LED directly to a power source can cause an LED to burn out. You have to utilize a current limiting resistor in series with the LED for protection.

Thx
The series resistor is not for protection.
It is there to make the LED operate properly.
 

dl324

Joined Mar 30, 2015
18,326
There you go. Its improved. Some of the wire jogs I couldn't avoid.
I had to update my post to reflect that you changed the schematic in your first post.

You still haven't explained what you're trying to do or the logic family for the gate. At any rate, you probably want a comparator and not a logic gate.
 

MrChips

Joined Oct 2, 2009
34,807
The resistor is there to turn a constant voltage source into a current source. Ideally, you want the value of the resistor to be as high as possible and still have the LED visible in all viewing conditions.

The resistor value can be calculated from:

(Vs - Vdiode) / diode current.

Standard resistors of the appropriate wattage are used.

Edit: Personally. I find 20mA is too high for an LED.
For example, if I want the drive the LED with 2mA from 5V supply,

R = (5V - 2V) / 2mA = 1.5kΩ
 

Thread Starter

clangray

Joined Nov 4, 2018
261
The resistor is there to turn a constant voltage source into a current source. Ideally, you want the value of the resistor to be as high as possible and still have the LED visible in all viewing conditions.

The resistor value can be calculated from:

(Vs - Vdiode) / diode current.

Standard resistors of the appropriate wattage are used.

Edit: Personally. I find 20mA is too high for an LED.
For example, if I want the drive the LED with 2mA from 5V supply,

R = (5V - 2V) / 2mA = 1.5kΩ
I guess this a problem that negates he use of an indicator LED?
 

Thread Starter

clangray

Joined Nov 4, 2018
261
I had to update my post to reflect that you changed the schematic in your first post.

You still haven't explained what you're trying to do or the logic family for the gate. At any rate, you probably want a comparator and not a logic gate.
I'm trying to give the circuit the ability to have the status light turn off if the main LED fails.
 
Top