travisgoodspeed / goodwatch

Replacement board for Casio Calculator Watches using the CC430F6147
503 stars 55 forks source link

Measuring Battery Voltage #76

Closed travisgoodspeed closed 5 years ago

travisgoodspeed commented 6 years ago

To avoid glitching out on a low battery, we need to be able to at least roughly measure its voltage through the ADC.

Known thresholds:

Close this issue when a voltmeter is included and in use.

travisgoodspeed commented 6 years ago

A skeletal battery voltage application is now implemented and functional. I'll hold off on closing this issue until a low battery warning is displayed in the clock.

A fresh Energizer ECR2016 reads as 3.38V by the applet, 3.30V by a voltmeter.

travisgoodspeed commented 6 years ago

The voltage applet has not been merged into the clock. Press '1' to get the current voltage in millivolts.

I'll close this issue when a few more features are added.

travisgoodspeed commented 6 years ago

The CC430F6147 does not contain an ADC12 device at 0x700, but rather an ADC10 device at 0x740. For now, this causes the voltage to be read as 000 on 6147 devices and the ADC to appear as always on.

travisgoodspeed commented 6 years ago

I have a patch with support for the REF and ADC10 modules. I'll merge it after verifying that it doesn't break anything in the LCD or radio.

travisgoodspeed commented 6 years ago

Both chips are now properly supported, accurately measuring voltage while keeping the reference off at other times.

travisgoodspeed commented 5 years ago

We now reliably measure voltage in both the CC430F6137 and the CC430F6147. Closing issue.