Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Solar charged 3.7V battery. LDR circuit to drive 300ma

ThomsCircuit

Well-Known Member
This sample circuit uses an LDR to switch on a single LED with a 547 NPN. Could you assist me in updating this so it will drive a small strip of LED lights. They draw a little less than 300ma. I have some larger transistors and mosfets. The circuit runs off a 3.7v Li-ion battery that is charged from a 5V 3watt solar panel. A "charge controller board" manages the battery and prevents overcharging. When fully charged the output is 4.2 volts. The led strip is 5volt 280ma. The battery alone provides more than enough light despite the voltage but this NPN is not enough to drive more than 100ma.

Thank you
LDR.png
Screenshot 2025-05-28 at 21-25-30 Amazon.com 6PCS TP4056 Type-C USB Charging Module 5V 1A 1865...png
 
I believe I solved this. I traded out the NPN for a PNP. I had read that it may work better but could not find an example. Regardless, I found an example that uses a 2907. It make not be the most efficient, If you have and suggestions as i would like the circuit to be fully on or fully off. The pot is set at 10k. R2 and the LED represent the 280ma strip of leds.
pnp.png
 

This circuit won't work very well. The transistor needs to be flipped. Look at the simulation pics below. The transistor is in reverse active mode when wired with its emitter grounded like that which makes for very poor efficiency. For switching, the load should be on the collector and the emitter should be connected to the positive rail.

PNP.png


If you want to prevent the transistor from operating in its active region to prevent it from overheating, the easiest way to do that would be an op-amp wired as a comparator. An LM358 would do. If you have an actual comparator like an LM393 that would be even better. Here's how I would do it with an LM358:

1748513744797.png


Unless you have a rail-to-rail op-amp, you would have to modify the circuit if you want to use PNPs (build a sziklai pair using a BC547 and a 2N2907) because op-amps usually can't go right up to the positive rail which would prevent them from turning off a PNP BJT. If you have an open-collector output comparator like the LM393 though that would work. Alternatively, you can build a discrete schmitt trigger with a few transistors if you want to keep it all discrete although that would make the circuit more complex.
 
Last edited:
This circuit won't work very well. The transistor needs to be flipped. Look at the simulation pics below. The transistor is in reverse active mode when wired with its emitter grounded like that which makes for very poor efficiency. For switching, the load should be on the collector and the emitter should be connected to the positive rail.
I made a mistake documenting the example. This is the correct sample. (Left)
I also tried to interpret your sample. (Right) It did not work but im sure I mis-understood it. If you could use what I have done and tell me what I did wrong.
ldr-2.png
 
I made a mistake documenting the example. This is the correct sample. (Left)
I also tried to interpret your sample. (Right) It did not work but im sure I mis-understood it. If you could use what I have done and tell me what I did wrong.
View attachment 149982

The led should go on the collector in series with R5. The emitter can go straight to +5v because the 50k pot should limit the base current. Maybe put in a 1k resistor in series with the base so that you can't blow up the transistor if you set VR3 to zero by accident.
 
If you want to prevent the transistor from operating in its active region to prevent it from overheating, the easiest way to do that would be an op-amp wired as a comparator.
I do not have an LM358 but I do have a LM311. This group helped me design a Dusk to Dawn sensor a few years back but it was designed for 12 volts and used a relay. If it is easier perhaps we could alter this schematic to run on 3.7 volts and not use a relay.
Dusk to Dawn.png
 
Alright. This correct? The LED Strip does not need a current limiting resistor so I removed it.

View attachment 149984
This would work, but the issue is that your transistor's current gain is not high enough to bring the collector current up to 300mA. Assuming your li-ion cell is at 3.7v, there will be a 0.7v drop across the base-to-emitter junction leaving 3v for VR3 and R5. Assuming the combined resistance is 25k (pot set around halfway), the base current will be 3v / 25k = 120uA. Below is a screenshot from the datasheet of the 2n2907.

1748532156934.png



Even taking the best-case scenario current gain of 300, you would only get 120uA * 300 = 36mA of collector current.
If you have another 2n2907, you can connect two together to make a darlington pair. Alternatively, you can use a BC547 and a 2n2907 to make a sziklai pair. A sziklai pair would work better for this application because voltage drop from base to emitter remains 0.7v and does not nearly double like it does for darlingtons. Additionally, the BC547 has far more gain than the 2n2907 at low currents and so the szikali would have a much higher combined gain reducing the likelihood of entering the linear region (instead of saturation where you want it to be for switching) if you set the potentiometer to a higher value. For both the darlington and the sziklai pair, the combined current gain is obtained by multiplying the individual transistor beta (or hFE) values together. Also, if you have a logic-level MOSFET that would probably be the ideal solution for your circuit.

1748532680435.png
 

Attachments

  • 2N2907.PDF
    60 KB · Views: 4
I do not have an LM358 but I do have a LM311. This group helped me design a Dusk to Dawn sensor a few years back but it was designed for 12 volts and used a relay. If it is easier perhaps we could alter this schematic to run on 3.7 volts and not use a relay.
View attachment 149983
From what I can tell the LM311 does not seem to be designed to work at low supply voltages. The common-mode input voltage range does not go down to ground and the Texas Instruments datasheet specs all assume a supply voltage of +/- 15v although the datasheet does say it can theoretically operate at 3.5v min. Do you have any other op-amp or comparator?
1748533040671.png
 
If you have another 2n2907, you can connect two together to make a darlington pair.
I can do both but I'll focus on the Darlington pair with the (2) 2907's
First let me know if i interpreted your diagram correctly then second where do i connect the LED? And finally, where does the LRD fit in

ldr-3.png
 
This is correct. You can remove the 8.2 ohm resistor as it was just a stand-in for the led strip. Note that this may not necessarily work with the potentiometer maxed out becuase the base current will then be (3.7v - 1.2v) / 50k = 50uA. If we use the worst case datasheet values (50 for the transistor driving the LED and 100 for the lower current transistor) you will get a gain of 500 which will yield a maximum collector current of 250mA. This will probably still be fine because your strip is rated for 5v so it will probably draw less current at 3.7v. I would test it and see what happens.

Also, the two base-emitter junctions of the sziklai will clamp the LDR voltage to around 1.2v (because the LDR is in parallel with them) so it will turn on whenever the LDR drops 1.2v and the LDR voltage will not rise beyond that. It shouldn't affect the operation of the circuit but it's just something to keep in mind if you're troubleshooting the circuit.

edit: Just realised I wrote "sziklai" instead of "darlington". It should be "the two base-emitter junctions of the darlington".
 
Last edited:
This is correct. You can remove the 8.2 ohm resistor as it was just a stand-in for the led strip. Note that this may not necessarily work with the potentiometer maxed out becuase the base current will then be (3.7v - 1.2v) / 50k = 50uA. If we use the worst case datasheet values (50 for the transistor driving the LED and 100 for the lower current transistor) you will get a gain of 500 which will yield a maximum collector current of 250mA. This will probably still be fine because your strip is rated for 5v so it will probably draw less current at 3.7v. I would test it and see what happens.
So cool that I got it right! I will BB this and test tonight. Thank you so very much for your help with this.
 

Latest threads

Back
Top