View previous topic :: View next topic |
Author |
Message |
Izzy
Joined: 27 May 2007 Posts: 106
|
16 -22 bit Analog to Digital converter - Any suggestion? |
Posted: Mon Apr 14, 2008 11:00 am |
|
|
Hello,
I have been working with Pic's 10 bit ADC for measuring acceleration from accelerometer. But I dont know why it is fluctuating +/- 2 numbers up and down. I mean if the reading was 555 (out of 1023) then the value fluctuates upto 553 and 557.
The problem is, those value gets multiplied by around 90 in order for me to get the values I want . i.e. ( gets multiplied by 9.8 gravity and divided by 0.33, which is the voltage per G.) Plus I am using 3.03V zener for ADC reference so it gets multiplied by 3 again.
So even the fluctuation of the lowest bit is giving me off number. But I have to get it very accurate.
Now in 10 bit, even a fluctuation of 1 value up or down gives me..
(1/1023) * 3.03= 0.0029 resolution
This value gets multiplied by 9.8 , which gives 0.0290
Now this gets divided by 0.33 and multiplied by 3.03 which gives 0.087 m/s^2! Now even this much of change in acceleration can give me wrong values for Velocity and Distance and everything.
I have tried putting the pic into sleep while reading, but that didnt do much of a help. I have heard about separating analog and digital ground, but I am not sure how to do it.
So the bottom line is how to improve ADC? do you think using a 16 bit ADC chip will help to minimize the fluctuation? |
|
|
Izzy
Joined: 27 May 2007 Posts: 106
|
|
Posted: Mon Apr 14, 2008 11:05 am |
|
|
Oh by the way..
I am using 18f4685, 40mhz oscillator and the ADC clock is divided by 16. |
|
|
Dimmu
Joined: 01 Jul 2007 Posts: 37
|
|
Posted: Mon Apr 14, 2008 1:55 pm |
|
|
The output will always fluctuate but the mean value is correct.
Maybe you should filter the read value ?
Their is a topic in the library forum about the filters that could be useful for you : http://www.ccsinfo.com/forum/viewtopic.php?t=19509
Dimmu |
|
|
Franck26
Joined: 29 Dec 2007 Posts: 122 Location: Ireland
|
|
Posted: Mon Apr 14, 2008 3:58 pm |
|
|
Hi Izzy,
10 bits and a 3.03V reference means that a variation 3mV on the input will change your LSB....
3mV is nothing, it can come from your 40MHz quartz (which is quite high), the oscillation of your power supply (even if you use a zener for the ref), your mobile or your neighbour who's using is shaver, etc...
In fact I'm quite surprised that you have an oscillation of only 2 LSB...
Something could help: do you have a capacitor on your voltage refence?
Good luck,
Franck. |
|
|
Izzy
Joined: 27 May 2007 Posts: 106
|
|
Posted: Mon Apr 14, 2008 6:31 pm |
|
|
Thanks for the reply..
I have 1 uf cap at the Voltage ref pin.
I did use lil bit of filtering...i.e. taking reading 10 times continuously and taking the average. But I am not sure if I can do intense filtering on this one because I need correct values of the sudden acceleration.
I think if I use heavy filtering the new values will have less meaning .
So 16 or 24 bit ADC chip wont do much progress here huh? |
|
|
Franck26
Joined: 29 Dec 2007 Posts: 122 Location: Ireland
|
|
Posted: Tue Apr 15, 2008 2:09 am |
|
|
Hi Izzy,
I don't think that a 16 or 24 bits ADC will improve your system.
What is the purpose of your application? Do you want to measure the acceleration peak or a moving distance?
If you want to measure a moving distance you can use a filter since the distance is a time integration of the acceleration. In fact the filtering will be done by the integration...
If you want to measure a peak acceleration, you have to know what is the maximum frequency of this peak, calculate your filter and your minimum ADC sample period.
Franck. |
|
|
|