Most efficient way to power an Arduino from a 12V battery array

Hi all,

I have 12V high-capacity Li-ion battery array, regulated by a solar charge controller. The purpose of the project is to make a low-power-consumption controller for a Smart Terrarium, which will receive external power (USB charging in parallel with solar power when available).

I am just wondering what is the best way to power my Arduino Uno from this battery array. I have tested the array, and it doesn't fluctuate much (<0.1V under 3A loads), but it will output the voltage of the batteries, which is anywhere from 12.6V at full charge to 10.8V at cutoff voltage. The methods I have considered are:

  • directly to VIN and GND ports: this is the most convenient for me, and according to the specification, the VIN pin can take 12V input. I understand the lack of reverse polarity protection (I would just need to be extra careful), but the main issue from my understanding, the Arduino will need to dissipate the extra 7V as heat, which is in terms of my efficiency requirements (I would like to not dissipate over 50% of the power while operating the Arudino)
  • powering via the barrel jack is a second option, however, as far as I am aware, this uses the same voltage regulator, so I am at no more of an advantage than with the above option, except the reverse polarity protection
  • using my own voltage regulator: I only own step-up regulators from previous projects; wondering what kind of regulator I would need to purchase if this is my best options. I am under the impression that switching DC-DC regulators are pretty efficient, but would it be stable under such a large range of input voltages, and would connect the output to VIN, barrel jack, or USB port?
  • are there any other better options I have not considered yet?

Thank you for your help!

Use a switching (buck) converter for efficiency. Feed the 5V output into the 5V pin. Don't worry about the variation in input voltage, any converter will deal with that without difficulty.

Given the choices I would also go with a buck converter. Inexpensive and efficient. A Google of "5 volt buck converter" will bring up dozens of them.

Ron

Try and completely forget about the UNO having a "Vin" or "Barrel jack". :roll_eyes:

You will almost certainly have to power other parts - such as relays or sensors - from the 5 V as well, so you need the 5 V switchmode "buck" regulator.

And a UNO is cumbersome for practical projects - a Nano would be more appropriate and unless you need to connect it to a PC again, you do not need the USB interface so a Pro Mini does not have that to waste your power.

Do you want the Arduino to be powered continuously, or to go into sleep mode? If the latter
you'll probably need to ensure the voltage converter is efficient at very low currents.

I am under the impression that switching DC-DC regulators are pretty efficient

Correct. 12V to 5V through a linear regulator is less than 50% efficient. 90% or better efficiency is not unusual for a switching regulator. You get more current out of the regulator than you are drawing from the battery (at a lower voltage). Except under no-current or low-current conditions it may take more current just to run the regulator.

but would it be stable under such a large range of input voltages

You'd have to check the specs but they are generally similar to linear regulators. There are some boost/buck regulators that will boost the voltage if necessary to maintain the regulated output voltage. (But in boost mode you are drawing more current from the battery than you're getting out of the regulator.)

I have 30W of solar panels feeding into a PWM Controller, charging a 12V 8Ah LiFepo4 battery which supplies power to a 12V to 5 V switching regulator.

https://smile.amazon.com/gp/product/B07Q5W1BG3/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1

I have used several other hobbyist switching regulators but they could not take the harsh conditions. I run a RPi in the car and use one of those regulators from the link. I, finally, put one of those into my solar power generation station. It's been only running for 3 months, producing 5V in weather that has ranged from 103F to 22F.

I'm sure you, the OP, knows how harsh the solar power generation conditions can get, I think a strong point of consideration should be how toughened the electronics are.

Try and completely forget about the UNO having a "Vin" or "Barrel jack"

(unless of course you use the barrel jack on a regular basis for low power projects running off a 9V battery, but don't
tell anyone I said that....)

Thank you all for your kind responses!

@Paul__B your advice about "forgetting the Vin pin of Barrel jack" has actually been very useful; having a 5V regulated DC source going directly into the shared 5V rail powering everything, including the Arudino, is something that I haven't considered previously. Are there any precautions I should take regarding the quality of the 5V source? I understand that powering the Arduino this way bypasses the regulator and fuse, but with a 5V source, this is the only way of powering it besides VUSB, am I correct? The Atmega documentation states that VCC+/-0.5V is acceptable, so this is well below any "wobble" expected from a buck converter. Am I correct in assuming that, when wired this way, I must not apply external power via the USB port or the ICSP header? As for using a smaller board like the nano, I have indeed considered this, but this is the one I had on hand and am using it for development only so far. I may transition to the nano once I begin prototyping the enclosure, but I currently have enough space that this isn't a problem (unless the Nano offers some further power-saving advantages over the Uno).

@MarkT I haven't considered sleep mode as I am still in the development stage of the project, however, are there any buck converters you would recommend that are efficient at both low and high currents? I understand that at very low currents, the "net efficiency" is much lower, as I am wasting a set amount in the converter itself, that will be a higher proportion depending on the "useful" current draw. As long as this wastage remains at a fixed value across a range of loads, this seems fine to me; do most converters not satisfy this criterion?

@Idahowalker Thanks for mentioning the weather resistance element of this problem. I am definitely aiming to use components and an enclosure such that the project is moisture/temperature resistant to a degree. I am sealing the electronics in a watertight enclosure, from which the I/O and power are carried via water-sealed tubing. However, I do not expect to do a perfect job so sealed electronics like that converter is definitely a good idea.

ajulik1997:
having a 5V regulated DC source going directly into the shared 5V rail powering everything, including the Arduino, is something that I haven't considered previously.

The point is, 5 V, preferably regulated but at least smoothed with adequate bypass capacitors is exactly what is required to power the ATMega328 (or most other microcontrollers, though later ones use 3.3 V). It is that voltage and none other that you need to be concentrating on when you are developing a project.

ajulik1997:
Are there any precautions I should take regarding the quality of the 5V source?

Yes, not to exceed something like 5.5 V, not to vary too much while in use.

ajulik1997:
I understand that powering the Arduino this way bypasses the regulator and fuse, but with a 5V source, this is the only way of powering it besides VUSB, am I correct?

It is not so much the "only" way, it is the most appropriate way. There is simply no reason (except as I cite below) you would ever want to do it any other way.

ajulik1997:
The Atmega documentation states that VCC+/-0.5V is acceptable, so this is well below any "wobble" expected from a buck converter.

"Buck" converters - or switchmode supplies in general - are nowadays the preferred way of powering digital electronics, That is what is used in your PC, your laptop, your modems and network equipment. "Wobble" is not a matter for discussion. Either the regulator regulates, or it does not. If it does not, it is just a piece of refuse - you get one that actually works! :astonished:

ajulik1997:
Am I correct in assuming that, when wired this way, I must not apply external power via the USB port or the ICSP header?

There is no reason to apply power via the ICSP header. It is sometimes used as a convenience to connect some sensor or other minor accessory.

There is a risk that some have experienced - on a UNO (or Mega, Leonardo) but not the Nano - that supplying 5 V or slightly above to the "5V" pin and plugging the USB port into a laptop or PC may allow "back-feeding" of the 5 V power into the USB interface of the PC causing that interface to protectively shut down or in some cases, be damaged. This is not a matter of damage to the Arduino at all, but to the host PC.

ajulik1997:
As for using a smaller board like the Nano, I have indeed considered this, but this is the one I had on hand and am using it for development only so far. I may transition to the Nano once I begin prototyping the enclosure, but I currently have enough space that this isn't a problem (unless the Nano offers some further power-saving advantages over the UNO).

The power draw of the Nano is generally the same as the UNO. It is just more practical since with its pin headers, it can be plugged into a solderless breadboard or perfboard/ stripboard or a custom PCB. Or without the pin headers, you can securely solder wires to the PCB lands.

The UNO has sockets instead of pins so either you have a matching "shield" that performs everything you want, or you use pin jumper leads - that is not in general, convenient and the sockets have an odd offset that does not match a standard 0.1" grid pattern. For prototyping, the Nano is easier to use. :grinning:

ajulik1997:
@Paul__B your advice about "forgetting the Vin pin of Barrel jack" has actually been very useful; having a 5V regulated DC source going directly into the shared 5V rail powering everything, including the Arudino, is something that I haven't considered previously. Are there any precautions I should take regarding the quality of the 5V source?

You want to supply the board the actual MCU voltage where you can. Relying on the linear regulators to generate the board voltage from a higher voltage is less efficient, and that additional power lost will be dissipated as heat inside your sealed enclosure. Take the Arduino Due for example. Running a simple LED blinking routine, it draws 124.2mA at 4.99V when supplied via the 5V input (which uses a linear regulator to power the 3V3 bus the MCU requires), or 0.62W.
Supplying 3.293V to the 3.3V pin, it draws only 104.5mA or 0.34W.

In other words, if you supply it at 5V only ~55% of the power supplied to the board will actually be converted to 3.3V, the other 45% will be causing additional heating of your enclosure and electronic components. The same thing happens when a 5V board is supplied 12V through the linear regulator (although the actual values will differ).

Edit: To get some actual Uno figures I just grabbed a board I had lying around. Running another simple LED blinky sketch when supplied at 12.01V it peaked at 52.8mA (LED on). When supplied 4.994V to the 5V pin it peaked at 45.6mA (again LED on). So supplied at 12V it is using 0.63W, where at 5V it is using only 0.23W. In other words, nearly two thirds of your 12V power would be turned into heat in the regulator. Your actual power use will vary of course depending on the MCU load and the IO configuration, and even decent switching regulators are generally in the range of 85-90ish% efficient so you would still be using more power than that measured at the actual 5V pin, but it will be a lot less than with a linear regulator.

Regarding regulator 'quality', its a difficult thing to boil down into a couple of lines with the myriad of products out there. Looking at TI's regulator ICs alone there are literally hundreds of them that would do the job you need. In general, lower output ripple and better regulation is good but like anything it is a cost/efficiency/space/spec balancing act. Your best starting point would be checking each regulator module's specifications against Arduino/Atmel recommendations for power supply.

I use 5V , 3-pin switching regulators from Oki.
Pinout compatible with LM7805.

"https://power.sager.com/oki-78sr-5-1-5-w36-c-2020830.html?utm_source=googlemerchant&utm_medium=click&utm_campaign=power-brand&gclid=EAIaIQobChMIq8DAzdGT7QIVpxmtBh2ZRA2hEAQYAiABEgKXy_D_BwE"