App.
Note Code: 2D-C
Revision: 1
APPLICATION NOTE
Shaft Encoders
for Water Resources Applications
815 W. 1800 N. Logan, Utah 84321-1784 (435) 753-2342 FAX (435) 750-9540
Copyright (C) 2000-2002 Campbell Scientific, Inc.
Shaft Encoders
for Water Resources Applications
This application note describes using shaft encoders with Campbell Scientific datalog-
gers. Shaft encoders discussed in this note are the Campbell Scientific CS410, Stevens
PG-III, Handar 436A and 436B, Synergetics 501A, and Enviro-Systems SE-104P, SE-
107, SE105(S), and SE-109. Compatible dataloggers include our CR23X, CR10(X),
CR510, CR500, BDR320, and BDR301. Electrical connections and datalogger pro-
gramming are provided. For information about selecting pulleys, floats, counter
weights, tape, or beaded lines, contact our Water Resources Group through
water@campbellsci.com.
Shaft Encoder Descriptions
Shaft encoders monitor fluctuations in water level and the posi-
tion of water control gates by converting shaft rotation to elec-
tronic signals that are measured by the datalogger. A selection of
shaft encoders that are compatible with Campbell Scientific data-
loggers are described below.
Campbell Scientific CS410 — Includes an onboard QD1 decoder
to generate two pulse strings—one indicating clockwise and the
other counter-clockwise rotation.
Campbell Scientific SSR100 — Is a pre-programmed system that
consists of our CS410 shaft encoder and CR510 datalogger
housed in an environmental enclosure. It also includes an
alphanumeric display. A High Data Rate GOES satellite transmit-
ter, tipping bucket rain gage, and SDI-12 sensor can be added to
the system. Designed as a replacement for the USGS Automated
Data Recorder (ADR), the SSR100 mounting bracket has the
same footprint as the old ADRs allowing the SSR100 to be
mounted where the ADRs functioned. Because the SSR100 is
preprogrammed, the SSR100 is not mentioned in the program-
ming sections of this application note.
Stevens PG-III — Uses switch closures to generate electronic
pulses. The switch closures are decoded internally by electronic
logic circuits. The electronic logic circuits determine the direc-
tion the shaft is rotating and produce two pulse strings—one indi-
cating clockwise and the other counter-clockwise rotation.
Copyright © 2000-2002 Campbell Scientific, Inc. 1
815 W. 1800 N., Logan, UT 84321-1784 (435) 753-2342 App. Note: 2D-C
Shaft Encoders for Water Resources Applications
Handar 436A — Incorporates a 50-pole magnet that’s fixed to its
shaft and sensed by a pair of Hall Effect devices that produce two
square waves. One wave is half a wave-length out of phase with
the other. Reversing the shaft rotation reverses the phase which
indicates a change in shaft direction. A Campbell Scientific QD1
decoder is required to convert the square waves to two pulse
strings—one indicating clockwise and the other counter-clockwise
rotation.
Synergetics 501A — Produces square waves similar to the
Handar 436A, and like the Handar 436A, the Synergetics 501A
requires a Campbell Scientific QD1 decoder.
Enviro-Systems SE-104 and SE-107 — Provide several options
for output signals. The output option that’s often preferred pro-
duces two pulse trains (i.e., up and down counts like the PG-III).
The SE-104P provides this output option. The dual pulse train
option does not require additional interfaces or signal condition-
ers. The quadrature output option requires a Campbell Scientific
QD1 decoder.
Handar 436B and Enviro-Systems SE-105(S) and SE-109 —
Both encoders include an internal microprocessor that communi-
cates using the SDI-12 digital protocol (for details, see
http://www.sdi-12.org/). The internal microprocessor counts the
shaft rotations (up and down) and transmits a number to the data-
logger on a single, three-conductor cable.
The outputs of the SE-105(S) and SE-109 are programmable.
This allows you to match the output and resolution to specific
pulley circumferences and units. When using the SE-105(S) or
SE-109, if you don’t know how it was programmed, you need to
determine the output ratio empirically by operating the shaft
encoder.
The Handar 436B output units are feet if a 1 foot circumference
pulley is used.
The CR23X, CR10(X), CR510, CR500 are compatible with all of
the shaft encoders listed, both pulse and SDI-12 output. The
BDR301 and BDR320 are only compatible with the SDI-12
encoders. The CR10 must have its OS10-1.1 or OS10-2.1 PROM
installed.
2 Copyright © 2000-2002 Campbell Scientific, Inc.
App. Note: 2D-C 815 W. 1800 N., Logan, UT 84321 (435) 753-2342
Shaft Encoders for Water Resources Applications
Using Short Cut
Short Cut is the easiest, and typically the preferred, method for
programming a CR23X, CR10(X), CR510, or CR500 datalogger.
Short Cut is not compatible with the BDR320, BDR301, and
Synchronous Devices for Measurement (SDMs). Short Cut cre-
ates programs for applications requiring only sensor measurement
and data output.
When using Short Cut, you:
• Choose the shaft encoder model number, such as the CS410 or
436B, or choose QD1 for shaft encoders that require the QD1.
• Enter the pulley diameter and the current water level reading.
• Select the data and output processing.
• Save the program.
• Send the program to the datalogger.
After you have saved the program, Short Cut automatically cre-
ates a wiring table that shows how to connect the shaft encoder to
the datalogger.
The remaining text discusses wiring and programming for Edlog
or PC300 users. Short Cut users can stop reading now.
Using Edlog or PC300W
Wiring
Below are wiring examples. Multiple configurations are possible
(i.e., where the wire connects to C1, you could connect it to any
other datalogger control port). Unless stated otherwise the con-
nections are for the CR23X, CR10(X), CR510, and CR500 data-
loggers.
Copyright © 2000-2002 Campbell Scientific, Inc. 3
815 W. 1800 N., Logan, UT 84321-1784 (435) 753-2342 App. Note: 2D-C
Shaft Encoders for Water Resources Applications
Campbell Scientific CS410
CS410 Datalogger
Black ---------------------------------GND
Red -----------------------------------5V
Green---------------------------------P2
White---------------------------------P1
Shield --------------------------------GND
Stevens PG-III
PG-III Datalogger
Red -----------------------------------12V
Green---------------------------------P1
White---------------------------------P2
Black ---------------------------------GND
Clear----------------------------------GND
When using a CR10, a 10 KΩ pull-up resistor is required to
bridge each pulse channel to the 5 V terminal. The resistor is
not required when using a CR23X, CR10X, CR510, or CR500.
PG-III SDM-INT8
Red -----------------------------------12V
Black ---------------------------------G
Green---------------------------------CH6
White---------------------------------CH7
Shield --------------------------------G
Use 10 KΩ resistors to jump from 12 V to CH6 and 12 V to CH7.
Interface between a CR23X or CR10(X) and the SDM-INT8 is
shown in the SDM-INT8 manual. The CR510 and CR500 are not
compatible with SDM devices.
4 Copyright © 2000-2002 Campbell Scientific, Inc.
App. Note: 2D-C 815 W. 1800 N., Logan, UT 84321 (435) 753-2342
Shaft Encoders for Water Resources Applications
Handar 436A
436A QD1
Pin A ---------------------------------N/C
Pin B ---------------------------------N/C
Pin C ---------------------------------5V
Pin D ---------------------------------S2
Pin E ---------------------------------S1
Pin F----------------------------------GND
QD1 Datalogger
GND----------------------------------GND
5V ------------------------------------5V
P2 -------------------------------------P2
P1 -------------------------------------P1
Handar 436B
CR23X, CR10(X),
436A CR510, or CR500
Pin A ---------------------------------C1
Pin B ---------------------------------12V
Pin C ---------------------------------GND
Pin D ---------------------------------N/C
436A BDR301
Pin A ---------------------------------SDI-12 Pin A
Pin B ---------------------------------SDI-12 Pin B
Pin C ---------------------------------SDI-12 Pin C
Pin D ---------------------------------N/C
436A BDR320
Pin A ---------------------------------SDI
Pin B ---------------------------------12 V
Pin C ---------------------------------GND
Pin D ---------------------------------N/C
Synergetics 501A
501A QD1
Pin A ---------------------------------GND
Pin B ---------------------------------S2
Pin C ---------------------------------N/C
Pin D ---------------------------------GND
Pin E ---------------------------------S1
Pin F----------------------------------N/C
Copyright © 2000-2002 Campbell Scientific, Inc. 5
815 W. 1800 N., Logan, UT 84321-1784 (435) 753-2342 App. Note: 2D-C
Shaft Encoders for Water Resources Applications
QD1 Datalogger
GND----------------------------------GND
+5 -------------------------------------5V
P2 -------------------------------------P2
P1 -------------------------------------P1
Enviro-Systems SE-104P or SE-107
Dual Pulse Output Option:
SE-104P or SE-107 Datalogger
Pin F----------------------------------GND
Pin D ---------------------------------5V
Pin A ---------------------------------P1
Pin B ---------------------------------P2
Quadrature Output Option:
SE-104P or SE-107 QD1
Pin F----------------------------------GND
Pin A ---------------------------------S1
Pin B ---------------------------------S2
Pin D ---------------------------------5V
QD1 Datalogger
GND----------------------------------GND
+5 -------------------------------------5V
P1 -------------------------------------P1
P2 -------------------------------------P2
Enviro-System SE-105(S) or SE-109
CR23X, CR10(X),
SE-105(S) or SE-109 CR510, or CR500
Pin A ---------------------------------C1
Pin B ---------------------------------N/C
Pin C ---------------------------------N/C
Pin D ---------------------------------12 V
Pin E ---------------------------------N/C
Pin F----------------------------------GND
Pin G ---------------------------------N/C
6 Copyright © 2000-2002 Campbell Scientific, Inc.
App. Note: 2D-C 815 W. 1800 N., Logan, UT 84321 (435) 753-2342
Shaft Encoders for Water Resources Applications
SE-105(S) or SE-109 BDR301
Pin A ---------------------------------SDI-12 Pin A
Pin B ---------------------------------N/C
Pin C ---------------------------------N/C
Pin D ---------------------------------SDI-12 Pin B
Pin E ---------------------------------N/C
Pin F----------------------------------SDI-12 Pin C
Pin G ---------------------------------N/C
SE-105(S) or SE-109 BDR320
Pin A ---------------------------------SDI
Pin B ---------------------------------N/C
Pin C ---------------------------------N/C
Pin D ---------------------------------12 V
Pin E ---------------------------------N/C
Pin F----------------------------------GND
Pin G ---------------------------------N/C
Programming
Shaft encoders with a pulse output are measured with Instruction
3. The SDI-12 sensors are measured with Instruction 105 when
using a CR23X, CR10(X), CR510, or CR500. For the BDR320
and BDR301, use PC300’s prompt programming.
Multiplier for Instruction 3
The multiplier is based on the wheel circumference and the shaft
encoder counts per revolution:
MULTIPLIER = WHEEL CIRCUM. (in desired units)
COUNTS/REV
Stevens PG-III: 300 counts/revolution
Campbell Scientific CS410, Handar 436A, and
Synergetics 501A: 100 counts/revolution
Examples:
A Stevens PG-III with a 1-foot circumference wheel:
MULTIPLIER = 1/300 = 0.00333
(measures in feet)
Copyright © 2000-2002 Campbell Scientific, Inc. 7
815 W. 1800 N., Logan, UT 84321-1784 (435) 753-2342 App. Note: 2D-C
Shaft Encoders for Water Resources Applications
Our CS410 with a 12-inch circumference wheel:
MULTIPLIER = 12/100 = .12
(measures in inches)
Multiplier for Instruction 105 or BDR Prompt Programming
When the measurement and the wheel circumference are in the
same units, the multiplier is typically one. For example if you
want the measurement units returned in feet and a 1-foot circum-
ference wheel is used, the multiplier is one. Use the multiplier in
the program instruction to convert the wheel circumference to the
desired units. For example, if you want to measure in meters and
you’re using a 1-foot circumference wheel, a multiplier of .3048
is required since 1 foot equals .3048 meters.
Offset
When shaft encoders power up, they reference the wheel position
to zero. An offset may be required to reference the actual water
level height, as indicated by a known reference such as a staff
gauge. On-site you can enter the offset value into the program by
using a portable computer or keyboard/display (computer only for
the BDR320 or BDR301).
Edlog Program for our CS410, Stevens PG-III, Handar 436A, or
Synergetics 501A
This is a portion of a CR23X, CR10(X), CR510, or CR500 pro-
gram that measures a CS410, 436A, 501A, SE-104P, or SE-107
with a one foot circumference pulley. The program has a five
minute measurement interval and the desired units are feet.
Please note that this is only a portion of a program. A complete
program would require output processing instructions to place the
data in final storage. The data must be in final storage to transfer
the data to a storage module or to retrieve the data via a telecom-
munications link.
8 Copyright © 2000-2002 Campbell Scientific, Inc.
App. Note: 2D-C 815 W. 1800 N., Logan, UT 84321 (435) 753-2342
Shaft Encoders for Water Resources Applications
*Table 1 Program
01: 300 Execution Interval (seconds)
;5-minute scans
;Input Instructions
;Up-counts connected to P1 measure an increase in level
1: Pulse (P3)
1: 1 Reps
2: 1 Pulse Channel 1
3: 0 High Frequency, All Counts
4: 1 Loc [COUNT_UP]
5: .01 Mult
6: 0 Offset
;Down counts connected to P2 measure a decrease in level
2: Pulse (P3)
1: 1 Reps
2: 2 Pulse Channel 2
3: 0 High Frequency, All Counts
4: 2 Loc [COUNT_DWN]
5: .01 Mult
6: 0 Offset
; Processing instructions add the number of counts to a running total
3: Z=X+Y (P33)
1: 1 X Loc [COUNT_UP]
2: 3 Y Loc [STAGE_FT]
3: 3 Z Loc [STAGE_FT]
4: Z=X-Y (P35)
1: 3 X Loc [STAGE_FT]
2: 2 Y Loc [COUNT DWN]
3: 3 Z Loc [STAGE_FT]
Edlog Program for Handar 436B or Enviro-Systems
SE-105(S) or SE-109
This is a portion of a CR23X or CR10(X) program that measures
a 436B, SE-105(S), or SE-109 with an 18 inch circumference pul-
ley. (A CR510 or CR500 program would be the same except
Instruction 105’s entry for parameter 3 must be either 1 or 2.)
The program has a ten minute measurement interval and the
Copyright © 2000-2002 Campbell Scientific, Inc. 9
815 W. 1800 N., Logan, UT 84321-1784 (435) 753-2342 App. Note: 2D-C
Shaft Encoders for Water Resources Applications
desired units are feet. Please note that this is only a portion of a
program. A complete program would require output processing
instructions to place the data in final storage. The data must be in
final storage to transfer the data to a storage module or to retrieve
the data via a telecommunications link.
*Table 1 Program
01: 600 Execution Interval (Seconds)
1: SDI-12 Recorder (P105)
1: 00 SDI-12 Address
2: 00 SDI-12 Command
3: 1 Port
4: 1 Loc [STAGE_FT]
5: 1.5 Mult
6: 0 Offset
PG-III using an SDM-INT8 and a CR10(X)
Below are the instructions for using an SDM-INT8 and process-
ing the data. To make this a complete program, you need
Instruction 3 to measure the up and down counts and output pro-
cessing instructions to place the data in final storage.
1: SDM-INT8 (P101)
1: 00 Address
2: 0220 Input Config: Channels 8, 7, 6, 5
3: 0000 Input Config: Channels 4, 3, 2, 1
4: 0770 Function: Channels 8, 7, 6, 5
5: 0000 Function: Channels 4, 3, 2, 1
6: 0-- Output Options
7: 1 Loc [UP ]
8: 0.01 Mult
9: 0 Offset
2: Z=X+Y (P33)
1: 1 X Loc [UP]
2: 3 Y Loc [STATE_FT]
3: 3 Z Loc [STAGE_FT ]
3: Z=X-Y (P35)
1: 3 X Loc [STAGE_FT]
2: 2 Y Loc [DOWN]
3 3 Z Loc [STAGE_FT ]
10 Copyright © 2000-2002 Campbell Scientific, Inc.
App. Note: 2D-C 815 W. 1800 N., Logan, UT 84321 (435) 753-2342
Shaft Encoders for Water Resources Applications
BDR320/BDR301 Prompt Program
This program measures an SE-105(S) or SE-109 with a 308 mm
circumference pulley. It has a 15-minute measurement interval
and the desired output units are feet.
Multiplier = 1 ft = 0.003247
308 mm
Input Table Number 01
Measurement Interval mins 0015
Loc Name Units Type Chn Mult Offset
01 Level CM SDI 001 0.003247 +0.0000
02 OPT
Copyright © 2000-2002 Campbell Scientific, Inc. 11
815 W. 1800 N., Logan, UT 84321-1784 (435) 753-2342 App. Note: 2D-C