DiY Bat. balancer, -12 / +12v / GND can that -12 be converted to +12v

Status
Not open for further replies.

toxsick

Member
Hi all

EDIT: I cannot change the topic title.. negative voltages are not a problem as I redesigned the way I'd connect this project.

I have a few spare Arduino boards ( they allow to make stuff happen by feeding analog or digital inputs) can control relays and other cool stuff..

I have a hobby solar setup with about 24v 400AH setup as (2x 12v 400AH banks) each bank has 4 batteries.. for a total of 8 batteries..

There seems to sometimes be one bank with more voltage then the other.
Instead of spending about \$40-50 on a balancer. I want to make one. I like the idea I can change the discharge load. Where the brought one would be at best only a small load. Maybe undersized for 400Ah

So my Arduino can take the voltages from the banks and decide who has the highest voltage and discharge it via a relay with a load until eaual. I can add delays and timers to the code in Arduino ensuring it doesn't run all day etc.

So id want to connect the 24v and 12v as inputs and convert them to around the 5v range.

So my last question, input on Arduino needs to be 5v maximum.. having 12/24v from the battery would always read as 5v. I need to divide the input or do something.

Eg, divide the voltage by 3 or 6.
Arduino 5v = 15v battery
Arduino 2.5v = 7.5v on the battery
And other input
Arduino 5v = 30v
This would be difficult because I'd want a higher accuracy in the 8v to 15v range

Essentially wishing
Arduino 0v = 8v battery
Arduino 5v = 15v battery
Other input
Arduino 0v = 16v battery
Arduino 5v = 30v battery

I hope that makes sense.

Please see my diagram for a rough idea of how I would want to connect it.

Last of all I have a box of capacitors different sizes and a box of resistors with almost all valesv. If possible can this be done only using resistors and capacitors.. no transisors! As I don't have them and would complicate the circuit.

Cheers.
Shaun

Attachments

• 21.1 KB Views: 9
Last edited:

MikeMl

Well-Known Member
First, a comment on your proposed method of battery management. Since you are charging batteries in series, as long as they have similar Ah capacities, don't worry about the voltage at the tap between them ( and trying to shunt current around either the upper or lower bank). Just charge until the terminal voltage of the series banks is = 12cells *2.35V/cell = 28.2V (adjusted for ambient temperature), and don't let that voltage go any higher

Since over time, one of the banks will begin to have less capacity than the other, that is the time to monitor the voltage at the tap during discharge. The goal is to disconnect the discharge load from the batteries when the voltage of either the upper or lower bank drops below 6cells*1.92V/cell = 11.52V.

The trick to monitoring the battery voltage(s) is to know how the A/D converter in the Arduino works.

First, the 0 to 1023 reading is ratiometric with respect to the Arduino's supply voltage, meaning that if trying to read an absolute voltage accurately, you have to know what the Arduino's Vdd voltage actually is with some precision. You will have to adjust the reading in the code by multiplying by an experimentally determined calibration factor to account for the resistor tolerances and the actual Vdd.

Second, the Arduino's A/D input pin has a spec for DC input leakage, and it has a different spec for the AC source impedance. This makes it possible to feed an analog voltage to the A/D pin using high value resistors as a voltage divider provided that the A/D pin is bypassed to GND with a suitable shunt capacitor.

Here is how I would do it:

Last edited:

toxsick

Member
Hi MikeMi

Does vdd mean Arduino input voltage?
If so I will use a 24v dc to 5v step down dc-dc converter.

So it will be 5v on a multimeter.

So I found a resistor calculator tool online

Would I simply fill in the details for
12v in 5v out
And
24v in 5v out

Ground would be all common!
As in dc-dc 24v-5v converter has the ground basically soldered together meaning the ground is common, than the batteries would be common also..
I'd have to connect the battery to GND,
Using the resistor diagram would I simply connect the output to analog 1 and analog 2 input on Arduino?

Or do I need to use the 5v reference voltage pins?
I dont know what the leakage spec means, over my head! And also the shunt capacitor. Never heard of it. It is just a normal capacitor? But it's roll is shunt?

Thanks
Shaun

MikeMl

Well-Known Member
...
Does vdd mean Arduino input voltage?
Yes, look back at my previous posting and that should answer most of your questions.
If so I will use a 24v dc to 5v step down dc-dc converter.
I hate those things. They are very noisy, and typically contaminate your AD readings. I would go with a linear regulator to drop 24V to about 12V, and let the on-board Arduino regulator take it from there.

To reduce the average power used by the Arduino and in the upstream linear regulator, use the Narcoleptic library, and put the Arduino to sleep 99% of the time. This reduces the power lost to almost nothing. Battery management can be done very slowwwwly. I built a battery charger for my 48V electric golf cart based on a Arduino mini using Narcoleptic. That cuts the power drain to run the Arduino mini to less than 10uA while it is asleep (about 10mA while it is actually computing).

So it will be 5v on a multimeter.
The on-board regulator is not very precise. It could be anywhere from 4.75 to 5.25, which will directly effect the battery readings.

On the voltage dividers, allow for some over-range, like 15V per battery in my example.

Last edited:
Status
Not open for further replies.