Help with Circuit Design - Signal Isolation

Thread Starter

mriksman

Joined Aug 31, 2010
113
Hi,

I am using the FL5150 (https://www.mouser.ie/datasheet/2/308/FL5150-D-1809472.pdf).

For the DIM Control, it has an internal 10uA current source, which as per their datasheet, can be used with an external potentiometer (0-250k) to adjust the voltage between 0-2.5V). It mentions you can use a 0-10VDC signal through a 4-1 voltage divider.

My issue is; I'll have 2 of these on a circuit board. As I have found, and some users have helped me fix - I can't tie the 'GND's together between each gang. So I have GNDA, GNDB, and the GND of my controller (powered by the IRM-02-3.3).
1590311494881.png

As such, I have to isolate my signal from the controller to the Dim Control pin on each FL5150. I used an 817C optoisolator, and chose 1k as the load resistor. I chose 10k and 1uF for my RC filter.
1590311932156.png
Unfortunately, the 1k load resistor caused the FL5150 to cut out; presumably from over current protection (the Vdd pin isn't there to power external circuits; it is there to be used for the DIM Control Mode pin).

So I increased the load resistor to 10k, but this caused a voltage divider with my RC filter, so I moved those values to 100k and 0.1uF. However, the new problem was that the 10uA current was creating 1V at the dim control pin when InA was OFF. I decided to isolate using a LM358 opamp.

1590312462487.png

This worked, but I also (for reasons I do not understand) had to add a resistor after the opamp - otherwise the FL5150 would crash out between 1-3V signal on the DIM control pin. So, this works;

1590312622543.png

However, because of the load resistor, the switching speed is a bit slow, which causes a skew in the voltage at low duty. Instead of 1% being the theoretical 50mV, it ends up being ~300mV. The opamp also adds a small voltage offset close to 0V.

Does anyone know of a better way to do this? Different, specialised ICs to look at? Other isolation techniques?

Input signal has to be PWM - I don't have the ability to use I2C or SPI. Just a single pin.
 

Attachments

Alec_t

Joined Sep 17, 2013
14,280
Try this :-
Dim_Ctrl.png
You may need to tweak the value of R2.
Max PWM duty cycle = min D_Ctrl voltage. The transistor saturation voltage limits how low D-Ctrl can go. A photo-FET optoisolator (e.g. H11F1M) might get D-Ctrl closer to 0V.
 
Last edited:

Thread Starter

mriksman

Joined Aug 31, 2010
113
Thanks. I'm not sure I understand the working detail behind it (is it running the LED in 'linear' mode...?), but it doesn't seem to simulate well..?

At 20% duty, I don't get any response on Dim Control.

1590321332104.png

At 50% I get an interesting (inverted) response... But it only goes from 2.5V to 1.6V... Not exactly half way...

1590321411122.png
 

Alec_t

Joined Sep 17, 2013
14,280
The duty cycle needs to be in the 30% to 99% range. Less than 30% doesn't give enough smoothed voltage to turn on the opto LED. 99% takes D-Ctrl down to <150mV. With 100k and 1uF the respnse time is about 80mS.
 

Thread Starter

mriksman

Joined Aug 31, 2010
113
@Alec_t Thanks - I'll check it out.

I just jumped on to post this;

1590341108511.png

I took the idea from the IL300 datasheet. If I get a dual-package optoisolator, hopefully the CTR of both LEDs will be the same. R2/R1 is a ratio of 5V/3.3V. I really don't want to spend 3 EUR for a 'linear optoisolator' like the IL300...
 

Thread Starter

mriksman

Joined Aug 31, 2010
113
I tried your circuit. Inverted the PWM, and set 50% duty. 150k the voltages were wrong on Vdim. Set it to 75k. Vdim is half 2.5V.
But what is causing that 0.5V offset on Vdim?
1590342136895.png

Changing the duty... it doesn't appear linear - especially at low duties.
 

crutschow

Joined Mar 14, 2008
34,280
Here's a circuit that uses a current-mirror to generate a 10μA current to ground (cancelling the current from the IC) when the opto is off and no current when the opto is on.
It uses the opto as a switch so its linearity is of no concern.
The output is show for a 1kHz PWM input with on-times of 50μs, 500μs, and 950μs.

You may have to tweak the value of R1 to get the desired voltage vs. duty-cycle.

1590343181059.png
 

Alec_t

Joined Sep 17, 2013
14,280
But what is causing that 0.5V offset on Vdim?
The 1uF cap takes time to charge up.
Changing the duty... it doesn't appear linear
Not surprising. The opto itself isn't linear and the opto output is in parallel with the 250k resistor.
Here's a circuit variant which gives a pretty linear change in D-ctrl when input PWM goes from 100% to 0%, but the output/input isolation is compromised :( :-

Dim_Ctrl3.png
D-ctrl goes down to about 100mV. Reducing R2 and R3 would enable D-ctrl to go even lower.
 
Last edited:

Thread Starter

mriksman

Joined Aug 31, 2010
113
Can you use a difference amplifier?: https://www.analog.com/en/products/amplifiers/specialty-amplifiers/difference-amplifiers.html

Aside:
It's nice to have current input signals. e.g. 0-20 mA turned into 0-5V at the device with a 250 ohm resistor, You don'thave isolation, but you lose the ground loops.

Outputs from the device can still be voltage, usually differential or pseudo differential voltages.
I'm open to any suggestion as long as the signal GND is not the same as the Dim Control GND. Keeping component numbers down and price is good as well

I’m not very experienced with designing circuits, so the example circuits from Alec and crutschow have been amazing.

Thanks again! It’s late here - looking forward to taking a look tomorrow.
 

Thread Starter

mriksman

Joined Aug 31, 2010
113
Here's a circuit that uses a current-mirror to generate a 10μA current to ground (cancelling the current from the IC) when the opto is off and no current when the opto is on.
It uses the opto as a switch so its linearity is of no concern.
The output is show for a 1kHz PWM input with on-times of 50μs, 500μs, and 950μs.

You may have to tweak the value of R1 to get the desired voltage vs. duty-cycle.

View attachment 208010
How did you choose R1 and R4?
Is R4 * CTR and R2 how you generated 10uA? Was it trial and error and something that will be different with each Op-Amp?
 

Alec_t

Joined Sep 17, 2013
14,280
Hmmm. All the sims so far haven't separated the grounds on the two sides of the isolator, so that could be a problem.
Here's a sim with isolated grounds (actually with 100Meg between the grounds, as LTspice doesn't like floating components) and isolated 5V supply rails.

Dim_Ctrl4.png

Linearity isn't too bad, but can't be improved much without having feedback from the opto-transistor's current.
 
Last edited:

crutschow

Joined Mar 14, 2008
34,280
How did you choose R1 and R4?
In a current-mirror ( Q1 and Q2) the current through Q1 is ideally equal to that through Q2 (which is here determined by R1 and R4), so (R1+R4) ≈ (5V-0.7V) / 10μA.
Is R4 * CTR and R2 how you generated 10uA?
CTR does not enter in the equation since the opto coupler is being used as a switch.
Was it trial and error and something that will be different with each Op-Amp?
What op amp?

The mirror current will likely need tweaking (which can be done with a pot) since the current from the FL5150 will vary significantly from unit-to-unit.
1590414346684.png
All the sims so far haven't separated the grounds on the two sides of the isolator--
I didn't show isolation, but there's no reason my post #8 circuit can't have isolated grounds.
 

Hymie

Joined Mar 30, 2018
1,277
The opto isolators in the circuit are providing the safety reinforced insulation between the mains voltage and the (SELV) control circuit. Some of the circuit solutions offered have components bridging the opto isolators, which compromises the safety isolation barrier.
 

Thread Starter

mriksman

Joined Aug 31, 2010
113
Hmmm. All the sims so far haven't separated the grounds on the two sides of the isolator, so that could be a problem.
Here's a sim with isolated grounds (actually with 100Meg between the grounds, as LTspice doesn't like floating components) and isolated 5V supply rails.

View attachment 208085

Linearity isn't too bad, but can't be improved much without having feedback from the opto-transistor's current.
How would you invert the op-amp signal?
 

Thread Starter

mriksman

Joined Aug 31, 2010
113
Nice! I lose a lot of control above 70% and below 30% though.
1590431458638.png
Would using an Op-Amp help at all?

What is your thoughts on this;
1590431520385.png
 
Last edited:

Thread Starter

mriksman

Joined Aug 31, 2010
113
As @crutschow showed - if that Dim Control current varies, then both my R1 and R2 need to change.

Is there any clever way to feedback the Dim Control current back over to the left-hand side to dynamically adjust for this...?
 
Top