I have a question regarding the use of NPN transistors in an RGB LED (common anode) circuit connected to an Arduino Uno. I have spent the past several months developing LED color control software that communicates over serial to an Arduino board, which then produces color in LEDs over three PWM pins (a fairly common setup). I am now ready to install 10 LEDs instead of the single LED I was using during the testing process. I came across this Fritzing diagram in a solution, and have built the circuit with my NPN transistors and two LEDs to start.
Here are my issues:
Typically in common anode setups, writing a value of 255 to a PWM pin indicates OFF and writing 0 is full brightness. These controls seem to be inverted now with 0 being OFF. Is this normal behavior?
The brightness steps are out of control. Writing 1 to a RGB pin creates a fairly bright light, and anything above 3 is maximum brightness. For my color reproduction to be effective, I need at least 100 brightness steps as I had in my previous setup where only 1 LED was used and no NPN transistors were in the circuit.
Have I overlooked some aspect of NPN transistor electronics? I definitely am in need of guidance. I have only gotten into LED electronics recently and have a lot of learning to do.
Fundamentally, I need a circuit that will allow 10 common anode RGB LEDs to be controlled as a group by three Arduino PWM pins.