Creating a RGB sensors and light up Led Problem

Thread Starter

Sornpraram Xu

Joined Feb 24, 2019
21
Current I am doing a RGB color sensor to detech the Red green blue
And this is my last schemetic circuit
As you can see in the RED rectangle that LED should light up but is't NOT
and when I measure with Ammeter the output of it is 0 that not right

Please help
Thank you
 

MisterBill2

Joined Jan 23, 2018
7,048
The reason that is immediately obvious is that the gate current of the FET devices is not enough to light the LED. And the green LED will not light unless both FETs are turned on, and the upper FET can not switch on if the source terminal is floating because the lower FET is switched off.

So before you work with the indicator part of the project you need to verify that the outputs of the two op-amps are changing state the way you intend them to change. Also, FETs in series as shown seldom work without a much more complicated driving scheme than is shown.
Please provide a description of how you want this circuit to function, as that will allow a number of the wizards who participate to provide very useful advice.
 

Thread Starter

Sornpraram Xu

Joined Feb 24, 2019
21
The reason that is immediately obvious is that the gate current of the FET devices is not enough to light the LED. And the green LED will not light unless both FETs are turned on, and the upper FET can not switch on if the source terminal is floating because the lower FET is switched off.

So before you work with the indicator part of the project you need to verify that the outputs of the two op-amps are changing state the way you intend them to change. Also, FETs in series as shown seldom work without a much more complicated driving scheme than is shown.
Please provide a description of how you want this circuit to function, as that will allow a number of the wizards who participate to provide very useful advice.
I forget the LDR res that change by Red , Green , Blue
But What I want is if Red 1 red light on , Green another 1 red light on , Blue 2 red lights on and 1 green light on
This is my last Simulation when detect Blue 2 red lights on Check , 1 green light on Check ( But !! with the almost 0 mA it shouldn't Light up)
Oh, And another question why the output from FET has only 4.3 V left
 

LesJones

Joined Jan 8, 2017
2,698
Is this a school project ? I don't understand how it is supposed to work with no way of switching the LEDs illuminating the target.

Les.
 

Thread Starter

Sornpraram Xu

Joined Feb 24, 2019
21
It look like a bit too hard for me
Okay I think I am gonna leave it and change my circuit into more simple way
Just want to show the result as a GREEN LED

As you can see the Output voltage from comparator is 3.5 V so the current should be 14 mA
but in the simulator the result is 5 mA only
Why this is happenning???
Thank you
 

Wolframore

Joined Jan 21, 2019
1,797
What is the forward voltage for the LED set at? You're dropping current through the 250 ohm resistors.

The calculation is (V - Vf)/R = I
V is Voltage
Vf is forward voltage of LED
R is Resistance
I is your current

If your forward voltage is 2V then your current would be about 0.006A or 6 mA.
 

Thread Starter

Sornpraram Xu

Joined Feb 24, 2019
21
I get it about forward voltage
But with the yellow LED
V in = 5V and R = 250
didn't calculate forward Voltage and the output current is 20 mA
So the forward voltage of yellow LED is 0 V

If the forward voltage of yellow LED is 0 V the green LED should be 0 V too
isn't ?
 

Wolframore

Joined Jan 21, 2019
1,797
It's not possible... you have more than 5V as source... check your diagram again. Looking at RV1 which has a voltage divider at 51% your source looks like it's 8V.

upload_2019-5-1_15-53-15.png


At 8V your 250 ohm resistor would pass about 24 mA through the Yellow LED but your units being Amps, show as 0.02... if you changed to mA it will show more resolution.
 

djsfantasi

Joined Apr 11, 2010
6,848
I get it about forward voltage
But with the yellow LED
V in = 5V and R = 250
didn't calculate forward Voltage and the output current is 20 mA
So the forward voltage of yellow LED is 0 V

If the forward voltage of yellow LED is 0 V the green LED should be 0 V too
isn't ?
Your calculations are backward. Forward voltage can’t be calculated. It’s a property of the LED.

Dendad gave the formula (or a variation hereof):
I = ( Vin - Vf ) / R​
If Vin=5V, R=250Ω and we assume that Vf=2V (you need to get this value from the LED datasheet, but this is just an example), this is how the calculations work.
I=(5-2)/250
=3/250
=0.012A​
Or 12mA.

In post #6, you ask why the green LED doesn’t light. In that post, Vin=3.5V and R=250Ω. Green LEDs typically have a forward voltage of 3.3V. In this case, we can calculate the current flowing through the circuit.
I=(3.5-3.3)/250
=0.2/250
=0.0008A​
Or 0.8mA. Hardly enough current to light an LED!
 
Top