Exploring a LiPo-Charger/Booster/Fuel-Gauge-thingy - Page 1
Forum section: electronics / beginners

author: mcc
author_rank: Contributor
timestamp: October 21, 2018, 09:54:43 am
content: Hi,I bought one of these:https://www.aliexpress.com/item/1PCS-Raspberry-Pi-Zero-UPS-power-board-integrated-serial-port-power-detection/32893660585.html?spm=a2g0s.9042311.0.0.323e4c4ds8xUsPfor my Raspberry Pi Zero W.It is partly documented here:https://github.com/linshuqin329/UPS-LiteI translated the chinese spoken manual via google and some guesswork to english but didn't find a answer to my question.The circuit consists of a MAX17040 fuel gauge, a SIL CP2104 serial-to-usb interface chip, a Fitipower FP6717 boots converter chip (withsupposedly about 90% efficiency...) and a mysterious little 6pin SOT23-6.The according datasheets of the known chips doesn't tell anything of a charging functionality.I did a measureing of the current and voltage which flows while charging the LiION cell (LiION not LiPoly according to the writing of the cellitsself. I did the current measureing with a USB "charging doctor" (nothing fancy) and voltage measureing with a BRYMEN BM867 at the cellitsself.The voltage rises to 4.23 V and stays there and the starting current is about 500mA which slowly falls down to 0.5mAin the second half of the circle. Looks quite normal. 4.23V looks a little high for my beginners eyes, though.My question is: What is this SOT23-6 6-pin something on the PCB. A transistor? A charging IC (one pin goes directlyto the (+) of the LiION cell).Or what does charging?Another question:One can read via I2C the SOC and the voltage as measured by the MAX17040.As fas a I know, it is recommended to charge up to 75% and discharge no further than 25% charge of the cell.The voltage measured by the MAX17040 and what I measure with my DMM match.And the amount of mAh I have to recharge to reach 0.5mA cutoff current and the reported SOC match.But SOC and voltage reported by the MAX17040 compared to a Voltage vs. SOC table I found on theinternet does really not match.Is this Raspi power supply any good?Or am I badly wrong at some point with my assumptions?Is there any reasonable SOC vs. Voltage chart for LiION-cells?I have attached the fotos I made from the PCB.The datasheets are here:https://datasheets.maximintegrated.com/en/ds/MAX17040-MAX17041.pdfhttps://www.silabs.com/documents/public/data-sheets/cp2104.pdfhttps://pdf-datasheet-datasheet.netdna-ssl.com/pdf-down/F/P/6/FP6717-Fiti.pdfThank you very much in advance for any help in exploring and evaluating this circuit!Cheers!Meino

author: kjr18
author_rank: Regular Contributor
timestamp: October 22, 2018, 10:06:12 am
content: Indeed this sot23-6 looks like TP4057 or some other clone, set to 400mA charge current. These chips are very simple but quite good li-ion cc\cv charge ic's. You can try to compare your circuit to what shows up in datasheet.

author: mcc
author_rank: Contributor
timestamp: October 22, 2018, 07:17:18 pm
content: Hi kjr18,WHOW! The first "I understand this" on my side here...! Great !I used the continuity tester of my DMM to verify the schematic in this datasheet:https://datasheet.lcsc.com/szlcsc/Nanjing-Extension-Microelectronics-TP4057_C12044.pdfThe only difference seems to be, that the LEDs on my board get an R extra each tolimit the current...which seems reasonable for a LiPo-powered board.The next, what I need to understand is the MAX-chip.Currently I am in doubt, whether the value read via I2C is the percentage of chargeremaining in the LiPo (this is - I think - what the datasheet says) or the amountalready dicharged from the LiPo.I definetly need some valid chart, which shows a voltage <=> SOC dependency.As I understand LiPo (and that does not mean much) the battery voltagemeasured to estimate its SOC is the voltage without load....Correct?Does anyone has experiences with this MAX17040?Is he worth it or ... ?Thanks a lot again for any help in advance!Cheers!Meino

author: stmdude
author_rank: Frequent Contributor
timestamp: October 23, 2018, 05:06:50 am
content: I shipped a few million devices with the MAX17040 in it.If you're talking about the "SoC" registers in it, it's the percentage of charge _remaining_ in the battery.Please note though. The MAX17040 works in mysterious ways, and is powered by bullshit and unicorn farts. It's not a columb counting device, hence it's really just guessing. It's pretty good at guessing, but it's still guessing. (Hint: It's just reading the voltage, and what happens to a battery when you apply a load?)Also, the MAX needs a few complete cycles to self-calibrate itself before the SoC readings are somewhat reliable.Lastly, if you're going for maximal accuracy, the MAX needs to be calibrated (not self-calibration, manual calibration), which if I recall correctly is done by Maxim. (Its been a few years)

author: mcc
author_rank: Contributor
timestamp: October 23, 2018, 05:28:43 pm
content: Hi stmdude,Thank you very much for your help!Currently this happens after three charge/discharge cylces:When I start the Raspi and let it run idle ("running idle"-whatdid I wrote there......?I mean: Only the kernel is running and a little script doingsome I2C to get the voltage and the percentage off the chipfrom time to time) this happens:The voltage level falls and I can verify the value with my DMM.So no problem here.But the percentage rises first and falls then but towards thepoint I would shutdown/switch off, the percentage is way to high.I use this table (posting #6):https://www.rcgroups.com/forums/showthread.php?2366548-LiPo-80-rule-and-my-shallow-charge-ratesAccording to that chart, 3.69V is about 10% left charge.But my board reports:++++++++++++++++++++Voltage: 3.65VBattery: 30%++++++++++++++++++++You wrote, calibration is done by...MAXIM? So...do I need to sendthem my board? Is a joke...or? OR?What voltages would you suggest for a LiPo cell, which is currentlybe charged AND slightly under load (95mAh - the linux is running reading thevoltage and SoC), has 1000mAh and is supposedly a Li*Po* cell despitethe writing on it saying "LiIon", as upper and lower limits to not todo harmful things to the lifespan of the LiPo?How many cycles -- roughly guessed -- I need before the Max17040 from"wildly guessed mode" to an elaborated guess of the SoC?And why LiPos are such delicate beasts?...Thanks a lot in advance for any help!Really appreciated!Cheers!Meino

author: stmdude
author_rank: Frequent Contributor
timestamp: October 23, 2018, 06:11:09 pm
content: Ok, lots of questions in there..So, the rule of thumb is: Never go below 3.0Vunloadedon a LiPo cell.Since the unloaded voltage will be higher than the loaded voltage, you can run your battery all the way down to 3.0V, and when you stop drawing power, the voltage will rise above 3.0V.A medium quality LiPo has about 10mOhm internal resistance. Meaning, if you pull 95mA from it, you will get 0.010*0.095 volts of drop. (<1mV)As for the 17040, three cycles should get it somewhat accurate. The calibration from Maxim is not required unless you need higher accuracy, and I don't think they offer it unless you ship a lot of devices.As for 30% SOC @ 3.65V, it sounds somewhat reasonable actually. I'd run it down to 0% and keep an eye on a voltmeter to make sure the battery doesn't drop below 3.0V.As for the RCGroups sheets/charts, since they're not specifying the internal resistance or the load they're putting on the cells, they're kind of useless to look at.As a bonus: Keep in mind that LiPos self-discharge. So if you run a cell down to 3.0V or close to it, you should put some charge into it fairly soon.

author: mcc
author_rank: Contributor
timestamp: October 23, 2018, 06:46:10 pm
content: Hi stmdude,thanks a lot for the info material and the bonus track...I like it!...that's why I posted it under "beginners"...if my question would contain words like "bosons", "quarks", "myon" and "LHC" I morelikely had posted it under "quantum physics"...but doubt to get any answer there...Back to the topic...I read some articles about "extending the lifespan of your LiPos" and such and always misses any information, whether the givenvalues for different voltage levels are measured under load or without it. Additionally often there is no time stamp on such documents.LiPos did evolve over time I think...Those documents say: Discharge down to 3.5 volt (25%) and charge up to 75% (no voltage found here, I think because it is in the CV areaof the charge process, hehehehe).Will the difference that great: Under load 3.0 V and without load 3.5VCheers!Meino