Need advice on the simple solar powered lighting system

battery-chargingrelaysolar cell

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.

schematic

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.

enter image description here