Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe

How to configure the X bee modules using AT command mode to transmit digital data

By Venugopal M January 20, 2021

In the previous tutorial, Analog I/O Line Passing between two X-Bee modules was done. In this tutorial, X-Bee modules will be used to read and transmit digital data. The X-Bee modules are often used with the microcontrollers which may pass data to the module as digital data. Even the module itself is capable of sensing digital data from sensors and switches as it has 8 digital input/output pins. For reading or writing digital data, these pins or any of these pins can be configured to read or write operation.
Components Required – 
1) X-Bee Modules – 2
2) Arduino UNO
3) Breadboards
4) Connecting Wires
5) FTDI USB to Serial converter cable
6) PC
7) switch
Circuit Connections – 
  In this project, two X bee series 1 (S1) modules are used. One module serves as Transmitter and the another one as Receiver. Both the modules will be connected PCs for passing AT commands and monitoring Data transfer. A X-Bee module is a 20-pin module with the following pin configuration –
For connecting a Zig-Bee module with PC, FTDI USB to Serial converter cable can be used. The convertor cable has four pins – VCC, Ground, RX and TX. These pins should be connected to the X-Bee module in the following manner –
Another way of connecting the X-Bee module with PC is connecting it via Arduino board. The PC and Arduino board can be connected by an USB cable. The RX and TX pin of the Arduino can be connected to the Tx and RX pins of the Zig-Bee module and Reset pin of the Arduino UNO can be grounded. Now by loading the ‘Bare Minimum’ Arduino Sketch on the board, it can be used for serial communication with the X-Bee module.
Both the modules need to be powered by 3.3 V batteries. according to the pin configuration of the X-Bee modules, the positive terminal of the battery should be connected at pin 1 of the module and negative terminal to the pin 10 of the module.
The X-Bee module to be used as transmitter will be fed digital input through a switch connected at pin 20 of the module. The pin 20 of X-Bee is Analog Input 0 as well as Digital I/O 0. It needs to configured as digital input by passing appropriate AT commands. The pin 20 will be by default connected to ground, so the default logic read by the pin will be LOW. On pressing the switch, the pin will short circuit to VCC, therefore reading a HIGH logic. So the switch will be connected at pin 20 in pull down configuration.
The X-Bee module to be used as receiver will have an LED connected at pin 20 of the module. At the receiver module, pin 20 will be configured as digital output instead of digital input.
How the circuit works – 
The AT commands will be used to configure both the module. The transmitter module will be configured to read digital data and pair with receiver module to pass the data to it. The commands will be transferred using ‘CoolTerm’ application by the PC. At the transmitter module following configuration parameters will be required to be changed –
1) PAN ID
2) Destination Low Address
3) Source Address
4) Data I/O pin 0 (20th pin)
5) I/O sampling rate
These parameters will be set to the following values using the AT commands –
1) PAN ID = 3332
2) Destination Low Address = 0x22
3) Source Address = 0x24
4) Data I/O pin = 0x03  (Passing 0x03 configures the pin to Digital Input)
5) I/O Sampling rate = 0x1E (30sec)
The following AT commands are passed for changing the configuration parameters for the transmitter module –
The receiver module will be configured to pair with the transmitter module and output digital data at pin 20 according to the passed data from the other module.  At the receiver module following configuration parameters will be required to be changed –
1) PAN ID
2) Destination Low Address
3) Source Address
4) Data I/O pin 0 (20th pin)
5) Set  ATIA
These parameters will be set to the following values using the AT commands –
1) PAN ID = 0x3332 (Setting the PAN ID same as transmitter Address pairs the two modules)
2) Destination Low Address = 0x24 (Receiver’s DL Address should be same as Transmitter Source address)
3) Source Address = 0x22 (Transmitter Destination Low address should be same as the Receiver’s Source address)
4) Data I/O pin = 0x04  ( Passing 0x04 configures the pin to digital output)
5) Set “ATIA” as Source address of the transmitter (24) so that pin 20 of the receiver follows the changes at pin 20 of the transmitter.
ATIA is Address command. It helps in enabling the pin output mode updates from the other X-Bee Radio.
The following AT commands are passed for changing the configuration parameters for the receiver module –
After configuring each module, the settings must be saved by sending ATWR Command and finally exit from the AT mode by using ‘ATCN’ command. After configuring the modules and saving the configurations, if the switch on transmitter module is pressed, the LED connected at receiver module starts glowing and as the switch is released, the LED at the receiver module also gets turned OFF.
Not only a single pin but all the digital input/output pins can be configured on X-Bee modules for transferring digital data.

You may also like:


  • Understanding battery management systems

  • What are LoRa gateways and what types are available?

  • How does LoRa modulation enable long-range communication?

  • What is Wireless Electric Vehicle Charging System (WEVCS)?

  • What is the Modbus protocol and how does it work?

  • What is an Actuator Sensor Interface (AS-i)?

Project Source Code

 

Project Source Code

###

//Program to 

###

 



Filed Under: Tutorials

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Power Efficiency
Discover proven strategies for power conversion, wide bandgap devices, and motor control — balancing performance, cost, and sustainability across industrial, automotive, and IoT systems.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions.

  • Addressable Latch in My Logic Project
  • Heck! PCB footprint management: Why are existing libraries so terrible?
  • Why SG3525 + TL431 + PC817 feedback is not working on ±35 V push-pull SMPS?
  • How to select transformer Irms in push-pull converter? Any reference materials?
  • What is the best way to do 10Mhz to 50Mhz generation?

RSS Electro-Tech-Online.com Discussions

  • KiCad custom symbol definition correct approach
  • Anyone In The US Ordered From AliExpress Recently?
  • My Advanced Realistic Humanoid Robots Project
  • restarting this Christmas project
  • WTB: "The Theory Of Servicing AM, FM, And FM Receivers" by Clarence R. Green and Robert M. Bourque

Featured Tutorials

Real Time Hardware Filter Design

  • Practical implementation of bandpass and band reject filters
    Practical implementation of bandpass and band reject filters
  • Practical application of hardware filters with real-life examples
    Practical application of hardware filters with real-life examples
  • A filter design example
    A filter design example
  • Types of filter responses
    Types of filter responses
  • What are the two types of hardware filters?
    What are the two types of hardware filters?
  • What are hardware filters and their types?
    What are hardware filters and their types?
More Tutorials >

Recent Articles

  • Waterproof SMA-to-MHF I LK assemblies introduced by Amphenol RF
  • Antaira introduces weatherproof PoE extender designed for harsh industrial environments
  • Stackpole introduces compact jumpers for high-current circuit routing
  • Ironwood Electronics launches near-device-footprint SMT elastomer socket for BGA264
  • Amphenol RF releases P67 FAKRA plugs for 6 GHz RF transmission

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe