Pi5 Power-down When on Charge

Posted 29 November 2026

While working with my new vision-enhanced robot, I have noticed that it takes forever to recharge the batteries because the Raspberry Pi5 ‘brain’ draws around 0.4A – more than ten times the current drain from everything else when the motors aren’t running. The Pi5 really isn’t needed during recharge periods (the Teensy monitors charge levels), so I started looking for ways to shut the Pi5 down when the robot is recharging its battery.

A chat with Grok revealed that the Pi5 has no serviceable ‘sleep’ mode, so it looked like I would have to design and fabricate a power switch on the Pi5 power supply line that the Teensy could control. I have some AOD424G 20V/45A N-Channel MOSFET power switches with Rd(on) < 4mΩ left over from another project, so they might do. Unfortunately they require a VDS > 3.3V, so the Teensy 3.5 can’t drive the switch directly – a driver stage would be required.

Then I remembered that the D24V50F5 low-voltage-drop 5V switching regulator has an ENABLE input

that effectively disconnects the load (the Pi5) from the power supply – just what I needed. Even better, the ENABLE line is held high with a 100K pullup resistor, and pulling this line LOW opens the power circuit, meaning it can be driven directly from a normal Teensy GPIO pin.

To test this, I connected an unused wire on my first/second deck connector to Teensy pin 3 (PUR) on the bottom deck to the ENABLE pin on the D24V50F5 module on the second deck and created a small Arduino program to manually switch the ENABLE pin HIGH & LOW. Here’s the Arduino code:

And here is a short video showing the Pi5 being powered OFF & ON:

In the video the blue scope trace in the background shows the voltage at the Pi5 5V power pin. The clamping current meter in the foreground shows the Pi5 current draw. The power is first turned OFF, as shown by the voltage drop and the current going to zero. Then the power is turned back ON, and the current meter shows the current stabilizing around 0.4A.

Implementation of this capability will require some handshaking between the Teensy and the Pi5, as killing power to the Pi5 will need to shut down gracefully to avoid potential corruption of SD card files. The sequence will be something like the following:

  • Teensy detects Start-of-Charge and sends shutdown message to the Pi5
  • Pi5 acknowledges the message and starts an ordered shutdown
  • When the Pi5 is in a safe state, it tells the Teensy that it is ready for shutdown
  • Teensy pulls the D24V50F5 ENABLE line LOW, and disconnects the Pi5 from +5V
  • Teensy detects End-of-Charge and sets the D24V50F5 ENABLE line HIGH, reconnecting the Pi5 to +5V
  • Pi5 boots up and resumes normal operation (the exact steps are TBD).

Stay tuned,

Leave a Reply

Your email address will not be published. Required fields are marked *