Constant current for battery charger

Hi I want to create a li ion charger, and after looking into li ion charging, I learned that I need to have CC-CV charging. As in constant current-constant voltage. What I'm thinking for the constant current stage is to have an off the shelf battery buck converter, with its potentiometer replaced with a digital potentiometer that is controlled by an Arduino, I would use a current sensor to adjust the potentiometer's value until the buck converter outputs the desired amount of current to the battery.

I could have a safety mechanism for startup by using a digital pin to turn on a mosfet that turns on all the mosfets that connect the output of the buck converters to the batteries. I would need this safety mechanism as what if the battery is connected to the charger with the charger being not calibrated for the batteries's needs. In the worst case this will result in an over current to the batteries. Therefore on startup I would set all the buck converters to the lowest voltage setting via the digital potentiometers, and then turn on the mosfet.

What do you all think? :slight_smile:

Leave the design of battery charging circuits to people who know more.

Buy a battery charger. Or google for real circuits if you can’t buy a device that does what you want. They might even use an Arduino, hey!

Srsly, this is really not for experimentation by amateurs.

a7

As profeesional I handled large lead battories. As amateur I once built a computer controlled NiCa charger. Both types had their special demands. Charging a battory a few times is not that terribly difficult but to take care of as much life time of the battory as possible, that is a job for people having quite a lot of knowledge.

Perhaps you could just use the Microchip MCP73831/2 charge control chip?

...R

Robin2:
Perhaps you could just use the Microchip MCP73831/2 charge control chip?

...R

I had a skim through the datasheet, and found a possible schematic, what values do I use for the components? Also this chip has a maximum charge current of 500mA, I'm looking at charging my li ions with 4A of current each.

ningaman151:
, I'm looking at charging my li ions with 4A of current each.

Then buy a proper charger. It will be a great deal cheaper than a house fire.

...R

I'm not a battery expert...

Most power supplies/battery chargers don't use a programmable microcontroller (no software/programming) unless they have programmable timer or something like that. The current and voltage (and thermal) feedback are normally all handled directly in hardware.

4 Amps is a lot for a homemade power supply! And, I assume you checked the battery specs and it's OK to charge it at 4A?

DVDdoug:
I'm not a battery expert...

Most power supplies/battery chargers don't use a programmable microcontroller (no software/programming) unless they have programmable timer or something like that. The current and voltage (and thermal) feedback are normally all handled directly in hardware.

4 Amps is a lot for a homemade power supply! And, I assume you checked the battery specs and it's OK to charge it at 4A?

Yeah it says in the datasheet rapid charge at 4 amps. The battery I'm using is the Samsung 25R.

Robin2:
Then buy a proper charger. It will be a great deal cheaper than a house fire.

...R

I don't think I'll be able to find a charger that fits my needs, I'm going to be using a 17s3p battery.