Wednesday, May 16, 2012

Simple Labs' Quick Start Kit for Arduino - Interfacing IC ULN2003 - Darlington Pair Transistor Array - How To?

IC ULN2003 - Darlington Pair Transistor Array

In our last example of the first part, we saw how to use a transistor to trigger a buzzer. What if we had more than one buzzer? We can't be setting up multiple transistors as that would get hectic. IC ULN2003 has an array of transistors built inside it and these transistors can be used very much like our regular transistor. The ULN2003 has 7 darlington pairs of transistors inside it. A darlington transistor pair is a cascading transistor setup that given an increased amplification. (Click Here to Read more on Darlington Pairs) Each of these pairs can drive a device and can be controlled individually.

We hope you have kept the basic breadboard setup intact and removed everything else from the previous experiments.  Here's how your breadboard should look now.

Basic Breadboard Setup

Pin Diagram of ULN2003 / COM is +5V in our case

Place the ULN2003 IC as shown. The Top of All ICs is marked by a notch. The Pin to the LEFT of this Notch is the first pin of the IC. For Some IC's there will be a small dot next to the first pin.

Connect a wire from the '-'ve terminal to the 8th pin of the IC
Connect a wire between the 9th pin of the IC to the '+'ve terminal
Now Connect the Positive of the Buzzer (the Red Wire) to the '+'ve terminal and the Negative of the Buzzer to the 16th pin of the IC (OUTPUT 1)
Connect a Wire from GND on the Arduino to the '-'ve Terminal of the Breadboard
Connect a Wire from the 5V pin on the Arduino to the '+'ve terminal on the Breadboard

Connect a Wire from the 7th Pin of the Arduino to the 1st Pin of the ULN2003 [the Input1 Pin]
Here's how your final set up would look like!
Try the following code. A simple program - call it an audio_blink ;) [ULN_Buzzer.ino]
ULN2003- Buzzer
This program drives a Buzzer using ULN2003 

void setup()
void loop()