Author Topic: Getting Rid of Noise and Jitter With a Comparator Based PWM Circuit  (Read 6668 times)

0 Members and 1 Guest are viewing this topic.

Offline Login to see usernames

  • 50+
  • *
  • Posts: 58

Hope this can help.

Slow moving signals like sawtooth and triangle signals can sometimes be susceptible to noise.  When using this kind of signal to trip a comparator,  the comparator can burst into unwanted oscillations. Just about any high speed comparator can do this. 

Consider that an LM 311 comparator has a built in hysteresis of about 3 millivolts. So a  difference of 3mv between the inputs will trip the comparator. Noise above 3mv on the input signals can cause oscillations at trip point. This can be very pronounced with a slow rising and falling input signal and even more so if there is high frequency noise on that signal. Cheap (Made in China?) Florescent lighting  ballasts are notorious for generating noise in the 20 kHz - 100 kHz  range. Keep them away from your circuit.   

The LM311 is very susceptible to these oscillations if certain precautions are not taken.  If pins 5 and 6 are not used,  they should be shorted together. A .1uf ceramic capacitor should be used to bypass the positive supply input and should be located as close to the chip as possible.

There should be a ground plane on the bottom of the PCB running under the LM311 circuity. The signal traces should be routed between ground traces. If a pot is being used to supply the reference voltage (as in a PWM circuit),  the leads from the pot should be as short a possible and should be tightly twisted together.

Ramp signals can be generated in many ways... 555 timers, OP Amps,Current Sources, VCO's, etc. Noise and jitter on these signals can be caused by many things but can usually be eliminated with good design and proper board/component layout techniques. Slapping components down with no regard for component placement, ground and power planes, and trace size/routing ...will likely cause problems.

Where applicable, each IC on the board should have its own .1uf ceramic bypass capacitor and it should be as close to the IC's + Supply pin as possible.  Output signal traces should be routed away from input signal traces. Right angles on traces should be avoided wherever possible (use 2 45's).     

If the board has it's own voltage regulator,  the recommendations of the manufacturer for both  input and output bypassing should be used. A good sized input capacitor should be used in any case. In the case of the LM311,  the power supply bypass capacitor should be no more than a few inches from the chip.   

When prototyping on a bread board it may be difficult to eliminate cross coupling noise completely since you can't really make ground or power panes. Keep the wires as short as possible and keep outputs away from inputs.

If there is still considerable noise on the signal going to the comparator,  you can add hysteresis with positive feedback.  In a Meyer/Boyce type pulser circuit using a ramp/comparator PWM, 100mv hysteresis can be very helpful.   Attached is schematic showing how to do this.  Positive feedback can only be added to the + input of the comparator so the circuit should probably be designed in inverting mode where the reference voltage (Pot) goes to the + input and the ramp goes to the - input.

You can also use capacitors to reduce noise. A .1 uf cap from the  + reference comparator input to ground can filter out considerable noise.   

"Jitter" is basically time based noise where frequency or duty cycle of a signal changes periodically. 555 timers are not very susceptible to jitter.  However, a VCO like the 4046 can have considerable "jitter" on the output if there is noise on the VCO input. The VCO voltage should be as clean as possible. The techniques detailed above should assure that.

Sometimes, a cheap or defective oscilloscope can show noise or jitter when there actually is none.Some signals are difficult to trigger and an external trigger input may need to be used.Where you connect the ground clip can be very important.  When measuring a signal coming off of an IC,  try to put the ground clip as close to the chip as possible.  If the ground clip is 12 inches away (like at the ground terminal of the main power supply) you may see noise or jitter that is not really there.

The first attached file is a JPG schematic of a working  circuit. that has no noise and no jitter. A 555 is used to generate the ramp,  but this could just as well be a 4046 PLL IC,  or any other   circuit that generates a triangle or sawtooth.

The second file is the Spice simulation that can be run with LTSpice.  You will need the spice models for the LM311 , the TLC555 and  the potentiometer  in order to run the simulation.  These can be downloaded from the LTSpice Yahoo Users Group. 

If you are truly interested  in running the circuit simulations that I will be posting  here,   send me a PM and I can assist you in getting the necessary models downloaded,  installed and  working properly.