Chris Vogel @me@chrichri.ween.de

not yet

matrix

@chrichri:librem.one

intent

no sarcasm, no irony

  • Notes
  • Articles
  • Remote follow

Measuring power consumption on the Librem5

Feb 15, 2023

I wanted to measure the power consumption of my #Librem5 and didn't have a way to measure on the power lines off usb-c.

Looking at the #schematic 🔗 and at /sysfs I found that I could use values provided by MAX17055 to get the current values when running on battery only:

watch_battery_voltage_current.sh:

#!/bin/bash while sleep 0.05; do C=`cat /sys/devices/platform/soc@0/30800000.bus/30a50000.i2c/i2c-3/3-0036/power_supply/max170xx_battery/current_now` V=`cat /sys/devices/platform/soc@0/30800000.bus/30a50000.i2c/i2c-3/3-0036/power_supply/max170xx_battery/voltage_now` if [ "$C" != "$OLD_C" ] || [ "$V" != "$OLD_V" ]; then echo `date +'%s.%N'` $V $C fi OLD_C=$C; OLD_V=$V done

There's much room for improvement:

  • get changes pushed instead of polling (seems to be only possible using C)
  • getting values at BQ25895 or BD71837 to be closer to where the power is needed

Any ideas are welcome!

Using #libreoffice I made the #diagram below which shows:

  1. yellow vertical lines signaling a push of the power button. First line is power off the screen
  2. green vertical lines with a red 'shadow' showing where the xhci usb-hub vanished.
  3. during the period with screen on between the second and third yellow line I unloaded the xhci modules, cut the power to the modem briefly, and reloaded the modules
  4. the modem draws a lot more power during registration after the reset than during average operation as can be seen on the right side of the third yeelow line(green line = current, relativ)
  5. when a lot current is drawn the voltage (blue line) at max17055 goes down a bit
  6. battery slowly depleting: average voltage going down

I did this for two reasons:

  • I wanted to know how much power the modem draws to be able to compare it to other modems candidates to replace the broadmobi bm818
  • While doing this and chatting about it with @craftyguy@freeradical.zone he had the idea that problems with the bus or modem could be related to brownout
l5_schematic_block_diagram.pdf · master · Librem5 / l5-schematic · GitLab GitLab
Screenshot with part of the schematic block diagram of the Librem5
Diagram made in LibreOffice showing voltage, current, times when power key pressed and usb-bus vanished
  • permalink
  • interact from your instance
  • 17 likes
  • 10 shares
Likes
@jc@social.librem.one @goatwildernesscollective@social.librem.one @DavidMarzalC@mastodon.social @Idcrafter@fosstodon.org @realgrm@floss.social @janvlug@mastodon.social @techaddressed@fosstodon.org @torbuntu@fosstodon.org @dean@social.librem.one @optimal@mastodon.online
and 7 more.
Shares
@grinceur@fosstodon.org @jmlich@fosstodon.org @Idcrafter@fosstodon.org @janvlug@mastodon.social @torbuntu@fosstodon.org @linmob@fosstodon.org @silmathoron@floss.social @craftyguy@freeradical.zone @ademalsasa@floss.social @chrichri@social.librem.one
Powered by microblog.pub 2.0.0+ynh1 and the ActivityPub protocol. Admin.