Find your password

Circuits : Drivers and output devices

Drivers and output devices

It is impossible to decide on a suitable driver without knowing about the Output device that it is going to drive.

Drivers discussed on this site include:

  • the transistor
  • the darlington driver
  • the transducer driver
  • the ULN2803 octal darlington driver IC
  • 7-Segment decoder drivers
  • the L293D IC motor driver

Some of these drivers can be dealt with very simply.

Electrically, the ULN2803 octal darlington driver IC behaves in exactly the same way as individual darlington drivers. The advantage is simply that is combines eight darlingtons in one IC, which is convenient when using a PIC.

The 7-Segment decoder driver is just a special digital subsystem so, provided a CMOS 4000 device is used, it can be used safely with other CMOS 4000 devices and PICs.

The L293D IC motor driver is compatible with both CMOS 4000 devices and PICs. It provides an output drive current of up to 600mA, more than enough for most output devices in schools electronics.

The Transistor and Darlington driver

The two drivers that are most difficult to understand are the transistor and the darlington driver. They are quite similar (a darlington driver is simply a pair of transistors) so they will be discussed together.

A transistor driver subsystem contains two components:

  • a resistor (labelled Rb in the circuit diagram) which is there to limit the current flowing from the digital subsystem into the transistor driver subsystem
  • a transistor, which amplifies this current so that a much larger current flows through the Output device via the transistor's collector

The key question from a design point of view is:

If we know what the Digital Subsystem is and what the Output Device is, how do we select a suitable resistor and transistor?

Let's start with the resistor Rb. The voltage from the digital subsystem will be close to the supply voltage Vs for a 'digital 1'. The voltage at the base of a transistor that is 'on' will be close to 0.7V. So the voltage across Rb is Vs - 0.7.

The maximum current (which we will call Ib, the base current) that can be taken from the digital subsystem depends on whether it is a CMOS 4000 IC (which can provide up to 160mA) or a PIC (3mA).

So now we can use Ohm's law to work out Rb.

For example, suppose that the digital subsystem is a PIC, operating at a supply voltage of 5V, then Ohm's law applied to Rb gives:

Rb = V / I = (5 - 0.7) / 0.003 = 4.3 / 0.003 = 1,433W.

The nearest E12 value to this is 1k5.

If the digital subsystem is a CMOS 4000 device, operating at a supply voltage of 5V, then Ohm's law gives:

Rb = V / I = (5 - 0.7) / 0.00016 = 4.3 / 0.00016 =26,875W.

The nearest E12 value to this that allows a safety margin is 33k.

If the supply voltage for the CMOS IC is higher than 5V then Ib will be larger, but the IC will be able to provide more current.

a darlington driverA darlington driver (or darlington pair) consist of a pair of transistors. The only difference to the way in which Rb is found is that now the voltage between the base and the emitter is actually the combined value for the two transistors i.e. two lots of 0.7V = 1.4V.

So the voltage across Rb is Vs - 1.4.

If the digital subsystem is a PIC, operating at a supply voltage of 5V, then:

Rb = V / I = (5 - 1.4) / 0.003 = 3.6 / 0.003 = 1,200W (which happens to be a preferred value already).

The same approach for a CMOS IC gives a preferred value for Rb of 22k.

So we can reduce all this to a simple 'recipe':

Suitable Values for the Base Resistor (Rb)

For a Transistor Driver

For a Darlington Driver

Using a PIC Using CMOS 4000 Using a PIC Using CMOS 4000
1k5 33k 1k2 22k

We can make the recipe even simpler if we are happy to accept up to a third less current from the darlington:

Suitable Values for the Base Resistor (Rb) for a Transistor or a Darlington Driver
Using a PIC Using CMOS 4000
1k5 33k

How do we select the transistor (or darlington) itself? We first need to find the voltage and the current that the Output device requires (usually from the supplier's catalogue or a data sheet).

The voltage between the emitter and the collector of a transistor (or darlington) that is 'on' is very small, less than 0.1V. So the voltage across the Output device is equal to Vs. So we choose the supply voltage Vs to be the voltage needed by the Output device.

Note that the voltage supply Vs for the Output device does not have to be the same as the voltage needed by the Digital subsystem or other parts of the system. It's convenient if it is, but it's not necessary.

Vs can be completely separate if necessary, and can be higher or lower than the voltage supply to the rest of the electronics.

This deals with the voltage needed by the Output device. What about the current?

The current in the Output device is the same current that flows into the collector of the transistor. The transistor amplifies the current that flows into its base from the digital subsystem by a factor that is called the current gain of the transistor. The amplified current flows into the collector. In catalogues and data sheets the current gain is referred to as hFE. If a range of values is given for hFE, always use the minimum value quoted because this will be the worst case.

The transistor (or darlington driver) must be chosen so that the current from the digital subsystem flowing into its base, multiplied by the transistor's current gain, is more than the current needed by the output device.

There is a second important limitation on the transistor. There is a maximum current - Ic(max) - that a transistor can carry before it is damaged.

The transistor (or darlington driver) must be chosen so that the current needed by the output device is less than Ic(max).

There are thousands of transistors available. The cheapest transistor that fulfils both these conditions is 'best'. In practice, it is simplest in schools to stock a small range of transistors and darlingtons that can cover all likely needs. Here are some drivers widely used in schools:

Type Device Cost hFE (min) lc (max) Notes Drawing(pin-out)
Transistor BC237B 3p 200 100mA  
TO-92(C)
Transistor BC184 3p 250 100mA  
TO-92(C)
Transistor BC337 4p 100 500mA  
TO-92(C)
Transistor 2N4401 5p 150 600mA  
TO-92(B)
Transistor BC108 9.5p 200 200mA Obsolete
TO-18
Darlington BC517 14p 3,000 1A  
TO-92(C)
Darlington ZTX600B 23p 10,000    
E LINE
Darlington ULN2803 33p 1,000   8 in one IC 
IC DIL 18

ULN2803

Note that the drawings show the view from below (the pin side).

The prices are typical for quantities of 100 or more.

Let's look in detail at one example:

 The BC237B transistor
If the digital subsystem providing the current into the base is a PIC, then this current must be limited to 3mA. Based on the quoted hFE, the maximum current through the output device must be 3 ´ 200 = 600mA. However, this allows no safety margin. In fact, when a transistor is being used as a switch, the current gain is less than the quoted hFE, and we need to allow a safety margin of at least two. So, based on the hFE value, the maximum current would be 300mA.

However, Ic(max) is 100mA.

The current needs to be limited to the lower of the currents found from hFE and from Ic(max).

So, for a BC237B transistor connected to a PIC, the maximum current in the output device must be less than 100mA.

Using this approach, we can find the maximum current that can flow through the Output device, for each of the above transistors or darlingtons, when the digital subsystems is a PIC or a CMOS 4000 IC:

Type Device Cost Max current with a PIC Max current with CMOS 4000
Transistor BC237B 3p 100mA 16mA
Transistor BC184 3p 100mA 20mA
Transistor BC337 4p 150mA 8mA
Transistor 2N4401 5p 225mA 12mA
Transistor BC108 9.5p 150mA 8mA
Darlington BC517 14p 1A 240mA
Darlington ZTXX600B 23p 1A 800mA
Darlington ULN2803 33p 500mA 80mA

The reason why the BC108 is included in this list is that it is widely referred to in school textbooks. Unfortunately, this is an example of schools following a recipe without appreciating that technology has moved on in the last 30 years. As is clear from the table, the BC108 is no better than other transistors costing less than half as much. The BC108 is obsolete and can be safely replaced by cheaper alternatives e.g. the BC337 has the same performance, is less than half the cost of a BC108 and has the same pin arrangement.

For low current applications the BC184 is cheap and effective. The BC237B is almost identical and is used in Control Studio.

For higher currents a darlington driver is needed. The BC517 is inexpensive and will cover almost all requirements. The ZTX600B provides a higher current with CMOS if necessary and is used by Control Studio. The ULN2803 (which contains eight darlingtons in one IC) is convenient and cost effective if more than one darlington is needed.

Going beyond the limits

What would happen if a circuit is used with, say, a CMOS 4000 IC feeding a transistor driver and the resistor Rb is less than the value given above? Because of manufacturing spread, the chances are that the IC would be able to provide more current than the bare minimum guaranteed by the manufacturer and so the current in the output device could be higher.

Even if the CMOS IC was just on the edge, the chances are that the transistor's hFE would not be at the minimum, so again, more current could flow in the output device.

Unfortunately, many circuits in magazines and textbooks have been 'designed' in this dangerous way. The only way to be sure that circuits will always work is to design them using 'worst case design', not trial and error.

These are the details: