12-31-2019, 08:11 AM
(11-22-2019, 04:26 AM)pfeerick Wrote: Schematic suggests a single colour LED, dunno what colour, so no dual colour indication there!
http://files.pine64.org/doc/PineTime/Pin...191020.pdf
If there is an LED, it is not visible from the outside. I tried to toggle pin 27 and saw nothing...
Quote:Conceptually, it just measures the voltage using the ADC on pin 31 (AIN7) with the following settings:
- reference voltage: internal (0.6V)
- gain set to 1/5
- positive/negative channel resistors bypassed
- acquisition time 3µs
- single ended mode
Thanks @ayke for these info, I've successfully measured the battery voltage with these.
I've measured max voltage of more than 4v, a bit more than what you show on your graph.
How should we use your discharge curve to display the battery level in % ? For now, I implemented a simple linear interpolation between 3.9v and 3.55. Anything above 3.9 is 100%, anything lower is 0%. Is there a smarter way to process the voltage?
Thanks!
Working on InfiniTime, the FOSS firmware for the PineTime: https://github.com/InfiniTimeOrg/InfiniTime
Mastodon : https://mastodon.codingfield.com/@JF
Twitter : https://twitter.com/codingfield
Matrix : @JF002:matrix.org
Mastodon : https://mastodon.codingfield.com/@JF
Twitter : https://twitter.com/codingfield
Matrix : @JF002:matrix.org