Modification to a microcontroller led driver circuit.

Discussion in 'Embedded Systems and Microcontrollers' started by illusive, Sep 4, 2015.

  1. illusive

    Thread Starter Member

    Jul 9, 2015
    46
    0
    Hello,
    I was in a search for a good 20 leds bar graph audio meter and i come across this simple solution with Attiny13.
    http://www.hobbielektronika.hu/forum/getfile.php?id=47842
    But i want to add some kind of glue circuitry on the five outputs/inputs of the microcontroller that drive the leds so i can get more current out. The Attiny13 can output up to 40mA per pin. Also if it is not too complicated i want to add some kind of brightness control.
    Is all of this doable?

    Edit: One more question, can you confirm that the circuit can drive the leds in bar mode and not just in dot mode? Here are the C codes:
    http://m.eet.com/media/1185436/1200...ms_for_linear_and_logarithmic_scales_zip_.zip
     
    Last edited: Sep 4, 2015
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,771
    1,103
    Bar mode would require up to 20 times the single LED current, so the Attiny total output power rating (I haven't checked that) might be exceeded. For example, assuming the micro runs from 5V and you want 20mA per LED you are asking the micro to dissipate up to 2W.
    Brightness control is certainly doable, with PWM.
     
  3. illusive

    Thread Starter Member

    Jul 9, 2015
    46
    0
    That's why i'm not sure how to set the circuit in bar mode and is it even possible. The article says that it can, so i assume it is code related, but i'm new to microcontrollers and i'm not sure what to tweakin the code.
     
  4. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    Current output is 40mA max per pin, but there's also a maximum current rating of 200mA for all pins together. That would be only 5 pins each sourcing the 40mA output, or 10 pins each sourcing 20mA.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    Last edited: Sep 4, 2015
  6. illusive

    Thread Starter Member

    Jul 9, 2015
    46
    0
    Ok thanks for the info. The way the circuit and the code is given, does it operate in bar mode? I mean are for example all the 20 leds turned on when the input signal is at it's max level or is just the twentieth led turns on?
     
  7. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    I aim higher. Google gugaplexing.
     
Loading...