Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

ADXL202 acceleration sensor usage??

Status
Not open for further replies.

hbaocr

Full Member level 4
Joined
May 13, 2007
Messages
235
Helped
25
Reputation
48
Reaction score
5
Trophy points
1,298
Location
Hochiminh City university of technology (VietNam)
Activity points
2,777
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
 

cesare

Full Member level 3
Joined
Feb 21, 2002
Messages
175
Helped
9
Reputation
18
Reaction score
2
Trophy points
1,298
Activity points
1,226
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
 

rikie_rizza

Full Member level 6
Joined
Aug 5, 2006
Messages
339
Helped
29
Reputation
58
Reaction score
9
Trophy points
1,298
Location
Bikini Bottom, between a rock and a pineapple
Activity points
3,173
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.
 

hbaocr

Full Member level 4
Joined
May 13, 2007
Messages
235
Helped
25
Reputation
48
Reaction score
5
Trophy points
1,298
Location
Hochiminh City university of technology (VietNam)
Activity points
2,777
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
 

rikie_rizza

Full Member level 6
Joined
Aug 5, 2006
Messages
339
Helped
29
Reputation
58
Reaction score
9
Trophy points
1,298
Location
Bikini Bottom, between a rock and a pineapple
Activity points
3,173
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.
 

hbaocr

Full Member level 4
Joined
May 13, 2007
Messages
235
Helped
25
Reputation
48
Reaction score
5
Trophy points
1,298
Location
Hochiminh City university of technology (VietNam)
Activity points
2,777
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
 

rikie_rizza

Full Member level 6
Joined
Aug 5, 2006
Messages
339
Helped
29
Reputation
58
Reaction score
9
Trophy points
1,298
Location
Bikini Bottom, between a rock and a pineapple
Activity points
3,173
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.
 

Kral

Advanced Member level 4
Joined
Mar 28, 2005
Messages
1,326
Helped
280
Reputation
558
Reaction score
85
Trophy points
1,328
Location
USA
Activity points
13,418
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
 

pabloec

Member level 2
Joined
Sep 20, 2007
Messages
49
Helped
9
Reputation
18
Reaction score
3
Trophy points
1,288
Activity points
1,551
also make sure you dont sample at the sampling frecuency of the IC, just stay away of the 10khz range.
 

letitwork

Banned
Joined
Nov 22, 2007
Messages
8
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
0
Sounds like you have problem with the basics, ground, supply, bypassing etc.
 

Slayerza

Full Member level 5
Joined
Oct 22, 2005
Messages
296
Helped
27
Reputation
54
Reaction score
5
Trophy points
1,298
Location
South Africa
Activity points
3,462
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
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,875
Helped
14,125
Reputation
28,507
Reaction score
12,809
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,851
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.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top