Dealing with variable battery packs for project

Howdy Folks,

I am building a project that will variably use a 12v or 24v battery as a power source. The battery pack will change depending on specific install needs. I read that the 5v on my UNO does not like input voltages over 12v with 7.5v being a better input level. If I want to make this project so that the battery pack can be swapped out with ease what would be a good approach for keeping my UNO 5v regulator happy?

I have used an LM317 adjustable regulator before and I can visualize a scheme involving the LM317 with a 12v or 24v input 'selector' switch.

Is there an easier or more modern way of suppling my UNO's regulator with the correct input?


Use a buck converter. As the name coincidentally suggests, you can get them from china for about a buck :wink:
Take a look at these search results - also, read the descriptions and make sure they go the direction you want (most will either go up or down, but not both, but the item names don't always make that clear)

You could use a linear regulator like you're proposing, but if you are trying to draw any signficant amount of current through it, you don't want to do that (I assume you don't want half of the power from the 24v battery pack wasted, right?)

A switching regulator typically has an efficiency of >90%, whereas if you were turning 12v into 24v with a linear regulator, you'd lose half of the power to heat in the regulator.

Get spare buck converters, particularly if you get the ones that don't have current limiting; I fried 3 of them this summer by accidentally shorting the output.

Ah, buck converters look like they will take care of my needs.