5v fixed linear regulator off of 12v battery.... tons of wasted power

Hi. I'm creating a project to help save battery life, but the arduino itself will be running off of the battery I'm saving. I'm currently using a 3pin fixed 5v linear regulator, which works fine, but it puts out a ton of heat, which leads me to believe it's wasting a ton of power.

I'm running the arduino off of a 12v lead acid battery.

Would a switching regulator be worth it? Are they noisy? Practical? Worth the trouble?

Thanks!

Firstly, yes they can be a bit (electrically) noisy due to the switching - this might be noticeable if you rely on the full accuracy of the ADC for example. You will save power though.

Secondly if you want to run at low power then the standard Arduino won't really help you as the USB<->serial chip is consuming power all the time, whether or not you power-down the microcontroller. This can be 15 or 20mA or so (about the same as the Arduino microcontroller itself). It might be better to consider a board like the Mini or Pro Mini which doesn't have the USB chip, and is available in 3V3 / 8MHz versions (significantly lower power consumption, and sleeping the chip has a definite effect)

If you are only interested in periodic monitoring of the battery then spending most of the time in sleep state will help a lot. Look around these forums for how to setup sleep state, there are a couple of libraries at least to make this relatively painless.

Little 12 -> 5V and 12 -> 3.3V switchmode supply modules aren't too pricey, more than a linear regulator - however they may not handle sleep mode well (some are better than others at being efficient at low-loads - though this is also true of linear regulators).

The keyword "micropower" is a good one to add to your search in this context.

MarkT:
Firstly, yes they can be a bit (electrically) noisy due to the switching - this might be noticeable if you rely on the full accuracy of the ADC for example. You will save power though.

Secondly if you want to run at low power then the standard Arduino won't really help you as the USB<->serial chip is consuming power all the time, whether or not you power-down the microcontroller. This can be 15 or 20mA or so (about the same as the Arduino microcontroller itself). It might be better to consider a board like the Mini or Pro Mini which doesn't have the USB chip, and is available in 3V3 / 8MHz versions (significantly lower power consumption, and sleeping the chip has a definite effect)

If you are only interested in periodic monitoring of the battery then spending most of the time in sleep state will help a lot. Look around these forums for how to setup sleep state, there are a couple of libraries at least to make this relatively painless.

Little 12 -> 5V and 12 -> 3.3V switchmode supply modules aren't too pricey, more than a linear regulator - however they may not handle sleep mode well (some are better than others at being efficient at low-loads - though this is also true of linear regulators).

The keyword "micropower" is a good one to add to your search in this context.

thanks for the reply! I actually have a pro mini that I'm going to be using for my final project. the uno is just for prototyping. i even considered using a naked atmega328 to save on power. I did want the adc to be accurate for monitoring the battery level though. (don't want to permanently damage my AGM batteries) i might end up getting a separate battery to power the arduino to save myself the headache.

How Big is this battery?

Doc

A cheap source of 12V to 5v switching converters is Automotive shops which sell
small cigar lighter converters designed to run USB devices in the car.
Inside they have a small PCB with a switching regulator on board.
Ive bought them for as low as $3.
Can handle up to 1 A @ 5V.

I'm using this in an automotive project at the moment, for what it's worth:

Pinout is identical to a typical LM7805 linear voltage regulator.

In one of my previous posts, Nick Gammon gave me this link on power saving techniques for Arduino, and I'm passing it on to you: Gammon Forum : Electronics : Microprocessors : Power saving techniques for microprocessors.

With just the Arduino connected, it shouldn't be putting-out "tons of heat". Is it too hot to touch?

With a car battery, you don't have to be super-efficient. And, since the wasted-power is proportional to the utilized -power, as you reduce the power consumption with your final circuit design, the wasted power will be reduced also.

For example, it might be worthwhile to go with a switching supply in order to reduce power consumption from 50 Watts to 25 Watts, but it might not be worth the trouble to reduce from 500mW to 250mW...

I'm not saying you should stick with a linear regulator... Just, but it something to think about...

Regulating to 5V from 12V, you've got 7V across the regulator and 5V across the load. And since they both share the same current (with a linear regulator), the regulator is wasting more power than your curcuit is utilizing! And, it's actually worse than that, since "12V" lead-acid batteries actually charge-up to 14.4V. (With a switching regulator, you get-out more current than goes-in.)

DVDdoug:
Regulating to 5V from 12V, you've got 7V across the regulator and 5V across the load. And since they both share the same current (with a linear regulator), the regulator is wasting more power than your curcuit is utilizing! And, it's actually worse than that, since "12V" lead-acid batteries actually charge-up to 14.4V. (With a switching regulator, you get-out more current than goes-in.)

yup, that's exactly why I made this thread to see if there are other options when powering an arduino off of 12v. my agm batteries charge up to 13v. (only higher while charging)

I'm using the analog inputs to read battery voltage using a voltage divider (and map() function to scale the ADC back up to the actual voltage). I noticed on USB, the power is dirty enough to make the voltages jump around a lot. I tried doing some averaging of multiple samples and it's still not very stable. It's completely stable when on battery power only, but I'm wasting power through that linear regulator. which is why i'm praying the switching regulators put out clean power.

actually... what if I use a 5v zener diode to feed the arduino's AREF? would that help keep the voltage reading more noise-free than using the arduino's internal 5v reference? especially if i use a noisy switching regulator?

UPDATE: ok I decided I need more resolution. without using an external IC, I did some simple math to figure out the best way of getting more resolution. the batteries I'm using are deep cycle AGM. 13v is full, and 11.5v is empty. (while loaded) the division you see below is the voltage divider.

1:4 divider @ 5v aref
13v = full
13 / 4 = 3.25v
11.5v = empty
11.5 / 4 = 2.875v
5v / 1024 steps of ADC resoltion = .0048828v per step
3.25v - 2.875v = 0.375v (range) / 0.0048828v = 76 steps (what I'm currently testing with, no enough to even get 1% accuracy on battery percent)

1:3 divider @ 5v aref
4.333v = full
3.833v = empty
4.333v - 3.833v = 0.5v / 0.0048828v = 102.4 steps (better!)

1:4 divider @ 3.3v aref
13v = full
13 / 4 = 3.25v
11.5v = empty
11.5 / 4 = 2.875v
3v / 1024 steps of ADC resoltion = .0029296875v per step
3.25v - 2.875v = 0.375v / 0.0029296875v = 128 steps <- winner winner!

1:3 divider @ 3.3v aref
4.333v = full (too high for 3.3v aref)
3.833v = empty
4.333v - 3.833v = 0.5v / 0.0048828v = 102.4 steps

either will work, The zener is a voltage dependent resistor and will waste some power as it takes some current to cause the Zener to conduct and thus be a clamp. The switcher is easily filtered for ac components riding on the switcher's dc output, 2 capacitors and a coil are all that is required to place any noise components lower than the resolution of the A/D converter.
Zeners like all components come in various grades of accuracy and this must be measured and the actual dc value must be used in the resultant calculations. There are available micro-power voltage references if repeatable calibration accuracy is required. The arduino's internal reference is rather well filtered and not an impediment to final accuracy which must be measured in the calibration process. The Arduino has the capability of using external references including the 5V source the 3V3 source and an 1.1V internal reference.
The A/D value might well be a float and thus avoid the change in measurement granularity imposed by the Mapping or division by 4 of the measured signal and a multiplication of the reference voltage value by 4. The disadvantage of a float to byte conversion is the loss of granularity imposed by mapping the float results into a byte value which essentially represent rounding errors. There are trade off's in doing the conversion that must be taken into account before a specific measurement type is used.
There is one point I would like to cover lightly... a switcher converts power. Thus a 1 watt load @ 5Vout is still a 1 watt load @ 12 Vin - the efficiency of the switcher or (1W/5V = .2A and 1W/12V = . 08333A) and the actual load would be 1W + eff X load power so 90% X 1W = .9W -1W = .1 w (loss) + load power or 1.1W load power

Doc

An option which may or may not work for you is to utilize the built-in constant voltage reference (1.1V I think? and maybe other available options depending on which AVR chip you're using?) and redesign your voltage divider to scale the AGM battery's voltage down to that range. Might be more stable.

As far as power feeding into your arduino goes, I highly recommend using proper decoupling (capacitors and probably multiple ones of differing values, e.g. 0.01uF along with 10uF) connected between GND and the output of your switching power supply OR linear regulator to help stabilize things.

spirilis:
An option which may or may not work for you is to utilize the built-in constant voltage reference (1.1V I think? and maybe other available options depending on which AVR chip you're using?) and redesign your voltage divider to scale the AGM battery's voltage down to that range. Might be more stable.

As far as power feeding into your arduino goes, I highly recommend using proper decoupling (capacitors and probably multiple ones of differing values, e.g. 0.01uF along with 10uF) connected between GND and the output of your switching power supply OR linear regulator to help stabilize things.

all i have now is a 0.1 uF across gnd and 5v. do the caps need to be polarized or does that matter at all?

Depends on the cap, ceramic caps don't have polarity. Electrolytic caps (aluminum electrolytic i.e. the metal canister-type caps, or Tantalum caps) do have polarity.

0.1uF is good but I'd add something else 4.7uF+ for stabilizing larger transients. Typically when I add devices that can swing several 10's of milliamps worth of current on or off I like 10+ uF. (My nRF24L01+ breakout boards taught me the value in this... a single 0.1uF cap across the 3.3V regulator on my arduino was insufficient and caused the RF transceiver chip to reset ~50 microseconds after startup, 1uF extended that to 500us, 22uF tantalum cap eliminated the problem)

Actually there's nothing about decoupling I can say that wouldn't be thoroughly covered by grumpy mike's page-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

looks like a great read, thanks for the info and link!