- #1
petterg
- 162
- 7
Whats the way to go to apply filter to a pulse signal?
I have a signal with some weak triangle pulses, positive or negative, mixed with some very slow sine wave. I've tried to illustrate this in the attachment. The sine is actually slower than it looks in the chart I don't really know how low frequency it has, but I know it's less than 1Hz. The pulses has a length of 30-50us and they come about every 200-220us.
My goal is to feed this signal into a microcontroller. The controller needs to count pulses and know if they are negative or positive. My challenge is that the pulses are so weak that they have to be amplified, without amplifying everything else. In other words, a highpass filter. The thing with any kind of filter is that signals are weakened - in particular pulses. And that's really the issue I run into in my attempts with this.
So my idea to work around this is to send the signal through two parallel circuits with an opamp in each - one that do lowpass, and one that do nothing except for make the same delay as the lowpass. Then feed the output from those two circuits into a the next stage that subtracts the lowpass filtered signal from the original. The result should then contain pulses only - I thought.
It turns out that even with second order lowpass the output of the filter is affected by the pulses, and the signal that is supposed to pass untouched is also affected by the filter in the parallel circuit. And the subtraction method requires gain from the two parallel circuits to be equal - that wasn't so easy to get properly either.
So, what's the way to apply filter to pulse signals?
I have a signal with some weak triangle pulses, positive or negative, mixed with some very slow sine wave. I've tried to illustrate this in the attachment. The sine is actually slower than it looks in the chart I don't really know how low frequency it has, but I know it's less than 1Hz. The pulses has a length of 30-50us and they come about every 200-220us.
My goal is to feed this signal into a microcontroller. The controller needs to count pulses and know if they are negative or positive. My challenge is that the pulses are so weak that they have to be amplified, without amplifying everything else. In other words, a highpass filter. The thing with any kind of filter is that signals are weakened - in particular pulses. And that's really the issue I run into in my attempts with this.
So my idea to work around this is to send the signal through two parallel circuits with an opamp in each - one that do lowpass, and one that do nothing except for make the same delay as the lowpass. Then feed the output from those two circuits into a the next stage that subtracts the lowpass filtered signal from the original. The result should then contain pulses only - I thought.
It turns out that even with second order lowpass the output of the filter is affected by the pulses, and the signal that is supposed to pass untouched is also affected by the filter in the parallel circuit. And the subtraction method requires gain from the two parallel circuits to be equal - that wasn't so easy to get properly either.
So, what's the way to apply filter to pulse signals?