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

#### 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.

Joined Jul 18, 2013
28,669
As stated, that should be no problem for most, what is receiving it?
Max.

#### jrag6869

Joined May 20, 2019
11
As stated, that should be no problem for most, what is receiving it?
Max.
The signal is from a signal generator, but as I said, I don't want that the optoacoupler change the frequency, if it's possible not even in 1 Hz

#### 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.

#### 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?

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

Last edited:

#### 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