For practical or aesthetic reasons some sensor networks must use
energy harvesting rather than rely on batteries or a nearby power outlet. But
when you can't harness solar, wind or thermal energy, local RF power provides
an alternative. This kit
from Powercast Corp. uses a low-power RF source to supply energy to two
receivers that store energy an MCU can draw on periodically when it samples
signals from sensors and reports values via a wireless link to a host computer.
Powercast manufactures two integrated circuits that gather RF energy between 850 and 950 MHz and convert it into dc current to charge a
capacitor or charge a battery. The company also builds a modular transmitter
that produces a 3W RF directional output within a 60-degree-wide beam. The kit
combines the RF transmitters and receivers with low-power MCUs and transceiver
modules from Microchip Technology. Click here for documents and code.
A detailed User's Guide from Powercast made setup of the
equipment go smoothly. That setup involved installing software and a USB
driver, connecting boards, attaching an antenna to each energy-harvesting
board, and plugging in and orienting the 3W RF source. The RF source operates
at 915 MHz and can supply power to "end devices" about 40 to 50 ft
away. Distances depend on local conditions.
included two P2110 evaluation boards, two wireless-sensor boards and antennas
so I could set up two sensor end devices powered by Powercast's RF-power
source. The P2110 board demonstrates how a Powercast IC can accept RF energy
and convert it into useful power. Each sensor board can measure and report
local temperature, light intensity, humidity and receiver signal strength, as
well as identifier data. I placed the end devices 14 and 27 ft (4.3 and 8.2m)
from the RF transmitter.
A Microchip 16-bit XLP development board mates with a Microchip
MRF24J40 PICtail daughter card (an IEEE 802.15.4 2.4-GHz RF transceiver) to
create an "access point" for the wireless-sensor network. The XLP
board connected to my PC, which ran HyperTerminal to display information.
After setting up the RF-power transmitter and the two sensor/power
board end devices - each with a "patch" antenna - my PC showed no
data. Apparently the ESD mat on my work table created a ground plane that interfered
with signal reception. Moving the two end-devices away from the mat solved the
problem and my PC displayed sensor readings. (The kit
also supplies a small dipole antenna for each end device, but it decreases the
effective transmitter-to-end-device distance.)
During 24 hours, the access point received about 18,000 samples
from both end devices. I obtained more samples from the end device closest to
the RF transmitter because it could gather more energy and thus transmit more
frequently. A jumper on each end-device sensor board lets you measure current
use. The energy-harvesting boards supply a 50-millifarad (mF) capacitor to
store energy and provide contacts for an optional capacitor and battery. An LED
on each energy-harvesting board lets you determine whether a board receives
enough RF energy to charge its capacitor.
The kit employs the Microchip MiWi wireless networking protocol
stack for peer-to-peer or mesh-network communications, so I wanted to jump into
the Powercast code and see how it operated the sensor communications.
Programmers can use a MiWi application programming interface (API), which
simplifies communication operations. To examine the code, I downloaded and
installed the latest version (8.60) of the Microchip MPLAB integrated development
environment (IDE) and the C30 compiler (free version) for the PIC24F16KA102
MCUs used on the XLP dev board and on the end-device boards.
I enjoyed working with this kit
and recommend it highly. It comes with good documentation, diagrams and code.
And it clearly shows how engineers can harvest RF energy from a nearby
transmitter when they have no other way to easily and economically get energy
to electronics with low-power requirements.
Remember, Powercast created this kit
to demonstrate RF-power harvesting. So, treat it as an RF energy-harvesting kit
and not a kit for wireless networking, although it demonstrates those
operations. I describe some aspects of working with the code below:
Powercast provides documents and source code for the access point
and the end-device MCUs. Much of the access-point code deals with formatting
data for HyperTerminal to display. Likewise, the end-device code deals mainly
with the MCU's UART and ADC rather than wireless communications. That probably
indicates you can start off with simple MiWi code and expand it as necessary. Overall,
the Powercast code provides a good place to start and it includes many helpful
Microchip supplied a MiWi code "framework" for the
Powercast Development Kit and Powercast added its demonstration code. I printed
listings for the access-point and end-device code to learn more about how it
worked. The code includes many helpful comments, but newcomers to Microchip
compilers might get a bit confused by notations such as:
This type of statement had me scratching my head for a while, so
I contacted Daniel Harrist at Powercast and he replied: "The AD1CHS and AD1CON1bits.ADON structs are defined in the
file "p24F16KA102.h" which is part of the C30 compiler from
"It can be difficult to locate these definitions because
Microchip doesn't include this file directly in their software. Rather, they
include a higher level file, "p24Fxxxx.h," which contains #if-defined statements
and pre-compiler checks to include the correct file based on the processor
choice. These files are located in the following folder on my computer:
C:\Program Files\Microchip\MPLAB C30\support\PIC24F\h
and should be somewhere similar on yours, depending on where you
installed the C30 compiler."
The AD1CON1, for example, is a compiler definition of
analog-to-digital converter control register one, a 16-bit register. The
"bits" suffix lets you control individual register bits, and in this
case, AD1CON1bits.DONE lets code monitor the state of the DONE bit (bit 0) in
the associated control register. For more information on this type of acronym
or abbreviation used by the Microchip compiler, download a copy of the
"PIC24F Family Reference Manual," document DS39705B. This link
connects to the ADC section, chapter 17:
When I set up the PICkit 3 debug/programmer pod to download
modified code to the end-device sensor board I ran into a few small problems. Here's
what I found and recommend:
1. Open the Microchip MPLAB IDE before you try to do anything
with the code.
2. Remove the end-device sensor board from the power-harvester
board before you connect it to the PICkit 3 module. There are no jumpers to
change on the board, just use it as it comes.
3. When you reprogram an end-device sensor board, you must power
it from the PICkit 3 pod. When in the MPLAB IDE, select either Debug or Release
in the window at the top of the IDE window. Use Debug if you want to debug code
or use Release when you want to "release" the code and have it run
without any debug support.
If you choose Debug, go to the Debugger menu selection on the top
of the window and Select Tool-->PICkit 3. After you select the PICkit 3
tool, go to Debugger-->Settings... and select the Power tab. Set the voltage
to 3.25V and check "Power target circuit from PICkit 3." Then click
If you choose Release, go to the Programmer menu selection on the
top of the window and Select Tool-->PICkit 3. After you select the PICkit 3
tool, go to Programmer-->Settings... and select the Power tab. Set the
voltage to 3.25V and check "Power target circuit from PICkit 3." Then
click on Apply.
If you get an error message, go to the Debugger and Programmer
menus and unselect the PICkit 3. The IDE does not automatically unselect a tool
when you switch from Debug mode to Release mode and the IDE can only handle one
mode at a time.
4. Download the manuals for the PIC24F16KA102 MCU and also the
manual for the PIVkit 3, the MPLAB IDE, and the C30 compiler.
5. I also recommend you obtain the following documents from the
Microchip website if you want to pursue MiWi communications:
"Microchip MiWi P2P Wireless Protocol," AN1204.
"Microchip Wireless (MiWi) Application Programming Interface
-- MiApp," AN1284.
"Microchip MiWi Wireless Networking Protocol Stack,"