Solar panel to power and detect light level

Hi I am working on a project to turn a light on when it gets dark (simply put it does do more ;)). The circuit is powered with a solar panel and battery. I just wanted to pass an idea I had by you guys. Normally I would use an LDR but thought that seeing as I have a solar panel I could use that instead (reducing component count and wire count lol).

I was thinking of using a blocking diode between the panel and the battery (both are low power) and picking the solar voltage off of the solar side of the diode:

SOLAR PANEL---------±--------->¦--------BATTERY (where the + is the point of detecting panel voltage and >¦ is the diode).

Anyone done this and do people think it would work?

Sure it would work… You could probably rig something up like an arduino voltmeter on the solar panel side of the diode (aka analog input). Use resistors to bring the voltage down to 5V.

baum, thats what I was thinking. A PD of 8.2k and 2k gives 5V @ 25V, which should be more then enough if the panel was off load and in full sunlight. Not sure how the battery would affect the voltage of the panel though?

jep it works fine I use a 9V solarpanel and a 6 cell battery pack and i use two 2.1k risitors to make voltage devider that i read in A1.

6x1.2V = 7.4V full charge 8.4V I also used a diode to prevent that solarpanel drains the battery a diode uses 0.6V so it all fits just fine and it works perfect.

Cool thanks Robby!