Shop OBEX P1 Docs P2 Docs Learn Events
Measuring noise? — Parallax Forums

Measuring noise?

Zap-oZap-o Posts: 452
edited 2011-06-23 07:16 in Propeller 1
I am using the propeller as always, and in conjunction with a 16 bit ADC I also have a low pass filter and a precision voltage reference. All this is used to measure temperature in a voltage divider fashion. If needed I will post a schematic.

My question is how can I measure the noise in the system so that I may apply the correct values to my low pass filter (RC)?

I know there is noise because I placed some arbitrary values in for the low pass filter and the signal seems much better. That said I could just move on and always never know if the values could be better etc but I want to understand it more.

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-06-22 19:37
    You could perform an FFT on the unfiltered signal to see where the noise frequencies occur, then design your filter to exclude those frequencies.

    -Phil
  • Zap-oZap-o Posts: 452
    edited 2011-06-22 19:41
    Isn't that complex and time consuming, unless you know a short cut eye yah eye? Cant I use the scope somehow? Perhaps Ill do as you suggested. Thanks for the quick reply
  • kwinnkwinn Posts: 8,697
    edited 2011-06-22 19:52
    Zap-o wrote: »
    Isn't that complex and time consuming, unless you know a short cut eye yah eye? Cant I use the scope somehow? Perhaps Ill do as you suggested. Thanks for the quick reply

    Yes, it is complex, time consuming, and can lead to lots of extra calculations. That's why taking an average of several readings is often done. The noise being an AC signal tends to cancel out.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-06-22 20:05
    Averaging is a form of low-pass filtering. My original impression was that Zap-O wanted to analyze the noise to find the optimal low-pass filter. But, if he's not willing to invest the effort in something complex and time-consuming, my impression was apparently mistaken.

    Zap-O, try this: Do the averaging that kwinn suggests, adding more observations to your average until the noise component is low enough to satisfy you. At that point, you'll have the optimum filtering for that method. There may be better low-pass filters, but without more effort on your part to analyze your signal, it will be hard to know what they are.

    -Phil
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-06-22 20:19
    To minimize noise you should make your low pass filter as tight as possible. Determine what you need for the frequency response of your signal, and design the low pass filter to match it. If you are measuring temperature you probably don't need a very fast response. You could probably get by with a cutoff frequency of just a few Hz.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-06-22 22:38
    Interesting topic... I have something along similar lines that might be of some interest that determines the bias or noise floor of an I/O or LSBs (Least Significant Bits) ... In most cases people will truncate the LSB, but there can actually be useful information hidden within the 'noise'. This assumes that under normal or clean conditions, the bias or noise fluctuation is 50%. Anything else would be considered noise, and using a time integral of the bias can be applied back into the system as a form of error correction. This technique is especially useful for GYRO sensors or Accelerometer sensors to minimize drift or any other sensor that has similar time sensitive data.

    Let me see if I can dig it up and I'll post it.

    Another method to reduce noise is to sample your data at four times or greater than the Nyquist rate. If you sample your data twice the Nyquist rate your signal to noise ratio is 1:1 but if you sample at 4x the Nyquist rate your signal to noise ratio becomes 2:1

    Again, I'll see if I can pull up that info and post it.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-06-23 01:02
    Noise is purely random in its nature and will be reduced by multiple sampling, anything that is not random is interference and could have a dominant frequency (and harmonics) that could be targeted in particular. Low pass filters are always a compromise between the reduction of as much noise/interference as possible and maintaining the very best frequency response.

    There will always be the quantizing noise of about half of the LSB, hence it is often not used or treated with suspicion.
  • Heater.Heater. Posts: 21,230
    edited 2011-06-23 01:36
    Of course whatever signal you are sampling should be filtered in hardware prior to hitting the ADC.
    The last thing you want as input to the ADC is some noise or interfering signals that are higher in frequency the half your sampling frequency.
    With that in place you can do more filtering/averaging in software.

    What is the highest frequency you expect in your actual signal? As it's a temperature measurement I guess that is quite low, a few hertz.

    What is you sampling rate?

    The advice about looking at the Fourier transform of you incoming signal and/or the output of you filter need not be so hard to do. If you are working in low audio frequencies you can use the sound card in your PC and a free spectrum analyzer program.

    I used to use SpectrumLab under Windows http://www.dxzone.com/cgi-bin/dir/jump2.cgi?ID=9270 and BaudLine under Linux http://www.baudline.com/

    There is a whole list of such software here: http://www.dxzone.com/catalog/Software/Spectrum_analyzers/
  • Heater.Heater. Posts: 21,230
    edited 2011-06-23 02:13
    If you are measuring temperature why do you need a 16 bit ADC?

    16 bits gives you 65536 different levels so you have a resolution of 0.0015%. Given that most temperature sensors I have come across are only good for +/-1 degree I would have thought an 0.1% resolution would be sufficient and a 10 bit ADC would suffice. Or is your sensor a lot more sophisticated?
  • Zap-oZap-o Posts: 452
    edited 2011-06-23 07:16
    @Phil Pilgrim (PhiPi)
    Not trying to be lazy I am under pressure and wanted a quicker solution. In fact I will try using a FFT to measure the noise if I can squeeze it in the schedule.

    @ Beau Schwabe
    That is is another great way to handle the signal to noise ration. I forgot about the Nyquist rate from school. Thanks

    @Heater.
    I do use a hardware low pass filter before the signal goes into the ADC. As far as using a 16bit ADC well the temperature I am measuring has to be +/- 0.01 degrees C and in fact I have found a way to measure temperature to this resolution.

    Thanks all for posting Ill begin measuring and calculation the noise today and through out the weekend
Sign In or Register to comment.