I needed a way to switch several low-power isolated 12V loads with an Arduino.

There didn’t seem to be any shield with quite the requirements I had in mind:

  • Eight isolated outputs
  • Each output switched to one of two common lines (designed for 12V and GND)
  • Fits standard Arduino shield size and layout

So I had to design my own. I didn’t want to take up eight outputs of the Arduino, so I elected to use a 74259 addressable latch to interface between the Arduino and the relay driver. The latch reduces the number of required Arduino outputs from eight to five. The 74259 takes a three-bit address selection (S0-S2), and data (D) and enable (G) inputs. The 8 individual outputs go through a ULN2803 darlington driver that switches the relays on/off.


To switch an individual output on/off, the Arduino simply needs to:

  1. Bring the enable (G) input HIGH
  2. Choose the output using the S0-S2 address lines
  3. Set or clear the data (D) input as required
  4. Re-assert the enable (G) input LOW

So it’s actually a pretty simple circuit. I was tight fitting everything onto the Arduino form factor, and I pretty much immediately jumped to getting a two-layer board fabbed through OSHPark rather than trying my usual approach of a quick single-layer hackspace-etched PCB first.

This was an expensive mistake, as I’d got a package size wrong. The ULN2803 doesn’t come in the narrow SOIC package I’d chosen. In order to save the three boards I’d got made from going in the bin, I used the seven-output ULN2003 instead. For the remaining output, I glued a SOT23 breakout board to the PCB with a MOSFET and tacked on a back-EMF diode and some wires.


They all work, and I’m pretty pleased with how the relays look together with the terminal blocks. Gives the board an excitingly functional look.

Eagle files (with ULN2083 package fixed) provided.


This entry was posted in Electronics and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s