0% found this document useful (0 votes)
133 views

ENER002-2PI User Guide PDF

This document provides instructions for installing and using an RF transmitter add-on board with a Raspberry Pi to control Energenie radio-controlled sockets. The board connects to the Raspberry Pi's GPIO pins and is controlled through a Python program. The program allows coding signals to assign codes to sockets and toggle them on/off via keyboard inputs. Proper installation of the board and sockets is described along with programming the sockets to learn codes from the transmitter.

Uploaded by

lujoreb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views

ENER002-2PI User Guide PDF

This document provides instructions for installing and using an RF transmitter add-on board with a Raspberry Pi to control Energenie radio-controlled sockets. The board connects to the Raspberry Pi's GPIO pins and is controlled through a Python program. The program allows coding signals to assign codes to sockets and toggle them on/off via keyboard inputs. Proper installation of the board and sockets is described along with programming the sockets to learn codes from the transmitter.

Uploaded by

lujoreb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ith Raspb

ew er
bl

ry
t
pa
User Guide

Pi
Com
Pi Rf-Transmitter Board
Introduction How it is controlled by Software
The RF transmitter add-on board can be used The pin header connects to the add-on board
with the R-PI to control simple Energenie radio as follows to allow you to control the GPIO lines
controlled sockets using a small software as outputs to drive the radio frequency
program. We have written a simple program in transmitter.
Python to allow us to switch the sockets on and
off with a single keyboard press.

The add-on board connects to the row of pins


called the GPIO which can be controlled as
either input or output lines under your
software control.

Your software will use the outputs on the GPIO


connector to drive the add-on board. We will
write some code in Python to switch the two
Energenie sockets on and off.

There are two parts to the transmitter board.


Installing the board The encoder and the modulator:
Install the board on to the row of pins as show
in the picture and connect your Raspberry-Pi as 1) The encoder will accept 4 input signal levels
normal to a monitor, mouse, keyboard and USB programmed onto 4 of the GPIO lines (D0-D3)
power supply. as shown above. It will then serialise them on a
single line to the modulator part.

2) The modulator transmits the serialised


signal. It needs to be programmed in Ampli-
tude-Shift Keying (ASK) mode for the sockets
using a GPIO signal. It also needs to be enabled
by a separate GPIO signal.

Fig. 1: R-Pi with piggy back RF-transmitter board


Here are the pairs of codes using D0-D3 that The socket must then be programmed to learn
can be sent to control sockets; we will use a control code from the transmitter. To do this
socket 1 and socket 2 in the sample program at the socket must be in learning mode indicated
the end: by the lamp on the front of the socket housing
flashing slowly. If it is not doing this, press and
hold the green button on the from of the
housing (while the lamp is off ), for 5 seconds or
more and then release it when the lamp starts
to flash at 1 second intervals. Then send a signal
Firstly, we need to install a Python module, to it from you program by hitting the return
RPi.GPIO, to enable software control of the key. Acceptance will be indicated by a brief
GPIO pins for the Raspberry Pi. Open an quick flashing of the lamp on the housing
LXterminal from the desktop and type the which will then extinguish. Program first one
following lines: socket then the other in this way, otherwise
they will react to the same signal.
sudo apt-get install python-rpi.gpio
You can then toggle the sockets on and off by
Now, open a text editor such as leafpad and hitting the return key. You can also switch them
type the python code listed at the end called manually on and off by briefly pressing the
ENER002- 2PI.py into a new file under home/pi button on the front housing.
(or, more easily, download it from the
energenie4u.co.uk website and copy using a You can always reset the socket programming
USB flash drive). This program will allow us to by holding down the green button for 5
send coded commands to the sockets to seconds or more as mentioned before.
program them and then switch them on and
off when the return key on the keyboard is hit. To increase the range of the transmitter you
may wish to add an extra antenna to the circuit
Controlling the sockets board. You can do this by soldering a piece of
Launch your program by typing the following ordinary copper wire 13.5cm long into the hole
command at the prompt in the LXterminal marked ANT1 on the circuit board.
window:
IMPORTANT: The sockets will need to be inserted
sudo python terminal ENER002-2PI.py into separate mains wall sockets with a physical
separation of at least 2 metres to ensure they
Then insert one of the radio controlled sockets don't interfere with each other. Do not put into a
into a mains wall socket which is switched on. single extension lead.

Energenie is a trading name of Sandal plc,


Claremont House, Deans Court, Bicester, UK, OX26 6BW
If you have questions, please visit us at www.energenie4u.co.uk

You might also like