Can XBee radios transmit 12-bit ADCs (with some work)?

322 views
Skip to first unread message

Frank Magnotti

unread,
Oct 10, 2012, 4:52:57 PM10/10/12
to nycresistormi...@googlegroups.com
Hey all.  I know XBee radios have built-in 10-bit ADC capability, but the application I want to use it for is for 12-bit ADC.

The block diagram I'm trying to accomplish is:

[Analog sensor input] --analog signal--> [XBee transmitter] --transmitting analog signal--> [XBee receiver] --12-bit ADC--> [Microcontroller (already built in)]

What components other than the XBee would I need to put together to translate the data into 12-bit ADC?


(Without complicating things with the reasoning, it must be in 12-bit ADC format.)

Dan Lavin

unread,
Oct 10, 2012, 8:06:57 PM10/10/12
to nycresistormi...@googlegroups.com
The information flow should be more like this

sensor (analog signal) to 12-bit ADC (digital as per ADC interface) to
microcontroller (serial data) to XBee (serial data) to microcontroller.

The first microcontroller gets the data from the separate ADC using
whatever interface is appropriate (e.g., SPI, I2C) and formats it as a
pair of bytes to be sent to the UART input of the XBee. The second
microcontroller retrieves the bytes from its UART and does what you want
with them. Neither Atmel nor Microchip makes an 8-bit microcontroller
with more than a 10-bit built in ADC, so you will need a separate ADC or
a more substantial initial microcontroller
> --
> You received this message because you are subscribed to the Google
> Groups "NYCResistor:Microcontrollers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nycresistormicrocontrollers/-/PlHo_5658I8J.
> To post to this group, send email to
> nycresistormi...@googlegroups.com.
> To unsubscribe from this group, send email to
> nycresistormicrocon...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nycresistormicrocontrollers?hl=en.

Guan Yang

unread,
Oct 10, 2012, 8:27:25 PM10/10/12
to nycresistormi...@googlegroups.com
First of all, there's no such thing as 12-bit ADC "format". 12-bit
indicates a precision for the ADC itself. Even if the analog signal
you are measuring has less resolution, for example because it came
from an 8-bit DAC, you might benefit from a 12-bit ADC because you can
measure it with less noise.

I think you're saying that the built in microcontroller that's at the
final point in that chain has an analog input connected to a 12-bit
ADC, and does certain things based on the analog value it reads on
that input, and that you can't easily change this behavior, for
example by changing it to a serial input.

This means that you need some sort of DAC at this point:

XBee receiver -> DAC -> built in microcontroller

Most discrete DAC chips speak I2C or SPI, and as far as I know XBees
can't communicate directly with I2C or SPI devices, so you need
another microcontroller in there:

XBee receiver -> microcontroller -> DAC -> built in microcontroller

As an alternative, you can probably use PWM on the microcontroller and
a capacitor to filter the output. That will generate an analog signal
that the built in microcontroller can read with its 12-bit ADC. If you
use an AVR (such as the one on an Arduino) and one of the 16-bit
timers, you are effectively getting a 16-bit DAC. But since it's just
an analog signal, there should be no problems. This setup is:

XBee receiver -> microcontroller -> built in microcontroller

Akiba

unread,
Oct 11, 2012, 12:16:44 PM10/11/12
to nycresistormi...@googlegroups.com
Yeah, I would just use an external ADC. 12-bit SPI ADCs are easy to find and cheap. If you want to get fancy, go for a high rez sigma delta. They go up to 24-bits but they're slower. Anyways, as you mentioned, its basically two bytes sent over the air. Depending on the application, you might want a timestamp as well, although you can probably do that on the receiver side. The MCP3221 12-bit SAR ADC is roughly $1.50 in low quants, has an I2C interface, and can do up to 200 ksamples/sec. The MCP3201 12-bit SAR ADC has an SPI interface and can do about 100 ksamples/sec. You can interface either of those to an arduino fairly easily using the hardware I2C pins (and Wire lib) or the hardware SPI pins (and the SPI lib). Hope that helps :)

Ted Hayes | Limina.Studio

unread,
Oct 11, 2012, 2:20:18 PM10/11/12
to nycresistormi...@googlegroups.com
On Oct 10, 2012, at 8:27 PM, Guan Yang wrote:

Most discrete DAC chips speak I2C or SPI, and as far as I know XBees
can't communicate directly with I2C or SPI devices, so you need
another microcontroller in there:

Correct.  You'd have to either find an ADC/DAC that outputs something over a UART (not likely!) or use a microcontroller to do that.  The only thing you can send the XBee is a value over the UART.

—t3db0t

Frank Magnotti

unread,
Oct 11, 2012, 4:24:59 PM10/11/12
to nycresistormi...@googlegroups.com
Thanks everyone for your input!  I'm not very experienced with transmitting analog signals or ADC, so everyone's explanations were very helpful.

Guan - Thanks for clarifying.  And regarding your guess to my restrictions, that's right!  A few other reasons for why that objective is not very flexible, but that's one of the main reasons.
I'm going to test out the second alternative (PWM to analog to ADC), then go back to the first one if that fails.

Akiba - Appreciate the part numbers!  I'll look into both the parts you suggest in case I go with the first alternative.

I'll keep you guys in the loop how it goes!
Reply all
Reply to author
Forward
0 new messages