Xbee Alternative XRF Wireless RF Radio Module And Arduino

In this post I will show you how to connect the XRF with Arduino, and will show you a example application with two Arduinos talking to each other using the XRF wireless module.

Bought The XRF Wireless RF Radio Modules

As part of the DIY Custom Remote Control, I will be using wireless modules for remote communication. There isn’t much choice, either Radio Transceiver or Xbee. Both are great but quite expensive. Later on I stumble on an cheaper Xbee Alternative called XRF Wireless RF Radio Module, that claims it has the same pin configuration as the Xbee, the way it’s used is also the same, and the range can reach up to 1 Km (although some feedbacks said it’s more like 300m but it’s still great). More importantly, it’s only half of the price of a Xbee module.

I think the main difference is that this module transmits data at lower frequency (868 and 915 MHz) than the Xbee (2.4G Hz), and that partly explains why the transmit distance is longer.

Problems Right Away

remote-XRF-to-Arduino-connections 9

I bought the break out boards (XBBO) with wireless modules too, and I only found out that the ones I bought are called “Passive XBBO” which doesn’t accept 5V power supply but only 3.3V (not 5V signal as well because of that). Only “Active XBBO” would accept 5V and convert the voltage for you. I didn’t notice that when purchasing (should have been more careful and read the description), So, it didn’t work when I just simply connect everything. My first thought was the TX/RX data line voltage on the Arduino is too large (5V) for the XRF (3.3V).

I tried so hard searching on Google, there isn’t much information about this, even not much about the XRF module working with Arduino. So I decided to take the risk by following tutorials about the Xbee, since they are similar devices, and it did work!

A Not-So-Perfect Solution

I found this image about Xbee and arduino:


I noticed the potential divider on it and I thought, that this might be it! Because on the break out board, we have already have the capacitor, so we can ignore that (it still works without it anyway).

I don’t have any 15K resistors, so I am using a 4.7K in series with a 10K resistor. (Ignore the LEDs and the blue resistors, I was too lazy to remove them from the last project).



Okay, it’s great that it works finally. But it’s kind of annoying having to setup the potential divider every time. So I made a small strip board with the potential divider soldered on, and it also has a female to female connection, so it’s easier to work with as well with the Arduino.

remote-XRF-to-Arduino-connections 6

Here is the new result:

remote-XRF-to-Arduino-connections 4

remote-XRF-to-Arduino-connections 7

remote-XRF-to-Arduino-connections 5

Although it’s cheap and easy enough to work around it, but I still would suggest to get a proper break out board with voltage conversion and additional functionality like power and data transmission indication.

Two XRF and Arduino Test Application

To verify they are working, I made this test application. There are two Arduino involved, both will be using the XRF modules to send and receive data. Arduino1 will be sending data – 0, 1, 2, 3, 4…. 8, 9, with an interval of one second. Arduino2 will receive these data, when received data is 1, the LED on pin13 (built-in LED) will light up for one second and then goes off, otherwise nothing will happen.

So in theory if everything is working, we should see the LED on Arduino2 light up every 10 seconds.

Code For the Sender – Arduino1

[sourcecode language=”cpp”]
int num = 0;

void setup(){
// start serial port at 9600 bps:
pinMode(13, OUTPUT);


void loop(){
if (num++ >= 9)
num = 0;


Code For the Receiver- Arduino2

[sourcecode language=”cpp”]
int num;

void setup()
// start serial port at 9600 bps:
pinMode(13, OUTPUT);


void loop(){
if (Serial.available() > 0) {

// get incoming byte:
num = Serial.read();

if(num == 1){
digitalWrite(13, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(13, LOW); // set the LED off


13 thoughts on “Xbee Alternative XRF Wireless RF Radio Module And Arduino

  1. Habib

    I have to control about 500 different LED at different places. I can afford 500 separate receivers for them. What i want is to control them with single transmitter. Please help me out, what should i do?. I am new in this field..

  2. John

    Hi Oscar.
    Thanks for this tutorial!

    I want to ask you if these XRF modules can work as one Master and two Slave (or more slaves). It is possible? Because I want to light up two leds on “master arduino” with two “slave arduinos”. Each slave arduino will have one button to switch one of the two leds on master arduino.

  3. matt

    Thanks Oscar

    We are actually making a bit of progress with the project then hit a bit of a road block today… I’m curious did you have to pair your XRF’s together some way?

    What we have is an Android device that is sending out a serial command.. We have that side connected to an XRF chip when we press a button that we programed on the Android we know the chip does send it’s signal (we have a LED connected on the DTX pin.. when we press the button we get the light to flash)

    The receiving side we have connected to an Arduino Uno.. We configured it the same way you have your receiving side, code was loaded on the Arduino but we aren’t getting any visual indications on the receiving end that it is receiving the signal… Again just wondering if there is any firmware that needs to be installed on the XRF chips?

    1. Oscar Post author

      Hi Matt,
      I didn’t need to do anything to pair the XRFs, once powered on, they just worked.
      are you using a breakout board? is it passive or active? you can read more about the difference in my post.
      if it’s passive it won’t work straight away and you will need to solder some components on it first.

      also double check your connections, swap around TX/RX see if that makes a difference.

      1. matt

        No not using a break out… we are just using the headers to connect to a bread board… ok good to know that nothing else was needed… I did try to switch the Tx and RX pins.. perhaps I have a bad connection some place… I’ll find it! Thanks!

  4. Matt

    Cool project.. We are working on trying to light up multiple lights between two points… I saw somewhere that the XRF radios could theoretically control 650 (or some number in the 600’s!) what I’m not sure is how that many lights could be controlled?

    I’m assuming each light would have to have its own relay but what I’m not sure is how can that many outputs be controlled from this one board? Any thoughts? Our goal is to be able to control about 50 separate lights from one receiver set up.

    1. Oscar

      controlling LEDs, XRF radios don’t control them directly, you need some kind of Micro Controller, which acts like a brain. It receives and send data from XRF radios. For example, Arduino UNO.

      Micro controller generally doesn’t have many output pins. If you need to control 50 LEDs, you can consider the Arduino Mega, it has more than 50 Digital output pins.

  5. Steve T

    I have a project I’m working on that uses an Arduino to control 3 servos. Each servo has 3 set positions. What I want to do is control them wirelessly using push buttons. One button turns it left, one right, and when none are pushed it returns to the center position. Do you believe I can use these modules for that application? If so what exact modules do your recommend for optimum range?

    1. Oscar

      yes of course. it depends on what range you are hoping to have. Xbee provides different products depends on the range. You can also buy better antenna to extend your range.

      1. Steve T

        Is the a program you have to write for the XRFs to communicate for me to control the servos from one to the other? Or is there a website where I can learn all this. I’m new to all this and just finding out the capabilities of all these products.

  6. misiek

    Hi, Thanks for the info. One question, I am so confused about that technologies. I am looking for something more secure so somebody else would not be able to read what I send or at least the receiver would not take any actions. I am reading and reading and more I am reading then more confused I am.

    RF and XRF , what is the difference. Is it only the distance ? I heard that XRF Supports network identifier PANID . Is that mean that I can read the identifier with every data sent ? or it works more like a BT pin authentication ? Can you explain ?

    Thanks a lot.

    1. Oscar

      Hi, XRF is just a product name, it’s not a technology. XRF is similar product to Xbee basically. I am not too sure about the network identifier bit, better to read their product specification if you need that kind of functionality.


Leave a Reply

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

For prompt technical support, please use our forum IntoFPV.com. I check blog comments weekly.