# Calculating Optimal Battery Usage

Hello,

I'm working on a small LED project for a friend's wedding - 24 LEDs that randomly come on and off to imitate fireflies. I need to make it mobile - preferably solar powered so after the wedding it could run a couple hours a night at most. I have everything figured out and working just off of USB or a 5V ac/dc converter, but I'm having a hard time wrapping my mind around the best way to make use of batteries and a solar panel. I'm a beginner here and have done a few hours of research on this, but still just can't put the pieces together.

I know my device only draws a max of 80mA - just the arduino and a couple LEDs that fade on and off every few seconds. So how do I figure out the best way to make use of batteries? If I use a 9V, does that mean the arduino steps it down to 5V and wastes voltage through heat, or does that just mean I'll be able to pull 5V longer? Is it better to get as close to a 5v source as possible, like using 6V (1.2v*5 or 1.5*4) batteries?

And if I were to go the 1.2V*5 (rechargeable) batteries route, as far as the solar panel goes, do I need a solar cell that is more than 6V, or could I use a 2V panel, just taking much longer to charge? My gut says no on this one, but I couldn't give an explanation. Since it's only on a couple hours at a time at most and with such a small current draw, I wouldn't think it would take much to charge up the batteries, but I'm just not sure! I want to make the best use of money while trying to make this as efficient as possible.

I'm sure these are simple questions for experienced folk, and it will probably click if someone can relate some of these things together for me.

Thank you!

bnashville

The best voltage is 7.5V at the barrel jack or at VIN. However, you might use the 5V pin (it is a 5V output) to power the Arduino. In some cases the voltage regulator was damaged, but that is very rare, and you can add a protection diode 1N4007 from 5V to VIN. Then the whole world of voltages and high efficiency is open, since then you can use DC-DC converters that power the 5V.

You could use a single 3.7V Li-ion battery and use a DC-DC converter (buck boost converter) to make 5V. You could use a 9V or 12V battery pack and use a DC-DC converter (step down) to make 5V.

You can not use a 2V solar panel and charge a 6V battery. My suggestion is to buy a solar set plus battery and use a DC-DC converter to make the proper voltage for the Arduino. That can be 7.5V to the barrel jack or VIN or 5V directly into the 5V pin (add protection diode from 5V to VIN).

Which Arduino board are you using ?

This is a charger, add a solar panel and a Li-ion or Lipo battery: http://www.adafruit.com/product/390 In the video below, you see that board at the end:

Thank you, this pointed me in the right direction. If I understand correctly, I can attach a 4-6v solar panel to this:

http://www.ebay.com/itm/10pcs-Micro-USB-5V-1A-Lithium-Battery-Charging-Board-Charger-Module-for-Arduino-/351179017007?pt=Battery_Chargers&hash=item51c3e68b2f

then from the 3.7V battery to a DC-DC converter like this:

http://www.ebay.com/itm/DC-DC-Boost-Converter-Step-Up-Module-1-5V-to-5V-500mA-for-Phone-MP4-MP3-Arduino-/131040239382?pt=LH_DefaultDomain_0&hash=item1e829b5f16

Does this work? I need to make it as inexpensive as possible.

I am prototyping using an UNO, but will be using an Arduino Pro Mini for the final project.

Thank you!

bnashville

That charger is for usb power input, it only works for 4.5 to 5.5V input. I think you need something better for solar power input.

The DC-DC converter from 1-5 to 5V is okay.

By the way, a 8MHz Arduino can run directly on a Li-ion cell without the 5V.

On that charger, there is a + and - in next to the USB jack, can't I just attach a 5v panel to those?

And I have the 5V Pro Mini, but if I just pick up the 3.3v version, you're saying I can use a standard 3.7V battery without the DC-DC boost converter. Then I'll just need to change my LED resistor values for the 3.3v output instead of 5V correct?

Thanks so much, you have been very helpful.

bnashville

Yes and yes.

The +IN and -IN are connected to the USB 5V, you can also use those. You mean such a panel with electronics in it to charge devices via a usb 5V connector ? Those deliver 5V, so that is okay.

A Li-ion or Lipo cell is 3.0V to 4.2V. An ATmega328p chip at 8MHz will run okay on that voltage range. It is only the 16MHz that requires 5V.

A 8MHz 3.3V Pro Mini has a voltage regulator for 3.3V. You can use it, or you can bypass it. I think the 'raw' pin is the input for the voltage regulator and the 'vcc' is the output of the regulator.

What about safety ? If i'm correct, the official Pro Mini has a fuse and the cheap Ebay clones don't. You don't want to shortcut the Li-ion cell.

Sorry, I meant connecting a 5V solar panel to the charging module. I also found a different one that has space to implement a temperature sensor, but I'm still looking into that. (http://www.ebay.com/itm/10pcs-TP4056-5V-1A-Lithium-Battery-Charging-Board-Charger-Module-for-Arduino-new-/331301650537?pt=LH_DefaultDomain_0&hash=item4d231e0069)

Thanks for bringing the safety issue to my attention, I will certainly look in to this further. The 8Mhz Pro Mini I'm looking at (link below) does say it is 'over current protected' but I will look further in to the differences between the Ebay clones and the official versions.

http://www.ebay.com/itm/5PCS-Pro-Mini-atmega328-3-3V-8M-board-Replace-ATmega128-Arduino-Compatible-Nano-/310941837187?pt=LH_DefaultDomain_0&hash=item486593e783

Thanks

I also ment a 5V solar panel to the charger module. But only if that is a regulated 5.0V.

The new link has a charger module with a input range up to 8V. I don't know if that is okay for just any solar panel. I rather see a charger specifically for a solar panel. Search Ebay for : solar lipo charger I can't find the specifitions for them yet.