# Li-ion charging question

#### Torbek

Joined Apr 19, 2019
50
So say I want a fully contained li-ion battery pack, with both charging circuit (5v input) and output 3 - 4.2v) on the same two wires. Trying to work out how one could accomplish this. I have looked for a prebuilt module to perform this task and cannot find anything close. You get either charging modules or battery management, not both. I am not aware of a charging module that sends the battery voltage back out of the same two leads used to power the charger.

This is for an old headlamp with separate lead acid battery pack on the belt. No room in the torch body for a charger. Lead acid is dead and everything is charged through a two-core cable. Our club has a number of these lamps which we would like to convert without touching the charge rack.

I have thought about how to go about this but without very fast switching of input voltages/op-amps it is difficult to work out a simple solution that doesn't involve an op-amp or two, and even then I am not sure it would be safe/effective.

I know it can be done effectively because most phone battery packs have this capability! Just not sure how they achieve the switching?

Any ideas?

#### jiggermole

Joined Jul 29, 2016
47
for usb C its handled in the handshaking phase of the connection, who is providing power and who is recieving power. Its do-able, for sure, but like you said not easy. I would start with alibaba or bang good and look for boards. Is there a specific reason you can't have 5v in and 5v out?

#### Torbek

Joined Apr 19, 2019
50
5v is where the charger is currently set for lead-acid (a bit high really but short charge cycles) and I would only need the li-ion voltage out, but it wouldn't be a bad thing to boost it.

I have looked for modules but failed to find anything as of yet, which surprises me!

#### Juhahoo

Joined Jun 3, 2019
215
So battery charging current goes with same cables as the power comes out ?

#### Irving

Joined Jan 30, 2016
2,173
5v lead-acid? Would have expected 6v minimum - has to be multiples of 2.2v so maybe 2-cells, 4.4v?

How is the current charger connected to the battery? Can you draw a diagram? I can't see why you need to limit yourself to only two wires if you're creating a new charging regime....

#### jiggermole

Joined Jul 29, 2016
47
really need more info on the existing battery. Another possibility is to replace with a lithium iron phosphate battery as a direct replacement for the lead acid. They're pretty tolerant and in most cases won't require you to use a different charger than your existing one. I usually order my batteries from batteryspace.com
https://www.batteryspace.com/LiFePO4/LiFeMnPO4-Batteries.aspx

#### Torbek

Joined Apr 19, 2019
50
So battery charging current goes with same cables as the power comes out ?
Yes, exactly that!

#### Torbek

Joined Apr 19, 2019
50
5v lead-acid? Would have expected 6v minimum - has to be multiples of 2.2v so maybe 2-cells, 4.4v?

How is the current charger connected to the battery? Can you draw a diagram? I can't see why you need to limit yourself to only two wires if you're creating a new charging regime....
Yep they are 4v4, but very old now and charging is becoming more difficult. Seems the plates become fractured internally and the batteries are sealed.

#### Irving

Joined Jan 30, 2016
2,173
OK, there are chips that do what you want (see below) but I need to understand the physical arrangement. Do you unplug the hradlight from the battery and plug the charger into the same connection?

#### BobTPH

Joined Jun 5, 2013
3,769
Interesting, what is that chip?

Bob

#### jiggermole

Joined Jul 29, 2016
47
Okay. And you say the charger outputs 5v. And I re-read and I don't think you said, but I guess you remove the battery pack from the user and put it on a charger rack. Can you provide more info on the charger? Cause you could use a 4s NiMH battery with no circuitry whatsoever. Fully charged is 5.6v so the 5v output wouldn't overcharge. We don't know the charging current available from the charger. That would give us a constraint on the minnimum capacity of battery pack so the charger doesn't charge too quickly. You're gonna wear out the cells a little quicker but they're cheap to replace. The average i saw was about 10$an Ah. #### Irving Joined Jan 30, 2016 2,173 Interesting, what is that chip? Bob Its from the S-82B1xxx family of cell protection ICs from Ablic (ablic.com). They are intended for OEM use but a very limited selection of specified voltage/current limits are available from Mouser @$1.1 - \$1.4 1 off depending on version.

Its important to understand these chips do the over-discharge voltage/current and short-circuit and over-charge voltage/current protection. Constant current/constant voltage charge control and timing would need to be added seperately/externally, eg TP4056/TC4056 or similar.

I realize that doesn't meet the TS exact criteria, but if he/she is re-engineering things there's opportunities to adjust how things work..

An alternative protection chip is DW01A but hard to fnd a vendor.

Last edited:

#### Juhahoo

Joined Jun 3, 2019
215
So when you remove the lamp part, you have two wires as output. Now to those two wires you connect the 5V voltage and the batteries should start charging? So the charger is inside the battery module and it only takes 5V for charging purposes. 5V is fixed constant voltage and is built in to the rack which you don't modify any ways. Is this correct?