One of the big things on the to-do list is a charging circuit. I need a charging circuit to allow the solar panel to charge the battery. Lucky for me, the Arduino Feather 32u4 has a built-in charging circuit, but then why would I need a charging circuit?
I bought a little voltage regulator for the solar panel which makes sure that the voltage stays at 5V. If the voltage goes below 5V and has enough current, then the output voltage will be 5V with a little less current. I’ve done this because the charging circuit does not work with lower than 5V. After some testing, I found that the built-in charging circuit stops charging the battery if the solar panel goes through the process of losing sunlight, then regaining the sunlight. In order to fix the issue, I can disconnect the power line from the solar panel to the device when there is no sun. So the charging circuit isn’t actually a charging circuit, but rather a charging enable circuit.
My original design used an N-MOSFET. I used an N-MOSFET because everyone uses NPN BJT transistors, so why not use an N-MOSFET. After learning about MOSFETs, I created my V1 charging circuit. It had a voltage divider to probe if the solar panel was getting any sun or not. The circuit with the N-MOSFET had to be connected to the solar panel’s ground: The drain pin should be connected to the load, and N-MOSFETs drain should be more positive than the source (See below image for more detail).
The only problem as you might have guessed is that I could not check the voltage of the solar panel without the N-MOSFET enabled, because the ground was being disconnected, and so the measured voltage had no reference.
I couldn’t find the schematic, or picture of the original circuit.
After a few months of ignoring the enable circuit, I decided to work on it again. After learning a bit more about P-MOSFETs, I found that the only difference between them is the voltage of the source and drain. The P-MOSFETs drain should be more negative than the source, so the MOSFET should be placed between V+ and your load.
After some experimenting with the new circuit on a breadboard, I found that I don’t need the voltage regulator. In fact, the voltage regulator was causing all the problems that made me design the charge enable circuit. I don’t need the voltage regulator, because the solar panel is a 5V panel, and won’t be able to produce enough current to step the voltage up if it isn’t even at 5V.
Just because the solar panel now charges the Feather doesn’t mean that creating a new charge enable circuit isn’t useful. If the temperature is too cold or too hot, I shouldn’t allow the Li-ion battery to be charged–The temperature range for Li-ion batteries are 32F to 113F. I don’t know how I will insulate the battery to help prevent reaching those temperature ranges, but that is a problem for another day.