I'm working on a project that is used to monitor how many parts I have left in my cupboard of bits.
There are 5 separate parts whose level I want to monitor, each part will have 3 LEDs to display the stock level. I'm planning to use bi colour LEDs (L-59EGW-CA) in the following configuration:
I will be using 15 LEDs in total (3 per part x 5 parts). I'm planning to drive the circuit from an ATMEGA328P (Arduino UNO) and will have an Up/Down increment pushbutton for each part (5 up, 5 down in total)
I started to design a circuit for the system and came up with the following (Please bear in mind this is just a representation of the circuit, I'm aware there is not enough outputs etc.)
The ATMEGA328P goes through the decoder to the transistor array which switches the LED on. Now this would be good, if I only had 1 part. I've realised that because I have 5 parts I can't have multiple channels on the decoder on simultaneously. For example, in my diagram I want both the LEDs to be on, however they're for different parts so I can't just common the cathodes together.
After a long introduction here's my actual question:
1. Is it possible to have multiple outputs of the decoder on simultaneously?
I was thinking that if in the arduino code I kept switching between the decoder channels (and allowing for prop delay) then I could light the LEDs however they'd be dimmer due to a PWM type effect
2. After my input pushbuttons I have 10 digital pins left over for the 5 different parts. Is there another way to do the LED sequence using only 2 pins?
I've had a go using just 2 pins, I had to change to using a common cathode bi colour LED as opposed to a common anode and it uses 3 chips and a diode. It also means that I can only have 1 flashing red LED rather than 3.
Would this work, and is there a simpler way of doing this?
If you think I'm being a complete tool and that there's a better way then let me know
Sorry for the massive wall of text guys.
I am not using just 3 LEDs I've stated in the question that I'm using 15 and that the schematics are a representation as to not clog it all up