@Mike Odom
Sorry for the novice question, but what is a resistor divider and how is it being used in this circuit? Is it like a voltage divider? If i connect this to an ADC pin, do I also now need to connect something to the AREF pin on my MCU?
I use AVR controllers and you have a variety of selections for AREF. External in, internal VCC, or internal VCC/2. I'm sure PICs have somewhat of the same feature, but if not then you can connect it to vcc. Yes, a resistor divider divides the voltage, so at 12V battery voltage you have 5 volts into your circuit, and at 9V battery you would read 3.75V.
@mneary
Fixed the AVCC problem. Thanks!
https://i891.photobucket.com/albums/ac120/lockdown1289/SolarRacingRobotSchematic20-1.jpg
So, if I understand correctly, normal voltage regulators regulate the voltage downwards and increase current while boost converters regulate voltage upwards and lower current. Is there a way I can keep my voltage regulated at 5v if I start off with a higher source voltage than 5v that slowly decreases below 5v? This way I would be able to keep everything working until I'm able to charge my capacitors again, although at the cost of current.
well, that is how voltage regulators work. you start with a higher voltage, then you regulate it down to the desired voltage. This is called a LINEAR regulator and they are not very efficient. You still have to dissipate an amount of power equal to your source voltage, not your delivery voltage. so if you start with 12v, regulate it down to 5v, and draw 1A, you dissipate 5W on your load but also 7W on the regulator, for 12W (or 12V x 1A) total. Switching regulators take a different approach. They push charge through an LC circuit to either up the voltage or lower the voltage, therefore, they deliver the correct amount of power with little used up in the process, so are much more efficient. For a 12V in, 5V 1A out switcher, the circuit will pull only about half an amp from the 12v supply, as 12V x .41666A = 5W. It will draw a little more to supply the quiescent current of the switching circuit plus there will (always) be losses in the parts (dissipated as heat), but they are about 80-90% efficient. This is known as a Buck converter, it lowers the voltage. One that raises the voltage is known as a boost converter. The source current will be larger than the supplied current to make up the power difference.
However, building a switching supply may be a little over your head.
But, if you switch the motors off when the voltage hits about 8V, then you should have enough left to idle your micro until they charge back up.