Professional Electronics Engineer with a specialism in EMC.

MCP23017 and ULN2803

In a previous post, I talked about the MCP23017 and MCP23018, and why in my case the MCP23017 was a better device for my use in this case (this case being my Remote control K9).

The MCP23017 can only output a digital high of the same voltage as VDD, which is capped at about 5 VDC (the exact value will be in the datasheet). However, I want to drive incandescent bulbs, which require about 12 VDC to illuminate them, so to drive these I will be making use of some ULN2803s:

MCP23017 and ULN2803 minimal connections
MCP23017 and ULN2803 minimal connections

The ULN2803A device is a 50 V, 500 mA Darlington transistor array. The device consists of eight NPN Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching inductive loads. The collector-current rating of each Darlington pair is 500 mA. The Darlington pairs may be connected in parallel for higher current capability.

Applications include relay drivers, hammer drivers, lamp drivers, display drivers (LED and gas discharge), line drivers, and logic buffers. The ULN2803A device has a 2.7 kΩ series base resistor for each Darlington pair for operation directly with TTL or 5-V CMOS devices.

ULN2803 Datasheet

This 500 mA at up to 50 VDC compares with the MCP23017s 25 mA at 5 VDC.

In the image to the right, I show the two devices connected together with just channel GPA0 connected to 8B (Base), and a brushed DC motor is connected between 12V DC and 8C (collector).

ULN2803 internals
ULN2803 internal circuit

Internal to the ULN2803 is a darlington pair, a flyback diode and some support passives for each channel. the flyback diode is to protect the components when using the device with inductive loads, such as motors, coils, or relays.

In this instance I am using the ULN2803 to switch on and off 12 x 12 VDC incandecint bulbs mounted in switches.

I am going to use two ULN2803s driven by one MCP23017. This will give me 16 channels. I could use low side switching with a single N-FET of a darlington pair made up of descreete components, however this component makes the circuit much simpler.

The ULN2803 is very simmiler to the ULN2003, but has eight outputs rather than seven.

In a future post I will put this all together with an Arduino and a 3D printed button enclosure.

Leave a comment

Your email address will not be published.

11 thoughts on “MCP23017 and ULN2803”