Using Arduino Due's DAC0 to create a variable intensity LED driver

I am using Arduino Due's DAC0 to create a variable intensity LED driver.
The post "Rapid Prototyping Analog circuitry without a multimeter or an Oscilloscope" shows how I quickly prototyped, tested and ploted waveforms from a variety of test points without using an oscilloscope or multimeter.
The 4 pictures below are an output from my setup. The top left picture is for the circuit below.

Configuration "A"
3.3V - 20 Ohms - RedLED - (C)2N2222A(E) - Gnd
|(B)
10K
|
DAC0
Blue is the DAC0 input counter value
Green is the DAC0 pin as measured by A9
Red is the 2n2222 collector voltage as measured by A7
Yellow is the 2n2222 base voltage as measured by A8

I extended this analog amplifier to control multiple LEDs as shown below.
The PWM inputs are switched "Low" one at a time (They are "active low").
The plots for Red Grn and Blue are the pictures at the top right, bottom left and bottom right respectively.

Configuration "B"
PWM3
|
1K
|(B)
3.3V - (E)2N2907(C) - 20 Ohms - GrnLED +
….. +
3.3V - (E)2N2907(C) - 20 Ohms - RedLED + (C)2N2222A(E) - Gnd
|(B) |(B)
1K 10K
| |
PWM2 DAC0

Notes:

  1. 4096 is effectively 3.3 V; 0 is effectively 0 V
  2. Green tracks but does not equal Blue because page 1059 of SAM3S datasheet lists the voltage range of the DAC is from (1/6) x VADVREF to (5/6) x VADVREF.
  3. As seen by the collector voltage, Red has a large linear control range; green less and Blue not much at all.
  4. If I use the Blue LED in Configuration "A", its plot is essentially the same as Configuration "B".

Questions:

  1. How can I improve Green and Blue's control range?
  2. The second picture shows the RED LED's collector voltage. It is visibly "ragged" and you can see the intensity "jump" as I increment Dac0. How can I smooth out the response so that it is more linear?

Thanks

Screen Shot 2013-08-20 at 6.18.08 PM.png

It's likely that your NPN transistors are acting like switches. If you want to use a DAC output and have linear control, I recommend using an emitter-follower configuration, something like option B on this page: transistors - Why would one drive LEDs with a common emitter? - Electrical Engineering Stack Exchange. Either that or use straight PWM control of duty cycle.

VCC - RedLED - (C)2N2222A(E) - 20 Ohms - Gnd
|(B)
10K
|
DAC0

Attached are the charts for Red, Blue and Green LEDs (left to Right) with VCC at 3.3 (top row) and 5V (btm row) for the suggested emitter-follower configuration. Yesterday's common emitter gives greater range and linearity. I suspect this is because the base was able to get above the .7 V Base-emitter barrier sooner.

I am happy to try any other ideas however. Suggestions?

A Note:
I am using the design for for medical light absorption measurements that are multiplexed in the millisecond range. So I believe that this prevents use of PWM (due to the millisecond changes). Also, I believe that I cannot bias the base and plop a capacitor between Dac0 and the base due to the multiplexing. Is this so?

Thanks.