User manual

!
www.rovingnetworks.com Version 1.0r 9/21/2012 79
RN-WIFLYCR-UM
ANALOG SENSOR CAPABILITY
The module has 8 analog sensor inputs that can be driven between 0 to 1.2-V DC. You can sample the analog inputs and
read digital value using the show q <value> command, where <value> is a decimal number representing the channel. See
show q <value>” on page 36 for more details.
WARNING: Driving these inputs above 1.2 V can permanently damage the module.
The channel is the analog sensor input from 0 to 7. The value for the analog sensor input is measured in microvolts and is
returned as 8xxxxx, where the beginning 8 is a start marker.
You can also sample multiple channels by using a bit mask using the show q 0x1<mask> command, where <mask> is a
bit mask of the channels. See “show q 0x1<mask>” on page 36 for more details.
Example: Read Channels 0, 1 & 7
show q 0x183 // Read channels 0, 1, and 7
The results are in the format 8<channel 0>, 8<channel 1>, 8<channel 7>\r\n
The analog input hardware specification is:
Input voltage range: 0 - 1.2 V, however, the analog-to-digital converter saturates at 400 mV
Resolution: 14 bits = 12 uV
Sampling frequency: 35 us
Accuracy: 5% un-calibrated
The accuracy of each analog sensor reading can be offset by up to 5% due to variations from chip to chip. To improve
accuracy, Roving Networks recommends using a precision reference voltage on one of the analog inputs to calculate the
offset. The offset is the same for all analog inputs. For example:
Drive precision 200 mV reference on analog input 4.
Read analog input 4 and compute the offset.
If you read 210 mV you know that the offset is +10 mV. When you read input 5, subtract 10 mV from the result.
Sampling Sensor Pins Automatically
The sensor pins can be sampled automatically and data forwarded in two modes:
The UDP broadcast packet can contain the sample values.
In HTTP mode, the sampled pin data can be forwarded to a remote server
To enable these modes, use the set q sensor <mask> command.
Example: Sample All Sensor Inputs
set q sensor 0xff // Sample all sensor inputs