I've been reading around various sources trying to figure out how to measure a battery voltage on a PSoC 4 BLE running from a CR2032. We've all seen the 101 video which talks about adding a BAT GATT service. This is very useful but the tutorial just simulates voltage fluctuations with an interrupt driven counter rather than detailing best practices for physical battery voltage determination.
I'm fairly new to PSoC BLE and was a little disappointed when I did not find a "pre-rolled" battery voltage level component in Creator. I'm sure this is a common requirement amongst developers.
I thought it would be a good idea to invite comments on the topic, encourage others to pitch in and collectively come up with an approach which gives reasonable accuracy with low power consumption and price.
My ideal CR2032 based approach would have the following primary requirements:
Have a look at BLE_Battery_Level example project available with PSoC Creator. This can actually measure the voltage of a CR2032 coin cell and update the % voltage to an App and has low power features implemented. In addition to the standard battery service, it also has a simulated battery service.