I have two ways to approach this;Can I summarise , see if I have this right.
The FL5150 is expecting a 0 to X linear analog control voltage, and the opto-isolators are as you have seen not linear and not repeatable across temperature and different devices. ( diode forward current /light is none linear , transistor is none linear )
I see you have tried PWM , but that as you have seen , this needs power.
- get the PWM digital signal over the optoisolator to the FL5150 side. Linearity of the optoisolator doesn't matter then. However, choice of load resistor does - it effects switching speed - distorting the PWM signal.
- filter the PWM signal on the controller side, and use the optoisolator to send the analog signal across. This has the benefit of not requiring Vdd from FL5150 at all, but as you say - issues with optoisolator linearity. I can get around this; either use a $3 linear optoisolator, or use a dual optoisolator and assume both are reasonable similar (see previous schematic). But it assumes the FL5150 having 10uA at the DIM Control Pin for EVERY FL5150 I buy - however, the datasheet says it can range from 7-13uA. Which means big differences to the voltage it would see when using a 250k resistor (1.75V for 7uA, 2.5V for 10uA, etc...)
PWM is fine, as it is powered by a separate 3.3V supply for the controller. However, the optoisolator collector pin is connected to the Vdd (5V) of the FL5150 (as it is the only positive '..supply' on that side). It appears trying to source more than 3mA from that Vdd pin, the FL5150 crashes. So I am limited to using a load resistor of around 4.7k. This causes the PWM signal to get distorted, affecting the voltages at lower dimming levels (see below - see the separation between the lower lines are larger than the higher lines)
At the moment, I think I will use the following (maybe with/without the op-amp; I still need to test actual results. It seems to give better results);
Attachments
-
79 KB Views: 5