Post
by Stevo52 » Tue Dec 31, 2019 8:24 am
Hi pythoncoder..
I have spent a few hours today sorting out the back up battery on the STM32F722 and the WBUS-DIP28.
What I have found is that the WBUS-DIP28 has provision for two backup batteries:
1. The RTC backup battery - this is described in the documentation as you say, with the circular pad and two other pads near the connector for a tile. The battery recommended - MS414GE-FL26E is 'un-obtainium' in this country apparently , likewise the holder. However I discovered through the documents/schemactics/and poking around with the trusty meter, that the 'VBAT' that is the RTC backup battery doesn't appear on the WBUS DIL connections but it does appear on the STM32F722 - top left hand side Y pins 2 and 3 down from the USR button. Interestingly, if you trace the schematics, VBAT becomes VBAT_EXT for the transition though the WBU-A header (Pin 31), then reverts to VBat on the PYBD. While I couldn't get the right rechargeable battery, I wired in a JST 2PH header socket at the pins on the PYBD and then fitted a CR2032 as a temporary solution (with schottky diode inline) - and voila! I have read_core_vbat() data.
2. The second battery is a rechargeable backup for the whole 'system' - connections for it are just behind the USB-FS connector on the WBUS-DIP28. I have a single cell 3.7V Lipo connected there and it charges fine and maintains the system fully running if I disconnect the USB cable. I haven't done a full discharge run on it yet, but I expect there will be a few hours available in the event that the main solar power system fails (this is happening a bit at the moment with storms and cloud, plus smoke haze from the bush fires causing the solar battery to not get to full charge). This is the battery I want to read the voltage from, using a separate ADC pin, a voltage divider and some code, directly from the 'system' back-up battery.
The combination of the external power supply, system battery backup and RTC back up battery is a bit 'belt and braces', but should reduce the incidences of total system power down that have been occurring. My code already allows to recover from that scenario, but not without loss of live sensor data which upsets the client who is make real-time calculation from the information my app provides. So far reliability was at 92.999% with the early GPY version and is currently at 97.22% with the PYBD prototype (running at 216MHz 24/7 - but without reporting some of the system data requested - such as WiFi RSSI and battery voltages, though I am well on the way to resolving those now).
Note that the MS414GE-FL26E battery has two pins on it, so it is not a flat button cell yet the PCB pads seem to be for a button cell holder. While I can't source a MS414GE-FL26E, I have found some LIR2032 CMOS Battery CMOS Battery, so I am researching those., as well as alternative 4.8mm rechargeable cells.
So some progress for me and a much clearer idea of how the PYBD power system is bolted together which will help me refine the external solar power system.
Thanks for all the assistance that has been contributed so far - these relatively simple things have once again take a lot of research and time to come up with solid solutions.