In this post we shall see how to line pass Analog signal between XBEEs.
We make use of S1 series (802.15.4) XBEEs for this demo.Do not try this with S2 series XBEEs ,as S2 do not support I/O line passing.
Configure the S1 modules for point to point communication using XCTU.
The Transmit side XBEE connections are as below :
An XBEE adapter is used to plug on XBEE to breadboard.Pin 1 is connected to +ve rail & pin 10 to GND.
A 10k potentiometer is used to vary analog input.The center pin of pot is connected to pin 20 of XBEE which is defined as Analog input (ATD02) .The sampling rate at which data is collected is set to 20 msec (hex value 14 – ATIR14).
One end of pot is connected to +ve rail & other end to GND.
Pin 14 which is the VREF is connected to the +ve rail.This connection is a must which gives XBEE a reference for what voltage an analog sensor is working.
At the Receive side an LED is connected to pin 6.
This pin 6 is the PWM 0 of XBEE S1 .PWM acts like Digital to Analog converter to output an analog signal.
Setting is done in XCTU (ATP02) to make PWM0 as PWM output.
The I/O addressing is set to source address of Transmit XBEE. This is set using ATIA10.
XCTU settings for Tx & Rx
Now if you vary the potentiometer at Transmit side , the LED varies intensity at Rx side.
Watch this support video :
Hi
Thanks for the blog.I have a xbee conected to the computer with a explorer and another xbee the sits on a shield. The xbeesheild has a jumper that switches between xbee/usb. When I have it on the xbee side it can receive msgs and when on usb it can send msgs. I need to do bothat the same ttime. So should I use different pins like rx tx for sending and 3,4 for receiving?
All XBEEs are TransReceivers.XBEEs can send as well as Receive data.The jumper on the shield is provided to disconnect pins 1 & 2 of Arduino from the shield, so that you can Upload sketches on to your Arduino.Keeping the XBEE connected to Rx/Tx of Arduino you can’t upload any sketch.If you do not like to use the jumper,use Softserial library & declare pins other than 1 & 2 for communication.
I like your example utilizing the XBee S1’s. Would it be possible to modify this so the sending(remote) XBee could monitor a 12 Vic battery bank and the data displayed on my PC?
Thanks