Electronic – Low Pass Filter that can quickly turn on or off

adcfiltersignal

I may be pushing physics here so please tell me if I am. I have a signal I'm trying to anti-alias at 50Hz (sampling at 100Hz). The problem is my input signal is essentially an Amplitude Modified square wave that matches the sampling frequency with a very short duty cycle (~2-5%, settable). I'm timing my samples so that they only read the pulses at their peak after a settling time ts. I just realized though that my 50Hz cuttoff passive AA LPF will filter out the square wave and make ts far too long.

We've been banging our heads against the wall on this one, but here's what we want (don't know if it exists):

A Low Pass Filter that can be turned on or off quickly. Desired sequence of events is as followed:

  1. Signal input is at 0V (off duty cycle). Filter can be on or off during this time.
  2. Filter is turned off so signal can quickly rise to it's max amplitude (on duty cycle).
  3. After ts, Filter is turned on again so that it is now being filtered at that higher level taking whatever value the signal is at as a sort of initial value.
  4. After a few ms, the signal has been sampled by the ADC and the filter is turned off so the signal can return to 0V.

I dream of the circuit that can accomplish it, but cannot figure out how to pull it off. Does this exist? If so, what should I be googling?

Best Answer

The easiest and most effective way of doing this is not to filter your signal but start taking plenty of ADC samples as soon as you hit the area you want to sample. Carry on sampling until the pulse is about to change and stop sampling.

Average your ADC samples - that's all you have to do and if you can't take "enough" ADC samples, get a better ADC. Alternatively, if you can use samples on the next peak, accumulate values and average over several peaks.

There are analogue solutions but these involve comparators and tunable low-pass filters because the filter has to be in-circuit all the time and all you are able to "move" is the cut-off frequency (when the signal reaches the bounds of what you want to sample). Use the power of a decent ADC.

Moving the filter frequency - use a switched capacitor filter and bring down the clock to create the required low pass filter when the signal has stabilized.

Alternative idea - Use your signal (once it has achieved stability) to charge a capacitor with constant current (V to I converter). The voltage attained on the cap divided by the time to get to that voltage is dv/dt - you know the cap value and therefore you can calculate what the average current was over that time period (I = c dv/dt). The average current is the average voltage applied to the V to I converter. Timing and sequencing is necessary to start the V to I then when you have taken your reading you need to discharge the cap to zero before the next cycle begins. It's called an integrating ADC - look it up.