I’m trying to do a rev-counter for my motorcycle using 32 leds + 4 (for neutral, turn signal…)
The rev-counter will go up to 8000 rev/min, so I’ll use an orange led every 1000 rev/min. A green led will be used every 250 rev/min, and I’ll use red leds between 7000 and 8000 rev/min.
It will look like this:
v v v o (1000 rev/min) v v v o (2000) … v v v o (7000) r r r o (8000)
I wanted to use a max7219/7221 to drive the 36 leds. I saw I could maybe use a shift register, but I’m a bit scared to do the multiplexing myself. I’ll use an attiny 85 to drive the max7219.
The biggest problem is that the leds are not the same color and I want them to be of equal brightness. I bought this pack on ebay (in french sorry).
- Red diffused led : 800 to 1000mcd at 20mA - 1.9 à 2.1V
- Orange diffused led : 600 to 800mcd at 20mA - 2 à 2.4V
- Green diffused led : 150 to 200mcd at 20mA - 1.9 à 2.1V
They are good except the green one which are not so bright even at 15mA (I can’t see if they are shining under direct sunlight). The orange and red leds are bright at 15mA.
I found some bright leds on farnell so I’ll order them and I think that it should solve the brightness problem.
But I’m a bit scared because they’ll maybe be too bright compared to the orange and red leds. I know I can set the delivered intensity of the max7219 using Rset value, but it will be applied on every leds.
Do you think it is possible to add resistors between max7219 and the leds to adjust the brightness ?
An other option could be to do PWM with a small duty for the green leds and an higher one for the orange for example, but I don’t know if I can do PWM if I use a max7219 (I think it should be OK since the scan rate is about 800Mhz if I’m not mistaken).
Do you think the max7219 is good for this usage (driving leds with different colors), or do you know other solutions to solve this problem ?
Thank you very much for reading this and have a good evening