I was excited to receive my first Pico W and two Piico Dev components (ultrasound + ambient light). The project is designed to monitor light + distance to send a triggers to home automation in the right conditions. Python’s a breeze so far and I’ve debugged a few niggles whilst powered via USB from my laptop.
I’m ready for a field test soon, so will give the battery a crack with the LiPo expansion board. Here’s the catch - I’ve little knowledge on how much power this will use, so I don’t know how long the battery will last.
I haven’t found a way to examine the state of charge, but I’m sure others have done this?
LiPo battery monitoring can be tricky as the voltage on the battery does not correspond linearly to what percentage of charge is left in the battery.
For a rough estimation a voltage divider circuit connected to an ADC can measure the voltage on the battery, this will give you a rough idea of if the battery needs to be charged, but won’t give you insight into how many hours of battery life is left.
If you want a battery capacity readout as a percentage a battery monitor / fuel gauge module placed between the battery and the PiicoDev adaptor will let you read the battery levels via I2C into your Pico.
We’ve got a selection of battery monitors that you can find at the link below.