which capacitor type for signal filtering?

Thread Starter

pashford

Joined Dec 5, 2009
7
Hello,
I am outputting a 5V 50Hz PWM signal from a pic32. I want to clean up the signal before sending it through a 4n25 optocoupler to a higher voltage circuit. The signal is a bit muddy and so I want to use a capacitor to filter it. I put a 100uF 25V electrolytic capacitor in series in the circuit and it cleaned it up a lot, but I am wondering if I could improve it more. Should I put a ceramic capacitor in parallel with the electrolytic? If so, what size? Any help would be greatly appreciated.
 

beenthere

Joined Apr 20, 2004
15,819
There are a couple of problems. If you mean to have the optocoupler preserve your signal, you should be aware that it is not a linear device. It is much more suited to a logic signal, going from high to low. The IRLED between pins 1 & 2 likes a bit of current, too - 30 - 50 ma, well beyond the current ability of a D to A converter. It most likely will not work for you.

What is the application?
 

Thread Starter

pashford

Joined Dec 5, 2009
7
There are a couple of problems. If you mean to have the optocoupler preserve your signal, you should be aware that it is not a linear device. It is much more suited to a logic signal, going from high to low. The IRLED between pins 1 & 2 likes a bit of current, too - 30 - 50 ma, well beyond the current ability of a D to A converter. It most likely will not work for you.

What is the application?
Thanks for your help. The application is controlling a servo or hobby speed control (ESC) from a pic32 digital i/o pin. I am doing software pwm. I have attached a circuit diagram (with a similar optocoupler). In my testing, I have had no trouble getting the signal to cross the optocoupler, but the signal was quite noisy before I added the electrolytic capacitor just before the 4n25. Would a ceramic capacitor clean up the signal even more, or do you have any other recommendations?
 

Attachments

Top