XBEEs can be used without a micro controller thus reducing the cost of the project. In this post we shall see how to configure S1 series XBEEs for Digital In/Out. Two Series 1 XBEE Radios are configured to communicate with each other initially.
XBee radios can be configured for up to 8 digital input pins that can directly control the output pins on a second radio.
Following is the connection detail for the transmit side XBEE.
A push Button is connected to physical pin 20 of XBEE. This pin is Digital I/O pin 0 & is configured as Digital Input using ATD03 command.
The other side of the switch gets connected to the positive bus.
Add a 10K resistor between the negative power bus and the side of the switch that connects to the XBee. This acts as a pull down resistor, which ensures the input is connected to ground (low) when the switch is not being pushed.
The Transmit side XBEE is configured using XCTU.
The PAN ID is set to 3332 (you can set any value within FFFF). Please note that the Receiver should be also set for the same ID.
The DL Destination Low address is the source address (MY) of receiver XBEE.
Under I/O settings configure Data I/O pin 0 (DIO0) as hex 3 which makes physical pin 20 as Digital Input. Disable the internal pull up resistors for all pins under PR (i.e. 0).
The IR Sample rate is set to hex value 14. This equals 20 msec in decimal. The I/O sample rate sets how frequently to report the current pin state and transmit it to the destination address.
You can enter into command mode by typing three consecutive +++ symbol.
Following is the screen shot of terminal window verifying the settings we made.
Transmit side XBEE settings:
To the Receiver side XBEE, an LED is connected to pin20.
The destination address is set to Source (Transmit) address & Data pin 0 (physical pin 20) is set to LOW on start up using command ATD04.
The I/O input address is set to Source address of the transmitter using ATIA command.
As the source address of transmitter is 10 , type in ATIA10.
Do not forget to write the changes using ATWR command.
Receive side XBEE settings :
Result:
Now if you press the switch at transmitter end, High is applied to pin 20 of TX. This condition is transmitted to other end. The RX XBEE pin 20 now goes high, glowing the LED.
- For more information please visit: tenettech.com
- For technical query please send an e-mail: info@tenettech.com