User Tools

Site Tools


haas:projects:cabinpi5

Cerebrational Explorations

Cabin battery-powered pi5b for local shell and profit

Project

Objective

Finding myself predominantly using my iPad for typing, and cats regularly using my keyboard tray for a bed, ready access to a local Linux box requires work and often has complications. But it doesn’t have to be this way- I have a solar battery bank, which during the summer, typically ends each day at over 90% charge.

Currently I power both my DC refrigerators, and charge my nighttime battery bank, and power my cell/wifi router off the bank, but there’s a whole lot more capacity that can be used. So: why not rig up a pi5b, with all the trimmings, to serve as a 24/7 cabin server? THAT is the point of this endeavour.

Power: Approaches

The way I see it, there are two approaches that I could take:

  • from the battery (via the fuse bank) use a buck converter to provide 5V/5A to the pi5b
  • invest in one of those pi UPS boards

approach: buck converter

My solar battery system is 24v (25.6v), and the pi5b optimally likes 5.1v, although it has a small range of operational tolerance.

This would essentially be the most portable solution: during the summer months, power it off the battery. During the winter months? Just plug it into wall power. It would require no further modifications.

Equipment

consideration: pi5 power source sensing

A particular wrinkle that crops up with the pi5 is its unique power input requirements and sensing apparatus. It uses USB-PD to negotiate, and it turns out the MOST USB-C PD supplies will readily support 5V 3A (15W), but good luck with anything else, let alone the pi 5’s weird 5.1V 5A (27W).

This means, short of using the official pi 5 power supply, one might have to be suspicious about the pi receiving all the power it is due. Some testing is likely in order.

When not using an official adaptor, to bypass it falling back to 5V 3A, and only supplying 600mA to the USB ports, there exist two options that can be applied, one in firmware, one in config.txt:

USB MAX CURRENT ENABLE: config.txt setting to prevent low power delivery in USB ports

One of the default actions the pi5 will take in environments where an insufficient power source has been negotiated is to cap the USB ports at 600mA, versus 1.6A. To override this, add the following under the [all] stanza of the /boot/firmware/config.txt file (root to edit):

usb_max_current_enable=1

PSU_MAX_CURRENT: firmware setting for power delivery (pi 5 only)

From the pi documentation:

If set, this property instructions the firmware to skip USB power-delivery negotiation and assume that it is connected to a power supply with the given current rating. Typically, this would either be set to 3000 or 5000 i.e. low or high-current capable power supply.

As root, edit your firmware configuration:

pi5b:~$ sudo rpi-eeprom-config -e

And add the following:

PSU_MAX_CURRENT=5000

references

USB gadget

There are two cabin operating scenarios, based on internet access. The preferred: Ethernet connection directly into the cell/wifi router. Configuration is straightforward (none, it’ll just work) and easy.

The other, should I have to use my phone in hotspot mode, is to do Ethernet over USB to the pi, which requires the pi to be in USB gadget mode (OTG).

This process has changed slightly from the pi 4, so here are the relevant lines:

/boot/firmware/config.txt

Under the [all] stanza:

dtoverlay=dwc2,dr_mode=peripheral

/boot/firmware/cmdline.txt

Appended to the end (same line, no wrap):

modules-load=dwc2,g_ether

disable WiFi and Bluetooth

Being headless, and connected via Ethernet or USB for standard operations, I will not regularly need WiFi or Bluetooth functionality, so to save some power, I will disable them:

disable WiFi

Under the [all] stanza of /boot/firmware/config.txt:

dtoverlay=disable-wifi

disable Bluetooth

Under the [all] stanza of /boot/firmware/config.txt:

dtoverlay=disable-bt

status and updates

20240607

Received the first batch of 18650 batteries, began charging.

20240608

Received the Argon One V3 M.2 case, transplanted a pi5 into it.

Configured for booting from nvme.

Success!

Hooked up the waveshare UPS, plugged into this pi: we have liftoff!

20240610

Received the Geekworm X1202 case, transplanted the other pi5 (pi64) into it.

Received the remaining 18650 battery order, commenced charging.

20240611

Batteries charged, loaded into X1202, final assembly completed.

I was not able to fit the pi camera connector.

X1202 + pi5 + active cooler + X1001 + RTC + XH2.54 power switch (mounted into the case)

Success! Cloning SD card over to NVME, once booted we will be in action.

Currently powering it off of the waveshare AC adaptor. I need to relocated the 12V DC source closer to the X1202, then I can power it direct off solar battery bank.

haas/projects/cabinpi5.txt · Last modified: 2024/06/11 14:57 by wedge