Kit Harvests RF EnergyKit Harvests RF Energy

DN Staff

January 27, 2011

7 Min Read
Kit Harvests RF Energy

For practical or aesthetic reasons some sensor networks must useenergy harvesting rather than rely on batteries or a nearby power outlet. Butwhen you can't harness solar, wind or thermal energy, local RF power providesan alternative. This kitfrom Powercast Corp. uses a low-power RF source to supply energy to tworeceivers that store energy an MCU can draw on periodically when it samplessignals 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 acapacitor or charge a battery. The company also builds a modular transmitterthat produces a 3W RF directional output within a 60-degree-wide beam. The kitcombines the RF transmitters and receivers with low-power MCUs and transceivermodules from Microchip Technology. Click here for documents and code.


A detailed User's Guide from Powercast made setup of theequipment go smoothly. That setup involved installing software and a USBdriver, connecting boards, attaching an antenna to each energy-harvestingboard, and plugging in and orienting the 3W RF source. The RF source operatesat 915 MHz and can supply power to "end devices" about 40 to 50 ftaway. Distances depend on local conditions.

The kitincluded two P2110 evaluation boards, two wireless-sensor boards and antennasso I could set up two sensor end devices powered by Powercast's RF-powersource. The P2110 board demonstrates how a Powercast IC can accept RF energyand convert it into useful power. Each sensor board can measure and reportlocal temperature, light intensity, humidity and receiver signal strength, aswell 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 MicrochipMRF24J40 PICtail daughter card (an IEEE 802.15.4 2.4-GHz RF transceiver) tocreate an "access point" for the wireless-sensor network. The XLPboard connected to my PC, which ran HyperTerminal to display information.

After setting up the RF-power transmitter and the two sensor/powerboard end devices - each with a "patch" antenna - my PC showed nodata. Apparently the ESD mat on my work table created a ground plane that interferedwith signal reception. Moving the two end-devices away from the mat solved theproblem and my PC displayed sensor readings. (The kitalso supplies a small dipole antenna for each end device, but it decreases theeffective transmitter-to-end-device distance.)

During 24 hours, the access point received about 18,000 samplesfrom both end devices. I obtained more samples from the end device closest tothe RF transmitter because it could gather more energy and thus transmit morefrequently. A jumper on each end-device sensor board lets you measure currentuse. The energy-harvesting boards supply a 50-millifarad (mF) capacitor tostore energy and provide contacts for an optional capacitor and battery. An LEDon each energy-harvesting board lets you determine whether a board receivesenough RF energy to charge its capacitor.

The kit employs the Microchip MiWi wireless networking protocolstack for peer-to-peer or mesh-network communications, so I wanted to jump intothe Powercast code and see how it operated the sensor communications.Programmers can use a MiWi application programming interface (API), whichsimplifies communication operations. To examine the code, I downloaded andinstalled the latest version (8.60) of the Microchip MPLAB integrated developmentenvironment (IDE) and the C30 compiler (free version) for the PIC24F16KA102MCUs used on the XLP dev board and on the end-device boards.

I enjoyed working with this kitand recommend it highly. It comes with good documentation, diagrams and code.And it clearly shows how engineers can harvest RF energy from a nearbytransmitter when they have no other way to easily and economically get energyto electronics with low-power requirements.

Remember, Powercast created this kitto demonstrate RF-power harvesting. So, treat it as an RF energy-harvesting kitand not a kit for wireless networking, although it demonstrates thoseoperations. I describe some aspects of working with the code below:

Code Experiences

Powercast provides documents and source code for the access pointand the end-device MCUs. Much of the access-point code deals with formattingdata for HyperTerminal to display. Likewise, the end-device code deals mainlywith the MCU's UART and ADC rather than wireless communications. That probablyindicates 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 helpfulcomments.

Microchip supplied a MiWi code "framework" for thePowercast Development Kit and Powercast added its demonstration code. I printedlistings for the access-point and end-device code to learn more about how itworked. The code includes many helpful comments, but newcomers to Microchipcompilers might get a bit confused by notations such as:

while(!AD1CON1bits.DONE);

This type of statement had me scratching my head for a while, soI contacted Daniel Harrist at Powercast and he replied: "The AD1CHS and AD1CON1bits.ADON structs are defined in thefile "p24F16KA102.h" which is part of the C30 compiler fromMicrochip."

"It can be difficult to locate these definitions becauseMicrochip doesn't include this file directly in their software. Rather, theyinclude a higher level file, "p24Fxxxx.h," which contains #if-defined statementsand pre-compiler checks to include the correct file based on the processorchoice. 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 youinstalled the C30 compiler."

The AD1CON1, for example, is a compiler definition ofanalog-to-digital converter control register one, a 16-bit register. The"bits" suffix lets you control individual register bits, and in thiscase, AD1CON1bits.DONE lets code monitor the state of the DONE bit (bit 0) inthe associated control register. For more information on this type of acronymor abbreviation used by the Microchip compiler, download a copy of the"PIC24F Family Reference Manual," document DS39705B. This linkconnects to the ADC section, chapter 17:http://ww1.microchip.com/downloads/en/DeviceDoc/39705b.pdf.

When I set up the PICkit 3 debug/programmer pod to downloadmodified code to the end-device sensor board I ran into a few small problems. Here'swhat I found and recommend:

1. Open the Microchip MPLAB IDE before you try to do anythingwith the code.

2. Remove the end-device sensor board from the power-harvesterboard before you connect it to the PICkit 3 module. There are no jumpers tochange on the board, just use it as it comes.

3. When you reprogram an end-device sensor board, you must powerit from the PICkit 3 pod. When in the MPLAB IDE, select either Debug or Releasein the window at the top of the IDE window. Use Debug if you want to debug codeor use Release when you want to "release" the code and have it runwithout any debug support.

If you choose Debug, go to the Debugger menu selection on the topof the window and Select Tool-->PICkit 3. After you select the PICkit 3tool, go to Debugger-->Settings... and select the Power tab. Set the voltageto 3.25V and check "Power target circuit from PICkit 3." Then clickon Apply.

If you choose Release, go to the Programmer menu selection on thetop of the window and Select Tool-->PICkit 3. After you select the PICkit 3tool, go to Programmer-->Settings... and select the Power tab. Set thevoltage to 3.25V and check "Power target circuit from PICkit 3." Thenclick on Apply.

If you get an error message, go to the Debugger and Programmermenus and unselect the PICkit 3. The IDE does not automatically unselect a toolwhen you switch from Debug mode to Release mode and the IDE can only handle onemode at a time.

4. Download the manuals for the PIC24F16KA102 MCU and also themanual for the PIVkit 3, the MPLAB IDE, and the C30 compiler.

5. I also recommend you obtain the following documents from theMicrochip 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,"AN1066

Sign up for Design News newsletters

You May Also Like