Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
16 Cell 18650 Charger/Discharger Board Module
Inspired by many sources.
One of the first videos I came across that piqued my interest was Brett's Smile
Who happens to be a kiwi too, Bro Wink

Other videos of interest.

A big caveat, I am no electrical engineer.
The layout and track routing probably break all sorts of best practices.
My layman's assessment says it should work well enough. Smile

Note you will need a microcontroller to drive this.
4x Outputs to drive the Analog Mux's.
1x Output per module. 64 channel would need 4x.
3x Output to drive the Shift Registers. Controls the charge/discharge function.
1x Input to sense charge completed.
2x ADC input for sensing Battery temperature and voltage.

There is a Red led for charging indicator.
Yellow for discharging.
Was going to flash them both to indicate the test cycle had completed.

I did not know about the Megacell project until I was already 90% done routing the board.
20+ hours in Sad
Would I have still done this if I had found out sooner?
I think so.
There are some interesting engineering choices they made.
Using the whole PCB as a heatsink? With sensors for monitoring battery temperature on the same PCB.
The software looks really good though, once debugged.

Discharge is not PWM, just straight on/off. Should not generate much switching interference.
Also means it is not constant current discharge.
But a function of the battery voltage.
The shift registers could be driven fast enough to simulate PWM.

The two data buses are the Shift Register and Analog Muxes.
Both are pretty low frequency and can be slowed down if interference starts to show up.

Any spikes should have minimal effect on the adc measurements.
I am using the ADS1115 16bit ADC to measure battery voltages.
Running at the 430 Samples/Second speed. PGA set to max voltage range ±6.144.
Testing showed estimated mAh was within 1% when measured against a hobby battery charger, B6 clone.
This is without a current sense resistor, just accurate voltage measurement and calculating amperage using ohm's law. I=V/R
The fancy charger ramped down discharge current squeezing more mah out of them, iCharger 4010 Duo.

Shift registers over I/O Expanders for cost and expandability.
Although unless you go over 64 total cells, multiplexers would be fine.
For hobby use, costs are not a major either. Only matters if you are producing hundreds to sell.

Raw TP4056 IC over using completed modules.
The less soldering I have to do the better. If I am getting it populated might as well outsource as much as I can.

Switching the charging via a Mosfet rather than using the EN pin on the TP4056 IC.
This should give reverse battery protection too since it is now behind a Mosfet.

Temperature sensing, NTC Thermistor over a device like LM35.
Cost and availability. Not cheaply available locally here.
And I didn't know about it until the board was nearly completed.
I would have used them or something similar as they can be populated with the rest of the smd components.
Precision should be good enough for our purposes. These can go as accurate as 0.1°c if processed right.

Board was sent for manufacturing on 25/08.
PCB manufacturing completed 28/08.
Component assembly completed 28/08.
Should be in my hands in 5 days. Big Grin
Cost came to about us$18ea. Still unbelievably cheap compared to what was available not  ago.

Project is posted on EasyEDA

There was a minimum order of 5x boards.
If anyone wanted one and can help coding I can ship one to you.  Cool

I will do another post to give the R&D leading up this point.

stromisist98 likes this post
Interesting. Couldn't find the full project files,,, such as programming, stencils etc.

I haven't check but wondering how hard it would be to change from the TP4056 to TP5100?
All round better component. Also allows for lower voltage cell charging.

How is it currently working for you?
I agree the 5100 would be better overall. Plus it would be possible to input a higher voltage to the units thereby making them a bit more stable as the 5100 can take up to 18V input (if I remember correctly). But that might require changes to the above project.
Proceed with caution. Knowledge is Power! Literally! Cool 
Knowledge is Power; Absolute Knowledge is Absolutely Shocking!
Certified 18650 Cell Reclamation Technician

Please come join in general chit-chat and randomness at Discord Chat (channels: general, 3d-printing, linux&coding, 18650, humor, ...)
(this chat is not directly affiliated with SecondLifeStorage; VALID email req'd)
(08-29-2020, 02:49 AM)Bubba Wrote: Interesting.  Couldn't find the full project files,,, such as programming, stencils etc.

I haven't check but wondering how hard it would be to change from the TP4056 to TP5100?
All round better component.  Also allows for lower voltage cell charging.

How is it currently working for you?

No code posted yet. Just the schematic and pcb at

I have test code for each part, shift register/mux/adc, but haven't pulled it all together into a combined solution.

Stencil? The smd stencil? Sorry I am not familiar with that term in a proper development environment.

My initial test unit was only a 4 way unit.
No expander or shift register used.
I am putting together a 16 way unit now while I wait for the produced ones from JLCPCB.

TP5100, looking at the reference design from the datasheet and some of the available boards, as long as I am not soldering them it should be easy enough to rework those in. Smile


My only concern would be any extra noise from the buck switching. on my less than ideal traces.
I will buy a set of boards and try them out.
It is on the JLPCB parts list. Smile
Test hardware done.
So ready for those PCBs Smile

Onto coding.  Confused
PCBs Arrived Big Grin

7 days from paying to in my hands. Can't beat that.

Birds nest to PCB  Cool

Wolf, Bubba, Korishan like this post
After a Weeks of evening coding I have a functional system.  Big Grin
4 cells initially for final debugging and tuning.


Currently headless, no local display.
Posting information via serial to an excel spreadsheet using this plugin.

With the ADS1115 we can easily get millivolt accuracy.
Of course that means if you measure too far from the cell you will see the voltage drop in the wires.
This can be compensated for in software once the parameters are known.
But at this stage I am telling myself just leave it. I don't NEED sub 1% accuracy Rolleyes
I won't be running 10awg wire everywhere to gain a few mV either.
Also had to stop myself from buying a 6 1/2 digit bench meter. Maybe later  Cool

The code will need some work to get speed and efficiency up.
Currently taking about 100-150ms to cycle through the 4 cells.
Korishan likes this post

Forum Jump:

Users browsing this thread: 1 Guest(s)