Hi, I am working on a design that involves a 10 LED bar graph and I am trying to decide on the best approach. Thought someone could provide some input.
My main concern is price and size with size being more important.
This is what I am considering.
All options need room for resistor network and are SMD variants except for Bar graph and resistor network unless I use individual resistors which might better and can fit under the bar graph
8pin Attiny + Shift register
20pin Attiny + Direct to Led
328p + direct to led
Which option you think would be best? Space wise the 20 pin Attiny may take more space than 328p but the Attiny could allow for more routing room.
That's an idea and cheaper than the MAX7219. I think I may have to make my PCB larger. I am using the smallest of the Dangerous Prototypes Square Sick of beige stand PCB sizes.
If you start leaning towards the TLC5940, I suggest going through the power calculation sooner rather than later. I believe the two chips control current in a fundamentally different way. The TLC5940 (sort of) works like a resistor; it dissipates the excess energy as heat.
Thanks, I wasn't going to use PWM, but now that I think about it, it would come in handy. Hmm. I will check out the specs on the IC. Too bad I can't use a smaller 8pin Attiny since I need I2C and enough pins to talk to the TLC5940.
I think you need a minimum of five pins for the TLC5940: GSCLK, SIN, SCK, BLANK, XLAT. GSCLK has to be driven by hardware; either a timer output or CLKO.
I should also mention the common driver eats two timers (1 and 2 on the 328 processor). There is an alternative driver that uses one timer and CLKO. I'm working on a version that uses no additional timers (dovetails with timer 0 / millis) but it won't be ready for a while.
Given your original constraints, the TLC5940 is looking less and less desirable.
Hmm tough call. Maybe if I use the 328p directly and use the 6 PWM that might work. The top 4 i can probably due without PWM. I have to play with different PCB sizes and see what fits, how it looks and cost.
Thanks for the input, more things to think about, haha.
In the past I have used a PWM Pin through a basic R/C low pass filter to drive a LM3916 vu meter IC - its a chip that is purpose designed to drive a 10 led bar graph based on an analog input.
There are lots of examples of LM3916 circuits on your favorite video site if your not familiar with the chip