Download User Manual - Seeed Studio
Transcript
WiFly GSX/EZX www.rovingnetworks.com WiFly-RN-UM 5/4/2011 17. Analog Sensor Capability The WiFly-GSX has 8 analog sensor inputs that can be driven between 0 to 1.2VDC. The analog inputs are sampled and the digital value read by using the show q <channel> command. Warning: Driving these inputs above 1.2V will cause permanent damage. The hardware specifications of the analog input is: Input voltage range: 0 - 1.2 V, however the A2D saturates at 400mV. Resolution: 14 bits = 12uV Sampling frequency: 35us Accuracy: 5% un-calibrated The accuracy of each analog sensor reading can be offset by up to 5% due to variation from chip to chip. To improve accuracy it is recommend using a precision reference voltage on one of the analog inputs to calculate the offset. The offset will be the same for all analog inputs. For example, - drive precision 200mV reference on analog input 4. - read analog input 4 and compute the offset. If you read 210mv you would know that the offset is +10mv. When you read input 5 you would subtract 10mv from the result. To read a sensor pin, send the following command: show q <channel> 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. The 8 in front is a start marker. You can also sample multiple channels by using a bit mask: show q 0x1<mask> where mask is a bit mask of the channels. For example, to read channels 0, 1, and 7, send: show q 0x183 The return values are the format: 8<chan0>, 8<chan1>, 8<chan7>\r\n 809 University Avenue • Los Gatos, CA 95032 • Tel (408) 395-6539 • [email protected] ~ 69 ~