Friday, September 11, 2009

Solar Powered Arduino

I am working on an outdoor LED coffee table. The idea is for it to charge up all day long and then to drive a bunch of LEDs (blinking in cool patterns via an Arduino) for as long as it has power at night.

There are 5 components to the electronics:

  • The Arduino

  • The LED driver

  • Solar Cells

  • Battery pack

  • Charging/light sensor circuit

In the photo, clockwise from the top left are the solarcells, the battery, the charging circuit and finally the Arduino (actually a boarduino), LEDs, and LED driver chip.

The Solar Cells

I chose some flexible solar cells I had lying around from It turned out that they are a great choice for generic Arduino use because a single thin film cell generates 7.2 volts which is enough to power an Arduino! In contrast, one of the silicon cells only produces .5 volts (you need from 4.5 to 5.5 volts to power an Arduino).

In fact just one of the cells pictured here can power the arduino even in the shade. You could image one of these on top of a small device... however, they are not ideal for my project because I will have plenty of room under the glass of my table to put a lot of cells. And the silicon cells are cheaper per watt and more efficient per unit area.

The Batteries

I chose 4 1.2 volt Nmh (nickel-metal-hydride) batteries. I chose Nmh batteries because they can be trickle charged with a very simple circuit. They actually generate 1.3 (5.2 total) volts when fully charged. But that is less then the Arduino's limit of 5.5 volts, so I can connect directly to the Arduino's 5v line instead of the Vin. This bypasses the Arduino's voltage regulator and so is much more efficient but a little dangerous. It for some reason the voltage ever does exceed 5.5 volts, I could burn out the chip.

Charging Circuit

Basically, when the battery voltage is above that generated by the solar cells, current can flow from the top through the base (middle) of the upper right transistor and then backwards through the solar cells. This turns on the transistor, which then turns on the bigger transistor at the bottom and so power can flow through the Arduino. So the solar cells themselves are used both to charge and to sense when it gets dark. In practice, they turn the system on at dusk, so I put the Arduino to sleep for 45 minutes before actually turning on the LEDs.

The diode near the solar cells is so cells can only charge the battery, the battery can't attempt to "charge" the cells!

And finally a close up of the charging circuit itself:

The orange wires to the left go to the Arduino. The upper right ones go to the battery and the lower right to the cells. The wires on the bottom of the photo are basically electrical ground.

The LEDs

I use an M5451 constant-current LED driver chip to light the LEDs. If you are interested in this, there is a lot more information in prior blog posts, or at:

Share your solar projects! :-)


  1. what diode and transistor you used?

  2. The diode is actually made from germanium since germanium diodes drop .2 volts instead of the standard .7 volts for silicon. But a standard silicon diode should work just fine; but you will lose a more energy.

    There are 2 transistors, one PNP and one NPN. There is not enough voltage or current to really require a some special transistor, anything you have lying around will likely work. For example 2N3906 and 2N3904.

  3. How much light do the LEDs in this project emit? can I email you? I'd like to discuss this and see what you think about a couple of projects that I am currently conceptualizing. Thanks, Cary

  4. The amount of light that can be emitted is limited by how much power can be gathered by the solar cells and stored by the batteries. So if you need more, you can always add more solar cells or batteries! What I have here is enough to run 30-70 LEDs for most of the night, but not full on -- I am blinking them in various patterns.

    You can contact me at g dot andrew dot stone at gmail dot com.

  5. Great!
    Congratulations for your approach!

    I have three of questions:
    1) what are exactly the components? I see 7 components in your picture, but only 6 in the diagram above.
    What i deduced form your picture and your post:
    R1 = 10 Ohms (between batteries and solar cell)
    R2 = 270 KOhms (near T1)
    R3 = 2,2 KOhms (near T2)
    R4 = 4,7 Ohms (where you you wire it? It is the black one in your picture))
    D1 = germanium... (Value?)
    T1 = 2N3906 (this one near the solar cell?)
    T2 = 2N3904 (this one near the arduino?)

    So, could you post a plot with the exact location of each component and their value? Thanks!!

    2) May be could be interesting to wire a capacitor until the wires reaches the arduino board. In that case you could have a more stable power... What do you thing?

    3) i have a 9V 300mA, Do you think that it could be enough to charge 6 NiMH batteries (1.2V each one... 7.2 Volts in total). Thanks!!