Modification to a microcontroller led driver circuit.

Thread Starter

illusive

Joined Jul 9, 2015
46
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:

Alec_t

Joined Sep 17, 2013
15,117
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.
 

Thread Starter

illusive

Joined Jul 9, 2015
46
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.
 

John P

Joined Oct 14, 2008
2,060
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.
 

Papabravo

Joined Feb 24, 2006
22,081
Last edited:

Thread Starter

illusive

Joined Jul 9, 2015
46
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?
 
Top