User`s manual
53
Digital I/O
Output Examples
Controlling an LED
Lets say you want to light an LED while a cable is attached to the tester. In the Set Digital
Output users preference, we can choose to configure one of the outputs. In this case we’ll
choose the output pin 10. For this output pin, we also select Cable Attached to set and Cable
Removed to reset the output.
In this example, our LED requires only 20 mA so we can use the +5 DC volt supply on the IO
port to power our circuit. We use a resistor in series with the LED to limit the current through
the LED.
Pin 9
DC +5 Volts
Pin 10
Output
Resistor
LED
How do you choose the resistor? The LED in this example has a forward bias voltage drop of
two volts; therefore, we that three volts must drop across the current limiting resistor. Knowing
voltage drop and current through the circuit we can use Ohms Law to determine the resistor
value.
R =
V
I
=
3 Volts
0.020 Amps
=150 Ohms
When the cable is attached, the tester will pull the output to ground allowing to current to flow
in the circuit and the LED to light. When the cable is removed, current though the output will
stop and the LED will turn off.
Turning on a Light
Lets say that instead of an LED you want to turn on a light bulb powered from a 120 Volt AC
wall outlet. A relay can be used to control the light bulb. In this example, we select a relay that
has a coil voltage of 12 volts and draws less than 100 milliamps so we can use the +12 volt DC
power supply on the tester. The relay circuit is as shown.
Pin 6 Output
Diode
Relay
Pin 12 +12 VDC
A diode such as a 1N4002 is added across the relay to protect the IO port from the reverse
current created from the coil when the output turns off.