Why not design your own charger?

47 posts / 0 new
Last post

Pages

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark
Why not design your own charger?

I want a computer controlled charger, here is my first tests:

PCB’s are cheap, so I made one for my test.

Not bad for a LiIon charge curve. Charge voltage can be selected from 0 to 4.5V and termination current from 10mA and up.

The NiMH is also good, except I dropped something on my setup during the test. I use both -dv/dt and 0dv/dt termination here, it is not enough to handle low current charge, but I have not decided if I will support it.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

tempo
Offline
Last seen: 8 hours 43 min ago
Joined: 06/28/2014 - 08:59
Posts: 524

Yes, we want a HKJ BLF CHARGER!!

 

i\m in, sign me up, thanks!!

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark
tempo wrote:

Yes, we want a HKJ BLF CHARGER!!


 


i\m in, sign me up, thanks!!

It is not a product, but something I want for my testing. It will not have any display or buttons on it, everything is controlled from USB or serial.

On the Arduino console I write “start LiIon 1” to charge a LiIon cell with 1A and 50mA termination or “start cccv 1 3.6 10m” to charge a LiFePO4 cell with 1A to 3.6V with 10mA termination (The LiIon is just a shortcut that sets the voltage to 4.2V).
This is not really a practical design for most people.

I can also ask it to list charging:
Index Time Voltage Current Capacity Energy
12 12 1.587 0.999 0.0031 0.0049
13 13 1.587 1.001 0.0034 0.0054
14 14 1.588 0.998 0.0037 0.0058
15 15 1.589 0.997 0.0040 0.0063
16 16 1.589 1.002 0.0042 0.0067
17 17 1.590 0.999 0.0045 0.0071
18 18 1.590 0.999 0.0048 0.0076
19 19 1.591 0.997 0.0051 0.0080
20 20 1.591 1.001 0.0053 0.0085

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

amishbill
amishbill's picture
Offline
Last seen: 10 hours 16 min ago
Joined: 05/01/2019 - 10:03
Posts: 570
Location: GA

Being a computing type with not enough hobbies to suck his calendar and wallet dry, I’m interested in what you’re doing. Beer

DIY LT1 battery wrap image. "PDF on Google Drive":https://drive.google.com/open?id=1IHIEOi1NXu868IYNCzIM7D2Ulpxchmww

Fresh Sanyo NCR18650GAs already wrapped "for sale HERE":http://budgetlightforum.com/node/69120 if you like.

f0xx
f0xx's picture
Offline
Last seen: 12 hours 16 min ago
Joined: 02/27/2019 - 18:44
Posts: 359
Location: Near Dallas, Texas

This may not be something that is practical for “most people”, but you are on BLF… I too find this project interesting.

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark

If there is interest in it, I may put it on my project page when I am finished in a few months. It is not very expensive, the most expensive parts are Arduino Nano and a ADS1115 module (This 15 bit ADC secures good voltage and current precision). The other stuff is fairly cheap, except you usually have to buy multiple items and there may be some shipping.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

f0xx
f0xx's picture
Offline
Last seen: 12 hours 16 min ago
Joined: 02/27/2019 - 18:44
Posts: 359
Location: Near Dallas, Texas

That sounds fantastic!

amishbill
amishbill's picture
Offline
Last seen: 10 hours 16 min ago
Joined: 05/01/2019 - 10:03
Posts: 570
Location: GA

I like the plan.
Does / can it scale past a single cell holder on a controller?

DIY LT1 battery wrap image. "PDF on Google Drive":https://drive.google.com/open?id=1IHIEOi1NXu868IYNCzIM7D2Ulpxchmww

Fresh Sanyo NCR18650GAs already wrapped "for sale HERE":http://budgetlightforum.com/node/69120 if you like.

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark
f0xx wrote:
That sounds fantastic!

It may be cheap to build, but I use one very small IC (I could not find a larger version of it). It is near the battery connector and not much larger than the small SMD resistors.

amishbill wrote:
I like the plan. Does / can it scale past a single cell holder on a controller?

No, the Arduino is rather busy controlling the current, it directly controls the switcher, there is no switcher chip.

I got calibration of current, voltage and time working now.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

RollerBoySE
RollerBoySE's picture
Offline
Last seen: 2 hours 10 min ago
Joined: 12/13/2014 - 11:23
Posts: 1004
Location: Sweden

VERY interesting!

Lux-Perpetua
Lux-Perpetua's picture
Offline
Last seen: 2 hours 21 min ago
Joined: 03/01/2018 - 04:39
Posts: 1776
Location: Germany, 德国, ドイツ, Германия, जर्मनी

Nice project Henrik! Smile

As many people use a Raspberry Pi for DYI things I wonder if it could be suitable, too.

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark
Lux-Perpetua wrote:

As many people use a Raspberry Pi for DYI things I wonder if it could be suitable, too.

Not as replacement for the Arduino, but for controlling the Arduino it would be fine.

To charge and log you can just send this “start nimh 1;list” over the USB port and then you will receive the table from above while it is charging.
My charging modes at the current time are: CCCV, DVDT, LiIon, NiMH, the last two uses the first two, but with some predefined parameters.
I have 3 different list format, one with tabs, one with US CSV and one with EU CSV.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

Stittville Ed
Stittville Ed's picture
Offline
Last seen: 1 hour 37 min ago
Joined: 11/20/2011 - 08:22
Posts: 767
Location: Stittville, New York

Looks like a great project.

I think you will see a lot of interest in your progress Smile

lionheart_2281
lionheart_2281's picture
Offline
Last seen: 3 hours 37 min ago
Joined: 10/25/2012 - 18:32
Posts: 2974
Location: Brisbane, Australia

Oh wow, interested….

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark

Got around to add a timed charge, i.e. charge with specific current for a specific time. The normal charge modes will not have a time limit.
I added to code to handle a temperature sensor (LM35) and stop on over temperature. One of the 3 pin connectors on the PCB is for the sensor.
The other 3 pin connector is for an external status led. I use a WS2812 for that, this means I use color to show actual status (I can also be read from the serial/USB port). The colors are: green:idle, blue:working, weak read:current on, bright red:error. They are combined.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

Yokiamy
Yokiamy's picture
Offline
Last seen: 3 hours 15 min ago
Joined: 10/18/2016 - 15:47
Posts: 1935
Location: Netherlands
HKJ wrote:
If there is interest in it, I may put it on my project page when I am finished in a few months. It is not very expensive, the most expensive parts are Arduino Nano and a ADS1115 module (This 15 bit ADC secures good voltage and current precision). The other stuff is fairly cheap, except you usually have to buy multiple items and there may be some shipping.

That would be awesome, i would like something as that, seems not too difficult to build !

Budget Light Forum ...where Frugal meets with Flashlight!

 

Henk4U2
Henk4U2's picture
Offline
Last seen: 15 min 17 sec ago
Joined: 02/13/2014 - 17:52
Posts: 2938
Location: The heart of the Netherlands (GMT+1)

Then all it needs is a 3D-printed casing and a label that says: “HKJ-2020”.

You are a flashaholic if you are forced to come out of the closet, to make room for more flashlights.

Yokiamy
Yokiamy's picture
Offline
Last seen: 3 hours 15 min ago
Joined: 10/18/2016 - 15:47
Posts: 1935
Location: Netherlands

Maybe HKJ can offer it as a kit ? Wink

Budget Light Forum ...where Frugal meets with Flashlight!

 

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark
Henk4U2 wrote:
Then all it needs is a 3D-printed casing and a label that says: “HKJ-2020”.

I need a 3D printer and space for it.

Yokiamy wrote:
Maybe HKJ can offer it as a kit ? Wink

No way.

I have put the specifications and implemented commands : in a document
It is not listed on my website.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark

Trying to provoke the charger. I used my oldest cell with very high internal resistance (AW18350-IMR) and low capacity. Start current was 1A (That is begging for problems on this cell) and termination current 10mA.

It looks nice enough, but is there something at the start?

Zooming in on the start shows that the charger hits 4.3V for 1 second, not really a problem.

The charger is a constant current charger, it cannot do constant voltage, that is done in software. Usually regulation is within a mV, but if the voltage raises fast it need some time to adjust the current and may go a bit to high.
Current regulation is fast, but voltage regulation is slow. I will try to improve the speed slightly of the voltage regulation.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

Shadowww
Offline
Last seen: 3 hours 26 min ago
Joined: 01/20/2012 - 19:09
Posts: 1340
Location: Northern Europe

How about CC – CV – TC? The “UPS way” of charging a Lead-Acid battery.

I.e.

1. CC at 0.1C
2. CV at 14.4V, until current drops to 0.01C
3. CV at 13.5V indefinitely (until user unplugs the battery/charger)

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark

Shadowww wrote:
How about CC – CV – TC? The “UPS way” of charging a Lead-Acid battery.

I.e.

1. CC at 0.1C
2. CV at 14.4V, until current drops to 0.01C
3. CV at 13.5V indefinitely (until user unplugs the battery/charger)

Where would I (or other people) use it? The charger can only work up to about 4.5V.
LiIon has fairly low self discharge and there is no point in keeping a maintain charge, except if you want it to be connected to mains for years (i.e. UPS), but then again it is not the ideal way for LiIon.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

Shadowww
Offline
Last seen: 3 hours 26 min ago
Joined: 01/20/2012 - 19:09
Posts: 1340
Location: Northern Europe

HKJ wrote:
Where would I (or other people) use it? The charger can only work up to about 4.5V.

Oops, I missed this spec. My bad. Oops
HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark
Shadowww wrote:
HKJ wrote:
Where would I (or other people) use it? The charger can only work up to about 4.5V.
Oops, I missed this spec. My bad. Oops

I am trying to keep the part count low and cheap with high precision, this means I have to do some shortcuts:
Supply voltage must be in Arduino regulator range, 12V supply works for that.
I do not want a voltage divider before my voltage measurement circuit, this limits voltage measurements to 5V.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark

One more charge mode:
VOLTAGE, this will measure voltage with current off and terminate when a specific voltage is reached.
VOLTTOP, as above, but will add a timed top-off charge using TIME function

First test with, I included the top-off function. The average current is 10% below requested current because 1 second out of every 10 seconds it will turn current off to measure voltage. This also gave some fun with logging, because I do not always want a thick voltage curve as above, the solution was an option to either return only the voltage measured with current off or the actual voltage. When returning the voltage with current off it will only be updated every 10 samples and any power or energy calculation done on the received data will be wrong!

This charge mode do not have any safety, specify too high a voltage and the cell will cook (Careful use of the temperature sensor can add a safety).

That was the last charge mode I had planned* and now I am basically done with the Arduino software (Need to clean it up a bit), but need some testing time and to redo the circuit board.
If there is some good ideas for more functions I may also add them if there is space for it.

*Two other possible terminations methods is based on temperature raise and voltage slope, I have not decided if I want to try with them.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark

I added one more charging mode: CAPACITY, i.e. charge a fixed amount of capacity into the battery.

I also worked on a new PCB for it:

It fixes some bugs and include some improvements to the original layout.
I am not going to order the new PCB just yet, I will be running test for some time first

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

Henk4U2
Henk4U2's picture
Offline
Last seen: 15 min 17 sec ago
Joined: 02/13/2014 - 17:52
Posts: 2938
Location: The heart of the Netherlands (GMT+1)

So you (we) need a PCB like in the post before this one. And a battery holder like this:

And a 5V socket to put a USB plug in? Or do we need more?

You are a flashaholic if you are forced to come out of the closet, to make room for more flashlights.

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark

It is a computer controlled charger, i.e. you need a computer to control the charger. It do not use 5V from the USB connection.

The 4 terminal battery holder is to get the best possible voltage measurements. You could short the sense and current terminals at the charger and use any battery holder (Like a old charger with electronic removed), but the voltage measurement would not be as precise.

So the list is:

PCB with Arduino and other parts.
Battery holder, preferable 4 terminal.
12V plug pack or other stabilized 12V supply..
Computer to control the charger.
And I would recommend putting the PCB into a box.

It was not designed as a general purpose charger, but it more in the test equipment category.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

Henk4U2
Henk4U2's picture
Offline
Last seen: 15 min 17 sec ago
Joined: 02/13/2014 - 17:52
Posts: 2938
Location: The heart of the Netherlands (GMT+1)

Thank you. Guess I was looking into your build the wrong way. From a consumers point of view.
Which means I can skip my next question(s).

You are a flashaholic if you are forced to come out of the closet, to make room for more flashlights.

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark
Henk4U2 wrote:
Thank you. Guess I was looking into your build the wrong way. From a consumers point of view. Which means I can skip my next question(s).

It would be possible to make another program and connect a display and some buttons to the hardware instead, but I do not really see much idea in it with this hardware.

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

HKJ
HKJ's picture
Offline
Last seen: 5 hours 34 min ago
Joined: 05/24/2011 - 12:23
Posts: 6962
Location: Copenhagen, Denmark

Not much update on this project yet, I have been testing and need to test some more.
For testing I made a setup with the charger and a discharger that is controlled from scripting. This way I can just start the test and come back a few days later to see the result.

One result I got on charging eneloops at 1A with -dv/dt terminations was this:

What is most interesting is the consistency between the 3 runs and it looks very good.
Getting 1920mAh from a eneloop also sounds good. The cell is a fairly new cell (½ year old) and has been used for my general charger testing.

One of the charge curves. As can be seen the charger also logs temperature and I get a low temperature raise at the end (good).

My website with reviews of many chargers and batteries (More than 1000): https://lygte-info.dk/

Pages