The Godfather talking
You think I am funny guy huh?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 04, 2016, 12:55:02 00:55


Login with username, password and session length


Pages: [1]
Print
Author Topic: questions about anti aliasing filters  (Read 1196 times)
0 Members and 1 Guest are viewing this topic.
TucoRamirez
Senior Member
****
Offline Offline

Posts: 277

Thank You
-Given: 197
-Receive: 95


Tuco ... dead or Alive


« on: January 28, 2013, 09:41:50 09:41 »

hello

i have some little questions to ask to the more experienced users...

In lots of designs with adc's i see that anti aliasing filter is missing ... it's normal?   For example , i want to sample a 500Hz signal ( i expect to do make a ecg maybe in the future ) , it's mandatory to put an anti aliasing filter or i can live without it ? ( i mean putting 8 filters it's boring ^^ ,  otherwise i can put a standalone adc and analog mux to share the filter ...  taking care off course of the switching transitions ...

Or, instead of that could i do a digital (dsp or messy loop)  one inside my mcu ??

( i was thinking of doing a 60hz notch  inside but can i use it too to perform the antialiasing AFTER sampling???)


this part is a little bit confusing to me after reading Sad  sorry.

thanks for your help to understand better this obscure part ...
Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
Sideshow Bob
Senior Member
****
Offline Offline

Posts: 457

Thank You
-Given: 160
-Receive: 494



« Reply #1 on: January 28, 2013, 11:44:30 11:44 »

You can not do any anti alias after the signal is sampled. If you are going to use some DSP or MCU. I would have cranked the sample rate up to 5000Hz. Done all the filtering. And then downsampled the signal to say 500 or 1000Hz. I would perhaps have used a 500Hz second or thierd order analog filter on the input. Remember an anli alias filter is used to lessen problems for signals above Nyquist frequency. A 50/60 Hz notch filter will not fall in that category with 500Hz sample rate   
Logged

I really am ruggedly handsome, aren't I?
TucoRamirez
Senior Member
****
Offline Offline

Posts: 277

Thank You
-Given: 197
-Receive: 95


Tuco ... dead or Alive


« Reply #2 on: January 28, 2013, 11:52:22 11:52 »

So, let me formulate the following question/topology:

What about this scheme ?

incoming Signals ->  amps (instrumentation or whatever)  -->  analog  switch ->  lowpass anti aliasing  -->  extra punch  (gain? maybe?) -> ADC channel of microcontroller.

and which would be the pros / cons ?  ( allways the signal is 500hz max)
( in fact i want to reduce components and reduce the out of frequency artifacts

Ah, yes off course i expect to notch the signal by firmware ... but is for other purpose (just de-humming thus using less external components per channel)

 
« Last Edit: January 28, 2013, 11:54:29 11:54 by TucoRamirez » Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
Faros
Senior Member
****
Offline Offline

Posts: 253

Thank You
-Given: 125
-Receive: 178


« Reply #3 on: January 28, 2013, 11:59:21 11:59 »

1- what is your i/p signal level?
2- what is your targeted o/p signal level?
3- what is your bandwidth, when you say 500Hz, did you mean that Fc ( F cutoff) = 500Hz? , what is your min. Freq. ?
help us too help you ... 
Logged
TucoRamirez
Senior Member
****
Offline Offline

Posts: 277

Thank You
-Given: 197
-Receive: 95


Tuco ... dead or Alive


« Reply #4 on: January 28, 2013, 12:12:30 12:12 »

hi Faros, thanks for your reply and yes I think i can add more info (of course i'm not an hyper expert so i think the answers are) :

1: signals incoming to the amp are 5mVpp emulated  signals from nidaq/matlab (for filtering test) or from a ecg / ekg sensor and conditioning bloc (for real work).

2: after amplifying and filter, i expect to work with 3v max signals to feed the mcu ADC ( btw why in mikroE dspic lib they say send 1V olt max signals???)  (anyway i'll manage it with a loop to filter notching on a pic24jgb002 instead of dspic to reuse my available chips ^^ )

3: frequencies in that signal varying from dc to 500hz (  off course i want to decouple ac :p  then i'll give the offset by myself to set the best to the adc input)


Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
Sideshow Bob
Senior Member
****
Offline Offline

Posts: 457

Thank You
-Given: 160
-Receive: 494



« Reply #5 on: January 28, 2013, 12:41:10 12:41 »

You go to a lot of trouble here, and then you use a quite mere 10 bit ADC on some micro. That is kind of ouch! If you ask me. Your signal is 500 Hz what kind of sample rate did you have in mind?
Logged

I really am ruggedly handsome, aren't I?
TucoRamirez
Senior Member
****
Offline Offline

Posts: 277

Thank You
-Given: 197
-Receive: 95


Tuco ... dead or Alive


« Reply #6 on: January 28, 2013, 12:49:53 12:49 »

i think between 8 -10Khz of Fs ... off course i can use an external adc , but i'm still stucked by phylosophying about anti alias ^^

Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
Faros
Senior Member
****
Offline Offline

Posts: 253

Thank You
-Given: 125
-Receive: 178


« Reply #7 on: January 28, 2013, 12:55:19 12:55 »

In a similar project I have used the following:

Preamp:
TS464CD - IC OP AMP QUAD as a pre-amp @3.3V DC  0.5$
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00001507.pdf
low noise, low distortion , Rail2Rail , 3.3V single ... Great value/money
and:
Low Bass Filter:
MAX7427EUA+  ELLIPTIC FILTER, 5TH ORDER @3.3V  2.0$
http://www.farnell.com/datasheets/32464.pdf

Go through the MAX7427 datasheet and App. notes (anti aliasing explained) ... it worked like magic
 
Logged
TucoRamirez
Senior Member
****
Offline Offline

Posts: 277

Thank You
-Given: 197
-Receive: 95


Tuco ... dead or Alive


« Reply #8 on: January 28, 2013, 12:59:15 12:59 »

so, i need to put a anti aliasing for each signal before the adc  or  passing the amp first, then the mux and finally the anti alliasing???

btw, what do you think of this inst amplif:
http://fr.farnell.com/analog-devices/ad8237armz/inst-amp-1-8-5-5v-200khz-8msop/dp/2213571?Ntt=ad8237


« Last Edit: January 28, 2013, 01:01:20 13:01 by TucoRamirez » Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
Ichan
Hero Member
*****
Offline Offline

Posts: 840

Thank You
-Given: 312
-Receive: 387



WWW
« Reply #9 on: January 28, 2013, 06:40:12 18:40 »

Human body? It is full of noise, correlated with how big mouth (noisy) the measured person  Cheesy Grin.

In short, you will need both analog and digital filtering.

-ichan
Logged

There is Gray, not only Black or White.
solutions
Hero Member
*****
Offline Offline

Posts: 1446

Thank You
-Given: 587
-Receive: 851



« Reply #10 on: January 28, 2013, 09:42:57 21:42 »

Aliasing is undesired components above 0.5Fs. It shouldn't matter where you filter it, or how, as long as you do.

It's a lot cheaper and lower power to do it externally and in front of the ADC in most cases, even with a simple RC, than it is to do a bazillion tap digital filter.  

This writeup nicely explains digital vs analog antialiasing and he points out that you need at least an RC if you are going to do most of the heavy lifting of antialising filtering via DSP post conversion: http://eli.thegreenplace.net/2006/05/10/antialiasing-filteres-and-multirate-systems/

Remember that you are also filtering the noise of the electronics, not just the signal.
Logged
Gallymimu
Hero Member
*****
Offline Offline

Posts: 577

Thank You
-Given: 98
-Receive: 151


« Reply #11 on: January 30, 2013, 05:45:01 05:45 »

I typically use a 2nd order butterworth or Linkwitz–Riley filter (really almost the same thing).  If the measurement isn't that critical a single pole RC filter can also work, but an active filter will perform better and help with the input impedance of your ADC.  Then, if you can spare it, 10x oversample the signal.  That give you lots of room for attenuating any aliased noise and keeps things nice and linear in your desired signal range (500Hz).  In practice for sloppy low resolution signals you can get away without using an anti-aliasing filter, just be aware that any spectral power up to ??Hz will alias back onto your measured signal as noise, you could be limited to 6ish bits with poor signal conditioning but it depends on the setup.
Logged
TucoRamirez
Senior Member
****
Offline Offline

Posts: 277

Thank You
-Given: 197
-Receive: 95


Tuco ... dead or Alive


« Reply #12 on: January 30, 2013, 09:30:15 09:30 »

hello,

i decided to use the following configuration for test purposes..
Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
Gallymimu
Hero Member
*****
Offline Offline

Posts: 577

Thank You
-Given: 98
-Receive: 151


« Reply #13 on: January 30, 2013, 03:56:30 15:56 »

What's the MAX7247?  I don't see it listed on maxim IC website.
Logged
ahmetuyanik
Newbie
*
 Muted
Offline Offline

Posts: 12

Thank You
-Given: 1
-Receive: 1


« Reply #14 on: January 30, 2013, 05:46:38 17:46 »

Hello TucoRamirez

I don't understand that you would like to measure analog signals into digital with high precision. However if you would like to get it with high precision you should need low-pass filter (anti-aliasing filter) for every input signals. At that point you may ask why???

You should search about cross-talk phenomena on the web. I will try giving short explanation. If you have more than one signal and if you use some ADC for all channels with mux, ADC input capacitor charge with first input signal and ADC converts this signal into digital. After that mux selects another channel and input capacitor (if it is not discharged) charged with the new signal over residue charge from the first signal. ADC convert a signal but it is not what you want. The digitalized signal is mix with first and second channel. This is called cross-talk. Anyway cross-talk is caused by small ADC input capacitor (of course every electronic circuits, opamps, muxs have also input and output capacitance). You will use relatively a big capacitance inside the anti-aliasing filter and your input signals will share some capacitor with other input signals. You have to discharge capacitor after every ADC process and before next ADC process.
Another point is that filtering is not instant process.  Filter needs past data to filter-out new data. I think this is most important then cross-talk. So I do not recommend to use same filter for every channel (input signals).
If you want to design a precise data acquisition system you have to be generous.
« Last Edit: January 30, 2013, 05:48:51 17:48 by ahmetuyanik » Logged
TucoRamirez
Senior Member
****
Offline Offline

Posts: 277

Thank You
-Given: 197
-Receive: 95


Tuco ... dead or Alive


« Reply #15 on: January 30, 2013, 08:34:59 20:34 »

So i put the filter before the mux , in the signal conditioning of the incoming signal of each channel. ...

Thanks for that remark !!   I didn't took in account the thing you wrote when drawing the circuit ...

time to redraw .  .  .
Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
Gallymimu
Hero Member
*****
Offline Offline

Posts: 577

Thank You
-Given: 98
-Receive: 151


« Reply #16 on: January 31, 2013, 01:53:05 01:53 »

Hello TucoRamirez

I don't understand that you would like to measure analog signals into digital with high precision. However if you would like to get it with high precision you should need low-pass filter (anti-aliasing filter) for every input signals. At that point you may ask why???

You should search about cross-talk phenomena on the web. I will try giving short explanation. If you have more than one signal and if you use some ADC for all channels with mux, ADC input capacitor charge with first input signal and ADC converts this signal into digital. After that mux selects another channel and input capacitor (if it is not discharged) charged with the new signal over residue charge from the first signal. ADC convert a signal but it is not what you want. The digitalized signal is mix with first and second channel. This is called cross-talk. Anyway cross-talk is caused by small ADC input capacitor (of course every electronic circuits, opamps, muxs have also input and output capacitance). You will use relatively a big capacitance inside the anti-aliasing filter and your input signals will share some capacitor with other input signals. You have to discharge capacitor after every ADC process and before next ADC process.
Another point is that filtering is not instant process.  Filter needs past data to filter-out new data. I think this is most important then cross-talk. So I do not recommend to use same filter for every channel (input signals).
If you want to design a precise data acquisition system you have to be generous.


^^^^This is good advice,

A mux can work fine if the circuit is designed right and many embedded ADCs have built in muxes.  One thing you can do is look at the sample time for your ADC, it's sample and hold capacitor and make sure that whatever impedance feeds it, gives it enough time to charge to the new voltage level.  Sometimes this means keeping your filter impedance low.  sometimes it means adding a bulk capacitance on the input to feed the sample and hold capacitor.
Logged
TucoRamirez
Senior Member
****
Offline Offline

Posts: 277

Thank You
-Given: 197
-Receive: 95


Tuco ... dead or Alive


« Reply #17 on: January 31, 2013, 05:55:28 05:55 »

^^^^This is good advice,

A mux can work fine if the circuit is designed right and many embedded ADCs have built in muxes.  One thing you can do is look at the sample time for your ADC, it's sample and hold capacitor and make sure that whatever impedance feeds it, gives it enough time to charge to the new voltage level.  Sometimes this means keeping your filter impedance low.  sometimes it means adding a bulk capacitance on the input to feed the sample and hold capacitor.


Overload Overload of good useful info !!! ^^

ok, i modified the original scheme by adding your suggestions (cap value to be defined later and the filter ... anyway i'll test the conditioning on breadboard first so i will attach/detach it ...

Luckily, this changes doesn't interfere with the controller board design ( i don't know it is a good idea to talk bout the little one here or on a specific topic)  anyway now it's time to route a little pcb and prepare spare blocks of opamps to test de conditionning part ... 

Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
Gallymimu
Hero Member
*****
Offline Offline

Posts: 577

Thank You
-Given: 98
-Receive: 151


« Reply #18 on: January 31, 2013, 10:44:29 10:44 »

One last suggestion:

I've had a little trouble with opamps directly feeding A/D sample and hold caps.  It might have been the opamps I was using, but they didn't have the transient response to feed the S/H capacitor and their output drooped every time the S/H capacitor switched in to take a sample.  some additional output capacitance on the output of the opamp helped stabilize this and produced better accuracy, you have to be sure you don't exceed the capacitance driving capacity of the opamp when doing this though.
Logged
Sideshow Bob
Senior Member
****
Offline Offline

Posts: 457

Thank You
-Given: 160
-Receive: 494



« Reply #19 on: January 31, 2013, 11:29:37 11:29 »

One last suggestion:

I've had a little trouble with opamps directly feeding A/D sample and hold caps.  It might have been the opamps I was using, but they didn't have the transient response to feed the S/H capacitor and their output drooped every time the S/H capacitor switched in to take a sample.  some additional output capacitance on the output of the opamp helped stabilize this and produced better accuracy, you have to be sure you don't exceed the capacitance driving capacity of the opamp when doing this though.
I have also seen this. Some ADC inputs are quite harsh on the source. And you need to use a quite "stiff" source to drive them.
Logged

I really am ruggedly handsome, aren't I?
Gallymimu
Hero Member
*****
Offline Offline

Posts: 577

Thank You
-Given: 98
-Receive: 151


« Reply #20 on: January 31, 2013, 04:43:20 16:43 »

I have also seen this. Some ADC inputs are quite harsh on the source. And you need to use a quite "stiff" source to drive them.

Good, glad I'm not the only one!  It was a bit of a surprise the first time I saw it years ago.
Logged
Ichan
Hero Member
*****
Offline Offline

Posts: 840

Thank You
-Given: 312
-Receive: 387



WWW
« Reply #21 on: January 31, 2013, 08:22:11 20:22 »

1. First thing need to be done with mV or less signal is to amplify it, feeding it directly to a mux is not a good practice.

2. Adding capacitor on the output of an opamp feeding an adc will act as a bad low pass filter which can distort the signal, not a big problem for dc or very slow changing signal. If adding it helps the stability of adc reading then it is a positive sign that the analog front end doesn't work as expected, common problem is bad designed pcb layout and the lack of noise shielding.

3. As ECG mentioned, better use differential input IA as the first stage from the beginning so no regret later. Many choice available now, IMO the AD8237 mentioned before is a good one, but seems farnell price is too high.

4. Remember the hum will be on the measured range, pay attention on this when designing the board and be prepared to do the digital filtering.

-ichan
Logged

There is Gray, not only Black or White.
TucoRamirez
Senior Member
****
Offline Offline

Posts: 277

Thank You
-Given: 197
-Receive: 95


Tuco ... dead or Alive


« Reply #22 on: February 01, 2013, 12:44:23 12:44 »

yes ichan i have a conditioning circuit before the mux and the stuff (btw i will test it today ...)
Logged

Whoever double crosses me and leaves me alive... he understands nothing about Tuco.
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC