HD8: Bidirectional points used as outputs

The adjacent picture illustrates three of the four bidirectional I/O points connected to some typical output loads. When an output is ON it connects the I/O pin to 0V via a Darlington transistor.
The connector is wired to the 4 bidirectional I/O pins. Each connector also has a "convenience" pin connected to power supply positive (as well as one for 0V, which is used for inputs. The output load should always be connected between the output pin and power supply positive. Use the +Supply convenience pin on the I/O connector in preference to wiring directly to the power supply +.
CAUTION: Take care never to short an output pin to the positive common pin. If the output is on at the time you will blow up the output chip instantly!
The loads illustrated are:
A: The input pins of a solid state relay. Note the polarity!
B: A relay coil. Notice we have included a catch diode across the coil. While there are diodes on the board we recommend a diode across the coil, as close as possible to the coil, to minimize problems with switching noise. A suitable diode is a 1N4001 or similar 1A/50V rectifier diode.
C: An LED, with a series current limiting resistor. Resistance calculators
The (digital) outputs are implemented using the ULN2803A, a chip that contains Darlington transistors. 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.
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.
Maximum allowable output current
The HD8 uses a ULN2803A chip. This contains 8 Darlington transistors. The transistors are connected in parallel pairs to provide 4 outputs. Each output pair is capable of handling more current than a single transistor, but not twice as much. This restriction is due to imperfect current sharing between 2 parallel transistors. The chip data sheet does not contain enough information to allow accurate prediction of how well the transistors will share the current, so the following ratings are based on what we believe to be a conservative estimate of the chip's capabilities.
The maximum allowable output current is 870mA steady state, with brief (100mS) peaks of 800mA 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:
- All 4 outputs conducting the same current
- The allowable current concentrated in a few outputs.
Equal currents
The following table lists allowable current versus ambient temperature, when all 4 outputs of the HD8 are conducting the same current at once:
| Temperature | Allowable current per output |
|---|---|
| 25°C | 365mA |
| 40°C | 320mA |
| 50°C | 290mA |
| 60°C | 260mA |
| 70°C | 225mA |
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 |
|---|---|---|---|---|
| 25°C | 870mA | 250mA | 0 | 0 |
| 40°C | 870mA | 0 | 0 | 0 |
| 50°C | 805mA | 0 | 0 | 0 |
| 60°C | 730mA | 0 | 0 | 0 |
| 70°C | 650mA | 0 | 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 ambient operating temperature for the ULN2803A chip is 70°C.
If you feel like doing the actual sums, here's the procedure.
- For each output, calculate its output voltage drop from the formula
V(out) = 0..88 + 1 * I(out) [ I(out) in Amperes ] - For each output calculate the dissipation in watts from the formula
P=V(out) * I(out) - Add up all the dissipation figures to give P(tot) in watts
- Calculate the maximum allowable ambient temperature from the formula
Ta(max) = 125 - P(tot) * 55 - If you get an answer over 70°C then use 70°C
This calculation allows for the fact that the current is split between 2 transistors with imperfect current sharing.
This calculation aims at a maximum internal (junction) temperature of 125°C, which is the maximum rating of the chip. There are 2 things to keep in mind with this:
- A semiconductor will not suddenly die if you exceed the temperature rating by a modest amount
- As a rule of thumb, every 10°C reduction in temperature doubles the life-time (halves the failure rate).
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.
Note: This discussion pertains to the maximum operating temperature for the ULN2803A output chip only. See HD8 Operating temperature ratings for a further discussion.
How to blow up the outputs
Here are some of the ways you can blow up the outputs:
- Connecting the output pin directly to the positive supply voltage (or to any other voltage source capably of delivering more than the output current rating)
- Connecting the output pin to any negative voltage
- Connecting the output pin to any voltage greater than the positive supply.
- Switching a 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.
- Using 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.
- Driving an incandescent lamp. Incandescent lamps draw a warm-up surge current of many (up to 20) 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) | |
| 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.
