DIY Lithium Balance Charger

Hello everyone. Recently I thought about designing a lithium balance charger based on Arduino Nano, something very similar to Imax B6, but not as complicated as B6, so here is test version. I want you to look at the schematic and say if it's ok and if there is room for imporvement.

PS: The main goal of the project is to make it as cheap as possible, so high cost solutions are not acceptable.
PPS: There will be a custom PC software to display all data and for communication with Arduino via serial interface, that's why I needed Nano version.

Bal Charger.pdf (35.3 KB)

Questions about "PSU_VOLTAGE" and "CHARGE_VOLTAGE".
10k:20k dividers.
That could be 25.2volt with 6 LiPo cells.
I suppose the 4051's supply is 5volt because of the data lines.
The 4051 should not see any more than ~5volt on it's inputs.
The opamps could also swing above 5volt (battery or wiring failure).

Voltage dividers should be scaled to give <5volt and <1mA when Arduino is off.
VBAT lines could have schottky diodes to the 5volt rail.
Leo..

@Wawa, oh,it's a typo error, there should be 100K and 20K plus 10K on the output measured voltage

Here is corrected schematic. :slight_smile:

Bal Charger.pdf (33.6 KB)

I would change R52 to 10k and R51 to 47k, or 2x 100k parallel (cheaper for smd assembly).
R61 is nonsense, so remove.
Do the same with R53, R54, R60.

I don't see the supply voltage of the 4051.
AFAIK 12volt won't work (logic levels).

Buttons are usually safer between pin and ground.
Use the internal pullup resistor in your code, and you won't need resistors on the buttons.

You could improve A/D readings if you add 100n caps to ground on all 4051 inputs (X0 - X7).

Do you think 14.6mA opto current is needed.
Do a breadboard test with one opto and a 1k or 470ohm current limiting resistor.
And a 10k transistor load.
See what the saturation voltages are.

Why did you pick P-channel fets.
AFAIK N-channel preferred.
Just a matter of re-arranging the same parts.
Leo..

Just saw that battery negative is switched to ground with the IRLZ44Z.
Uhhh, can't do that.
That will upset all the battery voltage readings.
Change that to high-side switching with a P-channel fet and a small NPN level shifter.
Leo..

"I would change R52 to 10k and R51 to 47k, or 2x 100k parallel (cheaper for smd assembly)." - these ones are not critical, values will be tweaked when overall design and resistor values will be ok, thus, i can buy less types of resistor in more quantity.

"R61 is nonsense, so remove." - doesn't that limit current on adc pin, like all other 10K on the schematic ?

"AFAIK 12volt won't work (logic levels)." - supply voltage is 5V.

"Buttons are usually safer between pin and ground." - first time hear about that :). Can you tell me more about that? ))

"You could improve A/D readings if you add 100n caps to ground on all 4051 inputs (X0 - X7)." - doesn't that make slower readings and what about putiing the capacitor on output of 4051?

"Do you think 14.6mA opto current is needed.
Do a breadboard test with one opto and a 1k or 470ohm current limiting resistor.
And a 10k transistor load.
See what the saturation voltages are.

Why did you pick P-channel fets.
AFAIK N-channel preferred."

  • I saw P fets on a schematic, but if I put a N fet there will be no more need for optos (which are used just for driving high side fet), good point on that :slight_smile:

"Just saw that battery negative is switched to ground with the IRLZ44Z.
Uhhh, can't do that.
That will upset all the battery voltage readings." - can you explain more about this ?

PS: What means AFAIK ? :slight_smile:

  1. I calculated those values for a C6 LiPo, so you don't have to tweak them.

  2. R60, R61 are not needed, because the voltage divider itself is already a current limiter.

  3. AFAIK = "as far as I know"

  4. It doesn't make a difference if a button is normally "high" and switches to ground. or normally "low" and switches to +5volt.
    Fix the "reverse logic" in the code.
    If button == low becomes if button == high and vise versa.
    If you mount things in a case or on a front panel. it's usually safer to have a bunch of ground wires running through the case than supply wires.

  5. No, there will still be the need for optos if you use N-channel fets.
    In the schematic, swap the 10R resistor with the mosfet. Swap source and drain, so drain connects to the resistor.
    And swap the opto transistor with the 10k resistor.

  6. All battery voltages are referred to ground.
    If you fiddle with the ground, your battery voltages will not read correctly anymore.
    Google "fet high side switch" for the solution.

Post the eagle files in a zip folder if you are not sure how to fix this.
Leo..

" All battery voltages are referred to ground." - I get it now, if I put N chan mosfet, battery ground will be disconnected and not referenced to MCU ground, thus I will not be able to read valid data from battery voltage pin. :slight_smile:

"No, there will still be the need for optos if you use N-channel fets."- if I get it correct, I still need optos because fet and Mcu ground are not common, right ? and this makes impossible to drive fet form mcu, except for first fet which will have common ground with MCu.

What about 100n cap I asked in previous post ?)

Another question. If I put a P channel mosfet for charging, this means that I need Pull Up resistor, but PSU line can go above 20V (maximum Vgs) , so I have found a schematic where a Zener diode is connected in parallel with Pull Up resistor, thus limiting gate voltage if Supply go above Vgs, but what if I connect the Pull Up resistor to 12V line, which I already have in the schematic, is that correct to do ?

GrayMen:
What about 100n cap I asked in previous post ?)

Look at it as a perfect miniature battery, closer to the micro.
One cap for each battery.
A "solid" sample is available when the micro switches to it.

Using one cap on the output of the MUX is not good.
It would average battery voltages.

GrayMen:
Another question. If I put a P channel mosfet for charging, this means that I need Pull Up resistor, but PSU line can go above 20V (maximum Vgs) , so I have found a schematic where a Zener diode is connected in parallel with Pull Up resistor, thus limiting gate voltage if Supply go above Vgs, but what if I connect the Pull Up resistor to 12V line, which I already have in the schematic, is that correct to do ?

Gate has to be pulled up to the source to switch the fet off.

Use a voltage divider with two 1k resistors.
One between source and gate, and another one from gate to the collector of a small NPN transistor.
Emitter of the NPN transistor to ground, and base via a 1-5k resistor to the micro.
Now the gate voltage will be ~12volt max.
You don't have to use a logic fet.

Maybe this is a suitable fet for balancing. IRLML2502
Leo..

Added Caps on Mux inputs, changed mosfet to high side (check someone please). :slight_smile:

Balance Mosfets are not critical now, so I will not change them for now.

@Wawa, I hope you will check the corrected version of schematic and give me more tips on making this circuit :slight_smile:

Also, the PSU voltage should be from 12 to 30 V.

Bal Charger.pdf (35.3 KB)

Are you running the opamps on switched VCC instead of on battery VCC.
All the opamp inputs are connected to the battery.
Could be unhealthy for the opamps.

Supply should be EXACT. e.g. 25.2volt for a 6-pack.
Leo..

Is it possible to get the code along with the final schematics?

hi,

what happend to this great project?

Wolfram.