Interacting with Different IoT Modules Part 2

 GSM Shields Vs Radio Waves for inter-connectivity. What’s Better? 

The importance of connecting devices was emphasized from the previous blog thus raising the fact that a cheaper alternative is needed.

Radio waves are predominantly used for transmitting signals, enabling communication back and forth from great distances. These waves can be transmitted as far out as outer space or a short as several millimetres. In broadcasting radio waves are transmitted from specific locations to many others over limited distances. Theses waves carry signals for television, mobile phones and many other technologies that are used today. It is important to understand how much we rely on radio waves. Many of our information and key communication technologies use radio waves to allow us to benefit from them.

Wi-Fi follows one of the key characteristics of radio waves. With Wi-Fi being wireless it allows user to connect to the internet without wired in technologies such as the computer to a cabled connection. As a connecting technology it gives the users the ability to interact through a variety of media. Radio waves are transmitted and received in the same way just like a walky- talky or 2way radio is.

Similarly Arduino can be configured to Transmit/Receive data via Radio Waves using a 433Mhz RF module which is available for $1 a pair in ebay.

Wiring a Diagram for Arduino


For demonstration, a numeric pattern will be transmitted via this frequency.

Library Needed :

Simply paste this into the libraries folder in C:\Program Files (x86)\Arduino\libraries or open up Arduino and go to Sketch->Include Library ->Add .ZIP Library.

Copy paste the below code and upload the code to the Arduino after selecting the board and port in tools.

Transmitter Code

How Transmitter works,

Wait until transmitter is available and encode and queue the message into vw_tx_buffer, The message is raw bytes, with no packet structure imposed.
It is transmitted preceded a byte count and followed by 2 FCS bytes.

  1. Encode the message length ,Encode the message into 6 bit symbols. Each byte is converted into 2 6-bit symbols, high nybble first, low nybble second
  2. Append the FCS, 16 bits before encoding (4 6-bit symbols after encoding)
    CCITT CRC-16 as the FCS
  3. VW sends FCS as low byte then high byte
  4. Starting the low level interrupt handler sending symbols

Receiver Code

How receiver works,

Get the message received (without byte count or FCS), Return true if there is a message and the FCS is OK.

  1. Listen for message
  2. Read vw_rx_len
  3. Remove bytecount and FCS
  4. Check message against FCS and verify.

This is a bit primitive option compared to GSM shields but this is a much more cheaper option when building home automation systems, there are different mechanisms to encode the signals enhancing the security.

Recent Posts

Leave a Comment