Maker Pro
Maker Pro

pwm to analog

maor

Nov 25, 2015
8
Joined
Nov 25, 2015
Messages
8
Hello,
I have pwm signal of max 5v and min of 0v. i want to use opto coupler to change it to analog or digital signal of 0-5v, is it possible?

Thank you,
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,745
Joined
Nov 17, 2011
Messages
13,745
An optocoupler doesn't change a digital signal to an analog signal. You need to low-pass filter the pwm to remove the high frequency components. What remains is the DC component which is proportiional to the duty cycle and the amplitude of the pwm.
 

maor

Nov 25, 2015
8
Joined
Nov 25, 2015
Messages
8
1) so what happen if the input of the optocoupler is pwm? the output will be pwm or the average of the pwm?
2) what happen if the input of the optocoupler is a sine wave?

Thank you
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,745
Joined
Nov 17, 2011
Messages
13,745
1) so what happen if the input of the optocoupler is pwm? The output will be pwm or the average of the pwm?
PWM

2) what happen if the input of the optocoupler is a sine wave?
something resembling a very distorted sine wave. Optocouplers are - with exceptins - not made for transmitting analog signal, mostly digital ones.

Details vary with type of optocoupler and the exact circuitry used.
 

maor

Nov 25, 2015
8
Joined
Nov 25, 2015
Messages
8
and if i have input signal of 3v dc and ripple of 0.025v, the output would be 3v dc and much more ripple?

Thank you
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,745
Joined
Nov 17, 2011
Messages
13,745
and if i have input signal of 3v dc and ripple of 0.025v, the output would be 3v dc and much more ripple?
Not necessarily. A digital optocoupler is normally operated with the receiving transistor in saturation. It therefore will be saturated evn if the input current varies slightly. This will change if the circuit is designed such that the output is not saturated.

Look up some optocoupler theory to understand the behavior of optocoupler.
 

maor

Nov 25, 2015
8
Joined
Nov 25, 2015
Messages
8
And there is such thing analog optocouplers? if i let them sine wave the output will be sine wave?

Thank you
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
There are some very expensive analog optocouplers and you can also couple a LED to a fast LDR to create something which works acceptably in some applications.
 
Top