f

Is multipoint wireless communication between RFBee module possible ?

This tutorial is to show multipoint wireless communication between RFBee modules, by changing channel, and show the concept with 3 different nodes (Arduino + RFBee).

Node A as Temperature Sensor node

Node B as Master Node

Node C as Computer node

 

Introduction

Is it possible for multipoint wireless communication between RFBee module? Yes, each nodes can send data or receive data from more than one node with the same channel but interference could happen when more than one node transmit at the same time. To avoid interference, we could use different channel for multipoint wireless communication between RFBee module. If any node send data to master node when master node is at different channel, the data of that node will evaporate . In this example, master node control the data flow. A slave can only send data if master request it.

Again, this is a simple example, you are free and welcome to explore other methods. For my case, a slave node does not change channel, but every slave will have unique channel.  Master node will change channel to communicate with particular slave, so master node must be able to enter AT mode and send AT command to change channel.

As I am using SKXBee to connect the RFBee, computer cannot be master node because SKXBee does not provide I/O to switch the mode of RFBee. We need to switch between AT and Transparent mode on RFBee to change channel and to communicate wirelessly with other RFBee. Therefore, the master node will consist of Arduino and XBee shield. I will modify the XBee shield to allow the Arduino to switch between the AT and Transparent mode. Computer with the SKXBee will be come a slave node.

 

Hardware required for this tutorial:


Software required:

Concept 1 : All RFBee modules with same channel

Explaination of Concept 1

In this concept, I will show how interference happens when all nodes use same channel to communicate each other.

1

Procedure to build :

A) Temperature Sensor.

1. Label CT-UNO as T.

q

2. Stack the Cytron XBee Shield onto CT-UNO.

3. 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.

4. 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.

   

5. 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.

1

6. Change the wireless communication channel of RFBee module to 002 (since default channel is 001 ), optional from 001 to 127. This is just to show the method to change the wireless communication channel of RFBee module, you can ignore this if you want to stick to the default channel ( 001 ).

7. 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+C002″ to module
Example:
Send “AT+C002” to module
Return: “OK+C002”

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+B9600\r\n OK+RC002\r\n OK+RP:+20dBm\r\n OK+FU3\r\n ”

 2  

RFBee module of Node A is using Channel 002.

8. Close serial monitor and load the sketch of Temp_RFBee_SC from here under SameChannel sub-folder 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.

3232

DSC00860

9. 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 orientation and the mini jumpers should be plugged at the “D1” and “D0” for Tx and Rx on Cytron XBee Shield.

10. Connect LM35 to XBee shield using male to male jumpers. The connections are very easy. Just connect one end to VDD (RED wire) and the other end to GND(GREEN wire) while the middle pin (WHITE wire) connect to A0. By referring to the CT-UNO there are total 6 analog pins that we can choose. I use A0 as ADC input pin. You even can directly solder LM35 onto XBee Shield. 

FFODOLCFVW22FQV.LARGE 

r     e

q w

11. Connect USB micro-B cable to CT-UNO and open Arduino serial monitor. Type “T” and press send. Serial monitor will reply temperature value  . This means temperature sensor node reply temparature value only when we send “T”. This is because to make sure temparature sensor node send temparature value only when master node send “T”.

SA

12. Close serial monitor and remove USB micro-B cable. Plug in 12V dc adapter or  powered up with the DC supply from LI-3.7-1000 batteries .

t

r

 

B) Master Node

1. Label CT-UNO as M as master Node

y

2. Stack the Cytron XBee Shield onto CT-UNO.

3. Push the slide switch on RFBee module to AT MODE.

4. 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.

   

5. 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).

Previously my CT-UNO is COM 5. After I connect new CT-UNO and install driver, I have another new com port which is COM 7. You should check the COM port number for your CT-UNO. It can be any number. In my case, the COM is 7.

3

6. Change the wireless communication channel of RFBee module to 002 (since default channel is 001 ), optional from 001 to 127. This is just to show the method to change the wireless communication channel of module, you can ignore this if you want to stick to the default channel ( 001 ).

7. Open Serial Monitor in ARDUINO IDE. Make sure serial monitor’s baud rate is at 9600 baud and No line ending.

DD

Send “AT” to module
Example:

Send “AT” to module
Return: “OK

Send “AT+C002″ to module
Example:
Send “AT+C002” to module
Return: “OK+C002”

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+B9600\r\n OK+RC002\r\n OK+RP:+20dBm\r\n OK+FU3\r\n ”

4  RFBee module of Master Node  is using Channel 002.

8. Upload the sketch of Master_RFBee_SC from here under SameChannel sub-folder. * Before uploading sketch into CT-UNO, please move the mini jumpers on XBee shield to D2 and D3. This is to avoid the bootloading process interfered by RFBee.

  3232

DSC00860

9. After uploading is done, remove USB micro-B cable and push the slide switch on RFBee to TRANS mode. Make sure RFBee module stack in correct orientation and the mini jumpers should be plugged at the “D1” and “D0” for Tx and Rx on Cytron XBee Shield.

10. Stack in LCD shield onto CT-UNO.

11. Plug in 12V dc adapter or powered up with the DC supply from LI-3.7-1000 batteries .

12. Temparature value from Node A displays on LCD shield. In case, temperature sensor node didn’t reply temperature value, LCD shield will display “Temp A :No reply !!  “. *If the transmission signal is weak, please solder the antenna on the antenna pad of the RFBee module. 

JpegJpeg

e

C)  Computer Node

1. Connect another RFBee module via SKXBee using USB mini-B cable to computer.

2. Push the slide switch on RFBee to AT MODE and press reset on SKXBee.

DSC00865

3. From Arduino IDE, choose the com port SKXBee is connected to. Go to Tools -> Serial Port -> Choose the new com number. Previously my CT-UNO is COM 7. 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.

5

4. WE ARE NOT GOING TO LOAD ANY PROGRAM HERE but we will configure this RFBee module. Since Node A and Master Node  RFBee module’s Channel is 002. We have to change this module’s channel to 002, to enable the multipoint communication between RFBee modules using same channel .If another RFBee module’s channel is 001, you can ignore this if you want to stick to the default channel . 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+C002″ to module
Example:

Send “AT+C002” to module
Return: “OK+C002”

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+B9600\r\n OK+RC002\r\n OK+RP:+20dBm\r\n OK+FU3\r\n ”

6

RFBee module of Computer node  is using Channel 002.

5. Close serial monitor. Push the slide switch on RFBee to TRANS MODE and press Reset on SKXBee.

DSC00866

6. Open serial monitor again. Temperature sensor value will display on Computer Node’s serial monitor and also on Master node’s LCD shield screen. In case, temperature sensor node didn’t reply temperature value, Serial monitor wiill display “Temp A :No reply !!”. According datasheet of LM35DZ IC(temperature sensors) , maximum temperature can read is +100°C and minimum temperature can read is +2°C. If the temperature show below 1°C or above 150°C , it might be some problem in connection with temperature sensor node or temperature become too high or too low. In this situation, please troubleshoot temperature sensor node 🙂

SS

7. Type something and press send from serial monitor. The characters will display on master node’s LCD shield and also will see interference happens.*If the transmission signal is weak, please solder the antenna on the antenna pad of the RFBee module. 

FFF

fffffg

Conclusion :

When Master node send “T” to temparature sensor node , computer node also receive “T”. After temparature node receive “T” from Master node, temparature node send temperature value to master node, computer node also receive temperature value from Temperature node as all of the node are in same channel. The interference happens when master node receive data from both temperature sensor and computer node at same time. The data is mixed together, which will cause data corruption in some cases. From this case we know that multipoint wireless communication in same channel is possible but interference could happens when more than one node transmit at same time. This experiment shows master and slave node concept doesn’t works well using same channel to communicate between RFBee modules.

 

Concept 2 : RFBee modules using different channel

In this concept, I will show how master node change channel by itself to communicate with different nodes of different channel.

 

Node A (temperature Sensor ) use Channel 002

Master Node will switch between channel 003 and channel 002.

Node C (computer) use channel 003

 

Procedure:

A) Temperature sensor node 

1. No changes on the RFBee needed, can stick on same channel of 002 or with default channel 001. But new sketch is needed to be loaded to CT-UNO. 

2. Connect the CT-UNO to computer using USB micro-B cable and Open ARDUINO IDE,
go to Tools -> Serial Port -> COM (that connected with CT-UNO). In my case, the COM is 5.

3. Upload the sketch Temp_RFBee_DC from here under DifferentChannel sub-folder. * Before uploading sketch into CT-UNO, please move the mini jumpers on XBee shield to D2 and D3. This is to avoid the bootloading process interfered by RFBee.

4. Open Arduino serial monitor. Type “T” and press send. Serial monitor will reply only temperature value. This means temperature sensor node reply temparature value only when we send “T”. I have simplify the message.
jhj

5. Close serial monitor and remove USB micro-B cable. Plug in 12V dc adapter or powered up with the DC supply from LI-3.7-1000 batteries .

r

  

B) Master Node

To change channel of master node to communicate with different nodes of different channel, the CT-UNO need to to configure master node’s RFBee module manually. We want it to change channel of RFBee automatically. Understand this, to communicate wirelessly with other RFBee, the module itself must be in Trans mode (the slide switch must be at TRANS) and to send AT command (to configure the channel, baudrate, etc) the module itself must be in AT mode. We want this operation to be fully automatic without interaction from human. How can CT-UNO push the slide switch? No, the CT-UNO does not need to push the slide switch, instead, it change the logic (voltage) of the pin.  Tiny hacking on the XBee shield is needed.

Explanation about hacking master node

voltage-divider

The picture shows concept of voltage divider.

a) Picture below shows simple RFBee schematic for pin 4 and mode switch. Take note that pin 4 on RFBee is connected to SET pin of RF module . On the RF module, there is a resistor of 1K ohm series to the actual pin of input of on module microcontroller. If you notice, the slide switch on RFBee module is switching the SET pin to either GND or pull high to VCC (3.3V). CT-UNO can do that, it is like making LED ON and OFF 🙂

But since RFBee is powered with 3.3V but CT-UNO digital output is 5V, so a resistor to limit the current is recommended. I use 100 ohm. Connect a 100 ohm resistor in series with D12 pin (on XBee shield) to pin 4 of RFBee module as shown. Make D12 digital output on Arduino (in program), when you want RFBee in TRANS mode, make D12 HIGH. On the other hand, if you want RFBee in AT mode, make D12 LOW. Is as simple as that! Pay attention to your lecturer in electronic class. 

 

b) Make sure the slide switch on RFBee module is at TRANS mode. Arduino cannot switch RFBee module to TRANS mode if the switch is at AT mode as it is connected to GND.

 

Procedure to hack the Master Node

1. Choose any digital pin of XBee shield that is free, (11,12, 2, 3 ). I choose digital pin 12.

2. Solder one end of resistor 100 ohm or 220 ohm at to digital pin 12 of XBee shield and another end to pin 4 of RFBee module socket.

3. Stack XBee shield that hacked onto CT-UNO.

f

4. Upload the sketch of Master_RFBEE_DC  from here under DifferentChannel sub-folder.. * Before uploading sketch into CT-UNO, please move the mini jumpers on XBee shield to D2 and D3. This is to avoid the bootloading process interfered by RFBee.

3232

DSC00859

5. After uploading is done, remove USB micro-B cable and push the slide switch on RFBee to TRANS mode. Make sure RFBee module stack in correct orientation and the mini jumpers should be plugged at the “D1” and “D0” for Tx and Rx on Cytron XBee Shield.

6. Stack LCD shield onto XBee shield.

m

7. Plug in 12V dc adapter or powered up with the DC supply from LI-3.7-1000 batteries .

e

8. LCD shield should display temperature sensor value from node A (temperature sensor). Make sure the sensor node is being power up.*If the transmission signal is weak, please solder the antenna on the antenna pad of the RFBee module. 

 sss

C) Computer Node

Change computer node RFBee channel to 003 or any channel, optional 001 to 127. *But dont use same channel with Node A (C002).

1. Connect  RFBee module via SKXBee using USB mini-B cable to computer.

2. Push the slide switch on RFBee to AT MODE and press reset on SKXBee.

 

DSC00865

3. From Arduino IDE, choose the com port SKXBee that connected to. Go to Tools -> Serial Port -> Choose the new com number.  After I connect SKXBee, 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.

5

1. 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+C003″ to module
Example:
Send “AT+C003” to module
Return: “OK+C003”

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+B9600\r\n OK+RC003\r\n OK+RP:+20dBm\r\n OK+FU3\r\n ”

XC 

RFBee module of Computer Node  is using Channel 003.

2. Close serial monitor. Push the slide switch on RFBee to TRANS MODE and press Reset on SKXBee.

DSC00866

3. Open Serial Monitor again. Type something from serial monitor and press send. You will notice some or most characters will disappear if you repeat it. This is because the master is changing channel to communicate with sensor node. 

Computer should not simply send data out as it is now act as slave node. 

DD7

7. In this example, when the temperature value from temperature sensor node increase to or above +40 Celcius, the high temperature value will pass to computer node by master node. Even the temperature sensor node lost connection will also inform computer node by master node. According to datasheet of LM35DZ IC(Temperature Sensors) , maximum temperature it capable of reading is +150°C and minimum is +2°C. If the temperature show below 1°C or above 150°C , there should be problem in connection or temperature become too high or too low. In this situation, please troubleshoot temperature sensor node 🙂 *If the transmission signal is weak, please solder the antenna on the antenna pad of the RFBee module. 

DSC00882 DSC00884 DSC00886 DSC00887 DSC00888 DSC00889

  hyh

Conclusion :

When Master mode send “T” to temperature sensor node , the temperature node will send temperature value to master Node. If the temparature value increased to 40 Celcius, the temparature value will pass to Computer node. So, no interference will happen. Data from computer node to master node may lost if it is send randomly. In this case the computer does not need to send data. This tutorial is to show the master and slave roles in multipoint communication. 

BTW, if you have any inquiry, please do post it in our technical forum as we seldom check the comment section in tutorial site 🙂

________________________________________________________________________________________

ATTACHMENT

1. RFBee Module User’s Manual

2. CT-UNO User’s Manual

3. CT-UNO driver

Source Code :

In Github File there are folders:

1) SameChannel :

  • Temp_RFBee_SC
  • Master_RFBee_SC

2) DifferentChannel :

  • Temp_RFBee_DC 
  • Master_RFBEE_DC

Buy

2 thoughts on “Is multipoint wireless communication between RFBee module possible ?

  1. hye. i have try the tutorial and it successful. but, when i replaced the temp sensor with current sensor, the reading from current sensor cannot store in the eeprom. any idea?

Leave a Reply

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