Skip to content

433MHz Radio TinyShield Tutorial

Do you need to communicate over a long distance with something? Perhaps a drone, an RC car, or RC goose decoy. Well, lucky for you, the 433MHz radio is perfect for these applications!

To learn more about the TinyDuino Platform, click here


Description

This long range radio TinyShield is based around the very popular Silicon Labs SI4432 radio transceiver - the same transceiver as used by the HopeRF RFM22B module.  The TinyShield is set to operate at 433MHz and can transmit at up to +20dBm and is very easy to use. This transceiver allows for long range communication between radios and is designed for an open field range of up to 500 meters, which makes this great for long range sensors of RC control (like drones and vehicles).  

An U.FL antenna connection is included on the board, along with a 433MHz whip antenna.  The TinyShield incorporates level shifters and a local power supply to ensure proper and safe operation over the entire TinyDuino operating voltage range up to 5V.

To see what other TinyShields are compatible with this TinySheild, see the TinyShield Compatibility Matrix

Technical Details Si4432 Transceiver Specs
  • Frequency: 433MHz
  • Sensitivity: –121 dBm
  • Output power range: +20 dBm Max
  • Data Rate: 0.123 to 256 kbps
  • FSK, GFSK, and OOK modulation
  • Ultra low power shutdown mode
  • Wake-up timer
  • Auto-frequency calibration (AFC)
  • Configurable packet handler
  • Preamble detector
  • TX and RX 64 byte FIFOs
TinyDuino Power Requirements
  • Voltage: 3.0V - 5.5V 
  • Current:
    • Receive: 18.5mA
    • Transmit (+13 dBm): 30mA
    • Receive (+20 dBm): 85mA
    • Sleep: 1uA
    • Due to the current, this board cannot be run using the TinyDuino coin cell option
Pins Used

SPI Interface used

  • 3 - SPI_IRQ: This signal is the interrupt output from the radio transceiver and into the TinyDuino.
  • 7 - SPI_CS: This signal is the SPI chip select for the radio transceiver.
  • 11 - MOSI:  This signal is the serial SPI data out of the TinyDuino and into the radio transceiver.
  • 12 - MISO: This signal is the serial SPI data out of the radio transceiver and into the TinyDuino.
  • 13 - SCLK: This signal is the serial SPI clock out of the TinyDuino and into the radio transceiver.
Dimensions
  • Board: 20mm x 20mm (.787 inches x .787 inches)
  • Board: Max Height (from lower bottom TinyShield Connector to upper top TinyShield Connector): 5.11mm (0.201 inches)
  • Board Weight: 1.15 gram (.04 ounces)
  • Antenna Length: 177mm  (7.0 inches)
  • Antenna Weight: 0.26 grams (0.009 ounces)

Notes

  • For best range, the antenna should not be close to metal or coiled up.  
  • You can use different antennas with this board, but they need to be 433Mhz with a U.FL connector on them.
  • We've tested these at low data rates up to 500 meters (1640 feet) on the ground with the included antenna! However range will vary greatly depending on local 433MHz noise, obstructions, height above ground, and other factors.

Materials

Hardware materials

Hardware

NOTE: For this tutorial you will need two processor boards of any type, and two 433MHz Long Range Radio TinyShields.

Software

NOTE: There is not really a transmitter and receiver in this case. Both radios act as both a transmitter and a receiver. These names were assigned in order to simplify distinguishing which board is which.


Hardware Assembly

For both stacks, simply place the 433MHz Radio TinyShield on top of your processor of choice.

Assembled TinyDuino stack


Software setup

Be sure to unzip the RadioHead Arduino Library and place it in either your sketch folder or in your Arduino/libraries directory.


Upload Program

The following code will work with any of our processor boards as long as two of the same type of radio are used, one on either processor. Upload the first sketch to one stack and the second sketch to the other.

"Transmitter" Radio Code
/*
  TinyDuino Radio Transmitter TinyShield Example Sketch

  This example is to establish communications with another
  radio of the same type. The other processor and radio TinyDuino
  stack should have the RadioRX_example.ino Radio Receiver
  TinyShield Example Sketch.

  If using the 433MHz radio: set use433 to a 1 in line 24
  If using the NRF24L01 radio: set use433 to a 0 in line 24

  Written 04 June 2019
  By Hunter Hykes
  Modified 
  By 

  https://TinyCircuits.com
*/

#include <SPI.h>
#include <RH_RF22.h>
#include <RH_NRF24.h>

#define use433 1  //1 if using 433MHz radio, 0 if using NRF24L01

#if(use433)
RH_RF22 nrf24(7, 3);
#else
RH_NRF24 nrf24(9, 7);
#endif

#if defined(ARDUINO_ARCH_AVR)
#define SerialMonitorInterface Serial
#elif defined(ARDUINO_ARCH_SAMD)
#define SerialMonitorInterface SerialUSB
#endif

void setup()
{
  SerialMonitorInterface.begin(115200);

  #if(use433)
    if (!nrf24.init()) {
      SerialMonitorInterface.println("init failed");
    }

    nrf24.setTxPower(RH_RF22_TXPOW_20DBM);

    if(!nrf24.setModemConfig(RH_RF22::GFSK_Rb125Fd125)) { //GFSK_Rb4_8Fd45?
      SerialMonitorInterface.println("setModemConfig failed");
    }
  #else
    if (!nrf24.init()) {                        // For NRF24L01 radio
      SerialMonitorInterface.println("init failed");
    }
    if(!nrf24.setChannel(1)) {
      SerialMonitorInterface.println("setChannel failed");
    }
    if(!nrf24.setRF(RH_NRF24::DataRate250kbps, RH_NRF24::TransmitPower0dBm)) {
      SerialMonitorInterface.println("setRF failed");
    }
  #endif

  SPI.setClockDivider(4);
}

void loop()
{
  SerialMonitorInterface.println("Sending to receiver");
  //Send a message to receiver
  uint8_t data[] = "Hello World!";
  nrf24.send(data, sizeof(data));

  nrf24.waitPacketSent();
  //Wait for a reply from the receiver
  uint8_t buf[RH_NRF24_MAX_MESSAGE_LEN];
  uint8_t len = sizeof(buf);

  if (nrf24.waitAvailableTimeout(500)) { 
    // Should be a reply message for us now   
    if (nrf24.recv(buf, &len)) {
      SerialMonitorInterface.print("Reply: ");
      SerialMonitorInterface.println((char*)buf);
    } else {
      SerialMonitorInterface.println("Receive Failed!");
    }
  } else {
    SerialMonitorInterface.println("No reply, is the receiver running?");
  }

  delay(400);
}
"Receiver" Radio Code
/*
  TinyDuino Radio Receiver TinyShield Example Sketch

  This example is to establish communications with another
  radio of the same type. The other processor and radio TinyDuino
  stack should have the RadioTX_example.ino Radio Transmitter
  TinyShield Example Sketch.

  If using the 433MHz radio: set use433 to a 1 in line 24
  If using the NRF24L01 radio: set use433 to a 0 in line 24

  Written 04 June 2019
  By Hunter Hykes
  Modified 
  By 

  https://TinyCircuits.com
*/

#include <SPI.h>
#include <RH_RF22.h>
#include <RH_NRF24.h>

#define use433 1  //1 if using 433MHz radio, 0 if using NRF24L01

#if(use433)
RH_RF22 nrf24(7, 3);
#else
RH_NRF24 nrf24(9, 7);
#endif

#if defined(ARDUINO_ARCH_AVR)
#define SerialMonitorInterface Serial
#elif defined(ARDUINO_ARCH_SAMD)
#define SerialMonitorInterface SerialUSB
#endif

void setup()
{
  SerialMonitorInterface.begin(115200);

  #if(use433)
    if (!nrf24.init()) {
      SerialMonitorInterface.println("init failed");
    }

    nrf24.setTxPower(RH_RF22_TXPOW_20DBM);

    if(!nrf24.setModemConfig(RH_RF22::GFSK_Rb125Fd125)) { //GFSK_Rb4_8Fd45?
      SerialMonitorInterface.println("setModemConfig failed");
    }
  #else
    if (!nrf24.init()) {                        // For NRF24L01 radio
      SerialMonitorInterface.println("init failed");
    }
    if(!nrf24.setChannel(1)) {
      SerialMonitorInterface.println("setChannel failed");
    }
    if(!nrf24.setRF(RH_NRF24::DataRate250kbps, RH_NRF24::TransmitPower0dBm)) {
      SerialMonitorInterface.println("setRF failed");
    }
  #endif

  SPI.setClockDivider(4);
}

void loop()
{
  if (nrf24.available()) {
    // Should be a message for us now   
    uint8_t buf[RH_NRF24_MAX_MESSAGE_LEN];
    uint8_t len = sizeof(buf);

    if (nrf24.recv(buf, &len)) {
      // NRF24::printBuffer("request: ", buf, len);
      SerialMonitorInterface.print("Received: ");
      SerialMonitorInterface.println((char*)buf);

      // Send a reply
      uint8_t data[] = "and hello back to you.";
      nrf24.send(data, sizeof(data));
      nrf24.waitPacketSent();

      SerialMonitorInterface.println("Sent a reply");
    } else {
      SerialMonitorInterface.println("Receive Failed!");
    }
  }
}

Transmitter Output

Receiver Output

Moving forward, you could transmit arrays of data rather than text in order to provide control inputs or remote feedback to your devices. This concept is used in our Tiny Jeep and Tiny Jeep Controller which makes use of some additional materials (1 Motor Driver TinyShield, 1 Joystick TinyShield, 2 Motors, and some housing). With this, the radio TinyShields can be used to control an RC car.


Contact Us

If you have any questions or feedback, feel free to email us at info@tinycircuits.com or make a post on the forum.

Show us what you make by tagging @TinyCircuits on Instagram, Twitter, or Facebook so we can feature it!

Thanks for making with us!


Downloads