5 ascii output – Campbell Scientific SR50-L CSC Ultrasonic Distance Sensor User Manual

Page 24

Advertising
background image

SR50 Sonic Ranging Sensor

18

-Input Locations-
10 SnowDepth
21 Dis2Surf
22 T_Kelvin
23 273_15
24 ATempComp
25 Temporary

3.5 ASCII Output

The SR50 sensor is also capable of outputting data in printable ASCII format.
With the ASCII output option, serial ASCII data (0 and 5 volt levels only) is
output on the SDI-12/Data Bus. Several options define the type of ASCII data
output. The baud rates of 300 and 1200 can be selected as either TTL or RS-
232 logic levels. The baud rate of 9600 can only be selected as RS-232. With
either selection you can output the first target only or all three targets with
quality numbers (See Table 2).

To use the sensor in this mode of operation select the desired option by setting
the internal address jumpers according to the list in Table 2 (only addresses 6
to 14 apply for the ASCII output mode). To initiate the measurement, pulse
the Sensor Enable Line high to +5 Volts. The pulse width should be a
minimum of 5 ms and a maximum of 250 ms. Once the SR50 detects the
Sensor Enable Line has gone high, it makes a measurement. When the
measurement is finished, the SR50 outputs the appropriate serial data. If the
SR50 is unable to detect any targets, the sensor will output zeroes to indicate
that no reading was obtained. In this case, measurement quality numbers will
also be zero.

The ASCII data format is 8 data bits, no parity, 1 start bit, and 1 stop bit. The
distance values are a maximum of 5 digits with a decimal point and a polarity
sign. When multiple echoes are requested with quality numbers, the 3 distance
numbers precede the quality numbers. The quality numbers are 3 digit values
with a decimal point and a polarity sign. All character strings that are returned
in the ASCII output mode end with a carriage return and a line feed.

The following are two examples of data that are returned from the SR50. The
first example is one echo only. The second example is multiple echoes with
quality numbers.

+1.85<CR><LF>

+1.85 +3.71 +5.28 +172 +188 +196<CR><LF>

Echos Quality

#s

Advertising