Started assembling and testing the sense and balance circuitry on the weekend.
Discovered some weird behavior on the cell voltage measurements on Sunday. Otherwise cell voltages were okay, but the top most cell was always 40-70 mV under actual amount and was fluctuating slightly, where as all the other cell voltages were rock-solid and on point. I tested with 3, 4, 5, and 6S batteries and it was always the top cell measurement that exhibited this behavior. Due to the problem always persisting with the top cell and all lower cells showing correct numbers, this lead me to believe the sense circuitry itself was okay, but there is something weird going on the supply side on the LTC6803.
Tried isolating the MCU’s 3V3 supply, which seemed to fix the problem. Meaning there is something funky going on with the 6803’s 5VREG output while USB is connected. Problem seemed to get fixed by placing a diode on the 5VREG line between the MCU 3V3 linear regulator. USB comms showed correct and steady results for the top most cell measurement after that. Board now officially has it’s first hot bodge component placement as pictured below (had to scrape off soldermask and cut a trace and then solder the diode inline onto the naked trace )
I still want to check the measurement results without the USB connected by passing the cell measurement results through an Arduino via USART.
Once I have results from that, then I’ll start testing the actual balancing. Mainly interested in the thermal behavior, currently current bleed resistors are 33 Ohm, as can be seen on the lower picture. At 4.15V this should give ~125 mA balance current.
Note
I believe I’ll be able to get the standby current use below 100µA, but I still don’t have the better suited linear regulator on hand yet, so I can’t affirm it 100%. In theory this should give for example a 1 Ah (very small) battery a storage life of ~400 days, or 2.4 mAh daily.
Off-topic
Assembled this thing also on the weekend (battery not yet soldered in). Kudos to @MasterCho for Thingiverse files and @Smorto (https://www.electric-skateboard.builders/t/gt2b-mastercho-chozen-mod-full-length-tutorial-how-to/16005?u=simosmcmuffin) and @Mikenopolis (https://www.electric-skateboard.builders/t/gt2b-mod-video-tutorial-chozen-remote-case/37668?u=simosmcmuffin)
EDIT:
Also, experimented with the super low-power modes on the MCU and did a beginner’s error. Put the MCU in stop mode 2, which stops the CPU clock.
Have a guess, if I could get my ST-LINK to connect to it after that? No. Problem really was that I don’t have RESET broken out to a test pad, because normally you can call software system reset with just the SWCLK and SWDIO, but guess if that still works when the CPU is internally stopped in a low-power stop mode? Nah. So every time the MCU booted up it directly ran itself to stop mode in couple milliseconds. Not really enough time to start debugging run from the ST-LINK and flash a new firmware to it .
Fun. Times.
In the end I solved the problem by soldering a sneaky hook-up wire directly onto the QFN package’s
RESET pin pad (which doesn’t extend out anywhere from below the package). Well got it done. Got reset working so I could get the debugging session started and flash a new firmware. Didn’t even have RTC running the auto wake-up in the background, so it really was a sleeping beauty at that point. Even considered desoldering the whole MCU and just plonking down a new one.
Well, you learn best from these kinds of mistakes…