I'm a teacher with basic knowledge in electronics. My experience is really on programming. However, I'm supporting a group of students in a project to build a simple battery charger using a solar panel. One of the students is familiar with Arduino. He decided to use the board to monitor the battery charge and automatically "activate" the solar panel.
He is using a clever association of resistors to create a voltage divider and monitor the charge in the battery. Their design includes a relay to activate the connection between the battery and the solar panel. Here is a diagram of the design we are planing to build.
We were able to test the battery monitor and it works perfectly. However, now we are going to connect the solar panel and I'm afraid to burn the whole circuit, including our board. We would appreciate any advice on the design. We are using a 6v 2A battery and a 6V 1800mA solar panel.
As a note, this is a students project. The main idea here is to get them excited about electronics and in solving problems. The circuit isn't intended to work for long periods or to be efficient. It just need to work without smoking.
Welcome to the forums.
The following link on a basic PV solar charger using Arduino may provide you with some ideas.
For a more effective and updated circuit.
Ardunio do not have sufficient current to drive most of the relay, you need a transistor.
Thanks Paul and Bill for the quick answers. I forgot to mention that I'm using a 2 relays shield. So I suppose the shield uses adequate relays to work with the arduino current. But I really didn't know of the need of a transistor to use a discrete relay. So it was an important lesson.
I updated my project using the diagrams you shared.
Thanks for the support.
I assume the battery is rechargeable.
The diode in your circuit will prevent any recharging of the battery.
The black wire from the relay shield will need to be connected to ground on the top row of your breadboard.
Solar panels often contain a "blocking" diode so they can be permanently connected directly to a battery with no need for a relay.
I can see how the relay can connect the solar panel to the battery when the voltage from the solar panel becomes greater than the battery voltage. However there is a problem knowing when the connection needs to be broken because, once connected, the solar cell voltage will always be the same as the battery voltage. If the solar cell does not contain a blocking diode, current can flow from the battery into the solar cell if the light level is not sufficient to charge the battery.
As Archibald said, I would reverse the blocking diode shown on your circuit to allow it to charge the battery. I assume you're talking about a 6V lead-acid battery ? These battery can be charge as high as 6.3-6.9V. Make sure your solar panel open circuit voltage is higher then that plus the 0.7V of the diode forward voltage. For comparaison, an appropriate solar panel to charge a car battery (12.6-13.8V) has an open circuit voltage of 18-25V. I thought to talk about a voltage regulator or a beefy TIP125 PNP Darlington transistor but it wouldn't be as fun as a relay indeed. But I have an other suggestion for you if the time allow it. Why not to add a sensing resistor to measure the solar cell output current using an analog input of the Arduino. This way you can calculate the average daily output power and monitor it from the serial monitor... By exemple something like a 1W (0.25V2Afactor 2) 0.125 Ohm (0.25V/2A) can do the trick if they are interested (Analog signal around : 0.25V/5V*1023= 51).