Hardware Reference
In-Depth Information
Relaying Solar Cell Data Wirelessly
In this project, you'll relay data from a
solar cell via two XBee radios and an
Arduino to a Processing sketch that
graphs the result. This project is similar
to the previous one in terms of hardware,
but instead of using broadcast messages,
you'll relay the data from the first to
the second to the third using directed
messages. In addition, the Arduino
uses directed UDP datagrams to send
messages to the Processing program.
Sensor radio
Relay radio
XPort radio
MY = 01
DL = 02
ID = 1111
D0 = 2
IR = 0x64
IT = 5
MY = 02
DL = 03
ID = 1111
MY = 03
DL = 01
ID = 1111
a broadcast network, they form a chain, extending the
distance the message travels. Their settings are shown in
the table above. Here are the command strings to set them.
For the solar cell radio:
ATMY1, DL02\r
ATID1111, D02, IR64\r
ATIT5, WR\r
This project comes from Gilad Lotan and Angela Pablo
(as shown in Figure 7-11), former students at the Inter-
active Telecommunications Program (ITP) at New York
University. The ITP is on the fourth floor of a 12-story
building in Manhattan, and it maintains an 80-watt solar
panel on the roof. The students wanted to watch how
much useful energy the cell receives each day. Because
it's used to charge a 12-volt battery, it's useful only when
the output voltage is higher than 12V. In order to monitor
the cell's output voltage on the fourth floor, Gilad and
Angela (advised by a third student, Robert Faludi, who
later wrote the topic on XBee radios: building Wireless
Sensor Networks [O'Reilly]) arranged three XBee radios
to relay the signal down the building's stairwell from the
roof to the fourth floor. From there, the data went over
the local network via an Ethernet processor and onto a
SQL database. This example, based on their work, uses
a smaller solar cell from Spark Fun, and a Processing
program to graph the data instead of a SQL database.
For the relay radio:
ATMY2, DL03, ID1111, WR\r
And for the Arduino radio:
ATMY3, DL01, ID1111, WR\r
The Circuits
The solar cell circuit runs off the solar cell itself, because
the cell can produce the voltage and amperage in daylight
needed to power the radio. The LD1117-33V regulator
can take up to 15V input, and the solar panel's maximum
output is 12V, so you're safe there. The MAX8212 IC is a
voltage trigger. When the input voltage on its threshold pin
goes above a level determined by the resistors attached
to the circuit, the output pin switches from high to low.
This change turns on the 2N3906 transistor. The transis-
tor then allows voltage and current from the solar cell to
power the regulator. When the solar cell isn't producing
enough voltage, the radio will simply turn off. It's OK if
the radio doesn't transmit when the cell is dark because
there's nothing worth reporting then anyhow. The two
resistors attached to the XBee's AD0 pin form a voltage
divider that drops the voltage from the solar cell propor-
tionally to something within the 3.3V range of the radio's
analog-to-digital converter. The 4700µF capacitors store
the charge from the solar cell like batteries, keeping the
radio's supply constant. Figure 7-13 shows the circuit.
There are three radios in this project: one attached to the
solar cell, one relay radio standing on its own, and one
attached to the Arduino. Figure 7-12 shows the network.
Radio Settings
The radio settings are similar to the settings from the
previous project—the only difference is in the destination
addresses. You won't be using broadcast addresses this
time. Instead, the solar cell radio (address = 1) will send
to the relay radio (address = 2), and that radio will send
to the Arduino radio (address = 3). Instead of forming
Search WWH ::




Custom Search