Showing posts with label adc. Show all posts
Showing posts with label adc. Show all posts

Thursday, September 11, 2014

IO sampling Using XBEE API ADC operation

IMG_2522In this tutorial I will show the ADC operation of xbee. Two xbee one is configured as coordinator API and another is router API. One analog pin of router xbee (ad0 pin, pin no.20) is enabled analog input.A variable resistor(pot) is used vary the analog input,you can use any sensor here. So the analog value will be sampled and convert it into a digital data then send it to the coordinator  using a frame called IO Data Sample RX Indicator.

XBee Analog and Digital IO Lines

XBee ZB firmware supports a number of analog and digital IO pins that are configured through software commands.
Analog and digital IO lines can be set or queried. The following table lists the configurable IO pins and the corresponding configuration commands.
image

Periodic IO Sampling

Periodic sampling allows an XBee/XBee-PRO module to take an IO sample and transmit it to a remote device at a periodic rate. The periodic sample rate is set by the IR command. If IR is set to 0, periodic sampling is disabled. For all other values of IR, data will be sampled after IR milliseconds have elapsed and transmitted to a remote device. The DH and DL commands determine the destination address of the IO samples. DH and DL can
be set to 0 to transmit to the coordinator, or to the 64-bit address of the remotedevice (SH and SL).
Only devices running API firmware can send IO data samples out their UART. Devices running AT firmware will discard received IO data samples.
First configure your coordinator xbee as ZigBee Coordinator API mode.
Then configure your router xbee as ZigBee Router API mode.
XCTU


Since router xbee collects the adc sample from ad0 pin so we have set the ad0 pin as analog pin.We also need a periodic sampling rate at which analog pin is sampled and send it to coordinator xbee. Suppose you want to get sample every 100 milliseconds then set IO sample rate as 64(64 is hex value of 100).

XCTU

Now the router xbee will sample the ad0 pin analog value every 100 milliseconds and send it to coordinator.
To ensure that it will send to coordinator I set destination address with my coordinator serial number.You can set to any xbee serial no. to send data to specific that xbee.

XCTU

Now write the configuration to the xbee module.
Okay, now give the connections.Since the adc pins of xbee are 1.2v tolerant so make voltage divider to fed it to ad0 pin.


image

Now give power in both xbee.To see the received sample connect the coordinator xbee with pc using XCTU.Open the terminal.If everything is ok then you will see a series of data frames is coming every 100milliseconds.

XCTU

If you vary the pot then you will see the frame data also changes.
That,s it! You can use this frames to get the sample data in microcontroller or pc.I already interface my xbee with my PIC18F4550 and send these data to a software using usb which plots the values.

IMG_2515

If have any confusion , you are most welcome to contact with me,put comments or mail me.Dont forget to share.
Read More..

Monday, August 18, 2014

ADC 207 Flash Converting

Flash Converting - ADC 207
ADC 207 is the first to use Flash Converting An Advanced High Speed ​​VLSI 1.2 micron CMOS process. The process that is able to do the ADC 207 as mentioned earlier is very great and makes the ADC 207 is unique. The speed of the process of this ADC has a good linearity and have a stable temperature. ADC 207 has a lower power consumption is 250 mW.
ADC is working with +5 VDC voltage source and at a frequency of 20 MHz. ADC 207 has a small sampling time is 12nS, thus making the ideal sampling results. ADC 207 has 128 features auto balanced comparators with each conversion that serves to offset temperature and dynamic effects that exist. Resistor ladder in the ADC 207 has a mid point that is connected to an external voltage source and function in the conversion of 7-bit linearity. ADC 207 has 3 levels of output that is easy to connect it with external components.

ADC 207 Architecture

Feature ADC 207

7-bit flash A / D Converter
Sampling frequency of 20 MHz
Low power consumption (250mW)
VCC 5 VDC
1.2 micron CMOS technology
7 bits with 3 levels of output gates and overflow bits
Read More..