Electronic – Low Pass Filter For Square Wave Through An Optoisolator

filterlow passopto-isolator

I've got a higher voltage square wave input that I'm feeding through FOD817B Optoisolator. The square wave frequency is in the range of 30 to 300 Hz.

The Circuit is like this:

schematic

simulate this circuit – Schematic created using CircuitLab

I've tried to filter the Circuit as shown above, it works ok, but it's still quite noisy.

(Scroll Down To Bolded Area)
Here are some screenshots from the scope:

No Filter Higher Freq
[No Filter Higher Freq]Higher Frequency

No Filter Low Freq(noisier)
[No Filter Lower Freq]

With Filter(low freq.)
[With Filter Circuit]

Here is the 12v input Signal with no filtering
Input Signal No Filter

After realizing my scope was not properly grounded to the circuit
Here are the correct signals
enter image description here
On Occasion I would see the Optoisolated Signal create the similar/same sharp downward spike in the middle of the positive cycle of the square wave. Like the 12 Unfilitered Signal, but sharper.

Best Answer

Frankly, I suspect you have drive problems. I'd suggest monitoring the voltage across R2 as a measure of the current through the LED. If it's not perfectly clean (and I suspect it's not) that's your problem. I'd guess that your low phase has a major spike about a millisecond before nominal transition to low, and the high phase of the drive signal shows a major drop about 5 msec in, down to about a volt or less with a rather low rate of recovery.

If the drive signal is clean, try a new optocoupler. Every once in a while devices do very strange things.