New charger control?


ALL NEW - Battery Finder Search for 12/24/36/48v or by capacity www.batteryfinder.net
New & used Batteries, Solar, accessories, LifePo4 cells & more 5% Coupon "Powerwalls" www.batteryhookup.com

Tex

Member
Joined
Jun 5, 2022
Messages
59
Ok, I have a number of original and home built chargers I use on both 18650's and 26650' both bought and home built battery packs.
My best home built charger with adjustable voltage has died, so I just used this power pack as a test on a Lipo pack, and a 200 amp Hr LifePO4, both worked a treat, it actually pus out about 20.52 volts. My questions is what do I need to buy (from AliExpress?) to add the the power supply to provide a proper charging profile for LIpo packs (with a BMS)?


IMG_20260312_123139227_HDR.jpg
 
You'd need to add a microcontroller and a few FETs to control the output. To make it more efficient you might even want to add an inductor so that you can also buck voltage instead of relying on linear components to control voltage.

If you wanted to get away with it really cheaply, even just to get an understanding, get some of those buck/boost converters that have voltage/current manual adjustments. They are just variable resistors (varistors) to make the changes.
Then replace the varistors and use the microcontroller to change the values. I think you'd need another FET or transistor for this as you need a way to control "resistance", not voltage (the mcu controls voltage by default on the analog pins).

This is a crude design, but it could gain you the knowledge to better understand the whole set up and build a more robust one later
 
Please don't use the tinyurl shorteners. I know why you used them but these had a lot of extra tracking information in the search. Just post anything before the first ? for most sites the rest is just extra tracking information. I already fixed the urls

The AliExpress one is the one that I was referring to. You can desolder the trim pots and replace them with connections to the MCU and control it that way. The others would need more work to control remotely. You could do everything in the MCU what the other 2 are doing.
Because you need to control voltage and current you can't just set a static value on the device and let it run for full control.

What some have done is use several of those converters but just set at different stop voltages. For instance NNC cells, 4.00, 4.10, 4.20 each with a lower current value set. Crude but it works
 
Sorry about the Tiny URL's.
"replace them with connections to the MCU" way above my paid grade, I'd need a schematic.
Would the TKXEC unit already have all that control built in?
I set up one of the aliexpress modules with the power supply yesterday afternoon and charged a battery Lipo pack, once the pack was fully charged the BMS just kept switching the supply on and then off again, I can live with that if I'm in the shop I guess.
 
Would the TKXEC unit already have all that control built in?
I have no idea. Never used one.

"replace them with connections to the MCU" way above my paid grade, I'd need a schematic.
This requires desoldering the trim pots and using a FET as a programmable varistor programmable potentiometer. Just ask AI how to wire it up ;)
.......

Ok, did a quick ChatGPT researching, and that Aliexpress board doesn't quite work the way I thought it does. However, it actually works easier than I thought:

ChatGPT said:
The trim pot on that module is not acting like a variable resistor to ground.
It is part of the feedback divider to the FB (feedback) pin of the regulator IC (likely LM2596). The chip regulates its output so that the feedback pin stays at ~1.23 V.

So the pot simply adjusts the ratio of a voltage divider from Vout → FB → GND.

That means a MOSFET will not behave like the pot in this circuit. MOSFETs are very nonlinear as resistors and will make the loop unstable.

Digital Potentiometer (Best solution)​

Replace the trim pot with a digital potentiometer controlled over SPI or I²C.

Typical parts:
  • MCP4131
  • AD8400
  • X9C103S
Advantages:
  • Direct drop-in replacement for the pot
  • MCU sets voltage digitally
  • Stable feedback loop
Important considerations:
  • Pot value typically 10k–50k
  • Ensure terminal voltage rating > Vout (many digipots max at 5 V)
Because the divider connects to Vout, if your output might be >5 V you must use a high-voltage digipot or rework the divider.

I won't post the whole conversation, but here's the link to the project: https://chatgpt.com/share/69b4b12e-5fb4-800a-afb2-d8e9ad175851

I asked it for a schematic diagram using one of the digital pots above and connections to the Arduino Nano as an example. It also spat out some code that probably works. It may not exactly work on the first run, but gets a lot closer.


Allowing the BMS to turn on/off the charging could have negative effects later on. For one, it does put extra stress on the components due to current surging. Altho, the low current in this particular situation may not be an issue.
Also you are basically keeping the cells at absolute maxes all the time. This is not good for the longevity of Lithium based cells. They need to rest between full charges, this is their soak or absorption phase. If they are constantly kept at the absolute 100% charged state continually, they will actually become overcharged.

Now, it's possible, depending on which BMS you have, you could have the BMS trigger a relay that would disconnect the charger once the battery reaches a predefined charged condition. That way the battery isn't being pumped with current after it's actually fully charged.
 
Ok, added some more context to the chat by having it do the "Better cheaper option" :LOL:

ChatGPT said:
If you'd like, I can also show you a much better hack for these modules:

A $0.05 transistor circuit that lets the Arduino control voltage without replacing the pot at all — and it works up to 40 V safely.

This trick works because the regulator (usually an LM2596) keeps its FB pin at ~1.23 V. If we pull a little current away from the FB node, the regulator thinks the output is too low and raises Vout. By controlling that current with an Arduino PWM signal, we can digitally control the output voltage without touching the high-voltage side of the divider


The rest of the conversation is included in the link above. Looks pretty easy and you probably have a suitable transistor already
 
An icharger X6 1s to 6s , X8 up to 8s or X12 up to 12s in most any lithium chemistry . Paired with the power supply mentioned above. or battery pack to battery pack.

later floyd
 
Ok, added some more context to the chat by having it do the "Better cheaper option" :LOL:



The rest of the conversation is included in the link above. Looks pretty easy and you probably have a suitable transistor already
Ok, all this is still way over my pay grade, I'm just a fiddler, I can build a battery pack with Lipo or LifePO4 cells and a BMS and in the past I built an adjustable battery charger with an old transformer and an LM338 which I had an old circuit for. I can actually put together most things if i have a diagram as opposed to a schematic.
I get a lot of used 18650 and 26650 battery packs for free from my old business Lateral Technology I sold to a mate, so I have stacks of cells.
I run them all through my Opus charger, re sleeve them, and use my spot welder to build battery packs.
However because I build packs of different voltages I need something variable to charge them.
For the moment I am getting along with one of these hooked to the power supply.

LM2596 Adjustable Voltage Regulator 4.0-40V to 1.25-37V DC 36V to 24V to 12V to 5V Variable Volt Power Supply Car Motor Buck Step Down Converter Power Module with Red LED Voltmeter Display

I'm always there when somethings charging, so when I see the BMS start to disconnect the load I turn the voltage down to about 2 volts over the battery voltage and then let it go until it gets to disconnect again then turn it off. So far so good.

I have actually used that old HP power supply to charge my 200Ah LipePO4 battery pack in the van numerous times via the MPPT and JK-BMS, works a treat, whereas the Victron charger wants a 5 volt difference to kick in.

Thanks for the effort anyway.
 

Attachments

  • LM2596 Adjustable Voltage Regulator .jpg
    LM2596 Adjustable Voltage Regulator .jpg
    101.9 KB · Views: 15
Ok, all this is still way over my pay grade, I'm just a fiddler
We were all just little fiddlers, then we learned how to play the banjo, flute, and bass, then we learn to play the whole band of instruments. ;)
Meaning, if you don't go outside your comfort zone of learning you'll never learn new stuff. What I suggested isn't too difficult to learn, especially with the help of many YTs and now ChatGPT to help with specific questions/explanations.
 
Would the TKXEC unit already have all that control built in?
That one will do the job.
I have xy-sk120 with higher power output.
A lot of reviews on internet, but almost
nobody mentioning that they might be overcharging cells/batteries a little bit.
For example: If i set target voltage to 4.20V it will charge cell to 4.27V and than charger will reduce output voltage to 4.20. (the same happening when charging 12V lead acid batteries too). So i just set output to 4.13V for 4.2V cells.
This need to be checked when unit arrived.
 
Last edited:
We were all just little fiddlers, then we learned how to play the banjo, flute, and bass, then we learn to play the whole band of instruments. ;)
Meaning, if you don't go outside your comfort zone of learning you'll never learn new stuff. What I suggested isn't too difficult to learn, especially with the help of many YTs and now ChatGPT to help with specific questions/explanations.
I have been up to my neck in replacing our failed washing machine, repairing my daughter’s robot vacuum, cutting the back lawn, linseed oiling the garage doors, stripping all these battery packs, rebuilding my lathe etc. etc.
I have also been negotiating with sponsors and caters for a major classic car tour for eighty people, getting venues and caterers etc. locked in.
Not to mention working on my SAAB and rebuilding a Lightburn Zeta with a big bike engine!
At seventy eight that all happens much slower than in the good old days!
I'm always learning every day, never stopped, but learning takes time I don't really have left.
So for the sake of expediency it will be the xy-sk120 for me
I have plenty of solar in the shed and numerous controllers but they are hardly ever configurable for 18650 packs of various voltages, so this will handle them all (FOR AU$16!!).:D
 
That one will do the job.
I have xy-sk120 with higher power output.
A lot of reviews on internet, but almost
nobody mentioning that they might be overcharging cells/batteries a little bit.
For example: If i set target voltage to 4.20V it will charge cell to 4.27V and than charger will reduce output voltage to 4.20. (the same happening when charging 12V lead acid batteries too). So i just set output to 4.13V for 4.2V cells.
This need to be checked when unit arrived.
Appreciated, just ordered.
 
Back
Top