How to calculate resistor value in transistor light detector circuit? Thanks in advance.......

Thread Starter

Thinn

Joined Feb 4, 2015
21
The below have two kinds of circuits, used one bjt and two bjts.
If you have different voltage to input then you need to using different resistor, 3.3K for 14V and 1.075K for 5V, you can try 1k and 1.2K.
The first you can measure the current of relay how much current is it drawn.

View attachment 80628[/QUOTE

I just confused for two ckt. If I want to use different voltage, I need to make different ckt. Did you mean like this?
For my ckt, when the voltage is reach 14V, I want the LED is off and when the voltage reach 5V LED is on. I use PV panel like photoresistor.
The problem is when I test this ckt only 2 LED light, the relay is work well(even I don't know the what value of resistor should be in there)
but I draw 2A from this ckt, relay is making sound continuously and LED light is dim.
 

ScottWang

Joined Aug 23, 2012
7,409
but I draw 2A from this ckt, relay is making sound continuously and light is dim.
That is the current not enough to drive the relay, it means that the current of ckt is not enough when you draw 2A from ckt.
 

ScottWang

Joined Aug 23, 2012
7,409
I already given you two circuits, the two bjts one was that you used, and I also mentioned that to reduce the base of resistor, have you try it when you using different Vin as 5V and 14V.
 

Thread Starter

Thinn

Joined Feb 4, 2015
21
I already given you two circuits, the two bjts one was that you used, and I also mentioned that to reduce the base of resistor, have you try it when you using different Vin as 5V and 14V.
Ok, Today I'll test with this ckt and back to you. Thanks again Scott :)
 

ScottWang

Joined Aug 23, 2012
7,409
If you could change to the circuit that I attached is better, otherwise you need to take R4 away in your original circuit, because it will waste some current.
 

Thread Starter

Thinn

Joined Feb 4, 2015
21
If you could change to the circuit that I attached is better, otherwise you need to take R4 away in your original circuit, because it will waste some current.
I'll changed next ckt like your attached photo :) but I have still trouble with relay I don't know how to hookup wire for those 5 pin. For original ckt, I wonder if you could tell me calculation of R2 and R3? Also I would like to know how to know R4 is waste some current. Maybe my english is bad but I just want to keep in mine for all those knowledge that you share me. That's why I ask you that kind of question. Thanks for everything Scott :)
 

ScottWang

Joined Aug 23, 2012
7,409
I'll changed next ckt like your attached photo :) but I have still trouble with relay I don't know how to hookup wire for those 5 pin. For original ckt, I wonder if you could tell me calculation of R2 and R3? Also I would like to know how to know R4 is waste some current. Maybe my english is bad but I just want to keep in mine for all those knowledge that you share me. That's why I ask you that kind of question. Thanks for everything Scott :)
Could you measure the voltage for the e of bjt which is the relay driver?
Because your circuit used the e of bjt to drive the relay, so the voltage cross on the relay will be reduce about 1.1V, it is close to 10.9V,
I_Relay=10.9V/400Ω = 27.25mA.
I_Re = 10.9V/1.8K = 6mA, this will be wasted for nothing.
If the relay needs 30mA at least, how come it will works properly?
You could try to reduce the values of resistor between bjt to bjt or just take it away, and try again.
 

Thread Starter

Thinn

Joined Feb 4, 2015
21
Could you measure the voltage for the e of bjt which is the relay driver?
Because your circuit used the e of bjt to drive the relay, so the voltage cross on the relay will be reduce about 1.1V, it is close to 10.9V,
I_Relay=10.9V/400Ω = 27.25mA.
I_Re = 10.9V/1.8K = 6mA, this will be wasted for nothing.
If the relay needs 30mA at least, how come it will works properly?
You could try to reduce the values of resistor between bjt to bjt or just take it away, and try again.
Thanks, now I understand it. I'll try it again. How's about relay wiring????? I confuse how to hookup wire on those 5 pin. Input have 3 pin and other has NO and NC.
 

ScottWang

Joined Aug 23, 2012
7,409
Thanks, now I understand it. I'll try it again. How's about relay wiring????? I confuse how to hookup wire on those 5 pin. Input have 3 pin and other has NO and NC.
Normally only using four pins, two pins for coil, two pins are COM,NC, if you knew the resistance of relay then you can measure the other two pins that they should be open.
 

ScottWang

Joined Aug 23, 2012
7,409
Hello Scott, I tried to use only one bjt, when I connect to the battery, LED is work well but when I give Vin=12V LED is still on. Is there something wrong with ckt that I hookup? Please check attached photo.
1. Change the Rb(1K) to 4.7k~6.8k.
2. In parallel a 2.2K with b,e of the bjt.
3. In series a 560Ω with led for 3V/20mA/5mm, or a 1.2K with led for 2V/10mA/3mm.
 

ScottWang

Joined Aug 23, 2012
7,409
Please can you show it with picture????
The last post was posted from a cellphone far from my place, so I can't draw any anything, the below is a test circuit, your need to in parallel a diode with relay to protect the bjt from EMF of relay when relay discharging.

12Vrelay-oneBjt_03_Thinn_ScottWang.gif
 

Thread Starter

Thinn

Joined Feb 4, 2015
21
The last post was posted from a cellphone far from my place, so I can't draw any anything, the below is a test circuit, your need to in parallel a diode with relay to protect the bjt from EMF of relay when relay discharging.

View attachment 81062
Thanks so much for helping me. I wonder could you explain me why we need to put R2 and R3? I aslo would like to know calculation of it.
For R3, I used 12V LED strip and it draw around 2A. That's why which value of resistor should I choose?
 

ScottWang

Joined Aug 23, 2012
7,409
R2 is used to avoid when the Vin is floating and turn off the bjt quickly, the current of R2 is less than Ib*1/4 of bjt, you can using a 1K+10K(pot) to adjust and get the value by your own, different value will affecting the relay has a different response time.

R3 is limited the current for normal 2V/10mA or 3V/20mA LEDs.
2V/10mA/3mm LED, use 80% as 8mA:
R = (12V-2V)/8mA = 1250Ω, choose 1.2K

3V/20mA/5mm LED, use 80% as 16mA:
R=(12V-3V)/16mA=562.5Ω, choose 560Ω.

If you use 12V LED strip then it should be has the datasheet to check, some 12V LED strip just adding a 12V and offering the enough current then is ok.
 
Top