Why not design your own charger?

VERY interesting!

Nice project Henrik! :-)

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.

Looks like a great project.

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

Oh wow, interested….

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.

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

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

Maybe HKJ can offer it as a kit ? :wink:

I need a 3D printer and space for it.

No way.

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

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.

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.

Oops, I missed this spec. My bad. :zipper_mouth_face:

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.

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.

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

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?

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.

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).