www.diamondsystems.com
Zeta User Manual Rev 1.0
Page 41
14.2.6
Input Range Selection
The input range of the A/D circuit is programmable in software and can be selected from the 4 values shown in
the table above. Refer to the Universal Driver software user manual A/D section for details. The input range can
be changed anytime, so that you can use different ranges for different input signals based on the best match. In
general, you should select the highest gain (smallest input range) that allows the A/D converter to read the full
range of voltages over which the input signals will vary. For example, if you have a signal that ranges from 0V
minimum to 3V maximum, use the 0-5V range for best resolution. An input range that is too small causes the A/D
converter to clip at either the high end or low end, and you will not be able to read the full range of voltages on
your input signals.
14.2.7
Converting A/D Readings to Volts or Engineering Units
The A/D always returns a 16-bit binary number that represents the value of the input voltage relative to the
selected input range. This number needs to be converted to a meaningful value in order to be used in your
application. The first step is to convert it back to the actual measured voltage. Afterwards, you may need to
convert the voltage to some other engineering units such as temperature in degrees C or weight in grams.
Since there are many possible formulas for converting the input voltage to engineering values, this secondary step
is not described here. Only conversion to input voltage is described. However, you can combine both voltage and
engineering unit conversions into a single formula if desired.
To convert the A/D value to its corresponding input voltage, use the following formulas.
Conversion Formula for Bipolar Input Ranges
Input voltage = A/D value / 32768 * Full-scale input voltage
where the A/D value is a 2s complement number ranging from -32768 to 32767, and the full-scale
voltage is the nominal maximum value, either 5V or 10V.
Example:
For bipolar input range ±5V, full-scale input voltage = 5V
For an A/D value of 17761: Input voltage = 17761 / 32768 * 5V = 2.710V
For an A/D value of -12345: Input voltage = -12345 / 32768 * 5V = -1.884V
Conversion Formula for Unipolar Input Ranges
Input voltage = A/D value / 65536 * Full-scale input voltage
where the A/D value is a straight binary number ranging from 0 to 65535, and the full-scale voltage is
the nominal maximum value, either 5V or 10V.
Example:
For unipolar input range 0-5V, full-scale input voltage = 5V.
For an A/D value of 17761: Input voltage = 17761 / 65536 * 5V = 1.355V