This post is part of the Temperature monitoring project.
As said in the previous post, the protocol used by the Oregon Scientific EW91 is relatively new (seems to be named ‘Elements’), and I did not find already existing code on internet to decode it.
So I attached a 433 MHz receiver module (generic brand) to an Arduino Duemilanove and started observing, with the help of a tiny logic analyzer, and mostly the sound card of the PC and Audacity.
The picture bellow gives an example of the raw data that is received.
I will not go here into the details of the decoding algorithm. Those interested into that can have a look into the Arduino sketch, especially in file OregonRX.pde. Feel free to post comment if you want focus on a specific point.
However, here is an excerpt from code comments that shows the protocol main principles for the “impatient”:
Frame composition: Preamble - SYNC - 65 short data pulses (~ 1.9 ms) [pulse means "high")
Preamble = 2 short pulses with 1 short low between (~2.1 ms), then a short low
SYNC = 1 long pulse (~ 3.8 ms) followed by 1 long low (~ 4.1 ms)
Frame pulses are always ~1.9 ms, spaced by short (~2.1 ms) or long low (~ 4.1 ms)
short low ==> bit = 0
long low ==> bit = 1
The frame has 8 significant bytes, last 4 are complements of first 4.
Found a better byte alignment by inserting a first 0 in the burst.
4 Bytes meaning
XXXX-XXXX XXCC-SXXX XXXX-RHHH LLLL-DDDD
CC = Channel
S = Sign 0:Positive, 1:Negative
R = Reset 1 on first frame after reset
HHH, LLLL, DDDD High & low temp digit, decimal all in BCD
Did not yet investigated Low battery indicator
Considering decoding, I left one detail uncovered: the “low battery” indicator decoding. May be will do that later.
One other thing to mention:
I noticed that RF range was very short. So I tested another RF module (from telecontrolli), and have nearly the same problem. As I did not have an RF analyzer to check, I guessed that perhaps the frequency used by the Oregon transmitter was not exactly the same as the receiver modules I had.
I finally decided to open the EW91 display unit case and take the RF receiver used inside. After all, this is a reasonable price option.
The picture above shows this receiver (green PCB) mounted on a “daughter board” ready to be included into the central node box.
With this option, the range improved significantly, and I also adopted for a ½ wave length for the receiving antenna to increase it a little bit more.
The initial code from the Arduino prototype was then moved to the final target, a Jeenode as will be explained later. This change involved some code adaptation to deal with pin availability: an analog input has been used to replace a digital pin not available.
By the way, this change made me discover “by chance” a trick to read 3.3V digital logic with 5V microcontroller: use an analog input with comparator!
I have to seek for a simple and good schematic software in order to publish related schematics. But not worth right now, as electronic is so simple here.