Pages: [1]   Go Down
Author Topic: Connecting an Atiny to XBee series 2  (Read 268 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
Karma: 0
Posts: 155
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm working on a project that will run two or three analog sensors.  It would be great if I could collect the data from each sensor with a atiny85 and then send it to a arduino mega via an XBee series 2.  Would connecting the ATiny to the XBee work the way I have it drawn in the picture?  R3 & R4 form a voltage divider to shift the logic to 3.3 for the XBee.  R2 is referenced on this site/example: Should I leave R3 in or is it going to mess with the integrity of the signal? 

Will this plan actually work?

Any input suggestions or critiques would be appreciated.


* Screen Shot 2013-05-19 at 6.40.58 PM.png (26.35 KB, 848x682 - viewed 15 times.)

Offline Offline
Faraday Member
Karma: 66
Posts: 2568
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

XBees have analog input capability already and the "sensors" could be interfaced directly.

> > >
Configuring can be a hassle, but...

Analog and Digital Data
Analog and digital data may be sent as framed data from a one XBee to another reading the API frames if you are using firmware version 10A1 or higher. On the Remote node, the destination address (DL) is set, the various I/O’s are configured for digital inputs or ADC, and IR is set for the sample rate. The Remote node will send data of the configured I/O at the set interval as a framed packet with bits and data identifying the transmitted data. The number of samples per transmission may be set using the IT setting (samples before transmit).
The XBee needs to be configured with appropriate I/O devices connected. Figure 6-5 on page 109 shows the XBee USB Adapter being used on a breadboard, and powered for convenience of configuration changes from USB. It is using the phototransistor as an analog input and a pushbutton as digital input. Note that the inputs on the XBee have internal pull-up resistors eliminating the need for pull-up or pull-down resistors in the configuration.
 Through the X-CTU Modem Configuration tab, configure the Remote node’s USB XBee for
the following:
o MY to 1 (Remote XBee to address 1)
o I/O Setting D0 to ADC (2) (to read analog input)
o I/O Setting D1 to ADC (2) (to read analog input)
o I/O Setting D3 to DI (3) (to read digital input)
o I/O Setting D4 to DI (3) (to read digital input)
o IR Setting to $7D0 (2000 decimal to sample once every two seconds)
 Monitor the microcontroller-connected Base node in X-CTU
« Last Edit: May 19, 2013, 10:08:46 pm by Runaway Pancake » Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Pages: [1]   Go Up
Jump to: