lucsmall.com

Hacking the WH2 Wireless Weather Station Outdoor Sensor – Part 3: Receiving Packets With the Arduino

In the previous posts in this series, I described the process of reverse engineering the WH2 wireless outdoor sensor that is bundled with some Fine Offset Electronics weather stations, and the protocol used by these sensors. In this part I demonstrate how to use the Arduino to receive and decode the packets.

Update 19 December 2013: Please see this post for a sketch that supercedes the code below.

To simplify the operation of receiving and decoding packets, I’ve created an Arduino library. This is available on Github. The library includes a test harness in the examples folder. The test harness shows how to setup and call the library’s functions and writes a summary of each received packet to the Arduino’s serial port. Just wire up the circuit below, install the library, open the TestHarness example, compile and upload it to your Arduino, and open the Serial Monitor window of the Arduino software. (Note: It could take up to 48 seconds for the TestHarness to receive a packet from a WH2 sensor in range.)

The 433MHz receiver module I used was Jaycar catalogue number ZW3102. Just about any 433MHz receiver module that supports Amplitude Shift Keying (ASK) or On-Off Keying (OOK) should work.  The two LEDs provide status information. The RF Activity LED flickers when the RF channel is idle. It goes solid when something in range is transmitting on 433MHz. The Packet Received LED lights solid for a brief time when a packet is being received from a WH2 sensor. Both LEDs are optional.

Comments