Go Down

Topic: Connecting an Atiny to XBee series 2 (Read 528 times) previous topic - next topic


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:  http://www.ernstc.dk/arduino/tinycom.html 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.



May 20, 2013, 05:04 am Last Edit: May 20, 2013, 05:08 am by Runaway Pancake Reason: 1
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
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

Go Up