Electrical – Current sensing, low pass filter and ADC frequency

adccontrollow-power

I am designing the circuit that will read the current in a DC motor. The PWM on the H bridge will be running at 10/15 KHz with an ADC sampling frequency and a control loop running at ~ 5KHz. I will have to check the R/L constants of the motors to make sure the control frequency is suitable. For now the proposed the circuit is showed below.

Initially I was planning on using a low pass filter before the ADC pin of the PIC. However I have read a few contradicting threads on whether i should or should not use a low pass before the ADC of the PIC. I read a few Application notes all promoting the use of the filters. Should I use an anti aliasing filter here?

If the filter is needed would you able able to comment on the cut-off frequency to use? The cut off frequency of the Sallen Key below is around 2.5 KHz. (1/2 the intended sampling rate of the ADC).

I would also be curious to see if someone could comment on C9 below. I saw a few schematics using a small ceramic capacitor placed there so i decided to use one too. Not sure about its real purpose to be honest.

Schematics

Best Answer

Should I use an anti aliasing filter here?

I think you should. In some applications they are omitted because the system is intentionally trying to sample signals beyond the Nyquist rate of the ADC. I can't think of a reason not to use one. If you know of a good reason, please share.

I would also be curious to see if someone could comment on C9 below.

It seems to be nothing more than a low-pass filter (along wtih R5 and R6) to reject high frequency noise coming from the source before it gets amplified by the first stage amplifier. I think it is a good idea to put the cutoff of this filter at a reasonable frequency. If you are using the ADC as part of a feedback system, that might be 10x the sample rate.