2008-11-19 03:44 AM
ADC noise and filtering
2011-05-17 03:52 AM
I'm using an STM32 to do A/D on a potentiometer used as an angle sensor. I have a calibration routine to take measurements at the fixed stops. Then when running, I calculate the angle using y=mx+b and send the angle out over RS232. All that works fine. However, the A/D noise produces about half a degree total of angle noise. This isn't a big deal, but a new requirement is include the instantaneous angle velocity. This angle noise results in a velocity that is basically useless. I need to smooth this out, so I'm looking for ideas. Here are some of the options I've identified: drop LSB of ADC value, averaging, oversampling, or use a digital filter (FIR).
Any advice would be appreciated.2011-05-17 03:52 AM
2011-05-17 03:52 AM
For software filtering, there is a fundamental trade off between noise reduction and bandwidth that can't be eliminated.
So the first question you have to answer is how fast does this have to track the angle velocity? The slower the response time, the more you can average, the more you can reduce the noise. If you can't average then you will need to reduce the source of the noise (POT design, power supply, grounding issues, shielding problems, etc) oversampling is not going to help if the noise is generated from the pot or power supply, oversampling is to reduce A/D quatatization noise (get more then 12 bits)2011-05-17 03:52 AM
For this application, it doesn't need to be fast. 20ms (50Hz) would be sufficient.
I read AN2834, which was full of good information. I'm using a PCB with power & ground planes, an LDO with good line & load regulation, Vdda bypass caps, running from HSI, doing ADC calibration at power-on, using the full ADC range. I'll start with averaging and see how that works.2011-05-17 03:52 AM
Quote:
On 18-11-2008 at 22:09, Anonymous wrote: Hi, You can refer to our recently published Application Note ''AN2834'' : How to get the best ADC accuracy in STM32F10xxx devices Hope this may give you some thoughts for your application. Cheers, STOne-32 very nice application note!