Here is one simple example of how to make a DIY charge controller, built around a 555 timer IC. This chip has 2 inputs (pins 2 and 6). It compares these input voltages to a set of reference voltages that are based on the supply voltage. If the voltage at pin 2 drops below 1/3 of the supply voltage, then the output at pin 3 goes HIGH. If the voltage at pin 6 goes above 2/3 of the supply voltage, then the output at pin 3 goes LOW.
By using the 7805 voltage regulator, we can fix the supply voltage to 5 volts. So 1/3 of the supply voltage will always be 1.66V and 2/3 of the supply voltage will always be 3.33V.
The input voltages at pins 2 and 6 are dependent on the voltage of the battery. Each input has a voltage divider that is made of 2 resistors. The ratio of the 2 resistors determines what percentage of the battery voltage is sent to the input pins. In this example, the pin 2 voltage divider uses a 68 kohm resistor and a 10 kohm resistor. This means that the voltage at pin 2 will always be 12.8 percent of the battery’s voltage. Similarly, the voltage divider at pin 6 uses a 33 kohm resistor and a 10 kohm resistor. This means that the voltage at pin 6 will always be 23.2 percent of the battery’s voltage. This is only approximate because all resistors will vary a little from the indicated value.
When the battery’s voltage goes above 14.4 volts, the output of the 555 goes LOW and activates the relay. This disconnects the battery from the solar panel. When the battery’s voltage drops below 13 volts, the output of the 555 will go HIGH and deactivate the relay. This resets the system for another charging cycle. In the case of cordless power tool batteries, this will happen when you disconnect the battery. But in a typical solar system, the battery stays connected and the voltage will drop as the power is used.
If your battery has a different operating voltage, you can change the voltage setting of the charge controller by using different values for the resistors. The 33 kohm resistor can be replaced using the formula R = (3 x Vcutoff) – 10. The 68 kohm resistor can be replaced using the formula R = (6 x Vreset) – 10.