Go Down

Topic: Connect Arduino nano / uno to car battery (Read 1 time) previous topic - next topic

djda9l

I want to connect my Arduino Nano or UNO to a car battery. The battery is NOT in a car, but something i had laying around, and therefore want to use with this. The car battery will also have a 12V DC to 220V AC Inverter attached, and what i want to make with the arduino is a simple display that displays what the current voltage is on the battery. But I'm not entiry sure how i best do this.

Can you assist?

kenwood120s

I'd say the best way is not to use an Arduino at all, but one of these straight onto the battery.

But if you want to use an Arduino you'll need to get the nominal 12V and closer to 15V actually, down to 5V max on an analog pin to read it, eg with a voltage divider.
[gumby]I've got my head stuck in the cupboard[/gumby]

djda9l

I'd say the best way is not to use an Arduino at all, but one of these straight onto the battery.

But if you want to use an Arduino you'll need to get the nominal 12V and closer to 15V actually, down to 5V max on an analog pin to read it, eg with a voltage divider.
I would like to use an Arduino both because of the project, and because i want some additional functionality later. Do i need some sort of power supply in between the Arduino and the battery then ?

kenwood120s

You can power the Arduino off the battery's 12V into the jack.

But to read its voltage (as opposed to power the Arduino off it) you need to take the voltage into an analog pin, and they only tolerate 5V. So you need a voltage divider to drop the max voltage to 5V, and then all the other voltages the battery can have like 6V or 9V or 11V or whatever will be scaled proportionally between 0V and 5V when you read the analog pin.

[gumby]I've got my head stuck in the cupboard[/gumby]

Noobian

#4
Aug 19, 2017, 06:36 pm Last Edit: Aug 19, 2017, 06:39 pm by Noobian
If you feel lazy and don't want to make a voltage divider then get an arduino voltage sensor. Will cost you 1 or 2$. It's the same thing but costs a lot more than a voltage divider.


JohnRob

You didn't state such but I assume you are planning on powering the Arduino from the battery as well?

If so you will need a 12V to 5V regulator.   You can use a good quality cell phone charger of go onto ebay and look for 12V to 5V regulator boards.  Or you can buy the parts a built it yourself.

The 12V to 120V inverters I've had experience with are very electrically noisy.  You should add capacitors at the 12V input of the Arduino power supply and at the lower resistor in the resistor divider.  (perhaps 0.01µf)  And keep the wiring as separate from the inverter as possible.

Good luck


Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

MorganS

The Arduino Vin will take 14V so long as you're not powering anything else from the Arduino 5V line. An LCD display with a backlight is a something which will burn up the Arduino's voltage regulator with that input voltage.
"The problem is in the code you didn't post."

Go Up