Handy Tips - ULN2003 High Power Driver
Why use another chip to control outputs? Well the answer to that is
that the PIC can only supply up to 25mA. This is fine for
logic levels, and even small devices like
LED's, but you can't drive
a
relay, motor, piezo siren etc with a PIC..
The
ULN2003 is a very cost effective chip that acts like a
switch.
It simply switches an earth to/from an external circuit, and can
withstand a continual 500mA current drain and a maximum 50V. All
this for $0.47 AUD.
Internally the ULN2003 looks like this;

There is only one
power connection, a common
ground (Pin 8). Here's an example of
driving a high power
LED with logic voltages via the ULN2003 (note
the
LED is being driven by a 12 volt source, but controlled by the
logic voltage);

For
inductive
loads, such as motors and
relays,
Pin 9 is connected to the loads +V to shunt back EMF safely.
Using the
same analogy, this chip is my primary choice to controlling external
components, its cheap, effective, and requires no operating
voltages, simply a common ground. Keep in mind that you will have a
voltage drop of about 0.9v-1.0v on the
UL2003 when in circuit.
Where you can get the components;

 | Site Tutorial Index |
|  | 16F PIC Examples |
|  | 18F PIC Examples |
|  | Handy Tips |
| |  | High Power Switching |
| |  | Serial Comms |