Skip to main content

Arduino board interfacing with X-bee module.

      Project: Arduino interfacing with X-Bee S-2 module.

 1.    X-Bee module:

X-Bee module is wireless communication device which range may be up to 500 meter or above it and it have two version Pro and normal. This module may be used for high speed and much secure communication for data and information transmitting.


1.1 Specifications:

  • 3.3V @ 40mA
  • 250kbps Max data rate
  • 2 mW to 6 mW output (+3 dBm)
  • 100 to 500 meter range(for normal X-bee not Pro.)
  • Built-in antenna
  • Fully FCC certified
  • 6 10-bit ADC input pins
  • 8 digital IO pins
  • 128-bit encryption
  • Local or over-air configuration
  • AT or API command set
Data sheet of X-bee is Here:  Download X-Bee data sheet

NOTE: - Before using X-Bee first we need to configure some features in X-Bee like baud rate, Pan               ID, destination address channel etc. To understand the configurations please go to links below.

2.    X-bee operating mode: - X-bee module has two operating mode which can be used for         different purpose.

    2.1   AT mode: - In this data is transmitted bit by bit wise not in whole frame.

   What

     ·    AT mode is synonymous with "Transparent" mode.
     ·    In AT mode, any data sent to the X-Bee module is immediately sent to the remote module            identified by the Destination Address in memory.
     ·     If the X-Bee that the data is sent to is the Coordinator it will broadcast on the Pan ID.
     ·    No packet formation is necessary, but rather simple send Serial data to the tx of one X-bee          and it will be received by the Rx of the destination X-Bee
     ·    Because no packets are created the destination address and type (only-data) are both fixed.

   Why

     ·      If you are new to X-Bees this is the fastest way to start transmitting
     ·      If you only communication between two X-Bees
     ·      If you can implement an external protocol (Every X-Bee will have an associated mbed)

  How : - To configure X-Bees follow this tutorial: X-Bee Basic Setup for 6.1 XCTU version                            and  X-Bee set up for older version 5.2 for older version.


2.2   API mode: - In this mode data is transmitted in data frame and that frame contains     information of delimiter, transmitter x-bee module address and data and check sum.

    for better understanding of the API frame and API mode of X-Bee module go to below link.
    click here: -API frame structure

    What

     ·         API mode is "Application Programming Interface"
     ·         Data must be formatted in frames with Destination information and payload
     ·         The API is an alternative to the default transparent mode.

   Why

    ·         For larger networks that involve nodes talking to multiple targets
    ·         If X-Bees are gathering data without a embedded attached and thus can not format their own         data before sending
    ·         If power is a big concern and you would like End Devices to 'sleep' until data is requested.
    ·         Need to change parameters without entering command mode (X-Bee only)
    ·         Want to view RSSI and source address on a packet by packet basis
    ·         Would like to receive packet delivery confirmation on every transmitted packet

   How
             If you are using XCTU version 6.1 or   latest than go to:

3. Component needed in project: - With the help of X-bee module we can make many interesting project and establish communication between two different module of project or any arduino modules.


·         Arduino software:  https://www.arduino.cc/en/Main/Software
·         Two Arduino modules.
·         Two X-Bee modules.
·         1 Bred board.
·         Couple of jumper wires.
·         X-Bee explorer shield for Configuration of X-Bee module.


  4. Arduino interfacing with X-Bee modules: - In this project we would learn to            communicate two Arduino with AT and API mode and transfer serial data between them.

   
S. no
X-Bee pin
Arduino pin
1
VCC Pin 1(3.3 v)
3.3 v pin
2
GND pin 10
Any GND pin
3
TX pin 2
RX pin 0
4
RX pin 3
TX pin 1










Note: - Rx and Tx pin can be change on Arduino board if we use Software Serial function and forget to connect X-Bee with 3.3 v pin of Arduino. 

Note: - Be careful while configuration of x-bee other-wise your x-bee module will be break and                      then it won’t communicate with other one. And connect your x-bee with 3.3 v other-wise it                   may get damage permanently.

. 
If you X-Bee module get break accidentally than don’t worry it may get recover easily with few steps shown in video below.


5. Arduino board codes for this project

 5.1 Arduino code for X-bee API frame transmission or router side.  

      Upload this code in you router side or transmitter side Arduino board.

       5.2  Arduino code for X-bee API frame receiver or co-ordinator side .

             Upload this code in your Coordinator side Arduino board.         

        Download the X-Bee.h library from here:  Xbee.h library for Arduino.

Note: If you want to make some cool x-bee project than see my other project for remote sensor sensing with x-bee. Arduino board Remote sensor Sensing with X-bee module.

Please share and follow my project with your friends, if you like it.
  

Comments

Popular posts from this blog

RFID-MFRC522 with Arduino Board.

1.     RFID MFRC522:        A normal RFID kit is just like our ATM card which can send a specific data to controller when it gets in touch with its reader module.       MFRC522 is name of controller which is being used in this RFID kit.   Figure 1 : RFID MRFC522      1.1 Specifications of RFID MFRC22 Module Name:MF522-ED Working current : 13 - 26mA / DC 3.3V Standby current : 10 - 13mA / DC 3.3V Sleep current : <80uA Peak current : <30mA Working frequency : 13.56MHz Card reading distance : 0 ~ 60mm ( Mifare1 card ) Protocol : SPI. Data communication speed : 10Mbit/s Max. Card types supported: Mifare1  S50, Mifare1 S70, Mifare UltraLight, Mifare Pro, Mifare  Desfire Dimension : 40mm × 60mm Working temperature : -20—80 degree Storage temperature : -40—85 degree Humidity : relevant humidity 5%—95% This RFID kit works on the...

Smart Home Door lock system project.

RFID MFRC522  Door lock system Project summary: RFID system radio frequency identification in which Information is written in the card or tag is get read by RFID module when they get in contact. In this project we are making a home lock system which would open only when an authorized card will be available and access will be denied on wrong card. Component require: - In this project we are interfacing Arduino board with RFID MFRC522 and servo motor. RFID system would send data to Arduino board and according to that data action would be taken by Arduino board. Components are listed below:         ·          Arduino board.         ·          Arduino software.         ·          RFID MFRC522 board.         ·        ...

An alarm system with Sound detector sensor.

Project: Alarm system with Sound sensor Project summary:  In this project we would interface our sound detector sensor and make alarm system which would detect any sound in the room of any kind of noise disturbance, by beeping up a buzzer. And also we would able to see the result on the Serial monitor of Arduino Software (IDE). Figure 1:alarm system with Sound detector sensor. Component & tools required: - In this project we would required the component and tools which are described below. ·          Arduino board. ·           Arduino Software (IDE). ·           Sound detector sensor. ·          Red led 1, and Green led 1. ·          Buzzer. ·          1K resisters 2....