Connect with us

pic outputs to ULN2003A

Discussion in 'Microcontrollers, Programming and IoT' started by lefteris_, May 19, 2013.

Scroll to continue with content
  1. lefteris_

    lefteris_

    2
    0
    May 19, 2013
    Hello!!

    I' ve build a digital clock with 4 7-seg digits wich are driven by a pic 16F84.
    What i wanted to do was to replace each segment of the digits with led strips using the ULN2003A chip.But i have problems with the signals of the segments.
    I read that i have to use some pull up or pull down resistors but i dont know how.

    In the schematic i have removed the resistors R1-R7

    Any help?

    Thank you in advance!
     

    Attached Files:

  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,496
    2,837
    Jan 21, 2010
    One of the problems you will face is that the ULN2003 chip inverts the signal from the PIC.

    You need to place something to invert the signal between each output of the PIC and the corresponding input of the ULN2003.

    Another issue you might have is that the voltage required for your LED strips may be higher than the PIC supply. This will (at the very least) require you to do something a little different with the 4 digit drivers.
     
  3. lefteris_

    lefteris_

    2
    0
    May 19, 2013
    This why im using the uln2003 chip the suply voltage is 12v and the regulator outputs 5v for the pic only, the led stips are conected to 12v and im using the ULN2003 as a switch!
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,496
    2,837
    Jan 21, 2010
    That's fine for the row outputs, but the column drivers need to switch the other side (i.e. the +12V). You'll need level converters for this.

    Also since the two transistors will drop a couple of volts between them, you might need to run your LEDs from a 14V supply.

    In addition, they're multiplexed (only on 1/4 of the time) so you may want to ensure they operate at a higher than normal current to get the brightness you're used to when operated from a DC supply.
     
  5. gorgon

    gorgon

    603
    24
    Jun 6, 2011
    For the digit driver transistors, you'll need to replace the single resistor with a resistor divider. To get the correct operation you'll need to calculate the base voltage when the driver is off, to be close to Vsupply for the LEDs. One way to do this is to add a zener diode in the divider, with a value slightly higher than the difference between the Vcc(5V) and Vsupply(12V?). for this combination, I would have used a 7V5 zener, and 2k2 BEresistor and 3k3 on the pic output in series with the zener. The resistor value depends on the Hfe and Ic of the transistor, and you may need to reduce the 3k3 to a lower value.

    To drive the ULN2003 you only need to invert the segment outputs in the program.
     
    Last edited: May 20, 2013
  6. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-