TheSR50A SONIC RANGING SENSOR is warranted by Campbell
Scientific, Inc. to be free from defects in materials and workmanship under
normal use and service for twelve (12) months from date of shipment unless
specified otherwise. Batteries have no warranty. Campbell Scientific, Inc.'s
obligation under this warranty is limited to repairing or replacing (at Campbell
Scientific, Inc.'s option) defective products. The customer shall assume all
costs of removing, reinstalling, and shipping defective products to Campbell
Scientific, Inc. Campbell Scientific, Inc. will return such products by surface
carrier prepaid. This warranty shall not apply to any Campbell Scientific, Inc.
products which have been subjected to modification, misuse, neglect, accidents
of nature, or shipping damage. This warranty is in lieu of all other warranties,
expressed or implied, including warranties of merchantability or fitness for a
particular purpose. Campbell Scientific, Inc. is not liable for special, indirect,
incidental, or consequential damages.
Products may not be returned without prior authorization. The following
contact information is for US and International customers residing in countries
served by Campbell Scientific, Inc. directly. Affiliate companies handle
repairs for customers within their territories. Please visit
www.campbellsci.com to determine which Campbell Scientific company
serves your country.
To obtain a Returned Materials Authorization (RMA), contact Campbell
Scientific, Inc., phone (435) 753-2342. After an applications engineer
determines the nature of the problem, an RMA number will be issued. Please
write this number clearly on the outside of the shipping container. Campbell
Scientific's shipping address is:
CAMPBELL SCIENTIFIC, INC.
RMA#_____
815 West 1800 North
Logan, Utah 84321-1784
For all returns, the customer must fill out a “Declaration of Hazardous Material
and Decontamination” form and comply with the requirements specified in it.
The form is available from our website at
completed form must be either emailed to repair@campbellsci.com
435-750-9579. Campbell Scientific will not process any returns until we
receive this form. If the form is not received within three days of product
receipt or is incomplete, the product will be returned to the customer at the
customer’s expense. Campbell Scientific reserves the right to refuse service on
products that were exposed to contaminants that may cause health or safety
concerns for our employees.
www.campbellsci.com/repair
. A
or faxed to
SR50A Table of Contents
PDF viewers note: These page numbers refer to the printed version of this document. Use
the Adobe Acrobat® bookmarks tab for links to specific sections.
Weight:Sensor only 0.88 lbs (0.4 kg)
Cable (SR50A) 15 feet 0.55 lbs (0.25 kg)
1: The quiescent current draw is less than 1.25 mA if the baud
rate is 9600 bps or less.
2: Power supply must not drop below 11.0 Volts or heavier
gauge wire is required.
Note2
1
SR50A Sonic Ranging Sensor
2. Introduction
The SR50A Sonic Ranging Sensor measures the distance from the sensor to a
target. The most common applications are measuring snow depths and water
levels. The sensor is based on a 50 kHz (Ultrasonic) electrostatic transducer.
The SR50A determines the distance to a target by sending out ultrasonic pulses
and listening for the returning echoes that are reflected from the target. The
time from transmissions to return of an echo is the basis for obtaining the
distance measurement.
Since the speed of sound in air varies with temperature, an independent
temperature measurement is required to compensate the distance reading for
the SR50A. A simple calculation is applied to initial readings for this purpose.
The SR50A is capable of picking up small targets or targets that are highly
absorptive to sound, such as low density snow. The SR50A makes use of a
unique echo processing algorithm to help ensure measurement reliability. If
desired, the SR50A can also output a data value indicative of measurement
quality.
The SR50A was designed to meet the stringent requirements of snow depth
measurement which makes it well suited for a variety of other applications.
The rugged aluminium housing is built to withstand harsh environments and
offers several mounting options.
3. Operation
The SR50A has several output formats: SDI-12, RS-232 and RS-485. The
SR50A is shipped from the factory configured as an SDI-12 sensor (address 0).
By moving a set of three jumpers inside the SR50A the output type can be
optionally set from SDI-12 to RS-232 or RS-485. Refer to Section 6 for details
on opening the SR50A and Figure 13 for jumper settings.
The SR50A performs multiple echo processing regardless of output formats.
The SR50A bases every measurement on several readings and applies an
algorithm to improve measurement reliability.
The distance to target readings that are obtained from the sensor are referenced
from the metal mesh on the face of the transducer. The SR50A projects an
ultrasonic beam that can pick up objects in its field of view that is 30° or less.
The closest object to the sensor will be detected if it is within this field of view.
Unwanted objects must be outside the field of view. If a target is in motion,
the SR50A may reject a reading if the target distance changes at a rate of 4
centimetres per second or more.
The SR50A will complete a measurement and output the data typically in 1
second. In RS-232 and RS-485 Serial modes the data is completed within one
second for BAUD rates of 9600 and above. The total time for an SDI-12
Measurements can exceed 1 second due to the long communications times
associated with the 1200 BAUD data rate.
2
If the SR50A rejects a reading or does not detect a target, zero will be output
for distance to target or –999 for depth values.
3.1 Quality Numbers
Measurement quality numbers are also available with output data; these give an
indication of the measurement certainty. The quality numbers have no units of
measure but can vary from 152 to 600. When the Quality numbers are lower
than 210, the measurements are considered to be of good quality. A value of
zero however, indicates a reading was not obtained. Numbers greater than 300
indicate that there is a degree of uncertainty in the measurement. Causes of
high numbers include:
• sensor is not perpendicular to the target surface
• target is small and reflects little sound
• target surface is rough or uneven
• target surface is a poor reflector of sound (extremely low density snow)
Quality Number Range Quality Range Description
0 Not able to read distance
152-210 Good measurement quality numbers
SR50A Sonic Ranging Sensor
210-300 Reduced echo signal strength
300 to 600 High measurement uncertainty
It is not necessary to make use of the quality numbers but they can provide
additional information such as an indication of surface density in snow
monitoring applications. The quality numbers will increase during snowfall
events consisting of low-density snow.
3.2 Temperature Compensation
The SR50A does not include a temperature sensor to compensate for the speedof-sound variations in air temperature. Temperature corrections for the speed
of sound will need to be applied to the readings. Use a reliable and accurate
probe, such as the 107-L or HMP45C-L to measure air temperature. A
radiation shield is also required when the temperature probe will be exposed to
solar radiation. Temperature compensation must be applied to the sensor
output using the following formula:
FORMULA 1. Temperature Compensation
=DISTANCE
READING
SR50A
KELVINT
°
273.15
CAUTION
The SR50A calculates a distance reading using the speed
of sound at 0°C (331.4 m/s). If the temperature
compensation formula is not applied, the distance values
will not be accurate for temperatures other than 0°C.
3
SR50A Sonic Ranging Sensor
3.3 SDI-12 Operation
3.3.1 SDI-12 Wiring
SDI-12 is a Serial Digital Interface standard that is used for communication
between data recorders and sensors. Most Campbell Scientific dataloggers are
SDI-12 compatible.
It is recommended to power down your system before wiring the SR50A.
Never operate the sensor with the shield wire disconnected. The shield wire
plays an important role in noise emissions and susceptibility as well as
transient protection.
Color Function Connection
Black Power Ground Power Ground
Red +12VDC Power Power Source
Green SDI-12 I/O Recorder/Reader SDI-12 Com port or control port
White Not Used Ground
Clear Shield Shield/Earth Ground
3.3.2 SDI-12 Addresses
The SR50A can be set to one of ten addresses (0 to 9) which allows up to ten
sensors to be connected to a single digital I/O channel (control port) of an SDI12 datalogger.
The SR50A is shipped from the factory with the address set to 0. The address
on the SR50A can be changed by sending an SDI-12 change address command.
The change address command can be issued from most SDI-12 recorders. For
some Campbell Scientific dataloggers the SDI-12 transparent mode will need
to be entered to change the address.
When it is necessary to measure more than one SR50A, it is easiest to use a
different control port for each SR50A instead of changing the address. If
additional control ports are not available, then the address will need to be
changed.
To change the address of a sensor that has the default address of 0 to the
address of 1 the following command can be sent:
“0A1!”
Only one sensor of the same address should be connected when using the
change address command.
3.3.3 SDI-12 Commands
4
NOTE
The SDI-12 protocol supports various measurement commands. The SR50A
can use the SDI-12 commands listed in the following table.
The SR50A needs to be powered for 1.5 s before it can receive
an SDI-12 command.
SR50A Sonic Ranging Sensor
The different commands are entered as options in the SDI-12 recorder
instruction. The major difference between the various measurement commands
are the data values that are returned. The user has the option to output the
distance to target in either meters or feet, or to include the measurement quality
numbers.
If the SR50A is unable to detect a proper echo for a measurement, the sensor
will return a zero value for the distance to target value.
The SR50AT is a version of the sensor that is available on special order only.
It includes a temperature sensor and can return valid temperature corrected
readings. In order to obtain the Snow Depth values (aM4! or aM8!) the user
must properly set the Distance to Ground value in the SR50AT sensor. This
can be done by sending and extended command in SDI-12 mode or by using
the setup menu in RS-232 or RS-485 modes.
SDI-12
Command
Command Function/Description
Values Returned
aM! Distance-Meters D
aM1! Distance-Meters, Quality Number D, Q
aM2! Distance-Meters, Temperature °C D, T
aM3! Distance-Meters, Quality Number, Temperature °C D, Q, T
Note1
Note1
aM4! Snow Depth Meters, Quality Number, Temperature SD, Q, T
aM5! Distance-Inches D
aM6! Distance-Inches, Quality Number D, Q
aM7! Distance-Inches, Quality Number, Temperature °C D, Q, T
aM8 ! Snow Depth Inches, Quality Number, Temperature SD, Q, T
AM9 ! Temperature °C T
aMC!
aMCn!
Measurement Commands with Checksum
See aM and aM1- aM8
Note1
Note1
Note1
Output is the same as
aM, aM1-aM9
Checksum is added
aC! Concurrent Measurement Command
D
Distance-Meters
aCn! Concurrent Measurements
Same as M1 – M8
Output is the
Same as M1 – M8
aCC!
aCCn!
Concurrent Measurement Commands with Checksum. See aM and aM1- aM8 Output is the same as
aM, aM1-aM8
Checksum is added
aD0! Send Data Dependent upon
command Sent
aV! Verification command S1,S2,V,WD
S1 = Firmware Signature
S2 = BootRom Signature
V = Supply Voltage
Note1
WD = Watch Dog Errors
aI! Send Identification 013CAMPBELLSR50A
2.0SN
SN = Serial number (5
digits)
5
SR50A Sonic Ranging Sensor
SDI-12
Command
?! Address Query a
aAb! Change Address command b is the new address
aXM;D.DDD!
Extended
command
aXI;DDD.DD!
Extended
command
aXT;CC.CC!
Extended
command
aR0! Returns the Distance to Ground Setting in the SR50A. The units returned are
aR1! Returns the Distance to Ground Setting in the SR50A. The units returned are
aR2! Returns the temperature sent to the SR50A for Internal Temperature
Command Function/Description
Set the distance to ground parameter in the SR50A. The distance must be in
meters with no more than 3 decimal places.
Set the distance to ground parameter in the SR50A. The distance must be in
Inches with no more than 2 decimal places.
Provide the SR50A with a temperature value to perform on board temperature
compensation. The temperature must be in degrees Celsius with a maximum
of 7 characters including sign and decimal.
in Meters
in Inches
compensation. This value remains the same unless power is cycled or a new
temperature values is sent.
Values Returned
A
Address is returned
A
Address is returned
A
Address is returned
DG
DG
T
Where a = address of SDI-12 device.
Where n = numbers 1 to 9
NOTE 1: (SR50AT version only)
3.4 RS-232 Operation
The SR50A sensor comes from the factory with the internal jumpers set to
SDI-12 mode. To use the SR50A in the RS-232 mode of operation the jumpers
will need to be set as outlined in Section 7.
3.4.1 RS-232 Wiring
The following table/diagram illustrates the wiring for the SR50A in RS-232
mode.
Color Function Connection
Black Power Ground System Ground and/or RS-232 Receiver
Red +12VDC Power Power Source
Green RS-232 (SR50A Output) Recorder/Reader RS-232 Input
White RS-232 (SR50A Input) Recorder/Reader RS-232 Output
Ground
(Pin 5 of a computer (DTE) DB-9
connector)
(Pin 2 of a computer (DTE) DB-9
connector)
(Pin 3 of a computer (DTE) DB-9
connector)
6
Clear Shield Shield/Earth Ground
3.5 RS-485 Operation
The SR50A sensor comes from the factory with the internal jumpers set to
SDI-12 mode. To use the SR50A in the RS-485 mode of operation the jumpers
will need to be set as outlined in Section 7.
The RS-485 on the SR50A supports half-duplex communications. This means
that the SR50A can receive and transmit but both cannot occur simultaneously.
Normally there is a master-slave relationship in most systems to avoid
collisions between transmissions. For this reason the Auto Measure Auto
Output is not recommended for RS-485 communications. It is much better to
have a master initiate the communications by making use of the Measure On Poll or the Auto Measure Polled Output modes.
Campbell Scientifics’ MD485 interface can be used to connect one or More
SR50A sensors in RS-485 mode to an RS-232 device. This can be useful for
sensors that require lead lengths that exceed the limits of either RS-232 or SDI12 communications.
3.5.1 RS-485 Wiring
The following table/diagram illustrates the wiring for the SR50A in RS-485
mode.
SR50A Sonic Ranging Sensor
Color Function Connection
Black Power Ground System Ground and/or RS-232 Receiver Ground
(Pin 5 of a computer (DTE) DB-9 connector)
Red +12VDC Power Power Source
Green RS-485 A To RS-485 A terminal
White RS-485 B To RS-485 B terminal
Clear Shield Shield/Earth Ground
7
SR50A Sonic Ranging Sensor
FIGURE 1. SR50A to MD485 Wiring
3.6 RS-232 and RS-485 Settings
Once the jumpers are set for RS-232 operation a terminal program such as
Hyperterminal can be used to change factory default or existing settings. The
following settings apply to Hyperterminal or any other program that is used for
communications.
BAUD Rate Current SR50A Setting
Data Bits 8
Parity None
Stop Bits 1
Flow Control None
NOTE
The factory default BAUD rate is 9600 BAUD. Once the BAUD
rate is changed the new BAUD rate must be used for further
communications to the SR50A. It is important to keep track of
the BAUD rate setting on the SR50A. If the BAUD rate setting
is unknown, we recommend trying the default value of 9600
BAUD. If that does not work, start at BAUD rate 1200 and go
through all the BAUD rate settings until the correct one is found.
Note
8
When the hyperterminal session is started the command “SETUP” needs to be
entered. Hitting the Enter will transmit the CR LF characters which are
required after the text “SETUP”. The text “SETUP” is not case sensitive so
any combination of upper and lower case letters will work.
The Initial menu will look as follows:
SR50A Sonic Ranging Sensor
The following is a summary of settings that can be changed on the SR50A RS232 or RS-485 operating modes.
Setting Description Options Default Value
BAUD Rate 1200
9600 BAUD
4800
9600
19200
38400
Address RS-232/RS-485 Any 2 Alphanumeric
33
Characters
Serial Operational Mode Measure on Poll
Auto Measure Auto Output
Auto Measure Auto Output
Auto Measure Polled Output
Distance to Target or
Depth output
Distance to Target
Depth
Distance to Target
Distance to Ground Decimal Value in Meters 0.0
Measurement Interval Units Seconds
Seconds
Minutes
Hours
Measurement Interval Value Integer 1-255 60
Output Unit Meters
Centimeters
Millimeters
Feet
Inches
Meters
9
SR50A Sonic Ranging Sensor
Setting Description Options Default Value
Quality Output On
Temperature Output On
Diagnostics Output On
3.6.1 BAUD Rate Setting
The factory Default BAUD Rate Setting of 9600 BAUD is suitable for most
applications. Lower BAUD rates (1200 or 4800) may improve communication
reliability or allow for longer cable lengths. Higher BAUD rates (19200 or
38400) may be used where faster communications are required.
The quiescent current draw for the SR50A in serial mode is normally 1.25mA
for BAUD rates of 9600 or less. The current draw increases to 1.5 and 2.25
mA for the BAUD rates of 19200 or 38400 respectively.
It is possible to download a firmware update to the SR50A via the RS-232 or
RS-485 communication interface. Higher BAUD rates may be desirable to
speed up this process.
Off
Off
Off
Off
Off
Output valid only for the
SR50AT (available on special
order only)
Off
It may take up to 30 minutes using a speed of 1200 BAUD, 7 minutes using
9600 BAUD, or 3 minutes using 38400 BAUD.
3.6.2 Address
The factory Default Address is 33. Normally for RS-232 applications there is
no need to change the default address. For RS-485 operation multiple sensors
can be polled individually if different addresses are assigned.
3.6.3 Operational Mode Setting
There are 3 different operational mode settings available on the SR50A.
Overall system design and desired performance determine which mode to
select. The SR50A operation for each of the 3 different modes will be
described as well as the advantages and disadvantages of each mode.
3.6.3.1 Measure in Poll Mode
In this mode the SR50A will remain idle until a measurement command is sent
(p33<CR>) where 33 is the default serial address. After the measurement
command is received, the SR50A will immediately begin a measurement and
transmit out the resulting data packet when complete. Typically the SR50A
will transmit the data packet within 1 second of receiving the command packet.
• The SR50A only performs a measurement when requested.
• The data output will lag the measurement command by 1 second.
10
•This configuration is conducive to a multidrop RS-485 system where
individual sensors do not transmit data until they are addressed.
3.6.3.2 Auto Measure Auto Output Mode
In this mode the SR50A will automatically exit its low power mode, initiate a
measurement and output the data. The frequency by which the SR50A will
perform this is set by adjusting the Measurement Interval Units and the
Measurement Interval Value parameters.
• No command is required from an external device to obtain a measurement.
• The data recorder or equipment simply needs to read the incoming serial
data from the SR50A.
3.6.3.3 Auto Measure Polled Output Mode
In this mode the SR50A will automatically exit its low power mode, initiating a
measurement. The output data string will not be sent until a poll command is
received. When a poll command is received by the SR50A the output data will
typically commence 100ms after the poll command is sent.
The frequency by which the SR50A will perform the measurement is set by
adjusting the Measurement Interval Units and the Measurement Interval Value parameters.
SR50A Sonic Ranging Sensor
•The main advantage of this operating mode is that the receiving device
will only have to wait 100ms for the data as opposed to 1 second.
•This configuration is also more conducive to a multidrop RS-485 system
where individual sensors do not transmit until they are addressed.
3.6.4 Distance to Target or Depth
The SR50A can output either distance to target values or calculate snow depth
values. To obtain a valid snow depth value the parameter distance to ground
must be entered.
The SR50AT will compensate the readings for temperature; the SR50AT is
available on special order only.
CAUTION
Do not use this option on the SR50A sensor unless the
SR50A is sent valid temperature readings via the
Temperature Input command (see Section 3.6.10).
3.6.5 Distance to Ground
A valid distance to ground must be entered when the SR50A is configured to
output snow depth values. The value must be in Meters regardless of the
output units that are selected.
If the exact value cannot be obtained it is better to slightly overestimate the
value rather than underestimating it. If a Distance to Ground value is too
small, the SR50A will output an error value as the snow surface should not be
below the ground surface.
11
SR50A Sonic Ranging Sensor
3.6.6 Measurement Interval Units
3.6.7 Measurement Interval Value
This setting is only applicable if either the Auto Measure Polled Output or the
Auto Measure Auto Output Modes are used. The options for the Measurement
Interval Units are:
Seconds
Minutes
Hours
Once a unit type is selected the number of units for the interval is set by
changing the Measurement Interval Value parameter. A 60 second interval
can be set by setting the units to seconds and the Measurement Interval Value
to 60. Alternately, the Measurement Interval Unit could be set to Minutes and
the Value could be set to 1. The Value setting can only range from 1 to 255.
This setting is only applicable if either the Auto Measure Polled Output or the
Auto Measure Auto Output Modes are used. The Measurement Interval
Value can range from 1 to 255. The units used for the value is set by the
Measurement Interval Units.
3.6.8 Output Unit
The SR50A always outputs the distance to the target. The units for the
distance value can be set to any of the following values:
Meters
Centimeters
Millimeters
Feet
Inches
3.6.9 Quality Output
The SR50A quality numbers can be optionally included in the data output
string. The Quality Output setting can be set to ON or OFF.
3.6.10 Temperature Output
This setting should only be enabled for the SR50AT version of the sensor; the
SR50AT is available on special order only. The Temperature Output setting
allows the SR50AT temperature reading to be included in the data output
string. It can be set to ON or OFF.
3.6.11 Diagnostics Output
The SR50A diagnostics numbers can be optionally included in the data output
string. The Diagnostics Output setting can be set to ON or OFF.
12
3.7 Serial Commands
3.7.1 Setup Command
The setup command places the SR50A in the serial setup mode. This
command should only be sent to customize a sensor’s settings. Upper and
lower case letters are accepted and a carriage return character must also
terminate the string (Enter key for Hyperterminal).
“setup<CR>”
3.7.2 Poll Command
The poll command is used to obtain the sensor’s output values. The poll
command consists of the upper or lower case letter “p” followed by the SR50A
address (default 33). The command must also terminate with a carriage return
character (Enter for hyperterminal).
“pAA<CR>” – where AA is a two character address and set from the
factory to 33
“p33<CR>” – Poll command with factory address of 33
SR50A Sonic Ranging Sensor
3.7.3 Information Command
The information command is used to query information from the sensor that is
not associated with the sensor’s output. For detailed information on the output
refer to Section 9.
The information command consists of the upper or lower case letter “i”
followed by the SR50A address (default 33). The command must also
terminate with a carriage return character (Enter for Hyperterminal).
“iAA<CR>” – where AA is a two character address and set from the
factory to 33
“i33<CR>” – information command with factory address of 33
3.7.4 Temperature Input command
The temperature input command is used to send the SR50A version of the
sensor a temperature value that is to be used for temperature compensation.
The value sent must be in degrees Celsius and should not exceed 8 characters.
The command consists of the upper or lower case letter “t” followed by the
SR50A address (default 33) a semicolon and the temperature value. The
command must also terminate with a carriage return character (Enter for
Hyperterminal).
“tAA;-5.5<CR>” – where AA is a two character address and set from the
factory to 33 and –5.5 is the temperature in degrees C
“t33;tt.ttt<CR>” – Temperature command with factory address of 33 and
a temperature value in Celsius.
13
SR50A Sonic Ranging Sensor
3.8 RS-232/RS-485 Data Output Format
3.8.1 Measurement Output
The measurement output string for the SR50A is as follows:
<STX>aa;D.DDD;QQQ;TT.TT;VVVVV;CC<CR><LF><ETX>
<STX> is the hex character &h02 (2 in decimal)
aa
These two characters are the serial address of the sensor. The default is 33.
Note this is two ASCII characters of &h33 in Hexidecimal or 51 in decimal.
D.DDD
This is the distance to target reading. The units depend on the Output Units
setting. The number of digits and decimal places also depend on the output
unit that is selected. The decimal digits are as follows:
Meters: D.DDD, 0.000 for no valid reading
DD.DDD possible for values past 9.999 m
Centimeters: DDD.DD
DDDD.DD possible for values past 999.99 cm
000.00 output for no valid reading
Millimeters: DDDD
-999 output for no valid reading
9999 Maximum value
Feet: DD.DDD
00.000 output for no valid reading
Inches: DDD.DD
000.00 output for no valid reading
QQQ
This data value is the optional quality value output. The quality value is
always a 3 digit integer and varies from 152 to 600, where 600 is the poorest
quality.
TT.TT
This is the temperature value in Degrees Celsius read by the SR50AT sensor.
This value is optionally output by setting the Temperature Output option to
ON. Only the SR50AT sensor will output a valid temperature. The SR50A
will output a –999.00 if the Temperature Output option is set to ON. The
temperature is displayed with 2 decimal points of precision.
VVVVV
This is the diagnostic output value. Each digit represents a pass or a fail on a
diagnostic test.
14
XVVVV
If X is a 1, then the ROM Memory has passed the signature test.
SR50A Sonic Ranging Sensor
VXVVV
If X is a 1, then no watchdog errors have occurred.
VVXXX
The 3 digits XXX are for factory use and should always read 111.
CC
This is a 2 character checksum of the data packet. The checksum is the two’s
complement of the data packet sum including control characters.
The Least significant byte is used resulting in a 2 character checksum.
The following is a sample packet with proper checksum:
<STX>33;1838;194;11011;2C<CR><LF><ETX>
SUM =
02+33+33+3B+31+38+33+38+3B+31+39+34+3B+31+31+30+31+31
+3B+0D+0A+03
=0x3D4
Use Last byte only (D4) and calculate two’s complement = 100 – D4 = 2C
<CR>
Carriage return character. 0x0d in hexadecimal or 13 in decimal
<LF>
Line feed character. 0x0a in hexadecimal or 10 in decimal
<ETX>
End of transmission character. 0x03 in hexadecimal or 3 in decimal
3.8.2 Information Message Output
The measurement output string for the SR50A is as follows:
<STX>aa;SSSSS;H.H;F.F;BBBBB;WWWWW<CR><LF><ETX>
<STX> is the hex character 0x02 (2 in decimal)
aa
These two characters are the serial address of the sensor. The default is 33.
Note this is two ASCII characters of 0x33 in Hexidecimal or 51 in decimal.
SSSSS
This is the serial number of the sensor
H.H
This is the hardware version of the sensor
F.F
This is the firmware version of the sensor
15
SR50A Sonic Ranging Sensor
(
)
BBBBB
This is the checksum of the boot code.
WWWWW
This is the checksum of the firmware.
CC
This is a 2 character checksum of the data packet. The checksum is the two’s
complement of the data packet sum including control characters.
The least significant byte is used resulting in a 2 character checksum.
The following is a sample packet with proper checksum:
<STX>33;1838;194;11011;2C<CR><LF><ETX>
SUM =
02+33+33+3B+31+38+33+38+3B+31+39+34+3B+31+31+30+31+31
+3B+0D+0A+03
=0x3D4
Use Last byte only (D4) and calculate two’s complement = 100 – D4 = 2C
<CR>
Carriage return character. &h0D in hexadecimal or 13 in decimal
<LF>
Line feed character. &h0A in hexadecimal or 10 in decimal
<ETX>
End of transmission character. &h03 in hexadecimal or 3 in decimal
4. Sensor Mounting and Installation
4.1 Beam Angle
When mounting the SR50A, the sensor's beam angle needs to be considered
(see FIGURE 2. Beam Angle Clearance). It is always best to mount the
SR50A perpendicular to the intended target surface. The SR50A has a beam
angle of approximately 30 degrees. This means that objects outside this 30
degree beam will not be detected nor interfere with the intended target. Any
unwanted target must be outside the 30 degree beam angle.
The following formula is used to determine the required clearance for the beam
angle. By inserting a height value in the Formula, a Clearance Radius in the
same measurement units as the height can be obtained.
Clearance Radius formula:
0.=
268
CONE
FORMULA 2. Beam angle clearance Radius
16
CONE
heightradius
4.2 Mounting Height
Any target to the SR50A should be at least 19.7 in (50 cm) or more from the
face of the transducer. An attempt should also be made to not mount the sensor
too far from the target surface. The further the sensor is from the target the
more the absolute error increases. If your application is measuring snow depth
in an area that will likely not exceed 4.1 ft (1.25 m) of snow then a good height
to mount the sensor would be 5.74 to 6.56 ft (1.75 to 2.0 m). Mounting the
sensor 13.1 ft (4 m) above the ground will result in the potential for larger
snow depth errors.
SR50A Sonic Ranging Sensor
FIGURE 2. Beam Angle Clearance
4.2.1 Reference Point
The front grill on the ultrasonic transducer is used for the reference for the
distance values. Because it is difficult to measure from the grill one can use
the outer edge of the plastic transducer housing see FIGURE 3. If this edge is
used, simply add 0.3 in (8 mm) to the measured distance.
FIGURE 3. Distance from Edge of Transducer Housing to Grill
17
SR50A Sonic Ranging Sensor
4.3 Mounting Options
There are two standard mounting options available for the SR50A sensor.
The first is the SR50A Mounting Kit, part number 19517. This bracket is used
to mount the SR50A to a CM206 crossarm or a pipe with a 1 in. to 1.75 in. OD.
Figures 4 and 5 show a couple of angles of the SR50A mounted to a crossarm.
A u-bolt attaches the bracket to the crossarm and two screws attach the SR50A
to the bracket.
Another mounting option shown in FIGURE 6 utilizes a mounting stem (part
number 19484) and a NU-RAIL. The mounting stem is sized to fit a 1” NURAIL (#1049). This mounting method was used for the SR50 (predecessor to
the SR50A ) and the stem can be used to fit the SR50A into existing SR50
mounts.
FIGURE 4. SR50A Mounted to a Crossarm via the 19517 Mounting Kit
FIGURE 5. The SR50A Mounted to the Crossarm
Shown from Another Angle
18
SR50A Sonic Ranging Sensor
FIGURE 6. SR50A - Mounted using a NU-RAIL Fitting and
19484 Mounting Stem
SR50A with 6-plate gill radiation shield – the picture below shows the
SR50A stem attachment
5. Maintenance
The SR50A’s electrostatic transducer requires equal pressure on both sides.
Vent holes in the transducer housing are used to equalize pressure. Desiccant
is placed inside the transducer housing to prevent the possibility of condensing
humidity. The desiccant must be inspected and, if required, replaced on a
regular basis. The desiccant supplied with the SR50A uses an indicating silica
gel and will remain blue if it is still capable of absorbing moisture. Once the
desiccant becomes saturated the color will change from blue to pink. If the
SR50A is used in humid environments, the desiccant should be replaced more
frequently. To inspect or replace the desiccant, follow the procedures outlined
in Section 6 under disassembly.
The five small desiccant packets used in the transducer housing are part
number 4091.
19
SR50A Sonic Ranging Sensor
It is recommended that the transducer housing assembly (part number 19486 –
Transducer Maintenance Kit) be replaced every 3 years.
If the SR50A is used in an environment with high humidity, it is recommended
that the transducer housing assembly be replaced every year.
6. Disassembly/Assembly Procedures
It is important to follow these instructions to disassemble the SR50A.
Disassembly is required to change the transducer and the Option jumpers, and
to inspect or replace the desiccant.
Before proceeding with any maintenance on a data acquisition system, always
retrieve the data first. It is also recommended that the datalogger program be
saved.
If the sensor is in operation, always disconnect the SR50A from the datalogger
or the connector before disassembling. Refer to Section 3.4.1 or Section 3.5.1,
Wiring for further information on your specific wiring connection and
disconnection.
20
FIGURE 7. Disconnect Cable from Sensor
SR50A Sonic Ranging Sensor
FIGURE 8. Remove 6 Screws from the Transducer Housing
FIGURE 9. Remove Transducer Housing and Disconnect Wires
21
SR50A Sonic Ranging Sensor
FIGURE 10. Location of Desiccant in Transducer Housing Assembly
22
FIGURE 11. Remove and Replace Desiccant
SR50A Sonic Ranging Sensor
FIGURE 12. Remove the 2 Flat Philips Screws to Expose the PCB
Carefully reassemble in reverse order.
7. Jumper Settings
The following diagram illustrates how the Jumpers are located on the SR50A
sensor.
FIGURE 13. Jumper Settings
23
SR50A Sonic Ranging Sensor
The SR50A can be configured with either SDI-12, RS-232 or RS-485
communications. Shunt jumpers can be located on any of the 3 sets of
communication selection headers. All 3 jumpers should be placed only on one
group at a time. Never install more than 3 jumpers and never mix the jumpers
amongst the SDI-12, RS-232 or RS-485 locations.
The other jumper located on the SR50A places the sensor in either the normal
operation mode or in the Program update mode. The program mode is only
used for updating the internal firmware of the sensor. For operation the jumper
must be left in the RUN position.
Refer to Section 8 for SR50A Firmware Updates.
8. SR50A Firmware Updates
The firmware on the SR50A can be updated by using a terminal program such
as Hyperterminal. If your SR50A is configured for RS-232 communications,
the SR50A can be programmed from the I/O cable. The SR50A also contains
an internal female DB-9 connector.
Firmware updates should only be performed at an appropriate workstation with
static control procedures in place. Failure to follow the procedures may cause
damage to the sensor.
• Ensure that the SR50A is completely disconnected.
• Open the SR50A as follows:
o Remove the 6 slot head screws that are located on the bottom side of
the transducer housing.
o The transducer housing will separate from the main housing.
o Ensure that the screws and o-rings are kept and set aside.
o Disconnect the transducer housing assembly from the main body
assembly by pressing the tab on the connector and separating the
connector.
o Remove the 2 phillips screws from the bottom disk assembly.
o The bottom disk assembly should now separate from the main
housing.
o The circuit board will still remain connected to the housing via the
signal wires.
o Place the bottom disk/ circuit assembly on the work bench with the
circuit board and DB-9 connector facing up. Ensure that no part of
the PCB is in contact with the lid or other conductive objects.
24
•Move the jumper on the Run/Program Header from the Run position to the
Program position.
•Connect to the DB9 connector on the SR50A.
SR50A Sonic Ranging Sensor
•Power can now be applied to the SR50A by connecting the connector and
applying power to the sensor. The Green LED should remain on when
powered up properly.
•Setup Hyperterminal or the communications program that you are using as
follows:
o BAUD rate: 38400
o Data Bits: 8
o Parity: None
o Stop Bits: 1
o Flow control: XON/XOFF
o 25ms line delay (under ASCII setup)
• From the Hyperterminal menu select Transfer -> Send Text File.
• Select the new download text file and the transfer should begin.
• Initially the LED should remain constantly on. When data transfer begins
the LED will flash rapidly with each line that is reprogrammed.
•Upon completion the LED will remain steadily on again. If there are any
errors the LED will flash to indicate that an error occurred.
• If the LED does flash attempt the reprogram process again.
• After the reprogramming is successful, disconnect the sensor from the
power supply.
• Move the jumper back from the Program position to the Run position.
• Re-assemble the sensor.
• Verify operation of the sensor by obtaining a measurement.
9. Data Interpretation
Although not common the SR50A can occasionally output invalid reading
indicators if it was unable to obtain a measurement. For distance to target
values a 0.0 reading is usually output. For snow depth outputs a -999 is output
as an error indicator value. An invalid temperature reading is also indicated by
a -999 reading. For snow depth applications these can be easily filtered out
when analysing the data.
Consideration should be taken in a control type application to deal with invalid
readings. For example if the sensor is used to initiate a water level alarm then
multiple readings should be used to ensure that a single invalid reading does
not trigger the alarm condition.
25
SR50A Sonic Ranging Sensor
10. Datalogger Program Examples
In the following datalogger program examples only the CR1000 and the
CR10X dataloggers are used. The programming of CR800, CR850 and the
CR3000 dataloggers are effectively the same as the CR1000. Also for a
CR23X datalogger refer to the CR10X programming examples.
10.1 SR50A Examples
10.1.1 CR1000 Example (SDI-12 “M1!”)
'CR1000 Series Datalogger
'In this example, the SR50A is mounted 2.5 meters above the ground.
'The CR1000 sends an 'SDI12 command to the SR50A,
'which outputs a raw distance value and a signal quality.
'Declare Public Variables:
Public SR50(2)
Alias SR50(1)=Raw_Dist
Alias SR50(2)=SignalQuality
Public Temp_Corr_Distance
Public Air_Temp
Public Snow_Depth
'Declare the initial distance of the SR50A from the ground in meters:
'Subtract the corrected distance from the initial distance of the SR50A to the ground:
Snow_Depth=Initial_Distance-Temp_Corr_Distance
'Call Data Table and Store Data:
CallTable (Table1)
NextScan
EndProg
26
SR50A Sonic Ranging Sensor
10.1.2 CR1000 Example (RS-232 Mode)
'CR1000 Series Datalogger
'In this example, the SR50A is mounted 2.5 meters above the ground.
'The SR50A is used in RS-232 mode (internal jumpers are set).
'The CR1000 sends a serial string to the SR50A, which is in "Measure on Poll Mode",
'and then receives a serial string in return which is parsed into different values.
'Wiring: Black: Power Ground
' clear: Power Ground
' Red: +12V,
' White: C1
' Green: C2
'Declare Variables
'Declare SR50AData as a dimensioned string of maximum 50 chrs
Dim SR50AData as STRING * 50
Public ParseVals(5) as FLOAT
Alias ParseVals(1)=SerialAddress
Alias ParseVals(2)=Raw_Distance
Alias ParseVals(3)=SignalQuality
Alias ParseVals(4)=Diagnostics
Alias ParseVals(5)=Chcksum
Public Temp_Corr_Distance
Public Air_Temp
Public Snow_Depth
'Declare the initial distance of the SR50A from the ground in meters:
'Subtract the corrected distance from the initial distance of the SR50A to the ground:
Snow_Depth=Initial_Distance - Temp_Corr_Distance
'Call Data Table and Store Data:
CallTable (Table1)
NextScan
EndProg
10.1.3 CR10X Example (SDI-12 “M1!”)
;{CR10X}
;
;In this example, the SR50A is mounted 2.5 meters above the ground.
;The CR10X sends an SDI-12 command to the SR50A, which outputs a
;non-temperature compensated distance value (Raw_Dist) and signal quality value.
;Two input locations are used to store incoming data.
*Table 1 Program
01: 60 Execution Interval (seconds)
;Measure the 107 temperature probe:
1: Temp (107) (P11)
1: 1 Reps
2: 1 SE Channel ;SE channel 1 used for this example
3: 1 Excite all reps w/E1 ;Excite channel 1 used for this example
4: 1 Loc [ T_Kelvin ]
5: 1.0 Multiplier
6: 273.15 Offset ;This converts the value to degrees Kelvin
;Use SDI-12 command "M1!" to receive Distance and Signal Quality from the SR50A
*Table 2 Program
02: 0.0000 Execution Interval (seconds)
*Table 3 Subroutines
End Program
29
SR50A Sonic Ranging Sensor
10.2 SR50AT Examples
10.2.1 CR1000 Example (SDI-12 “M4!”)
'CR1000 Series Datalogger
'The following sample program obtains the Snow depth output
'directly from an SR50AT sensor.
'This program is written for the SR50AT version only. For an SR50A
'sensor a valid depth can not be output unless a temperature value
'is passed from the datalogger to the SR50A via the extended SDI-12 command
'Declare Public Variables
Public PTemp, batt_volt
Public SR50ADistanceToGround
'Once the SR50AT is installed the Distance from the SR50AT to the
'Ground must be placed into this parameter. Once successfully transferred
'to the SR50AT the SR50AT will store the parameter in EE memory and retain
'the value even when power is removed.
Public NewDistanceToGround
Public SR50AReturnValues(3) as FLOAT
Public XtendedDistValStr as STRING * 16
Public ExtendedCMDResult as FLOAT
Alias SR50AReturnValues(1) = SR50A_SnowDepth_Meters
Alias SR50AReturnValues(2) = SR50A_QualityVal
Alias SR50AReturnValues(3) = SR50A_AirTempC
'Declare Other Variables
'Example:
'Dim Counter
Dim SDI12commandstring as STRING * 16
'Declare Constants
'Example:
'CONST PI = 3.141592654
'Once installed enter the actual distance from the SR50AT to the Ground with
'no snow present. If in doubt it is better to use a slightly larger value
'than a smaller value. Errors in the value will show up as an offset error
'in the snow depth values
'If a new value for the variable NewDistanceToGround is entered (non zero)
'The following code will send that value to the SR50AT.
If NewDistanceToGround > 0.0 then
'Convert the floating point value to a text string for the SDI-12 command
'To send the Distance to ground (in meters) value to the SR50A the
'SDI-12 extended command is as follows:
'aXDM.MMM!- where M.MMM is the value such as 2.345 Meters
'Read the Snow depth from the SR50A "M4!" command returns depth with
'quality and temperature
SDI12Recorder (SR50AReturnValues,1,0,"M4!",1.0,0)
'Call Output Tables
'Example:
CallTable Test
NextScan
EndProg
31
SR50A Sonic Ranging Sensor
10.2.2 CR1000 Example (RS-232 Mode)
'CR1000 Series Datalogger
'In this example, the SR50AT is mounted 2.5 meters above the ground.
'The SR50AT is used in RS-232 mode (internal jumpers are set).
'The CR1000 sends a serial string to the SR50AT, which is in "Measure on Poll Mode",
'and then receives a serial string in return which is parsed into different values.
'Wiring: Black: Power Ground
' clear: Power Ground
' Red: +12V,
' White: C1
' Green: C2
'Declare Variables
'Declare SR50AData as a dimensioned string of maximum 50 chrs
Dim SR50AData as STRING * 50
Public ParseVals(6) as FLOAT
Alias ParseVals(1)=SerialAddress
Alias ParseVals(2)=Dist_To_Snow
Alias ParseVals(3)=SignalQuality
Alias ParseVals(4)=SR50AT_Temp
Alias ParseVals(5)=Diagnostics
Alias ParseVals(6)=Chcksum
Public Snow_Depth
'Declare the initial distance of the SR50AT from the ground in meters:
'Subtract the corrected distance from the initial distance of the SR50A to the ground:
Snow_Depth=Initial_Distance - Dist_To_Snow
'Call Data Table and Store Data:
CallTable (Table1)
NextScan
EndProg
10.2.3 CR10X Example (SDI-12 “M3!”)
;{CR10X}
;
;In this example, the SR50AT is mounted 2.5 meters above the ground.
;
;The CR10X sends an SDI-12 command to the SR50AT, which outputs the
;temperature compensated distance value (Meters),
;the signal quality value and the temperature.
;
;Three input locations are used to store incoming data.
*Table 1 Program
01: 60 Execution Interval (seconds)
;Use SDI-12 command "M3!" to receive Distance, Signal Quality and Temperature
;Store the Temperature reading from the SR50AT
9: Sample (P70)^1224
1: 1 Reps
2: 5 Loc [ SR50AT_T ]
*Table 2 Program
02: 0.0000 Execution Interval (seconds)
*Table 3 Subroutines
End Program
11. Warnings/Cautions
Never open the SR50A while the sensor is connected to power or any other
device. Always disconnect the SR50A via the connector or disconnect the
cable wires from their termination points.