Tested on:RPi B+, RPi 2, RPi 3; Raspbian Jessie
Prerequisites:Raspberry Pi with Raspbian Jessie and internet connection (see steps 1-7 in the Introduction)
>= 12V power source with a 2.1mm jack positive inside

MoPower, less problems: efficient energy management for the Raspberry Pi

The Raspberry Pi is already a very energy efficient device, but AllSpectrums’ MoPower greatly enhances the energy managment capabilities of the Raspberry Pi and is perfect for building efficient portable devices.

What does it do?

  • safe physical shutdown button
  • broad range of input Voltages 12-20V (unmodified)
  • uninterruptible power source (UPS) with a backup battery
  • watchdog: reboot the RPi when it is unresponsive
  • program time-dependend boot behaviour easily
  • program voltage-dependend boot behaviour (great for solar or automotive systems)
  • takes just 5mA power

Have a look at the MoPower manual for more information.

MoPower is a surface mounted device, which means really really small parts have to be soldered on with great caution. This was my first smd circuit and i butchered the first try (sorry Moses!), but the second one came out ok. So, this is entirely doable for non-engineers, thanks to the very good assembly instructions from AllSpectrum. So, here it is:

MoPower - Assembled

MoPower – Assembled

Boot the Raspberry Pi with the MoPower attached on top. Log in with ssh and type in the terminal

In the now open file cmdline.txt, remove the part

Save and close, then execute

In the now open file rc.local, add the line

before the line

Save, then reboot the Raspberry Pi. Test the firmware installation by pressing the poweroff button of the MoPower for two seconds, which should shutdown the RPi. Turn it on again, attach a 9V battery, then cut the main power source to test the uninterruptibility.

Programming the MoPower directly
Minicom (see next section) gives full access to all functions, but is rather uncomfortable. Luckily, AllSpectrum gives a method for directly programming the chip. Simply enter

to store a command.

Programming the MoPower with Minicom
First, the MoPower controller script needs to be stopped. Enter

find the PID of /home/pi/mopower/mopower-ups-wrapper.sh and /home/pi/mopower/mopower-ups.py, then terminate both with

Minicom is used for programming the MoPower. Start it with

then turn on local echo with Ctrl+e for displaying the inputs.

to see the current MoPower configuration, which should look like this:

MoPower Minicom

MoPower Minicom

Now, you’re able to use all the fancy commands described in the user manual!
After entering a command in minicom, store the configuration always with
Minicom can be closed with Ctrl+A, then x.

Usage example
So, imagine a watersprout fountain which should run for a little while when a button is pressed. To simulate this, an LED was attached to the RPi. Pressing Button 2 will turn on the RPi (which autostarts a LED blink script) for 10 seconds.
This is achieved by entering the following two commands (which are well-explained in the MoPower documentation) in the terminal of the Raspberry Pi:

The MoPower now behaves like this:

First, Button 2 is pressed. The RPi boots and is shutdown again after 10 seconds, which is why the LED only blinks twice. Then, the original power button, Button 1 is pressed, which starts the RPi normally and leaves it alive.

Where to obtain
You can buy it here.

MoPower manual: http://www.allspectrum.com/mopower/
MoPower sale: http://www.allspectrum.com/store/mopower-ups-kit-designed-for-the-raspberry-pi-beta-firmware-p-9103.html
Remote access with SSH: http://www.knight-of-pi.org/remote-control-your-raspberry-pi/

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.


  1. I have just started with MoPower yesterday and I have to say it is a powerful piece of equipment.
    One remark to INPUT_CONTROL[2]=10,3,50,0,2,10,1,1,1 Shouldn’t 2 and 10 be the other way around ( INPUT_CONTROL[2]=10,3,50,0,10,2,1,1,1)? 10 for seconds, 2 for “TEST equal to”?
    Also, if you would be to be so kind to enlight me on position 7 (third from the end). The manual says “Option 7 – Trigger: Holds trigger variable, 0=not triggered, 1=triggered” but I have no clue what it means. I would be much obliged.

    • Hello Martin,
      yes MoPower is amazing. Can’t imagine how many hours of professional work went into that device!
      First point, i don’t really understand: the manual says option 5 is time at level and option 6 is the test which should be executed, so the order looks fine to me?

      The triggering is a mechanism for controlling time dependend behaviour. INPUT_CONTROL[2] should just fire when INPUT_CONTROL[1] was run before. To achieve that, INPUT_CONTROL[1] sets a trigger for INPUT_CONTROL[2] when run, and INPUT_CONTROL[2] only runs when it was triggered before.
      Without that, INPUT_CONTROL[2] would just fire a ‘shutdown’ signal every 10 seconds, if the RPi is booted or not!
      Hope that clarifies!


Time limit is exhausted. Please reload CAPTCHA.