I'm building a simple circuit in which a solar panel will charge a 12 V battery during the day and then switch over to battery power during at night to light up a few bulbs. I'm using an LDR which will trigger the NPN at night and switch the relay, as shown in my circuit schematic below. I'm very inexperienced so I'd like if you can tell me what is wrong or what could be done better. I'm also wondering if there is a better approach to activating the relay than using a 9V battery. Thank you.
Need advice on the simple solar powered lighting system
battery-chargingrelaysolar cell
Related Solutions
Under charge currents of << C/1 a Nimh cell is fully charged at about 1.45V. Using 1.4V/cell gives you slight lee way at the loss of a small amount of capacity. Slightly lower again is even safer.
If you don't mind wasting solar energy (and that should not be a problem here), feed the batteries through a diode (if there is not one in the panel already, and clamp the battery voltage at 5.6V (1.4V/cell). [ Or 5.4V at 1.35V/cell for good safety].
I assume battery temperatures are in the 20 -30C range usually - best voltage will vary somewhat with temperature but that should work well enough.
That panel is perhaps 2 Watts (you may have a spec there or can measure short circuit current in full sun). If so then Imax is about atts/Vmax_power = say 2W / 15V =~~ 130 mA. Actual could be 50 200 MA - neither extreme being too likely.
100 - 200 mA is too much for a cheap TL431 clamp regulator by itself.
A TL431 driving a TO220 P Channel MOSFET (plus a few resistors) or an N Channel MOSFET plus any small PNP transistor will give you a clamp regulator suitable for the task.
TL431 divider string top resistor can be maybe 100k so drain on battery when there is no sun is around 50 uA = not a problem in this application.
Or you could use a standard series regulator such as an LM317 plus 2 resistors set to 5.6V would work but backfeed via the regulator and resistors adds slight complexity.
There are other ways but the TL431 + MOSFET clamp should work well enough.
TL431 "turns on" when gate voltage >= 2.5V.
Z1 on pulls Q1 gate low turns Q1 on which dissipates excess energy in Q1 + Rload.
Rload is optional if MOSFET can dissipate all energy OK - but usually using a resistor avoids needing a heatsink.
Rload = V/I <= (Vbattery_max - V_FET_on) / I_panel_max
V_FET_ON is the voltage drop across the fully on MOSFET
= Rdson x I_panel_max.
With a MOSFET with Rdson = say 0.1 Ohm then on voltage at say 150 mA =
= V = IR = 0.15 x 0.1 = 15 millivolts, so a half decent FET needs minimal allowance for on voltage.
Say V_FET_on = 0.1V, Imax = 150 mA, Vbat max = 5.5V.
Rload = V/I = (5.5 - 0.1) / 0.150 = <= 36 Ohms.
33 Ohms OK.
Lower OK but FET will then make up some of load and dissipation may be higher.
simulate this circuit – Schematic created using CircuitLab
LM336 datasheet - All LM336 datasheets I found were poor (Faichild, TI, LT).NONE gave adj pin current.
If Vclamp is not correct R3 & R2 may need to be lowered while maintaining 1.2:1 ratio.
eg 33k : 27K
Does the circuit make sense and do you see it working?
The circuit is rubbish (I'm not noted for my human skills BTW) because the top NPN will only ever produce about 8.2 volts at the emitter to charge the battery - you need to consider using a PNP transistor wired differently.
Also the two voltage sources are floating i.e. their negative connections are floating and please don't whine saying that I should presume they are connected to ground.
Accuracy is something that needs to be a commitment in electronics.
Also, the LED shown in red isn't described as being a 12V type and therefore it might need a current limiter BUT why is it there at all when you have the other LED in parallel?
I also read that you are using lamps but, please get used to the fact that a circuit diagram (and what it contains) is the gospel and, contradicting it with statements about lamps is really just a sign of laziness when using the circuit diagram editor. Get it right in the editor.
In other words, draw an accurate circuit to the best of your ability and let that speak for itself. Transistors all round are probably the best option when it comes to Q3.
Best Answer
Since you have a PV you won't need an LDR, and since you have a 12V battery you won't need any other battery, just hook up the circuit shown below.
In operation, when it's light outside and the PV is charging the battery, it's also turning on Q1, which will energize K1 and pull COM away from NC, breaking the circuit between the battery and the lamps, turning them off.
Then when nighttime comes and the PV is no longer generating anything, there'll be no current into Q1's base, turning it off. That will de-energize the relay and COM will spring back to NC, closing the circuit between the battery and the lamps, and they'll turn on.
R1 is used to adjust when the lights turn on, and is rotated just enough to cause the lights to turn on when you decide it's dark enough to use them. R2 is there to make sure that if you accidentally rotate the pot too close to the PV's 14V output you won't fry Q1, and K1 is just one of those garden-variety relays with a 400 milliwatt coil and with contacts that can break 12 volts DC with the total lamp current through them. There's noting holy about the coil, though, and if you want to get something more sensitive, (which will allow more current into the battery when it's charging) no problem.