Increasing run-time

I have ordered both CM4 and R-01 versions to play with. One thing I would like to explore is getting more than 5 hours of runtime out of it. Has anyone connected a larger pack, etc.?

Also, what is the difference in runtime between the two, assuming mostly development (no games, heavy graphics, etc.)

I dunno about the rest of it… since I don’t even have mine to test with yet… But I I am certain… The #1 factor is getting a great battery to put in… Samsung 35e… or Sony vtc5a? Lg mj1?.. many batteries are super overrated …

I had some that claimed 6,000 mAh, but I also have a tester. They actually came in between 600 and 800 mAh. The other instantly noticeable thing was they were so light. Good cells from known good sources weigh way more.

there is a great thread on the DevTerm on battery choice - I have ~2800 mah batteries from the battery store - they have lasted more than two years but they do have a life on the devterm (without printing) of only ~4 hours (depending on back light) … but since I have a way to recharge it’s not an issue . I used the DevTerm to ssh a linux laptop during an event I supported as a volunteer. I may have used it for several hours…

I have the CM4 uConsole with two Samsung 35E cells (so 7Ah * 3.7V makes well above 25Wh) and when I put the governor to powersaving and reduce the backlight brightness, the litte machine runs fricking forever.

2 Likes

There have been counterfeit cells where they pack the center full of plastic wrapped sand, so weight isnt a great measure for quality either.

1 Like

Can you describe freaking forever with a number? :slight_smile: I am really looking for something to code on without access to an outlet for extended periods. If I could bring few of extra sets of batteries and be able to use it for 25-30 hours total, that would be ideal.

these values are already graphed very well in this post.

so… with a set of samsung 30Q’s you will get this graph… or better…

get yourself a set of samsing 35E’s and you will get even better!

3 Likes

I would advise against bringing extra batteries, since they are more difficult to swap than they were on the DevTerm (I own both devices). While on the DevTerm I have hot swapped 18650s, I am using an external power bank for the uConsole.

1 Like

It should not be hard to switch out the 18650 holder on the battery board with a 21700 holder, you’ll get about 40-80% more battery life, depending on the 21700 you use.

Sans the size change 21700 are drop in replacements for 18650 from a circuitry stand point. Same voltage, just much higher capacity. (Charging circuit uses voltage to measure capacity, so uConsole will have no issue charging them to full.)

Looks like 3,500 mAH to 5,000mAH, but longer by 5mm and wider by 3mm. Hmm, definitely something to look at, once I get my uConsoles. Thanks!

I have the DevTerm in the field I have a power box with USB out - I use that to keep the DevTerm charged while in heavy use. (Power box is 12 volt battery - lipo4fe - has usb , 12 volt, anderson power poles…)

Hi, how can I adjust the backlight on uconsole Cm4? ~ thx

I have found that the 4g modem is actually the biggest user of power because it spikes VBAT parallel to the charge controller. I’m thinking the internal resistance of the batteries can be really annoying in this case and am working on adding ~5000uF of capacitance on VBAT.

Dimmer:

#!/usr/bin/python3

# System device tree paths for actuation
BR_PATH = "/sys/class/backlight/backlight@0/brightness"

# Pull the current/defining states
with open(BR_PATH, 'r') as f:
    curBright = int(f.read())

# Decrease brightness value, bounded to 1
curBright -= 1
if curBright < 1:
    curBright = 1;
else:
    # Write brightness
    with open(BR_PATH, 'w') as f:
        f.write(str(curBright))

Brighter:

#!/usr/bin/python3

# System device tree paths for actuation
BR_PATH = "/sys/class/backlight/backlight@0/brightness"
MAX_BR_PATH = "/sys/class/backlight/backlight@0/max_brightness"

# Pull the current/defining states
with open(MAX_BR_PATH, 'r') as f:
    maxBright = int(f.read())

with open(BR_PATH, 'r') as f:
    curBright = int(f.read())

# Increase brightness value, bounded to max
curBright += 1
if curBright > maxBright:
    curBright = maxBright;
else:
    # Write brightness
    with open(BR_PATH, 'w') as f:
        f.write(str(curBright))

Another thing that keeps the spike current down that I have done now is I have my 4g-on command force a hard CPU governor. This makes it less likely to randomly kill itself. It is also recommended to make a backup of your shell history in your shell’s rc file every time you open it (during random power-offs it has a tendency to get corrupted).

4g-on:

#!/bin/bash

# Avoid force shut off
sudo cpupower frequency-set -g powersave

# Turn on LTE modem
uconsole-4g-cm4 enable
sleep 3

# Set up ModemManager and signal quality calculation
sudo systemctl restart ModemManager

4g-off:

#!/bin/bash

# Turn off the modem before restoring the CPU governor
uconsole-4g-cm4 disable
sleep 1

# Turn back up the CPU power
sudo cpupower frequency-set -g ondemand

3 Likes

Very interesting! How can I run this python script please? Do the brighter n dimmer correspond ti any button press? And if so, which buttons - thanks

1 Like

a simpler approach is to execute the python program from a bash file… at some point the capability of Node-Red to run python will be improved as well - I’ve had better luck running node-red in the background than python but that may just be my limited skill set.

Just copy past each one into a file and make each file executable. As for binding the buttons, that is up to the window manager as I have it configured. The brightness keys are XF86MonBrightnessUp and XF86MonBrightnessDown, and it is really up to you how those get run. With this though, you also don’t need to bind these to keys. The code works even in TTY.

I mean you do whatever you want. This code works anywhere with a python interpreter (including an ssh session).

1 Like