Go Down

Topic: Help with 433mhz receiver (Read 9 times) previous topic - next topic

DerekK19

Hi There. I've come late to this conversation. I've been struggling with almost the same weather station (Actually a WS1093, here in the 6th AU state, New Zealand). I also went down the sound card route and every 48 seconds saw the same signal Agrajag has posted. At that point I got completely lost. I'm also a software engineer, so the programming is easy, but the electronics phases me. That said, even the interrupt programming for the Arduino is a bit trickier than I'm used to (yep, programing iPhone apps, web services, I can do that, but I'm having real difficulties with low-level Arduino development). Long story, short. Please could you post the Arduino code you wrote. Thanks for any help. Derek

mauried

As your weather station is a WS1093, according to the specs for that station, it supports multiple wireless sensors, Temp/humidity, Rain and wind.
Thats a bit differant to the OPs weather station which only supports 1 wireless sensor.
Means that the decoding process is a bit more difficult.
Most of these simple weather stations that use OOK 432.92 Transmitters use a simple form of Manchester Coding to improve the reliability
of the Radio transmissions.
They usually start with a sequence of 1-0-1-0-1-0- multiple times to give the receivers AGC time to adjust and to give the receivers
data slicer a constant 50% duty cycle transmission so that it can find the 1/2 amplitude point , which it then uses to decide whats a 1 and a 0.
After the 1-0-1-0-1-0 sequence , there is usually a fixed code called the sync word which never changes, and thats used to indicate that the next thing being transmitted is the Sensor data.
This is where the detective work starts, as you need to capture this data and try to make some sense of it.
Which usually means , if its a temp sensor, heating and cooling it , and watching what the data fields do.
Since this weather station supports multiple wireless sensors, there will be Sensor ID fields to tell the console what sensor is sending, so it can work out whether its temp, wind or rain.
Good luck, the programming of the Arduino is the easy bit.

DerekK19

Thanks for the tips. I've seen posts elsewhere hinting to the data layout and once I get reliable data value I'm confident I'll be able to crack the code. Right now however I'm trying to get a sensible bit stream. I get a steady stream of random 1 and 0 meaning I'm just seeing noise. I think I have to filter this (I didn't have, so don't fit the 1k resistor on the data line, but I'll try that next) then there are 4 further filter settings in the code: min, max, min long and max short, getting the right values for these seems to be the trick. I'm going for trial and error, but that's a lengthy process. But a challenge is good right?

mauried

In the absence of any input, the receiver winds its AGC to maximum, and that produces random 1-0-1-0 transitions on its output.
You can generally tell its noise , as there will be no fixed time periods between the transitions , whereas with sensor data, the times between transitions
will be more ordered.
Also the frequency of 433.92 Mhz is used by lots of differant devices that all will produce data that looks like valid data, so you need some way to know that
what you are seeing is your sensors and not someone elses.
Not a problem if you have no neighbours.

Agrajag

Hi Derek - my main breakthrough was when I printed out the highs/lows that were bigger than a smallish threshhold (100usec from memory) and the how long they were high/low for. I would print a ^ for high and _ for low (I didn't want to use 1/0 because that was confusing me at first, this wasn't the binary data yet), and then the timing (using the interrupt) next to it. During the transmission period my program was printing something like:

^ : 125
_ : 255
^ : 375
_ : 255
^ : 375
_ : 255
^ : 125

When I saw that the lows were always 255 (or very close) and the highs were always 125 or 375, I knew I had it - just ignore the lows and look at the long/short highs. When it wasn't transmitting I would just get fairly random timings.

I don't currently have access to my computer that I wrote the code on that I know works but I do have a version that I "cleaned up", but I haven't even verified that it compiles yet let alone runs. The structure is pretty much the same as the practical arduino code but might be a bit easier to follow.

See here: http://whatsbeef.net/philip/weatherstation/src/

If I have time tonight I'll verify that it compiles/runs.

Go Up