Wireless Interface for E.R.I.K.A.
Antonio Mancina and Michele Cirinei
We are working on a system to send and receive data between RCXs
(hosting ERIKA Educational) and normal Personal Computers (hosting the
SHaRK real-time kernel). The aim of the
work is to continue using the InfraRed Interface mounted on the RCX
and the IR Tower to communicate with the PC.
The first step has been the implementation of a simple protocol stack
in ERIKA Educational to allow the communication through the InfraRed
The second step, currently under construction and test, is the project
of a device whose goal is the translation from InfraRed to Radio Waves
and viceversa, to allow a faster communication (in case of multipoint
communication) avoiding the need of a Line Of Sight between units.
At the moment, RCX can communicate with other RCXs only through an easy
infrared interface. We projected an easy protocol stack to allow this
communication, composed of three layers:
Layer: exports the abstraction of an InfraRed channel;
- Data Link
Layer: exports the abstraction of message transmission and
reception with error checking (that is, each node can send a message of
1 or more bytes to another node);
Layer: exports a distributed database of 8/16 bit variables,
whose values can be exchanged between the various nodes of the network.
The protocol stack has already been implemented and it is in the final
testing stage. Soon (we think before the end of June), the protocol
stack will be available to the public under the GPL license. Together
also an implementation of the protocol stack for the S.Ha.R.K. kernel will
be available. Through it, RCX will be able to communicate also with a
PC with the IR tower on the serial port.
The InfraRed device shipped with the RCX has from our point of view
We wanted to solve these problems using a radio frequency communication
infrastructure which should be able to maintain a much higher bandwidth
and can reach farther distances than IR lights.
- the communication is slow:
the hardware allows only 2400 bps;
- components are directional:
the nodes needs a line of sight;
- communication is point to point:
it is hard to implement a communication between more than two units,
also because the communication channel is half duplex.
The device is composed of three main sections:
- InfraRed Section
- Radio Frequency Section
- Logic Section
The goal of this section is the reception of messages from the RCX, and
trasmission to the RCX of messages received via Radio Waves.
Transmission is an easy task, so we decided to use only an IR led
with some electronic around. The reception can be difficult, especially
for time constraints, so we choosed an integrated IR Receiver, set to
38 kHz pulsing IR light, the Vishay TSOP1738.
Radio Frequency Section
The goal of the Radio Frequency Section is the reception and the
of messages via Radio Waves.
The choice of the radio frequency transceiver have been guided by the
enough bandwidth to reach good transfer speeds allowing, at the same
time, more than one RCX to communicate without IR transmission delays.
XTR-434, which works in FM radio modulation at a frequency of
433.9 MHz, is able to reach a 100 Kbps bandwidth and represents a
The Logic Section must translate from a Section to the other. It has
three main goals:
Due to a tradeoff between cost and power, the core of this Section is a
microcontroller of the PICmicro family, PIC
- receive all the messages from the RCX, through the InfraRed
Section, prepare them for the transmission via Radio Waves, and send
them to the Radio Frequency Section;
- receive from the Radio Waves Section the messages sent to the
unit, prepare them for transmission via InfraRed, and send them to the
- implement an easy protocol to assign the shared RF channel to the
Schematic and Board
We have designed a second version of the device, trying to improve some aspects if compared to the old one. In particular final dimensions have been reduced and IR components have been placed in the center of one of the board sides. On the other hand we took some risks placing the microcontroller near to the transceiver, without respecting some use constraints imposed on the Aurel datasheet: this have not led to any kind of malfunctioning (it could be shown only some more signal noise, easily avoided by the receiving routine) and final dimension is approximately 60% of the original one.
You can download schematic and board of this version, but
remember they are not fully tested yet.
Schematic and board are made for Eagle.
In order to use them you need 3 libraries for Eagle of some components:
TSOP1738, AUREL XTR-434 and PIC
Eagle Schematic image
We have implemented a first version of the PIC program, which should
control InfraRed and Radio Frequency sections. The code is not fully
working, in some cases, stressing too much the protocol, one of the
three units we are using stops working. You can download the
from the Erika CVS website. To use it, you must send an
initialization message via IR, which must include:
- header composed by 0x55, 0xFF and 0x00;
- ADD = address number of the unit;
- MADD = maximum address number;
- TCONST = time constant calculated as [ 0x40 /
(MADD+1) ] * ADD;
- CHK = checksum of the packet, calculated
as 0xF5 + 0x03 + ADD + MADD + TCONST.
The full message will be:
0x55 0xFF 0x00 0xF5 0x0A 0x03 0xFC
ADD ~ADD MADD ~MADD TCONST ~TCONST CHK
Click here for images and movies
Please contact the authors for other informations, or read their Master
Thesis (available for download under the