Tutorial demonstrate Wireless Communication between Arduino and Computer with RFBee using XBee shield and SKXBee.
HARDWARE REQUIRE:
- CT-UNO + USB Micro B cable
- SKXBee + USB Mini B cable
- RFBee 433MHz UART wireless module (1km) x2
- Arduino LCD Shield
- Cytron XBee Shield
- Adapter 12V 2A
Stack the Cytron XBee Shield onto CT-UNO.
Push the slide switch on RFBee module to AT MODE. If you are new to RFBee Module, please check the User’s Manual to get started. Stack the RFBee 433MHz module onto XBee Shield. Make sure RFBee module stack in correct orientation and the mini jumpers should be plugged at the “USB” and “USB”for Tx and Rx on Cytron XBee Shield.
Connect the CT-UNO to computer using USB micro-B cable and install the necessary driver. If you are new to CT-UNO, please check the User’s Manual to get started. Open ARDUINO IDE, go to Tools -> Serial Port -> COM (that connected with CT-UNO). In my case, the COM is 5.
We are going to change baud rate of RFBee to 4800 (since default baudrate is 9600). This is just to show the method to change baud rate, you can ignore this if you want to stick to the default baud rate.
Open Serial Monitor in ARDUINO IDE:
Make sure serial monitor’s baud rate is at 9600 baud and No line ending.
- Send “AT” to module
Example:
Send “AT” to module
Return: “OK”
- Send “AT+B4800” to module
Example:
Send “AT+B4800” to module
Return: “OK+B4800”
- To obtain all common parameters of module, simply send “AT+RX” to module. Serial monitor will return serial port transparent baud rate, channel, transmitting power and transmission function mode in order.
Example:
Send “AT+RX” to module
Return: “ OK+B4800\r\n OK+RC001\r\n OK+RP:+20dBm\r\n OK+FU3\r\n ”
Close serial monitor and load this sketch Arduino_RFBee into CT-UNO. * Before uploading sketch into CT-UNO, please remove the mini jumpers on XBee shield to D2 and D3. This is to avoid the bootloading process interfered by RFBee.
After loading is done, remove USB micro-B cable and push the slide switch on RFBee to TRANS MODE. Make sure RFBEE module stack in correct orientationand the mini jumpers should be plugged at the “D1” and “D0” for Tx and Rx on Cytron XBee Shield.
Stack the Arduino LCD Shield on top of XBee Shield. So its looks like this.
Connect USB micro-B cable to CT-UNO. Now open Serial Monitor in ARDUINO IDE again. From Serial Monitor, change baud rate to 4800. Serial Monitor will display “TYPE ANYTHING”. If serial monitor doesn’t display anything, press reset button on CT-UNO. You can start type something and send to test. The characters will display on Arduino LCD Shield
Close the Serial Monitor. Remove USB micro-B cable from CT-UNO. Connect another RFBee module via SKXBee using USB mini-B cable. Push the slide switch on RFBee to AT MODE and press reset on SKXBee.
From Arduino IDE, choose the com port SKXBee that connected to.
Go to Tools -> Serial Port -> Choose the new com number.
Previously my CT-UNO is COM 5. After I connect SKXBee and install driver, I have another new com port which is COM 50. You should check the COM port number for your SKXBee. It can be any number. WE ARE NOT GOING TO LOAD ANY PROGRAM HERE but we will configure this RFBee module.
Since another RFBee module’s baud rate is 4800. We have to change this module’s baud rate, to enable the communication. If another RFBee module’s baud rate is 9600, you can ignore this if you want to stick to the default baud rate. To configure this RFBee module, follow these steps. Open Serial Monitor in ARDUINO IDE. Make sure serial monitor’s baud rate is at 9600 baud and No line ending.
- Send “AT” to module
Example:
Send “AT” to module
Return: “OK”
- Send “AT+B4800” to module
Example:
Send “AT+B4800” to module
Return: “OK+B4800”
- To obtain all common parameters of module, simply send “AT+RX” to module. Serial monitor will return serial port transparent baud rate, channel, transmitting power and transmission function mode in order.
Example:
Send “AT+RX” to module
Return: “ OK+B4800\r\n OK+RC001\r\n OK+RP:+20dBm\r\n OK+FU3\r\n ”
Close serial monitor. Push the slide switch on RFBee to TRANS MODE and press Reset on SKXBee.
Open serial monitor again. From Serial Monitor, change baud rate to 4800. Plug in 12V DC ADAPTER to CT-UNO. Right after adapter plug in to CT UNO, Serial Monitor will display “TYPE ANYTHING”. If serial monitor doesn’t display anything, press reset button on CT-UNO. You can start type something and send to test. The characters you typed will be displayed on Arduino LCD Shield . In case the transmission signal is weak, please solder the antenna on the antenna pad of the RFBee module.
Computer to Arduino
Arduino LCD Shield can display 32 Characters and each row can display 16 Characters only. Extra Characters will display in second row. :). Press some button from LCD shield. It wil appear on serial monitor
Arduino to Computer
Press some button on LCD shield. It will appear on serial monitor
Check out the video:
————————————————————————————————————————————————————————-
ATTACHMENT
2. RFBee Module User’s Manual
3. CT-UNO User’s Manual
5 thoughts on “Wireless Communication between Arduino and Computer with RFBee.”
What is the range
Move the jumpers to D2 and D3 when you upload sketch into CT-UNO, move back to D0 and D1 after you done uploading.
The jumpers are at USB when I loaded the program
Have you move the mini jumpers on the XBee shield when you load program?
Hey, I have a problem in uploading the sketch to the CT-UNO. this error came out:
avrdude: arduino_read_sig_bytes(): (a) protocol error, expect=0x14, resp=0x00
avrdude: error reading signature data for part “ATmega328P”, rc=-2
avrdude: error reading signature data, rc=-1
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x00
Problem uploading to board
Is there any solution to this?