New Arduino Project

I finished one of my first Arduino projects last night.  It isn’t terribly exciting to watch, but it employs a number of things that will be invaluable in future projects.  Basically it cycles a large, seven-segment LED display through the numbers 0-9.  Yes, any digital clock can do that, but that wasn’t the point.

The first obstacle when driving large LEDs or motors from the Arduino is power.  The Arduino outputs are only 5 volts at a maximum of 40 milliamps.  While this is fine for driving single, small LEDs, it is not enough for larger loads.  To overcome this, it is common to use a transistor as a switch — using a small current from the microcontroller to turn on a larger current.  Since I have several devices to control all at once, up to eight displays with seven segments each, I used a couple of integrated circuits which contain a number of transistors in a small, convenient, inexpensive package.

For this project, I used a UDN2982A for the anodes and a ULN2003A for the cathodes.  The LED displays are common-anode, so I really only needed one of the eight available channels on the 2982 and could have used a single transistor instead.  Also, since I only have one display, I could have omitted the transistor on the anode completely by wiring the common anode directly to my 12V source.  However, since this is simply a proof-of-concept for a larger project, I used transistor arrays on both ends.  The larger project will include up to eight displays, so I will need to control both the anodes and cathodes for multiplexing purposes.

Here is a photograph and a schematic.  This was my first time to use TinyCAD as well, so please excuse my drawing skills.

Arduino Prototyping Board with Second Breadboard and Digit in Background

TinyCAD Schematic

The video is on YouTube: Arduino – Seven-Segment LED Display Test

Finally, here is the source code: SevenSegTest.pde

  1. Very good blog..What are other alternative for UDN2982A? I can’t find that IC.ty 😛

  2. Thanks for the comment. I can’t believe you found this old blog. Perhaps I should update it sometime. I checked Digikey and couldn’t find the UDN2982A either. In fact, it seems that DIP ICs are getting hard to find. The closest substitute I found is the UDN2987, but you will need to compare the datasheets to see if it will work for your application. It is also surface-mount instead of DIP, unfortunately. Good luck with your project!

  3. Thanks Jason,

    I’m doing the same setup, powering a huge seven segment display but due to arduino current limitations i need to put a transistor similar to your post. I can’t find the UDN2987 also. In the datasheet of UDN2982A, I find similar model with the same specs. the UDN2981A

  4. I just found the next equivalents for UDN2987:

    I thought it may help…

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>