Raspberry PI – receive 433Mhz radio signal

Tonight, the hack objective is to communicate with 433Mhz equipments using Raspberry PI. For this, I use a 433Mhz receiver from Itead Studio bought at hack spark for 4.5€ with an emitter. Cabling is simple : VDD on 5V (I tryed to use 3.3V supply voltage but as a consequence the reception range is limited to a couple of cm) , GND goes to GND and One of the data pin going to pin 13 (gpio21/27). This is following elements found on that site : ninjablocks

If you are looking for a RF433 shield for Raspberry, check this link to another article !

The first step is to install a fresh wheezy raspbian environment and get the basis element to work :

Install wiringPI :

WiringPi is a library used to control GPIO in C and much more

git clone git://git.drogon.net/wiringPi
cd wiringPi
./build

 Install 433Mhz tools

This lib is used to interface with the receiver

git clone git://github.com/ninjablocks/433Utils.git
cd 433Utils/RPi_utils
make

Now, just start the RFSnifer tool … and it works ! I’m receiving my PIR detector signal. I made a change in the RFSnifer tool to get the binary value to understand the coding. (I’ll push the code next time) It seems that the coding of each the PIR digit is made on 2 bits with a non connected value, a high value and a low value.

Here is what is received when no swicth are set :

Received 5592533 (00000000010101010101010111010101)

We can see 12 series of 2 bits. the default value when no jumper are connected is 01 for each of the bits pair. If the jumper is set to high, the bit-pair value will be 11 ; if set to low, the bit pair will be 00.

On the PIR system, the encoding chip is a CS5211AGP which really looks like this one.

Improvement

  • To get a better reception, the size of the antenna should be around 17,3cm
  • To see reception, you can add a led between data and gnd (or vcc) with a 10K resistor in serie
  • With RPI2 and RPIB+ the user level Interrupt access is not efficient and you can loose part of the frame. I recommand to take a look to my post about the use of a kernel driver.
This entry was posted in Hardware and tagged , . Bookmark the permalink.

14 Responses to Raspberry PI – receive 433Mhz radio signal

  1. christopher says:

    hello

    did you just connect vcc to 5V on the raspberry? did you o something that DATA didn’t go over 3.3V to save the raspberry????

  2. Andy says:

    Hi, i want to receive a weather sensor sending 433mhz signals, but i do not get any input. I´ve done everything like you but nothing really nothing happens. Maybe you have some help for me.
    best regards
    andy

    • Andy says:

      For Information the sending and receiving of codesend works, when i send my own information it works. Can i integrat a readall?

    • Paul says:

      Take a look to Oregon Scientific sensors with RPI, you may find some usefull source code to decode your weather station if compatible. The proble with RF433 is that you have as many encoding as systems. So you have to find the right decoder.

    • Gerald says:

      Have you been able to figure out how to receive those weather sensor signals? I am planning to try the same thing with my Acu-Rite weather station.

      Thanks.

      • Paul says:

        take a look to the RFRPI post and the associated source code. I can’t tell you if your weather station will be supported but if you add the code to make it work, tell me I’ll add it.

  3. Ernst says:

    Hello Paul
    Sorry to bother you. I’m new with RasPi
    I did axactly what you discribed but RFSniffer doesn’t start.
    It says : command not found
    can you help me please?
    Screenshot: http://kanomaken.nl/py/RFSniffer.png

    What did you change in the cpp file to get a binary value?

    Sorry for my english ,but i’m dutch 🙂

    Gr Ernst

    • Ernst says:

      Sorry stupid mistake
      I got it starting.
      I changed the owner to root chown pi:root RFSniffer
      I changed chmod +s RFSniffer
      I tried sudo ./RFSniffer but nothing happens

      Do i mis something?

      • Paul says:

        launch it as root sudo ./RFSniffer is more simple.
        what do you mean by “nothing?” can you copy/paste some console output please?

  4. Don Aitken says:

    Hi. Thanks for this info. I’m trying to do something similar by sniffing the RF signal from a door contact on my home alarm system but nothing is picked up. The transmitter can send a code to the receiver all OK but it can’t find any of the signals from my alarm which is 433Mhz too. Is this because they are encrypted (and something to do with the house code set inside each door contact with a series of 8 switches) or is it to do with the part you mention “I made a change in the RFSniffer tool to get the binary value to understand the coding”? If the latter, please could you elaborate on how I could make a similar modification? Many thanks for any pointers, Don

    • Paul says:

      You can add some trace in the code to get the raw signal timing before decoding and try to analyse it. Not easy to explain, but it is possible to do with this code. Basically it get the signal (up and down) duration in a table and it decodes thanks to theses values so you can try to decode manually then create your own decoder.

  5. Martin Doubek says:

    Hi,

    I’m recently trying this myself and for long time I was unsuccessful but now, finally I can receive signal. The strange thing is, that I can receive only what I send with ./codesend but nothing from any push controller, for example car keys which are 433MHz and not even garage remote. It is strange, I can only receive what I send. Any idea? I’m on Raspberry Pi 2, I have it connected like so:

    Receiver:
    VCC 3v3
    GND
    DATA GPIO2 (PIN 13)

    Transmitter:
    VCC 5V
    GND
    DATA GPIO0 (PIN11)
    ANTENNA 17,3cm straight wire

    Any idea is welcome, thank you.

    Martin Doubek

    • Paul says:

      433 is a frequency not a protocol. It sounds like your garage remote does not use one of the decoded protocol. You can eventually activate some logs to see timing of messages listen and create your own decoder but it is a little bit tricky

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.