16 Cell 18650 Charger/Discharger Board Module

nz_lifer

Member
Joined
Aug 26, 2020
Messages
87
Inspired by many sources.
One of the first videos I came across that piqued my interest was Brett's :)
Who happens to be a kiwi too, Bro ;)

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

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 :(
Would I have still done this if I had found out sooner?
I think so.
https://www.indiegogo.com/projects/megacellcharger-mass-production#/
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.1c 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. :D
Cost came to about us$18ea. Still unbelievably cheap compared to what was available not long ago.

Project is posted on EasyEDA
https://easyeda.com/recfvpernz/18650-chg-disc-rev1-web

There was a minimumorder 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.


image_mfwobd.jpg

image_rjuozp.jpg

image_jaeazs.jpg

image_mqituj.jpg
 
Last edited:
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.
 
Bubba said:
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
https://easyeda.com/recfvpernz/18650-chg-disc-rev1-web

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.

image_szzlun.jpg

image_eatglw.jpg

image_vwrbti.jpg

image_vfsrvr.jpg

image_zdcolh.jpg



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


image_alqnuh.jpg

image_viusae.jpg


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

image_bttiid.jpg
 
After a Weeks of evening coding I have a functional system. :D
4 cells initially for final debugging and tuning.


image_iknqsv.jpg

image_wjrtde.jpg


Currently headless, no local display.
Posting information via serial to an excel spreadsheet using this plugin.
http://www.robertovalgolio.com/sistemi-programmi/arduino-excel

With the ADS1115 we can easily get millivoltaccuracy.
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.
 
I've just started harvesting cells. This project intrigues me. I was looking at the Megacellcharger which also seems nicely done but I lost interest for the dumbest of reasons. I don't have a Windows computer anywhere.

Anyway, looking forward to seeing more of this project. How much were the boards from JLCPCB? I'd like to try building one when you're ready.
 
I was looking at the Megacellcharger which also seems nicely done but I lost interest for the dumbest of reasons. I don't have a Windows computer anywhere.

There's nothing dumb about that reasoning. I've heard quite a few people say the same thing. Hopefully they'll work on port to another OS or some other way of configuring it.
 
Anyway, looking forward to seeing more of this project. How much were the boards from JLCPCB? I'd like to try building one when you're ready.
Hi, there came to us$18ea delivered, for the minimum for 5x.
I will put together an update post. :)
3 have been in service as a discharge only board for 2.5 months now.
Processed about 2,000 cells?
1 slot has failed, have not checked it out to see what failed. Logic signal is still getting there.
There was a uncompleted trace. A length of jumper wire fixed that.

Working on Rev2 now. Was hoping to get it manufactured before christmas o_O
 

Attachments

  • 20200927_131628.jpg
    20200927_131628.jpg
    2.7 MB · Views: 265
Working on Rev2 now. Was hoping to get it manufactured before christmas o_O
Looks good. I'm currently harvesting cells (I'm down to 2-BPH. Bandaids-Per-Hundred).

Did they actually assemble and reflow the board for you? Or did they just ship the boards and parts to you? Regardless, that's pretty amazing. $67 for 5 boards plus shipping.

Anyway, it all looks pretty simple. I'd build one if you were ready. I don't mind writing code (embedded, not gui or web).
 
Looks good. I'm currently harvesting cells (I'm down to 2-BPH. Bandaids-Per-Hundred).

Did they actually assemble and reflow the board for you? Or did they just ship the boards and parts to you? Regardless, that's pretty amazing. $67 for 5 boards plus shipping.

Anyway, it all looks pretty simple. I'd build one if you were ready. I don't mind writing code (embedded, not gui or web).
BPH , :LOL::ROFLMAO:.
Our current workflow now includes gloves. So that metric is way down.

They come all reflowed and assembled. Post #6

Where are you based?

Current test code attached.
 

Attachments

  • Mega-shiftcell-tester_r0.1.zip
    13.6 KB · Views: 200
  • 20201214_060016.jpg
    20201214_060016.jpg
    3.2 MB · Views: 218
BPH , :LOL::ROFLMAO:.
Our current workflow now includes gloves. So that metric is way down.

They come all reflowed and assembled. Post #6

Where are you based?

Current test code attached.
I see that now. Nice.

I'm in Calgary, Canada. I've not used easyeda; looks like I can create an account and place my own order? I suppose I should wait for you to post rev2?

Today's count is 430 batteries.
 
I see that now. Nice.

I'm in Calgary, Canada. I've not used easyeda; looks like I can create an account and place my own order? I suppose I should wait for you to post rev2?

Today's count is 430 batteries.
Canada, cool.

Currently used as a pure discharge board.
As my current workflow requires the cells to rest after charging.
I can fix the minor error I made. Remove charging related stuff, drop the cost a little too.
And send you the files required to order from JLCPCB. Rev 1.1 :D

Rev2 is mainly revamping the charger side. Going with TP5100 modules.
And a float rail to get the cells to exactly the same charged voltage.
Not the current range of 4.10-4.25v from my charging bank, attached.
Although in the end it does not matter that much, but dammit I only want to see 4.200 ±0.005 V.
 

Attachments

  • 20201001_210923.jpg
    20201001_210923.jpg
    2.6 MB · Views: 277
  • 20201001_210911.jpg
    20201001_210911.jpg
    2.4 MB · Views: 273
  • 20200930_175119.jpg
    20200930_175119.jpg
    2.3 MB · Views: 271
  • 20200930_175110.jpg
    20200930_175110.jpg
    2.3 MB · Views: 269
Last edited:
I can fix the minor error I made. Remove charging related stuff, drop the cost a little too.
And send you the files required to order from JLCPCB. Rev 1.1 :D

Rev2 is mainly revamping the charger side. Going with TP5100 modules.
And a float rail to get the cells to exactly the same charged voltage.
Not the current range of 4.10-4.25v from my charging bank, attached.
Although in the end it does not matter that much, but dammit I only want to see 4.200 ±0.005 V.
I think I'd like to wait until you have a version that can do charging.
 
You will never be able to get 4.200 ±0.005 V. with the TP chipset. Its +- 0.1V.
And to be honest. You will never have any benefit of going closer. Especially not for the purpose or for this type of cells.
 
I read somewhere and saw a chart that laid out supply voltage to termination voltage. Higher supply voltage = higher termination.
 
You will never be able to get 4.200 ±0.005 V. with the TP chipset. Its +- 0.1V.
And to be honest. You will never have any benefit of going closer. Especially not for the purpose or for this type of cells.
I understand that.
My design is a float rail the cells will be connected to after charge termination that will be at the exact voltage.
It is more an academic exercise than a real life practical one. :geek:
 
Last edited:
New schematic drawn up. Any input before I start routing it :)

Some design notes.
Optional components can be omitted at time of ordering to reduce cost.
The board will be routed to allow alternatives to using that component.

Optional $2.00 (ADC) + $0.60 (mux)
I have put the ADC on each board to increase accuracy.
I like this particular one as it is one I am familiar with.
It has onboard voltage reference, reducing external component count.
Internal Programmable Gain Amplifier , no external voltage dividers required for a +-6.144v range.
However it is I2C with limited address. 4.
To overcome this , I have also included a I2C Mux IC. 8 Possible address. Maxing out at 128 (8x16) cells per controller.
If you need more per controller then a variation of the below solution could give you 512 cells. (4x 128)
This Mux could also be on the controller board, but it would require running an extra 2 wires from each board back to the controller.

A float rail is included to bring the charged cells to an exact voltage.

Even though the P mosfets are switching 4.2v, the gate can be at 5v.
As long as the Gate voltage is below the max of the mosfet it seems to be ok.
I found confirmation of this after drawing up the schematic with a level shifter.

Both SMD and Through hole cell holders are included for flexibility.
Through hole holder will need a 3mm hole drilled for the temperature sensor.
Cells will not sit flush in the SMD holder as the temperature sensor will lift it by about 1.1mm.
My testing shows there is still good engagement with the -ve contact terminal.

To keep the board small, the TP5100 charge module and discharge resistor will be stacked. Proof of concept attached.
Doing this will keep the board about the same dimensions as the first board.
This should keep the heat away from the cells to allow proper detection of cell temperature during testing.
Even better, build a channel to allow forced air cooling for the charge module and resistor.
 

Attachments

  • 20201216_203940.jpg
    20201216_203940.jpg
    2.6 MB · Views: 247
Back
Top