It works fine but the PWM from the uno or duemilanove's resolution isn't high enough so I'm using the Texas Instruments TLC5940, Arduino Playground - HomePage to get 12 bits.
But it turns out the TLC5940's channel PWM is a current sink and the LDD-H requires a current source. Is there a way to make the TLC5940's signal a current source with an added component?
EDIT: All that complicated transistor stuff removed, I think a 1K? pullup resistor between VCC and the TLC5940 output / Meanwell input is all you need?
Disclaimer: I'm not an EE, just a newbie that knows enough to be dangerous.
Thanks.
Using a combo of pnp transistor and a pull down resistor works.
And using timer1 works as well. It's not as smooth lighting transition as using the TLC5940.
If I need more than 2 channels, I'd probably use a 12bit I2C pwm driver from adafruit.
The transition is only noticeable in low brightness.
That makes sense, as the DAC control is linear whereas your eye's response is nonlinear and ratiometric, more able to detect differences in intensity at lower light levels.
Think about it - 1 bit change in brightness at 1000 bits out of 4096 is a lot lower change than 1 bit change out of, say, 10 bits out of 4096.