I've read some posts about charging batteries with a solar panel to be used with Arduino. But none of them (at least, none I've read) fits what I need. So I designed a simple circuit.
Before building it, I'd like to have some advice if it'll work properly. The schematics is attached. I will run a software on Arduino that reads A0 and when the voltage is 5v it sends a HIGH signal to 0. That is meant to stop the charging process of the 9v battery.
Actually, 9 volts is perfectly OK. The Arduino uses a voltage regulator. So, you can plug up to a 12v battery (see http://arduino.cc/en/Main/ArduinoBoardUno , for example).
Actually, 9 volts is perfectly OK. The Arduino uses a voltage regulator.
I certainly know that (I am a God member, ;D).
However your drawing shows the 9vdc battery wired to the 5v pin, which would smoke the chip.
Lots of different ways to power an Arduino. Lots of people power their arduino boards directly via the 5vdc pin, using batteries or external regulated power supplies, however they must not exceed recommended 5.5vdc maximum voltage to this pin.
Looks practical and pretty simple. You would need to test it out and of course the software would have to be tested and voltage switching values worked out.
I should have put Arduino and not AVR on my schematics.