https://github.com/kevinmehall/rtlsdr-433m-sensor
Decoder for Oregon Scientific v1 protocol wireless temperature sensors with RTL-SDR and GNU Radio.
https://github.com/kevinmehall/rtlsdr-433m-sensor
gnuradio rtl-sdr software-defined-radio temperature-sensor
Last synced: 9 months ago
JSON representation
Decoder for Oregon Scientific v1 protocol wireless temperature sensors with RTL-SDR and GNU Radio.
- Host: GitHub
- URL: https://github.com/kevinmehall/rtlsdr-433m-sensor
- Owner: kevinmehall
- Created: 2012-04-23T04:48:33.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2017-03-25T21:37:24.000Z (over 9 years ago)
- Last Synced: 2025-03-28T02:14:15.016Z (over 1 year ago)
- Topics: gnuradio, rtl-sdr, software-defined-radio, temperature-sensor
- Language: Python
- Homepage:
- Size: 120 KB
- Stars: 176
- Watchers: 32
- Forks: 34
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Decoding Oregon Scientific wireless sensor data with RTL-SDR and GNU Radio
===========================================================================
Kevin Mehall
http://kevinmehall.net
This script decodes the packets that Oregon Scientific remote
thermometers (like the one pictured below) send to the display unit. It also
serves as example code for accessing [rtl-sdr][] / GNU Radio samples live from
Python.

Each sensor transmits every 30 seconds on 433.9MHz. The packet is repeated
twice. Modulation is [On-off keying][ook], and the 32 data bits are
[manchester encoded][manchester]. Alexander Yerezeyev implemeted a
[decoder for AVR][avr-code] microcontrollers, and wrote up a
[description of the protocol][alyer].
My sensors use the V1 protocol, but if you have newer sensors, take a look at
[JeeLabs' description][jeelabs-v2] of the V2 protocol. It would probably be
simple to adapt my code.
[rtl-sdr]: http://sdr.osmocom.org/trac/wiki/rtl-sdr
[ook]: http://en.wikipedia.org/wiki/On-off_keying
[manchester]: http://en.wikipedia.org/wiki/Manchester_encoding
[alyer]: http://alyer.frihost.net/thn128decoding.htm
[avr-code]: http://code.google.com/p/thn128receiver/source/browse/osv1_dec.c
[jeelabs-v2]: http://jeelabs.net/projects/11/wiki/Decoding_the_Oregon_Scientific_V2_protocol
The GNU Radio [osmosdr block] captures from the [device][p160].
It's tuned slightly to the side to avoid the DC noise at the local oscillator
frequency. A `freq_xlating_fir_filter_ccc` block selects and downsamples the
correct region of the captured frequency range. Then it AM demodulates that band, and
uses a message sink and queue to bring the samples into Python. (see gr_queue.py).
A Python state machine detects the preamble, manchester-decodes the bits, and
then parses the packet.
[osmosdr block]: http://cgit.osmocom.org/cgit/gr-osmosdr/
[p160]: http://blog.kevinmehall.com/post/21103573304/my-10-96-software-defined-radio-arrived
You can also (with the `-a` flag) play the AM audio to your speakers. The sensor
packets sound like beeps, and you can hear other devices transmitting on the ISM
band.