1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PIC16F84A + 4017 Decade Counter + audio question

Discussion in 'Microcontrollers' started by Peter_wadley, Apr 8, 2007.

  1. tdg8934

    tdg8934 New Member

    Joined:
    Oct 15, 2006
    Messages:
    147
    Likes:
    0
    Location:
    Somerset, KY
    Transistor drivers vs IC drivers.

    On the cathodes I use ULN2803 chips (pos in to the ULN2803 provides neg out ot the LED cathodes).

    I had been using PNP transistors / resistor circuits on my LED anodes (neg in to the transistor provides pos out into the LED anodes).

    However, after reading this thread more yesterday, I see that a UDN2981 is a good substitute for the PNP transistor / resistor circuits. I ordered some samples from Allegro Microsystems Inc. yesterday.
     
  2. Peter_wadley

    Peter_wadley New Member

    Joined:
    Mar 20, 2007
    Messages:
    376
    Likes:
    1
    Yes, the ULN2803 chips is the one I was going to get today.

    Will the chip reduce the amount of resistors in my circuit?

    Right now I have 16!

    8 to bias the transistor from the 4017 outputs and 8 to limit current on the HIGH outputs of the PIC...

    Does the ULN need resistors? I dont want to burn it out..

    So that should take care of the first 8.. is there a way bring the other 8 down with out making the LEDS lose brightness.. well I know there will be some brightness lost when they are all on..

    Thanks tdg,
    Peter W
     
  3. tdg8934

    tdg8934 New Member

    Joined:
    Oct 15, 2006
    Messages:
    147
    Likes:
    0
    Location:
    Somerset, KY
    Current Limiting Resistors are a must

    The ULN2803 will allow more current to the LEDs that the PIC can not provide. You should have at least 500 ma to an 1 amp or more for your power supply. The resistors are current limiting resistors and they are only for the LEDs.

    LED's will always need current limiting resistors added to them. The lower the value the brighter they will make the LED's appear. However, they also protect the LED's (make them last longer - no burn out) by using higher values like 220 or 470 ohms. I tend to make some sort of allowance and use 10 ohm (probably asking for trouble) to 100 ohm (little more safe) on every collumn or row.

    I personnally believe that you only need to have a current limiting resistor for either every column or every row but you don't necessarily need to have them for both. So if you have 8 rows and 16 columns, I would put them on each of the 16 columns (to be safe) as there are more columns and more resistance to take in in excessive current / voltage. However, I have seen people use it both columns and rows - which you will probably see dimmer LEDs due also to duty cycle (refreshing rates for the LEDs). I think if you use LEDs with higher MCD ratings for brightness this will help too - but this would probably bring cost up too.

    BTW: About LED's needing current limiting resistors, this is generally always the case EXCEPT for custom LED driver IC's which have them internally and use 1 external resistor for adjustment. An example of this would be the MAXIM 7219. The Maxim 7219 works with up to 64 LEDs of individual control and it works well. However, the only problem I have is figuring out how to cascade them in software (haven't quite mastered that yet).

    Good luck.
     
    Last edited: Apr 12, 2007
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Peter_wadley

    Peter_wadley New Member

    Joined:
    Mar 20, 2007
    Messages:
    376
    Likes:
    1

    Thanks and also...

    Does the ULN need resistors? I dont want to burn it out..

    Peter W
     
  6. tdg8934

    tdg8934 New Member

    Joined:
    Oct 15, 2006
    Messages:
    147
    Likes:
    0
    Location:
    Somerset, KY
    Sorry - I was editing my post. See the first paragraph. Short answer no. Resistors are for the LEDs.
     
  7. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Careful Peter, you're getting some sloppy advice.

    If you're scanning columns (only one column is on at any one time) then you'll use current limiting resistors on the row drivers. If you were to put current limiting resistors on the column lines when you're scanning columns you'd get a different voltage drop across each resistor depending on how many LEDs are lighted in that column. Your row drivers are only ever driving a single LED at a time as you scan columns.
     
    Last edited: Apr 14, 2007
  8. tdg8934

    tdg8934 New Member

    Joined:
    Oct 15, 2006
    Messages:
    147
    Likes:
    0
    Location:
    Somerset, KY
    Peter,

    Mike is correct. I failed to mention more specifically it refers to what is not being scanned. In most cases the columns are scanned so the rows would get the current limiting resistors as Mike stated.
     
  9. ClydeCrashKop

    ClydeCrashKop Well-Known Member

    Joined:
    Apr 28, 2005
    Messages:
    1,018
    Likes:
    171
    Location:
    Florida
    Just a thought: If you are scanning 8 rows and the LEDs are dim because of a 12.5% duty cycle, could you put a capacitor on each LED before the resistor to hold a charge and keep it lit a little longer?
     
  10. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,203
    Likes:
    640
    Location:
    Derbyshire, UK
    No, where's the current coming from to charge the capacitor? - if you had the excess current capability the LED would take it and be brighter.

    If you need brighter, increase the current - adding drivers if required.
     
  11. ClydeCrashKop

    ClydeCrashKop Well-Known Member

    Joined:
    Apr 28, 2005
    Messages:
    1,018
    Likes:
    171
    Location:
    Florida
    And, you would need diodes to keep from back feeding the rows and columns.
    Not practical.
     
  12. Peter_wadley

    Peter_wadley New Member

    Joined:
    Mar 20, 2007
    Messages:
    376
    Likes:
    1
    Right now I have the 4017 interfaced with the 2803a for the columns (grounds) of the 8x8 matrix.

    The PIC16f84a is sourcing the 8x8 and I have 330:eek:hm: current limiting resitors on each one.

    Thanks
     
  13. quant

    quant New Member

    Joined:
    Oct 24, 2009
    Messages:
    49
    Likes:
    0
    Peter,
    I just finished going through this very interesting thread which was abandoned back in 2007. What was the final outcome? Did you end up with any worthwhile conclusions?

    Also for others, what is the best suggestion for achieving the same now?

    thanks

    Cy
     

Share This Page