Powering Uno R3 from a 12v battery with charger connected

I'm trying to power an Uno R3 from a 12Vdc battery that has a solar charger panel connected. The charger outputs 13.5 Vdc when charging the battery so would blow up the Arduino. The battery will also power a 12Vdc pump motor so there may be voltage dips on motor startup. I don't want to use two batteries. I did think of a simple resistive voltage divider to power the R3 at around 8 volts to keep the voltage within the R3 limits, but this would drain the battery I think. Any cheap ideas would be welcome.

Welcome to the forum

What makes you say that ?

If you feed the power to the Uno via the barrel jack or the Vin pin then it can tolerate a 20V input

See Arduino Uno Rev3 — Arduino Official Store

Expect to see a lot of switching noise generated by the charger.

You cannot use a voltage divider to supply power. Voltage dividers are OK for signals.
From the Sparkfun voltage divider tutorial:

Application Dont's

As tempting as it may be to use a voltage divider to step down, say, a 12V power supply to 5V, voltage dividers should not be used to supply power to a load.

Any current that the load requires is also going to have to run through R1. The current and voltage across R1 produce power, which is dissipated in the form of heat. If that power exceeds the rating of the resistor (usually between ⅛W and 1W), the heat begins to become a major problem, potentially melting the poor resistor.

Be careful when using the power plug or Vin. Powering through Vin or the power jack means that the Arduino and all peripherals that are on the 5V rail are powered by the onboard 5V regulator. The on board 5V regulator is not heat sinked so will supply limited current before it overheats and shuts down. Keep the total power dissipated by the on board regulator to less than 1W to avoid overheating. The amount of current depends on the voltage input to Vin or the power jack. The higher the voltage the less current can by supplied. I would use a buck converter to drop the higher voltage to 5V and connect that to the 5V on the Arduino, bypassing the, weak, 5V regulator if the 5V rail needs to provide much current. Then the rated current of the DC DC converter is available on the 5V line.

I would use a 5V buck converter to get 5V from the battery voltage to the 5V pin or use a 7V buck converter to get 7V from the battery to the barrel jack (or Vin pin).

Thanks. I'm sure that i read 5 to 12volts somewhere

Did you read the page that I linked to ?

image

Not for the clones though. Most clones have 16volt rated caps on V-in.

The 5volt regulator on an Uno needs 1volt minimum across to regulate down to 5volt.
So V-in needs in theory 6volt minimum. And the DC jack, with a reverse protection diode in series, needs 6.7volt minimum. The datasheet just simplifies it to 7volt.
Maximum is cap voltage or regulator voltage, whichever is lowest.

Note that max current draw from any pin goes down with voltage.
With 12volt on V-in is has dropped to about 100mA.

A buck converter to 5volt on the 5volt pin, or to 7volt on the V-in pin, is both safer and the Uno draws less from the 12volt battery.
Leo..

Not yet but I will thanks. To be honest i wrote the post and then went to the pub. I didn't expect to get such quick and helpful replies. Thanks again though, I'll get on to it tomorrow.

Thanks everyone for the advice. I will go along the route of using a Dc-DC buck converter. I just need to find a simple and cheap circuit that I can build. I've looked at a number of them on Amazon but they mostly don't have good reviews as far as reliability, build and component quality is concerned.

DC/DC converters are basically a part. Very few go to the trouble of building one.
If you don't mind paying for quality then use this one.
Leo..

For the UNO, MICRO, MEGA, NANO, and similar try stay BELOW 12 volts.
Usually they will operate quite well in the range 7 to 10 volts and that will prolong the life of the board also.