Optocoupler to replicate a square signal from 100Hz to 10 KHz

Thread Starter

jrag6869

Joined May 20, 2019
11
Hi team:

I have to make a circuit to measure the frequency of a square signal (0V - 3.3V). The previous step is introduce the signal to an optocoupler and get the same frequency output signal, (I only care about the frequency because a high accuracy is needed)

What optocoupler do you think is good for this purpose when the signal goes from 100 Hz to 10 KHz?

Thanks
 

wayneh

Joined Sep 9, 2010
17,498
I don't think either of those frequencies would be a challenge for just about any optocoupler. Pick one and check the specs.

You may see some (very little, I think) rounding of the square corners as the frequency rises but I would not expect any problem detecting the frequency.
 

crutschow

Joined Mar 14, 2008
34,392
An optocoupler can't change the frequency.
It can change the waveshape some or have reduced amplitude at a higher frequency but the frequency out will always equal the frequency in.
 

Thread Starter

jrag6869

Joined May 20, 2019
11
An optocoupler can't change the frequency.
It can change the waveshape some or have reduced amplitude at a higher frequency but the frequency out will always equal the frequency in.
Good to know that, but can all the optocouplers work at all frequencies?

Thanks
 

crutschow

Joined Mar 14, 2008
34,392
can all the optocouplers work at all frequencies?
No active device can work at "all frequencies" (to infinity?).
You determine the maximum frequency you want to the opto to carry and then look for a device that has the frequency response to do that.

For good 10kHz response, you likely want one that will has a maximum response of around 50-100 kHz to maintain good waveform fidelity.
 

crutschow

Joined Mar 14, 2008
34,392
Here's the LTspice simulation of a common optoisolator operating with a 10kHz signal.

What's the reason for isolating the signal generator signal?

upload_2019-6-10_8-53-49.png

Here's the simulation with a higher frequency opto.
Notice the faster rise and fall times.

upload_2019-6-10_10-51-23.png
 
Last edited:

Thread Starter

jrag6869

Joined May 20, 2019
11
Here's the LTspice simulation of a common optoisolator operating with a 10kHz signal.

What's the reason for isolating the signal generator signal?

View attachment 179410

Here's the simulation with a higher frequency opto.
Notice the faster rise and fall times.

View attachment 179416
That is really helpfull, thanks.

The reason is isolate the grounds in order to get less noise. I'm using the LM331 F-to-V converter and I´ve noticed that the Vref pin change its value depending on the input frequency (only 4 to 6 mV but that means less accuracy) and when I try it with the 4N25 the Vref value pin doesn't depend on frequency.
 
Top