Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

filtering noise spikes and unstability

Status
Not open for further replies.

seyyah

Advanced Member level 2
Advanced Member level 2
Joined
Oct 7, 2001
Messages
646
Helped
8
Reputation
16
Reaction score
8
Trophy points
1,298
Activity points
6,234
filter noise spikes

Sometimes there occur spikes in the waveform that is difficult to detect and eliminate like in the figure. How can we eliminate them?
I have an encoder that produces pulses like in the figure. I filter encoder output with an rc filter. But sometimes it doesn't work correctly. I couldn't catch the error source because it rarely happens. I suppose that the error is due to the spikes which sometimes become greater than a threshold level. Why can this happen? Due to heat? If so what is affected from the heat? Optical encoder? or Capacitor?
 

Is this spike in the direct output of the encoder? I would suggest that you try several encoders and see if they all have the problem. If they do, try some other brand or model of encoder.

Some bandaids would be to use a LC low pass filter to get rid of the spike. Another would be to make a circuit that looks for a zero lever of over a certain time duration and puts out its own pulse on the next rising edge. This could be a simple sequential state circuit with a clock. It could go to the next state for each low value and after a certain number of them goes to a state that looks for the high level and puts out a pulse and then goes to the rest state.
 

Encoder is home made :eek:) Top of the pulse is not flat as this. It's noisy but noise level is low. I believe that sometimes noise goes over a threshold value in a very short time(spike) which causes false readings. I sketched it to illustrate what i believe. I read it with a µc. In software i have some delay and i also read increasing edges. I have a small error generally. In a period of reading, it differs only 1-2 pulses from the actual value which is not important in my system. But sometimes it doesn't work correctly which means that a considerable error occurred.
 

You will be better off working on the encoder end of the problem. Can you describe how the encoder is made and what laws of physics it relies on?

You can also do a polling type reading of the output instead of a interrupt type. That way you will take two or more highs in a low for a high and two or more lows for a low. This will make the glitch not bother your PIC calculations.
 

I used a slotted optical switch and a slotted disk. Switch is composed of an ir transmitting diode and a phototransitor. Disk is revolving between the diode and transistor. and you understand the rest...
I chose to work on the code instead of hardware. I further improved the code to neglect some periods of dips and rises say 400µs. Now it seems more stable and solid. Time will show the real result.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top