Battery discharge curve
#11
(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 Pinetime with FreeRTOS (C/C++) : https://github.com/JF002/Pinetime

Mastodon : https://mastodon.codingfield.com/@JF
Twitter : https://twitter.com/codingfield
  Reply
#12
(12-31-2019, 08:11 AM)JF002 Wrote: If there is an LED, it is not visible from the outside. I tried to toggle pin 27 and saw nothing...

Strange... the backlight LEDs are controlled by different IOs, so it's not for them, and the GPIO port assignment document also says it's a STATUS_LED but it also says 'NOT STAFF' next to it, which makes me think it's not fitted. Undecided
  Reply
#13
(01-02-2020, 02:33 AM)pfeerick Wrote:
(12-31-2019, 08:11 AM)JF002 Wrote: If there is an LED, it is not visible from the outside. I tried to toggle pin 27 and saw nothing...

Strange... the backlight LEDs are controlled by different IOs, so it's not for them, and the GPIO port assignment document also says it's a STATUS_LED but it also says 'NOT STAFF' next to it, which makes me think it's not fitted. Undecided

I also think it's not fitted. On the schematic, you can see the pin 0.27 on the MCU that is "connected" to LED13, but it's written "NC" (Not connected ?) just below.
Working on Pinetime with FreeRTOS (C/C++) : https://github.com/JF002/Pinetime

Mastodon : https://mastodon.codingfield.com/@JF
Twitter : https://twitter.com/codingfield
  Reply
#14
Oh derp... you're right, you're right! Neither the LED or the current limiting resistor are populated / connected!
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)