Shop OBEX P1 Docs P2 Docs Learn Events
How many devices can an output pin drive? — Parallax Forums

How many devices can an output pin drive?

henrytjhenrytj Posts: 90
edited 2013-04-09 17:31 in BASIC Stamp
Building my photography flash unit controler project. Bought several uln2003 to drive the photo flash unit sync circuits. But, considering putting in some indicator LEDs to show which output flash were sent the sync signal. But there aren't enough pins to have seperate pin outs for the photo flashes, and seperate pin outs to drive LEDs (one per flash unit.) Can one output pin drive two uln2003s? Since they were so cheap (like 50-cents) I bought several (like 5 of them) just to make sure that the shipping cost did not exceed the product.

The uln2003s are really great and simply the cirtuit considerably. (unless I'm missunderstanding how they work.) Will find out soon enough.

Henry

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-04-03 17:22
    To figure this sort of thing out, you look at the datasheets. The BS2 Stamps use a PIC16F57 microprocessor and the I/O pins are rated at 25mA with an aggregate limit of 50mA for each group of 8 (P0-P7 and P8-15). The ULN2003 inputs have a maximum input current on the order of 1mA, so you theoretically could drive 20 ULN2003 inputs from a single Stamp output. In practice you add a big slop factor, so you can certainly drive all 8 inputs of a ULN2003 from a single I/O pin, maybe as much as two ULN2003s. If you want to drive two ULN2003s, you would need to put the 2nd one in the other set of 8 I/O pins. With LEDs, you have to choose the series resistor properly. Most LEDs have a maximum current of 20mA, but are typically operated at 10mA or less. If you operate the LED at 10mA, you could also drive several ULN2003 inputs and an LED from the same I/O pin. The series resistor value depends on the materials used to make the LED which also determine the color. For a standard red LED, a 330 Ohm resistor will limit the current to 10mA. A group of 8 I/O pins could handle 2 LEDs at that current plus 2 ULN2003s (16 inputs with some in parallel). Note that you can operate most high brightness red LEDs at 1mA and still get a respectable light output.
  • henrytjhenrytj Posts: 90
    edited 2013-04-09 17:31
    Mike Green wrote: »
    To figure this sort of thing out, you look at the datasheets. The BS2 Stamps use a PIC16F57 microprocessor and the I/O pins are rated at 25mA with an aggregate limit of 50mA for each group of 8 (P0-P7 and P8-15). The ULN2003 inputs have a maximum input current on the order of 1mA, so you theoretically could drive 20 ULN2003 inputs from a single Stamp output. In practice you add a big slop factor, so you can certainly drive all 8 inputs of a ULN2003 from a single I/O pin, maybe as much as two ULN2003s. If you want to drive two ULN2003s, you would need to put the 2nd one in the other set of 8 I/O pins. With LEDs, you have to choose the series resistor properly. Most LEDs have a maximum current of 20mA, but are typically operated at 10mA or less. If you operate the LED at 10mA, you could also drive several ULN2003 inputs and an LED from the same I/O pin. The series resistor value depends on the materials used to make the LED which also determine the color. For a standard red LED, a 330 Ohm resistor will limit the current to 10mA. A group of 8 I/O pins could handle 2 LEDs at that current plus 2 ULN2003s (16 inputs with some in parallel). Note that you can operate most high brightness red LEDs at 1mA and still get a respectable light output.

    Thanks. Coming to realize just how rusty my electronics knowledge is. Used to hobby when young, but that was 30 years ago.
Sign In or Register to comment.