- Arduino Duemilanove Board
- 12V Solar Panel
- 1N4007 Diode
- 25V 100uF Capacitor
- 9V Rechargeable Battery and connector
- A breadboard and some wires (suggested red and black)
- A multimeter to measure tensions
1) Green Power
Arduino datasheet suggests us to power it with 6-20V, being aware that the upper limit could be dangerous. It seems that 9V fits well, and it’s of course very easy to find a 9V battery in a shop. But if we really want to start our own little Green Revolution, we would like to get this electricity from some renewable source, e.g. the Sun, so we need a solar panel. It is a device made up of solar (or photovoltaic) cells, which convert light directly into electricity by the photovoltaic effect.
Now, one problem is that you can be sure that a solar panel will not provide a 9V tension constantly: As everybody know, the Sun walks through the sky during the day, and the energy that reach our panel (even given an ideal 100% conversion efficiency) changes according to the depth of air that the sun rays cross. As a matter of fact, at noon this depth is lower than at dawn or dusk. Moreover, during the night the solar panel is completely useless. So? If you’re smart enough (or if you google it), the solution is to use the solar panel to charge a 9V rechargeable battery, which in turn powers the Arduino board.
There are many solar panels on the market, so which one fits best with our Arduino board? My rule of thumb is to minimize the cost while maximizing the voltage. You can buy a 12V solar panel for ~20€, probably less. Just remember that we want to charge a 9V battery, so it’s better if our solar panel provides more than 9V.
2) Re-charging the battery
This part is the core of our little experiment. We want to wire up the board so that once the circuit is working fine, we just have to put the Arduino board in parallel to power it up.
2.1) Basic setup (wrong one)
In a circuit, electrical current (I) flows from the positive (+) outlet of the battery to the negative (-) one, just like a river flows from the mountain to the sea. Anyway, remember that in this case the charge carriers, the electrons, flows the other way around. Now, if you connect a battery to a load (e.g. a resistance), you basically deplete the battery extracting the accumulated charges. If you want to re-charge the battery, you have to push electrons inside the battery. Thus, the idea is to connect the same-sign sides of the solar panel and the battery, given that the solar panel is more positive (12V) than the battery (9V). This idea is good, but what happens during the night? The battery will send the electrons to the solar panel because now the battery (9V) is “more positive” than the panel (ideally 0V). We don’t really want that…
2.2) Basic setup (the right one)
We have to find a way to prevent this “night-effect”: The solution resides in the use of a diode. The most common function of a diode is in fact to allow an electric current in one direction (called the forward biased condition) and to block the current in the opposite direction (the reverse biased condition). Take a look at the 1N4007 diode: at one end (the cathode) there is a gray ring: The current can’t flow from this side (but you can check with a multimeter that there is a very small voltage anyway of about 0.6V). Now you are free to connect all the devices this way:
solar panel (+) —> (-) diode (+) –> (+) battery (-) –> (-) solar panel
you can convince yourself that during the night the current will not flow from the battery to the solar panel.
3) Connecting the Arduino board
Now that we are able to charge the battery with the solar panel, we can link the Arduino board to the whole circuit. The idea is simple: connect the (+)VIN terminal of Arduino to the (+) terminal of the battery/diode, and the (-) GND terminal to the common ground of the battery/solar panel. This way, Arduino will drain current from the “more positive” generator between the battery and the solar panel. As I said before, the problem is that the current generated by the panel is not constant. A trick to “smooth out” the voltage is to insert a capacitor between the (+) and (-) terminals of Arduino.
4) A few comments before I leave
You’ve probably seen around those fantastic devices that turns solar panels towards the Sun during the day in order to maximize the energy absorption. You could do that as well, but be aware of the fact that 12V are too much for the Arduino analog inputs! Maybe we will talk about that in next post.