| Author |
Message |
hbaocr
Joined: 13 May 2007 Posts: 229 Helped: 15 Location: Hochiminh City university of technology (VietNam)
|
09 Oct 2007 14:14 ADXL202 acceleration sensor usage?? |
|
|
|
hello friends
Plz help me to use ADXL sensor
when I read value from that IC 20 times and receive many different value in one condition of acceleration.So i don't know which value is reliable.Plz help me to find the best suitable value and give me some algorithm to find that value nearby reliable value which error δ value (δ=reliable value- value I choose) is ecceptable.
thank alot
Last edited by hbaocr on 15 Oct 2007 14:36; edited 1 time in total |
|
| Back to top |
|
 |
cesare
Joined: 21 Feb 2002 Posts: 176 Helped: 7
|
09 Oct 2007 16:07 Re: ADXL202 acceleration sensor usage?? |
|
|
|
| I think you can take a running average calculated over a number of past measurement. For example you can take the average of the last 8 measurement
|
|
| Back to top |
|
 |
rikie_rizza
Joined: 05 Aug 2006 Posts: 285 Helped: 20 Location: Bikini Bottom, between a rock and a pineapple
|
09 Oct 2007 16:39 ADXL202 acceleration sensor usage?? |
|
|
|
To use the data coming from an accelerometer, you must rely on the sensor's manufacturer. Calibrate your sensor by detecting the -1G and the +1G. than find the 0G (0G)=(-1G)+(+1G) all in mV. after that, find the 1G/mV... 1G/mV=(+1G)-(0G).
It is difficult for us to find an exact and steady acceleration except the earth's gravitation.
|
|
| Back to top |
|
 |
hbaocr
Joined: 13 May 2007 Posts: 229 Helped: 15 Location: Hochiminh City university of technology (VietNam)
|
09 Oct 2007 16:54 Re: ADXL202 acceleration sensor usage?? |
|
|
|
thank for all helping ,
I have already determined (-1G) ang (+1G) but my prolem is when I read value from that IC on one exact condition , I have received different value on each times I read value from Ic .So I don't know what value among it is reliable. So my problem is ,try to find reliable value or the value nearby it which error of that value can be aceptable.
so,Plz send me some idea or algorithm to find that value
thank alot
|
|
| Back to top |
|
 |
rikie_rizza
Joined: 05 Aug 2006 Posts: 285 Helped: 20 Location: Bikini Bottom, between a rock and a pineapple
|
10 Oct 2007 9:06 ADXL202 acceleration sensor usage?? |
|
|
|
How can you guarantee that the acceleration is an exact condition? It is so difficult to create a constant dynamic acceleration. Alright, assume you are correct, it could be another hardware problem... use a lowpass filter. Connect the output with 1K resistor at the other end of the resistor, tie a capacitor that connected to ground.
For software correction, try averaging. Collect as many data as possible in some consecutive time (like 1000 data per 100ms), sum all the data and divide the sum by the number of data taken.
|
|
| Back to top |
|
 |
hbaocr
Joined: 13 May 2007 Posts: 229 Helped: 15 Location: Hochiminh City university of technology (VietNam)
|
10 Oct 2007 14:43 ADXL202 acceleration sensor usage?? |
|
|
|
hi,thank u alot
but can you tel me more about filter which I design for using X_filt , Y_filt before connect it ADC 10bit which value of C and value R I need choose for making Low pass filter
|
|
| Back to top |
|
 |
rikie_rizza
Joined: 05 Aug 2006 Posts: 285 Helped: 20 Location: Bikini Bottom, between a rock and a pineapple
|
11 Oct 2007 7:36 Re: ADXL202 acceleration sensor usage?? |
|
|
|
ADXL output ---R 1K---to adc---C 1uf---GND
10-bit is a small resolution, to process the data try averaging.
here's a sample program
unsigned int n, data;
n=0;
for (i=1;i<=100;i++)
{
n=n+adc_data(0); //adc_data(0) is a function to call the adc conversion and return the data, it might be different from your's.
}
data=n/100;//data is the averaging result.
|
|
| Back to top |
|
 |
Kral
Joined: 28 Mar 2005 Posts: 952 Helped: 156
|
02 Nov 2007 17:47 Re: ADXL202 acceleration sensor usage?? |
|
|
|
hbaocr,
In addition to the filtering options given in other replies, make sure that your data acquisition (DAQ) setup is not susceptible to electrical noise. Some suggestions:
. 1) Use a shielded cable from the accelerometer to the DAQ. The
. shield should be grounded at one end only. Leave
. the other end of the shield open.
. 2) Make sure that your analog and digital grounds
. are connected together at one point only. The best place
. is at the power supply, or supplies.
. 3) Make sure that all power supply grounds in your system
. are connected together at one point only
. 4) Make sure that all integrated circuit components
. in the analog signal chain (path) have adequate power supply
. bypassing (filtering) to the analog ground with short connections.
Regards,
Kral
|
|
| Back to top |
|
 |
pabloec
Joined: 20 Sep 2007 Posts: 28 Helped: 2
|
16 Nov 2007 0:10 ADXL202 acceleration sensor usage?? |
|
|
|
| also make sure you dont sample at the sampling frecuency of the IC, just stay away of the 10khz range.
|
|
| Back to top |
|
 |
letitwork
Joined: 22 Nov 2007 Posts: 9 Helped: 1
|
02 Mar 2008 0:34 Re: ADXL202 acceleration sensor usage?? |
|
|
|
| Sounds like you have problem with the basics, ground, supply, bypassing etc.
|
|
| Back to top |
|
 |
Slayerza
Joined: 23 Oct 2005 Posts: 305 Helped: 21 Location: South Africa
|
20 Mar 2008 10:56 Re: ADXL202 acceleration sensor usage?? |
|
|
|
Also remember that in order for digital sampling to be accurate you need to sample at at least the nyqiust frequency (double the device freq). Thus is adxl is running at 10kHz sample at min 20kHz
Cheers
Slayer
|
|
| Back to top |
|
 |
FvM
Joined: 22 Jan 2008 Posts: 1768 Helped: 327 Location: Bochum, Germany
|
20 Mar 2008 11:35 Re: ADXL202 acceleration sensor usage?? |
|
|
|
| Quote: |
| Thus is adxl is running at 10kHz sample at min 20kHz. |
No, the ADXL is using 10 kHz PWM output. There is no sense in sampling before low-pass filtering. If the 10 kHz are filtered sufficiantly from the signal, there is no reason to care about nyquist in this case.
Alternatively, pulse width and frequency could be measured by a timer. But as the 10 kHz frequency isn't fixed, a division would be needed to determine the measurement value.
|
|
| Back to top |
|
 |