Saving a resistor on an NPN transistor current source (sink) when driving LEDs
simulate this circuit &ndash; Schematic created using CircuitLab

This would be a better circuit. It should work fine also if SW1 is replaced actually by 5V CMOS output. There is no need to rely on calibrating each transistor or the stability of beta.