PINE64
Battery discharge curve - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PineTime (https://forum.pine64.org/forumdisplay.php?fid=134)
+--- Forum: Development Discussion on PineTime (https://forum.pine64.org/forumdisplay.php?fid=136)
+--- Thread: Battery discharge curve (/showthread.php?tid=8147)

Pages: 1 2


RE: Battery discharge curve - JF002 - 12-31-2019

(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/PinTime%20Schematic-V1.0-20191020.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!


RE: Battery discharge curve - pfeerick - 01-02-2020

(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


RE: Battery discharge curve - JF002 - 01-02-2020

(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.


RE: Battery discharge curve - pfeerick - 01-03-2020

Oh derp... you're right, you're right! Neither the LED or the current limiting resistor are populated / connected!


RE: Battery discharge curve - geoffrey.vl - 05-02-2020

@ayke 
could you also share the pure data that you've collected?


RE: Battery discharge curve - aritual - 09-20-2020

(10-30-2019, 06:34 AM)caligari Wrote: Impressive graph. Good job ayke!

A power monitor should be implemented in software. I suggest following states and indications:

Impressive chart! 

Did you make this?  Combined with the suggestions below on user feedback, this thread is a total package when it comes to "how you do battery management right."

Playing around with these things via bash & python on a pinebook pro for the same general purposes / satisfying my curiosity.

Using bash to generate the voltage data at the moment, to a file python consumes.  Haven't figured out matplotlib but the provided code looks like a great start, thank you all very much!