joy-it RB-PE01 Power Controller Instruction Manual

June 1, 2024
JOY-It

joy-it RB-PE01 Power Controller

joy-it-RB-PE01-Power-Controller-product

Specifications

  • Product Name: PiEnergy Mini
  • Model: RB-PE01
  • Manufacturer: Joy-IT powered by SIMAC Electronics GmbH
  • Input Voltage: 6 to 36 V DC
  • Compatibility: Raspberry Pi 4 and 5
  • Interface: GPIO4
  • Operating Temperature: Can become hot under load

Device Overview

DIGIT FUNCTION DESCRIPTION
1 Raspberry Pi pin socket This connection is used to plug the board into the

Raspberry
Pi’s pin header.
2| Voltage input| The device is supplied with voltage via this connection. The
voltage must be between 6 and 36 V DC.
3| Fan connection| A 5 V fan can be connected to this connector.
4| Microcontroller interface| The microcontroller on the board can be programmed via this
interface.
5| Solder pads On/off switch| An external button can be attached to these solder pads for
on/off function.
6| On/off switch| This button can be used to switch the board on or off.
7| Solder pads Pinheader| The enclosed pin header can be soldered to these solder pads to
access the first 10 pins of the Raspberry Pi.

Product Usage Instructions

Connection
The PiEnergy-Mini is simply plugged onto the first pins of your Raspberry Pi and secured in place using the enclosed screw, nut, and spacer. Connect your 6 – 36 V DC voltage source to the input terminal, ensuring correct polarity. The positive connection ismarked with + and the negative with -.

GENERAL INFORMATION

Dear customer,
thank you for purchasing our product. In the following we will show you what you need to bear in mind when commissioning and using.
Should you encounter any unexpected problems during use, please do not hesitate to contact us.
With the PiEnergy-Mini, you can operate your Raspberry Pi with a voltage of 6 to 36 V DC. you can use the button integrated on the board to both power up and power down your Raspberry Pi.
Communication with the Raspberry Pi is via GPIO4, but this connection can also be cut by removing a resistor to free up the pin. Thanks to the ultra-flat design, it can also be used in conjunction with many housings. The pin header is included and not soldered on to keep the design even flatter.

This guide was written under Raspberry Pi OS Bookworm for the Raspberry Pi 4 and 5. It has not been checked with other/newer operating systems or hardware.
The board can become very hot under load. Do not touch the board during operation.
We recommend active ventilation of the board if an additional load is operated via the Raspberry Pi. This helps to keep the temperature lower and thus increase the service life of the product.

DEVICE OVERVIEW

joy-it-RB-PE01-Power-Controller- \(1\) joy-it-RB-
PE01-Power-Controller- \(2\)

CONNECTION

The PiEnergy-Mini is simply plugged onto the first pins of your Raspberry Pi and screwed in place using the enclosed screw, nut and spacer as shown in the picture.
You can then connect your 6 – 36 V DC voltage source to the input terminal and switch it on. Note the polarity of the connection – the positive connection is marked with + and the negative with –
The PiEnergy-Mini and the underlying Raspberry Pi can now be started with the small button on the PiEnergy-Mini.

joy-it-RB-PE01-Power-Controller- \(2\)

The microcontroller installed on the board reads the status of the button. If the button is held down for one second during operation, the GPIO4 of the Raspberry Pi is pulled low and 10 seconds later the voltage converter is switched off.
This allows the Raspberry Pi to be shut down with the button. For this to work, the Raspberry Pi must monitor this pin via a script. This topic is covered in the next chapter.

 SHUTDOWN SCRIPT

To ensure that your Raspberry Pi shuts down properly when you press the button on the board, the GPIO4 pin must be monitored via a script.
To do this, create a Python file with the following command:

nano shutdown.py
Now copy the code below into the file and save it with the key combination CTRL + O.

  • -- coding: utf-8 --

  • from gpiozero import Button
  • from signal import pause import os
  • Initializes the button. The parameter is the BCM pin number.

  • GPIO4 with internal pull-up resistor

  • shutdown_button = Button(4,pull_up=True) def shutdown():
  • print(“GPIO 4 is LOW, shut down the Raspberry Pi…”)
  • os.system(“sudo shutdown -h now”)
  • Executes the shutdown function when the button is pressed.

  • In this case, “pressed” corresponds to a LOW signal.

  • shutdown_button.when_pressed = shutdown pause() # Waits for the signal (this keeps the script running)

You can close the file again with CTRL + X and Enter.

Alternatively, you can also download the file with the following command:
wget https://www.pienergy.joy-it.net/files/files/downloads/scripte/PiEnergy- Mini_shutdown-script.zip unzip PiEnergy-Mini_shutdown-script.zip python3 shutdown.py

And then unpack with the following command:
You can now start the script with the following command:

It is recommended to integrate this script into the autostart of your Raspberry Pi so that it is executed automatically at every start.

First enter the following command in the terminal:
sudo nano /etc/rc.local

Now insert the following line above the exit 0 line

python3 /home/pi/shutdown.py &

Save the change with the key combination CTRL + O. And close the file with CTRL + X and Enter. Please note that you may need to adjust the path of the file.

joy-it-RB-PE01-Power-Controller- \(3\)

Now you can restart your Raspberry Pi with the following command:
sudo reboot

FLASHING THE MICROCONTROLLER

  • It is possible to change the firmware of the microcontroller on the PiEnergy-Mini.
  • We provide 2 different firmware versions. One is the default version with which the device is supplied and the other is the version with which the device starts automatically as soon as a voltage is applied.
  • You can download the firmware versions here.
  • The small solder pads on the back of the board are used for flashing.

joy-it-RB-PE01-Power-Controller- \(3\)

You can of course also write your own user-defined firmware for the device.

You can use the following section of the controller circuit as a guide:

SHTDWN is the connection to the GPIO4 of the Raspberry Pi.
Enable is the connection to the enable pin of the voltage converter on the board.
The microcontroller used is an ATTINY 5.

It is possible to flash the microcontroller with a Raspberry Pi. Unfortunately, it is currently only possible with a Raspberry Pi 4 or older models, the Raspberry Pi 5 is not yet compatible.
For the flash process, you must connect the microcontroller interface of your PiEnergy-Mini to your Raspberry Pi as shown in the table.

joy-it-RB-PE01-Power-Controller- \(4\)

For example, a 2 x 3 pin 2.54mm pin header is well suited for this purpose.
Connect the pin header to the specified Raspberry Pi GPIOs and hold the pin header to the microcontroller interface during the flash process.

Now install the required software on your Raspberry Pi by entering the following commands:
sudo apt-get install avr-libc gcc-avr build-essential git git clone https://github.com/Mrkvak/pi_tpi.git

Now change to the directory you just downloaded and create the installation file with the following commands:
cd pi_tpi/sudo make

To flash with a Raspberry Pi 4, use the following command:
sudo ./tpiflash_rpi4 w 1e8f09 firmware.bin

For older Raspberry Pi models you can use the following command:
sudo ./tpiflash w 1e8f09 firmware.bin

INFORMATION & TAKE-BACK OBLIGATIONS

Our information and take-back obligations under the German Electrical and Electronic Equipment Act (ElektroG)

Symbol on electrical and electronic equipment:

This crossed-out garbage can means that electrical and electronic appliances do not belong in household waste. You must hand in the old appliances at a collection point. Before handing them in, you must separate used batteries and accumulators that are not enclosed by the old appliance.

Return options:
As an end user, you can hand in your old appliance (which essentially fulfills the same function as the new appliance purchased from us) for disposal free of charge when purchasing a new appliance. Small appliances with no external dimensions greater than 25 cm can be disposed of in normal household quantities regardless of whether you have purchased a new appliance.
Possibility of return at our company location during opening hours: SIMAC Electronics GmbH, Pascalstr. 8, D-47506 Neukirchen-Vluyn

Return option in your area:
We will send you a parcel stamp with which you can return the device to us free of charge. To do so, please contact us by e-mail at Service@joy- it.net or by telephone.

Packaging information:
Please pack your old appliance securely for transportation. If you do not have suitable packaging material or do not wish to use your own, please contact us and we will send you suitable packaging.

SUPPORT

We are also there for you after your purchase. If you still have any questions or problems arise, we are also available by e-mail, telephone and ticket support system.

www.joy-it.net
SIMAC Electronics GmbH Pascalstr. 8 47506 Neukirchen-Vluyn

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals