# Using an Opto to Control a Current Source to Create a Voltage Input

#### mriksman

Joined Aug 31, 2010
65
Hi,

I am using an FL5150 IC, that has a control pin ('dim') with a 10uA current source on it. Their datasheet shows a variable resistor 0-250k which creates a voltage of 0-2.5V.

I want to drive/control this using an isolated PWM signal.

I've simulated many circuits using the Vdd pin, however, I am limited on the current I can draw from Vdd. As such, I end up needing a very high Rload resistor, which then causes poor switching times on the Opto.

If someone can come up with an idea to avoid Vdd and solely use the 10uA current source, that would be the ultimate outcome.

#### AlbertHall

Joined Jun 4, 2014
10,388
What voltage is Vdd and how much can be drawn from it?
What frequency PWM are you using?
I presume you want a steady DC voltage on 'dim' not a square wave?

#### mriksman

Joined Aug 31, 2010
65
5V.
About 3mA. I can get more - it's limited by the resistor that powers the FL5150. It's basically a transformerless power supply circuit; so 1mA extra equates to 200mW extra. I want to avoid using Vdd if at all possible.

1kHz. It's not fast, but as soon as I try and use a large resistor (>10k), the fall time is drastically impacted, which means I lose linearity at low dimming values.

Yes. Steady voltage on 'dim'. Exactly like it would behave if it were as shown; the 10uA across the variable 0-250k resistor creating a 0-2.5V signal.

#### crutschow

Joined Mar 14, 2008
25,392
I think you will have to bite the bullet and use a smaller resistor value.

#### mriksman

Joined Aug 31, 2010
65
@crutschow Coming from you (who appears to know his shit), that's not promising!!!

Can't we ... 'steal'/bleed some of that 10uA current away from the 250k resistor when the Opto is on, and then smooth the signal with a capacitor, thus reducing the voltage seen on 'dim'...?

#### mriksman

Joined Aug 31, 2010
65
I have this that simulates well? Looks very linear over the whole range. I have the PWM stepping up duty in 10% increments.

This should work well with a dual channel opto, or I can splash out on a \$3 LOC110 or IL300 etc.

#### crutschow

Joined Mar 14, 2008
25,392
If the dual optos are reasonably matched, then the circuit should work okay.