SPLat Logo

XBIO16: Connecting output devices

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

XBIO16: Connecting output devices

XBIO16 Outputs

The adjacent picture shows the two I/O connectors and three typical output devices.

Each connector contains the connections for 8 I/Os. It also has a positive supply connection labeled + and a common return labeled 0V.

In the picture A is an LED with a series current limiting resistor (plain LEDs must always have something in series to limit the current!).

B is a relay coil or solenoid. It has a diode across it to prevent inductive kick-backs from the coil. Although the board has suppression diodes onboard, we recommend external diodes to reduce noise problems. The diode can be a 1N4004 or similar 1A rectifier diode.

C is a solid state relay. Note the polarity labels.

The red arrow lines show the positive current path from the power supply, through the coil load and into the I/O pin, then out of the board and back to the power supply common terminal. It is absolutely essential that you provide the wire from the 0V terminal of the appropriate I/O connector back to the supply. Without that wire the current will try and find a path via the control cable back to the control board, and in the process probably burn out something.

Technical explanation: To prevent heavy switching currents from the load flowing back through the controller and causing noise problem, we have isolated the XBIO16 output ground from the controller ground with a resistor.

The (digital) outputs are implemented using the ULN2803A, a chip that contains Darlington transistors. The onboard indicator LEDs are connected directly to the output pin, and returned to the positive supply via (typically) 10K current limiting resistors.

The outputs consist of transistor switches between the output pin and 0V. When the output transistor is off, a multimeter set to DC volts connected between the output and 0V will measure a voltage slightly less than the positive supply voltage. If you set the multimeter to 200mADC, the output LED will turn on and you will get a reading of approximately V/10 milliamps, where V is the supply voltage.

Take care never to short the output pin to the positive supply voltage. If the output turns on the output chip will be instantly destroyed. This includes never doing it with a multimeter set on a current range.

There are catch diodes built into the chip. This means the board will not be damaged if you are driving relay coils, solenoid valves or other inductive loads (within the ratings of the output). We nevertheless recommend external catch diodes connected directly to the relay coil as close as possible to the relay, in order to reduce adverse effects of switching noise. The onboard diodes also mean that the load must not be connected to a supply voltage greater than the board's positive supply voltage.

If you connect the loads (for example relays) separately to the power supply or to a separate power supply, it may be possible to remove the controller's supply connection and still have power fed to the controller via the loads and the onboard protection diodes. This can produce confusing or possibly even dangerous results if the controller gets enough of this "sneak" power to run. It is safer to use the convenience + supply pin on the connector to provide positive voltage to the load.

The maximum allowable output current is 400mA steady state, with brief (100mS) peaks of 500mA allowed. There is also a limit to how much total current one ULN2803A chip can handle. This relates to the internal heating of the chip.

Let's look at 2 extreme cases:

  1. All 8 outputs on one chip conducting the same current
  2. The allowable current concentrated in a few outputs.

Equal currents

The following table lists allowable current versus ambient temperature, when all 8 outputs are conducting the same current at once:

Temperature Allowable current per output
25C 180mA
40C 160mA
50C 145mA
60C 130mA
70C 115mA

Concentrated currents

The following table shows the maximum allowable currents, when concentrated in a few outputs, versus temperature

Temp 1st O/P 2nd O/P 3rd O/P 4th O/P
25C 400mA 400mA 300mA 0
40C 400mA 400mA 150mA 0
50C 400mA 400mA 0 0
60C 400mA 325mA 0 0
70C 400mA 220mA 0 0

Naturally there are many other possible combinations, but the above should serve as a guide.

The above figures are intended as a guide only. In any event, the absolute maximum operating temperature for the ULN2803A chip is 70C.

If you feel like doing the actual sums, here's the procedure.

  1. For each output, calculate its output voltage drop from the formula
    V(out) = 0.92 + 1.85 * I(out) [ I(out) in Amperes ]
  2. For each output calculate the dissipation in watts from the formula
    P=V(out) * I(out)
  3. Add up all the dissipation figures to give P(tot) in watts
  4. Calculate the maximum allowable ambient temperature from the formula
    Ta(max) = 125 - P(tot) * 55
  5. If you get an answer over 70C then use 70C

This calculation aims at a maximum internal (junction) temperature of 125C, which is the maximum rating of the chip. There are 2 things to keep in mind with this:

Hence, an occasional excursion to, or even above, the rated temperature isn't the end of the world. However, for long life the cooler the better. The ULN2803A data sheet contains additional rating curves.

When semiconductor switches fail they are more likely to become stuck ON than OFF.

On the XBIO16 there are two ULN2803A chips, each one associated with one of the I/O connectors. The above ratings and calculations should be applied separately to each one.

How to blow up a bidirectional I/O circuit

You can blow up the I/O circuits by:

  1. Exceeding output current or voltage ratings.
  2. Connecting the I/O pin directly to the positive supply voltage (or to any other voltage source capably of delivering more than 4-500 mA) and turning (programming) the output ON
  3. Connecting the output pin to any negative voltage.
  4. Connecting the output pin to any voltage greater than the positive supply.
  5. Switching an output load that has a large amount of capacitance, i.e. draws large surge current. This could be the case if you tried using an output to activate some other piece of equipment by switching its DC power on and off.
  6. Driving (output) an AC solenoid or relay coil in place of a DC coil. An AC coil will typically draw 10 to 15 times its rated current if accidentally used in a DC circuit.
  7. Driving (output) an incandescent lamp load rated at more than 10% of the output's peak output rating. Incandescent lamps draw a warm-up surge current of many (up to 15) times their rated steady state current.

After you've blown up the outputs

We have thoughtfully fitted the ULN2803A output chip in a socket for you, so you can replace it without soldering. We can supply a 6-pack of ULN2803A chips. Our product code is ULNx6, and is available on our website. Alternatively you can buy the chip wherever fine chips are sold, including many electronics hobbyist stores.. Here are some supplier names and order codes:-

Supplier Order code
Digikey (USA/International)

Search site

Mouser (USA/International) 511-E-ULN2803A
Altronics (Australia) Z3010
Element 14 (formerly Farnell Electronics) (UK, Europe, Australia, NZ) 705-159, 409-868, 318-7032

The ULN2803A is made by many manufacturers, including Motorola, Texas Instruments, Alegro, Toshiba and ST Microelectronics. You should be able to buy them from most electronic component distributors and even from major electronic hobby stores.

When semiconductor switches fail they are more likely to become stuck ON than OFF.