Sampling Current (4-20 ma) Inputs
Many devices output a current value instead of a voltage value. The secret to obtaining
current readings is a 250 ohm resistor. Placing a 250 ohm resistor to ground on a 4-20
ma. current input will create a voltage potential of 1V to 5V.
If we remember Ohm’s law: E = I * R
R = 250 ohms
I = .004 to .020 amps (4-20 ma.)
E = 1.0V to 5.0V
Obtaining current readings is a three step process:
1.
Perform analog Unipolar sample
2.
Convert unipolar sample to volts
3.
Convert voltage to amps
The following formula will convert the raw analog sample reading to a current value.
Current = (ADC_Sample * (5.000/4096)) / 250
Obtaining accurate Analog samples
Please keep the following points in mind when attempting to obtain accurate samples.
•
Avoid high impedance analog signal sources!
•
Watch out for UPS systems! They create loads of EMI/EMF noise.
•
Keep the analog signal source as close to the ADC-x module as possible.
•
Keep transformers far away from the
ADC-1R2
Series
module.
•
Use good wiring practices, especially in regards to ground connections.
•
RS-232 interface can generate approx. 2 mv noise.
Resistors for Analog and Digital I/O
The digital I/O points have a 100K
Ω
resistor to ground to prevent floating inputs.
The analog inputs have a 560
Ω
resistor in series to afford some protection to the A to D
converter.
From input
To cpu input
From analog input
To a/d input