Wireless Communication between Arduino using RFBee

This tutorial is to show wireless communication between two Arduinos using RFBee. There are two types of RFBee available in Cytron, they are RFBee 434MHz UART Wireless Module (100m) and RFBee 433MHz UART Wireless Module (1km):

RFBEE-434MHZ(V2)-800x800

RFBee 434MHz UART Wireless Module (100m):Having operating frequency of 434 MHz and wireless range of 100 m. This wireless range is measured under open space, the wireless range may reduce if we use it in indoor. 

RFBEE-433MHZ(V2)-800x800

RFBee 433MHz UART Wireless Module (1km): Having operating frequency of 433 MHz and wireless range of 1 km. Again, this specification is measured under open space, and it may reduce when we use it in indoor. 

Since they have different operating frequencies, both these modules are not compatible with each other. We need same frequency module in order to set up the wireless communication. Also, they are not compatible to the low cost RF transmitter and receiver. 

Both RFBee modules have similarities as follows:

  • They are transceiver module, which means they are able to receive and transmit data wirelessly.
  • Both of them are using UART TTL interface protocol and half duplex (default), and able to support baud rate from 1200 bps to 115200 bps (default is 9600 bps). 
  • There are 100 channels to be configured for security and interference avoidance purpose. 
  • The configuration can be done with AT command. 
  • The supply voltage is 3.3V. 

In this tutorial, I’ll show you how to use RFBee modules to establish a wireless communication between two Arduino. The Arduino board I am using in this tutorial is the CT-UNO board and the RFBee module is RFBee 434MHz UART Wireless Module (100m)

 Hardware Required: 

First, take out the RFBee module from the package. There are 3 components in the package: a RFBee-434MHz module, an spiral antenna and a XBee breakout board.

C360_2015-01-21-10-12-22-153

The breakout board is not needed in this tutorial so I just keep it aside. Next, solder the antenna on the antenna pad of the RFBee module.

C360_2015-01-21-18-22-43-528

Plug the RFBee on the Cytron XBee Shield and further plug the whole shield onto CT-UNO board. 

C360_2015-01-21-19-02-20-164

C360_2015-01-21-19-04-44-991

C360_2015-01-21-19-05-22-614

Make sure the RFBee is plugged into XBee Shield correctly, same goes to the XBee shield, and repeat these steps for another set of RFBee and CT-UNO. 

RFBee Configuration

Connect CT-UNO to PC/computer via USB micro B cable to configure the RFBee. There are 100 channels available for RFBee module. To configure the RFBee, the MODE must be switched from “Trans” to “AT”, and the mini jumpers should be plugged at the “USB” and “USB” for Tx and Rx on Cytron XBee Shield. 

Picture2

There are 3 parts in the configuration we can set: 

  • A – module address
  • B – serial port baud rate
  • C – wireless communication channel

Let start with a simple test of communication by sending the command of “AT“. If everything is working, we will obtain the return of “OK“. 

SerialMonitor001

The second step is set the module address. The module address can be changed by sending “AT+A” follow by 3 digit values, and the values can be between 000 and 255. The default value is 000

For example, I sent AT+A010 to the module via Serial Monitor, and I will obtain return OK+A010

SerialMonitor002

The third step is set the serial port baud rate. The serial port baud rate can be changed by sending “AT+B” follow by valid baud rate. The baud rate can be set to be 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200. The default value is 9600

For example, I sent AT+B4800 to the module via Serial Monitor, and I will obtain return OK+B4800

SerialMonitor003

The last step is set the wireless communication channel. The channel can be changed by sending “AT+C” follow by 3 digit values, and the values can be between 001 and 020. The default value is 001

SerialMonitor004

By using combination ABC, there is over 100 channels available. Remember, both RFBee modules MUST have same configuration in order to communicate to each order. 

Circuit Connection

In this tutorial, a push button and 1kΩ resistor are connected to the XBee Shield pin 2, and a LED and 180Ω resistor are connected to XBee Shield pin 13. 

Sketch001_bb

Remember to plug the mini jumpers at the D1 and D0 for Tx and Rx of Cytron XBee Shield respectively so that the sketch can be uploaded into CT-UNO later on. 

Picture1

Next is the coding. The coding is simple: when push button is pressed, CT-UNO will sends integer ‘1’, else it will send integer ‘0’; when CT-UNO receives ‘1’, the LED will ON, if it receives ‘0’, the LED will OFF. Here’s the sketch

Cytron_RFBee_434MHz

The baud rate we configured in the RFBee configuration will be the baud rate of the serial communication of CT-UNO. Since the baud rate I set in the RFBee is 4800, so the value in the Serial.begin( ) should be 4800. If you set different baud rate, remember to change that baud rate in the Serial.begin( )

Upload the sketch into CT-UNO. After that, all the steps are repeated for another CT-UNO. 

Figure below shows the CT-UNO boards after set-up: 

C360_2015-01-21-22-10-29-063

Video below shows the wireless communication between two CT-UNO using RFBee modules: 

Buy

, , ,

Related Post

Getting Started with Colour Sensor Module (SN-COLOUR-MOD)

Getting Started with Tilt Sensor (SN-TILT)

Getting Started with Vibration Sensor Module (Normally Off) (SN-VIBRATE-MOD)

Getting Started with IR Distance Click

Leave a Reply

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