16 Cell 18650 Charger/Discharger Board Module

Bubba

Active member
Joined
May 9, 2018
Messages
288
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:
Are you meaning that the cells will be all parrallel to balance or that there will be a constant voltage applied from a common rail?
 

nz_lifer

Member
Joined
Aug 26, 2020
Messages
68
Are you meaning that the cells will be all parrallel to balance or that there will be a constant voltage applied from a common rail?
They will be parallel to balance after charge termination. Not charged from a common rail.

One of the cell blocks from the current design showing the 3 separate mosfets for the 3 functions.
1608137771835.png
 

daromer

Moderator
Staff member
Joined
Oct 8, 2016
Messages
5,468
Sounds like trying to solve a non existent problem. If you think you need better precision build your own Charge circuit or buy a more high end One.
Or just paralell all cells from start? And Charge all cells?

Though its Always fun to experiment :)
 

hpeyerl

New member
Joined
Nov 22, 2020
Messages
11
I was hoping to browse the schematic today but life got in the way. Will try to do it tomorrow. But don't wait for me. :)
 

nz_lifer

Member
Joined
Aug 26, 2020
Messages
68
Sounds like trying to solve a non existent problem. If you think you need better precision build your own Charge circuit or buy a more high end One.
Or just paralell all cells from start? And Charge all cells?

Though its Always fun to experiment :)
In the big picture it is probably not a problem :)
What's a few mAh between friends right? :cool:
This is a fun experiment indeed. As they say, keeps me out of trouble.


On an aged cell the difference between 4.10v and 4.25v is 300mAh, 12%.
2475mAh - 2775mAh at 50mA charge termination current.
1608159188857.png

I don't think I can build my own for the same price as doing it this way.
The megacell is probably the next step up in accuracy in commercial units.

Parallel charging from the start is a no go as the cells will be anywhere from 2.0-4.0v.
Without current limiting each cell it's a bit more cowboy than I would like.

Maybe I should just make all output display at two significant figures and be done with it :geek::unsure::p
 
Last edited:

daromer

Moderator
Staff member
Joined
Oct 8, 2016
Messages
5,468
Megacell uses tp4056 isnt it? Note that paralelling the first set may give you 4.12 and next 4.23.... all depends on the state during that run so you Still need something to have more accurate voltage.
 

nz_lifer

Member
Joined
Aug 26, 2020
Messages
68
I understand the voltage will change with load on the power supply, DC Step down.
As the cell voltages settle and load decreases, the voltage should float to the correct level.
1608178413979.png


If it does not work as expected I can add a digital potentiometer to the adjustment pot and have the controller adjust that too.
Just have to mind the PID loop to avoid hysteresis.
 

daromer

Moderator
Staff member
Joined
Oct 8, 2016
Messages
5,468
And if you look it is based on an adc that isnt that precise so the numbers you ask for does not exist in the pricerange you want ;) And thats basically howyou make the numbers look nicer. To bad that many think that just because you add more decimals it gets more precise :D The other way around often.
 

Eric44

New member
Joined
Jan 30, 2020
Messages
21
Forget the Megacell, just something robust with very good components (+ and - batteries), then an open software that the community can improve.
 

nz_lifer

Member
Joined
Aug 26, 2020
Messages
68
If we drop in a PCA9685/TLC5490and have adjustable discharge currents.
Unfortunately JLCPCB do not have that part in stock for smt assembly.

As for hardening it, not sure where to start.
If each board is cheap enough, just swap it out after a few slots goes bad?
Or design with through hole replaceable components like Brett's designs.
 
Last edited:

dc443

New member
Joined
Dec 10, 2020
Messages
19
Thanks for this thread @nz_lifer it's been very informative to me. I'm a coder but historically haven't been able to stop myself from getting seduced by power electronics. As I currently have a ton of 18650 packs on hand to disassemble and make something of, it was only a matter of time until I found myself here contemplating what a purpose-built (but DIY) cell testing system would look like, and boy did you deliver. The schematic you posted showing the different circuits gated by mosfets controlled by your arduino is really like what I had been envisioning and I'm so glad to see that it really is as simple as I hoped it could be.

I'm curious if you have any thoughts about simplifying some of this. So I take it the floating voltage (4.2v) is shared and utilized by all the cells once they are "charged", yes? So that's circuitry that does not need to be duplicated (like your discharge and charge circuitry must be for each cell). Well, what about temperature sensing? I wonder if there's a way to run thermistors over to each cell, but mux a single temperature IC to them somehow. Or I guess if you're gonna use something like LM35 it would not be as complicated? But what mechanism will you use to mux them?

Perhaps these poorly thought out suggestions would not serve to simplify at all. But that would be why you're so far along in this cool project and I'm still sitting here trying to find reasons against just buying a bunch of Opuses.
 

nz_lifer

Member
Joined
Aug 26, 2020
Messages
68
Thanks for this thread @nz_lifer it's been very informative to me. I'm a coder but historically haven't been able to stop myself from getting seduced by power electronics. As I currently have a ton of 18650 packs on hand to disassemble and make something of, it was only a matter of time until I found myself here contemplating what a purpose-built (but DIY) cell testing system would look like, and boy did you deliver. The schematic you posted showing the different circuits gated by mosfets controlled by your arduino is really like what I had been envisioning and I'm so glad to see that it really is as simple as I hoped it could be.

I'm curious if you have any thoughts about simplifying some of this. So I take it the floating voltage (4.2v) is shared and utilized by all the cells once they are "charged", yes? So that's circuitry that does not need to be duplicated (like your discharge and charge circuitry must be for each cell). Well, what about temperature sensing? I wonder if there's a way to run thermistors over to each cell, but mux a single temperature IC to them somehow. Or I guess if you're gonna use something like LM35 it would not be as complicated? But what mechanism will you use to mux them?
Thanks dc443 for the interest :geek:

Yes it is that simple once you know the basics.
And keyboard warrior friendly too since we don't have to manually place those microscopic components. My eyes and hands are not what they used to be. Still have to manually route all those interconnecting traces.

Float voltage device is 1x device shared per 16 cell board. It could be shared across the whole system as the power draw is not that much.

Temperature sensing is per cell, TEMP_1.
Cheap and available as an automatic build component on JLCPCBs parts list.

All inputs are mux'ed to an onboard adc.
Full schematic here also.
_sch_mux.PNG

I put the adc onboard as my current design (pictured) has a ±0.003v error in use.
Due to the long run back to the adc, 200-500mm. 8"-20".
20201225_201316-adc.jpg
And poor onboard routing.
Chasing those millivolt unicorns 🦄 is not for everyone or required but I wanted to give it a go. :unsure:

Tested floating above batch of cells.

Using this dc buck converter I had on hand.
20201225_202321.jpg

Look at those starting voltages. Come here little unicron. :ROFLMAO:
20201225_201325.jpg

I will finalize the design and start routing the board in the next week.
 

dc443

New member
Joined
Dec 10, 2020
Messages
19
Awesome, I did not realize that temperature sensors that spit out a voltage (they are calibrated as well!) are as cheap as 10 to 20 cents, seems like that makes them only around 5 times more expensive compared to NTC thermistors, but so much easier to integrate. That will do very nicely with a multiplexer chip as you have there. Thanks for the explanation!

I think that this kind of temperature sensor setup could work well embedded into battery packs so that they can self-report warm cells and help to pinpoint them if enough are used.

Are you using a "4 wire" method for measuring voltage with the ADC?
 

nz_lifer

Member
Joined
Aug 26, 2020
Messages
68
I completely forgot about looking up an smd ntc. I was wooed by the calibrated nature of those parts :p
NTC are cheaper.
1609129838768.png vs 1609130164583.png

I do plan to litter then throughout my battery bank to improve my chances to catching issues early.
Wiring is a lot easier now that I got the hang of muxes and shift registers.


"4 Wire" measurement, not sure if this is applicable to our use case.
I don't fully understand myself to make an informed opinion at this stage.
 

hpeyerl

New member
Joined
Nov 22, 2020
Messages
11
I had a quick look at the code you posted. Once you can tape-out on r2.0 and I can order my own set, I can see myself having a field-day refactoring this code. :)
 

Bubba

Active member
Joined
May 9, 2018
Messages
288
They will be parallel to balance after charge termination. Not charged from a common rail.

One of the cell blocks from the current design showing the 3 separate mosfets for the 3 functions.
View attachment 22827
I was wondering if you thought of say 1ohm resistor with the discharge FET rather than using the FET to dispate all the Heat?
I haven't done this yet, but looking at the TEENSY 3.6. There are 4 i2c ports and plenty of pwm pins to do 16 cells. I would need a driver since it's 3.3v and low mA pwm.
To avoid a lot of PCB waste have you thought of making the Charge/Discharge as a complete individual module that could be easily placed with the cell holder and replaced as needed? Thought it may also reduce the PCB cost or allow for more purchased for the same board dimensions.
 

nz_lifer

Member
Joined
Aug 26, 2020
Messages
68
I had a quick look at the code you posted. Once you can tape-out on r2.0 and I can order my own set, I can see myself having a field-day refactoring this code. :)
Cool. To a coder the current must look pretty amateurish. But hey, it works :)

I was wondering if you thought of say 1ohm resistor with the discharge FET rather than using the FET to dispate all the Heat?
I haven't done this yet, but looking at the TEENSY 3.6. There are 4 i2c ports and plenty of pwm pins to do 16 cells. I would need a driver since it's 3.3v and low mA pwm.
To avoid a lot of PCB waste have you thought of making the Charge/Discharge as a complete individual module that could be easily placed with the cell holder and replaced as needed? Thought it may also reduce the PCB cost or allow for more purchased for the same board dimensions.
Hi Bubba, the power is dissipated through a resistor :)
1609350268219.png

I too was concerned with board space/cost, until I saw the overall cost when ordering.
For mass production/profit there would be some compromises made. Look at the megacell.
For personal use, the extra cost is worth the ease of use.
-More space between cells to allow easier remove of individual cells. Waste vs ease of use.
-heat sources away from the cells for better accuracy of cell temperature measurement. Size vs accuracy.

Earlier post about some design choices. And potential resistor placement.
 
Last edited:

nz_lifer

Member
Joined
Aug 26, 2020
Messages
68
How are you confirming the discharge current so that you could adjust the PWM ... to simulate Constant Current?
Currently no pwm for simplicity but I will leave space on the board for a pwm controller.
We can work out capacity with a constant resistance discharge.
Works out pretty close to a constant current discharge of similar average amperage.
See link in first post to Adam's video.

Current can be calculated from battery voltage since we know the value of the resistance.
Using ohms law V=IR.
There will be some math gymnastics to use only battery voltage to set pwm.

Other option is to add a sense resistor.
Costs would be minimal but would add 1-3hrs to board routing. It is a one time effort so I might add that to the list :cool:
 
Last edited:
Top