MichaelCropper
Posts: 14
Joined: Sun Feb 21, 2016 4:03 pm

RF 433 MHz Communication Between Raspberry Pi & Arduino Sending Data

Sun Oct 01, 2017 11:01 am

While I'm still in the process of doing in-depth research on the topic, I thought it would be beneficial to post to see if anyone has any recommendations for how to communicate between a Pi and and Arduino over Radio Frequency 433 MHz.

Looking for 2 way communication. So the Pi can send structured data (i.e. commands, more than just on/off) which can then be interpreted by the Arduino, and vice versa so data can also flow back to the Pi.

I've picked up a cheap RF Transmitter / Receiver circuit, I only have one at the moment to play with, one receiver and one transmitter, so I'll have to swap them about for testing purposes for the time being then I can build in two way communication later on.

From what I've been reading so far, RF seems quite limited which is generally used to send commands of High/Low. Is there some kind of library on either side which can turn "thisCommand(data)" into a bunch of 01010101 which can then be transmitted / received easily? I've not come across anything yet on my research, although this must exist I would have thought.

General comments / thoughts / pointers?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12243
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: RF 433 MHz Communication Between Raspberry Pi & Arduino Sending Data

Sun Oct 01, 2017 12:34 pm

what you are looking for is called a "bit banged USART". search for bit banged USART, or bit banged serial code. Bit Banged means you are replacing hardware (the USART or UART) with software.

but in fact both the Arduino, and the PI have a hardware USART built in, so I would use them with a low baud rate, like 300 Bps, remember that 433 MHz emitters use very low signal strength, and are error prone, so you better send your messages multiple times, and use checksums, so the receiver can filter out a valid message among the scrambled ones.

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: RF 433 MHz Communication Between Raspberry Pi & Arduino Sending Data

Sun Oct 01, 2017 1:34 pm

MichaelCropper wrote:
Sun Oct 01, 2017 11:01 am
While I'm still in the process of doing in-depth research on the topic, I thought it would be beneficial to post to see if anyone has any recommendations for how to communicate between a Pi and and Arduino over Radio Frequency 433 MHz.
...
From what I've been reading so far, RF seems quite limited which is generally used to send commands of High/Low. Is there some kind of library on either side which can turn "thisCommand(data)" into a bunch of 01010101 which can then be transmitted / received easily? I've not come across anything yet on my research, although this must exist I would have thought.
There's a whole range of radio transmitter receiver modules. The cheapest and most basic (probably of the type you've got) generally use On-Off-Keying (OOK) where a signal is sent via the pulses sent out and their timing. For not much more you can get more advanced modules that contain receiver and transmitter in a single module and that can use other modulations (commonly Frequency Shift keying or FSK where the data is sent by changing between to frequencies). One fairly popular module I've used on both the Pi and ATMega328 (the heart of most arduinos) is the RFM69. This connects via SPI and you can then send it packets of data to transmit. They take a bit more configuration (there's a lot of parameters you can change including bitrate, power, frequency) but remove some of the black magic of signal detection, decoding, and checksums etc.

kayel
Posts: 109
Joined: Sun May 13, 2012 4:45 am
Location: France

Re: RF 433 MHz Communication Between Raspberry Pi & Arduino Sending Data

Sun Oct 01, 2017 4:18 pm

Semtech 1278 based LoRa transceiver modules are probably your best bet. They also do FSK, OOK and other stuff. They're excellent.
They're not breadboard friendly so you'll need to do some pin bending to be able to solder them onto breadboard friendly header pins.
7€50 post-free from AliExpress for two.

User avatar
joan
Posts: 14270
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: RF 433 MHz Communication Between Raspberry Pi & Arduino Sending Data

Sun Oct 01, 2017 7:30 pm

Given the module you have bought you could try my Virtual Wire module. This lets you send/receive short messages of arbitrary content.
Last edited by joan on Thu Oct 19, 2017 8:24 pm, edited 1 time in total.

drgeoff
Posts: 9819
Joined: Wed Jan 25, 2012 6:39 pm

Re: RF 433 MHz Communication Between Raspberry Pi & Arduino Sending Data

Sun Oct 01, 2017 11:12 pm

If in the US, you should first make yourself aware of the FCC restrictions on 433 MHz. See eg https://www.edn.com/electronics-blogs/e ... -of-Things. And do not overlook the comments there about interference to and from licensed amateur radio operators ("hams").

https://en.wikipedia.org/wiki/LPD433

There may be similar restrictions in other countries.

User avatar
Ferdinand
Posts: 236
Joined: Sun Dec 01, 2013 2:24 pm
Location: Leiderdorp, NL

Re: RF 433 MHz Communication Between Raspberry Pi & Arduino Sending Data

Wed Oct 04, 2017 10:15 am

Hi MichaelCropper,

Another fine transceiver is the HC-12. It has a wide voltage range and 100 channels. For more information see:
https://www.banggood.com/HC-12-433-SI44 ... 73522.html

Success with your project!
Success with your project!
Ferdinand

Return to “Advanced users”