Accelerometer

Digital Fiber, Photoelectric, Laser Range, Optical, Temperature, Rotary Encoder, Ultrasonic, Gas, Gyro, Accelerometer, FlexiBend, Flexiforce, Compass......

Re: Accelerometer

Postby shiyan » Mon Jan 10, 2011 9:45 pm

gilbertgan WROTE:I wrote the Hex file into mypic18f452. Write successful, but my led doesnt blink. The output voltage is about 2.2V at my first try. Then i see 1.6V on my 2nd attempt. How come ar?


Sorry, din go through your code :mrgreen:

actually I din use accelerometer before but as what I understand the output represent acceleration. SO when you tilt the sensor, it is not necessary 2.2V or 1.6V. Is much depend on how fast you tilt it from static. Of course it will change from 1st time to 2nd time and onwards because is impossible every time you tilt, you tilt with constant acceleration. That's why you get different value. Accelerometer is not a tilt angle sensor, but it can be use to detect tilt as when something tilt, it involve acceleration.
User avatar
shiyan
Amateur
 
Posts: 189
Joined: Wed Jun 09, 2010 10:59 am

Re: Accelerometer

Postby waiweng83 » Tue Jan 11, 2011 12:25 am

I would like to add some points to what shiyan said:

First of all, you would need to know how the accelerometer can be used to measure tilt angle. Like its name suggests, accelerometer measures acceleration. But how does it relate to the tilt angle? It's because the gravity of the earth is one type of acceleration with the value of 9.8m/s2 which is equal to 1G. When the measuring axis of the accelerometer is parallel to the gravity force, it measures 1G while if it's perpendicular to the gravity, it measures 0G.

Sounds simple right? But unfortunately, life is not that easy. The accelerometer does not measure purely the gravity acceleration. It measures the SUM of gravity vector and dynamic acceleration vector which is caused by the change of velocity. For example, when the robot start moving, it will encounter the acceleration in the same direction of the movement. This acceleration will be sensed by the accelerometer as well and the calculated tilt angle will not be accurate.

So in your application, unless your robot will be moving very slowly until the dynamic acceleration can be neglected, otherwise you might need a gyroscope and combine the reading with the accelerometer for accurate tilt angle measurement. You might not need to use the Kalman Filter as there are other simpler types of filter which can be used, Complementary Filter is one of them.

Hope this helps.
With the power of dream, nothing is impossible...
User avatar
waiweng83
Moderator
 
Posts: 208
Joined: Wed Apr 15, 2009 2:17 pm

Re: Accelerometer

Postby gilbertgan » Tue Jan 11, 2011 1:45 am

Yeap. Am looking the working principle of gyroscope and kalman filters already.

Im having my senior's 2 wheel balanced robot report. He used IMU and Kalman filter. His project involves Dc motor Back emf sensing, PID control system. he uses dsPIC30F4013 and UART to do real time tuning.

Does the two thing mentioned applicable to my project? I thought i'm supposed to get the tilt angle by applying kalman filter on accelerometer and gyro's output, no? And btw, i should use UART also right? If not, i couldnt find the constants for kalman calculation. Just to confirm

Lastly, the report mentioned that Kalman consumes a lot processor power. So, want to ask whether my PIC18F452 sufficient or not? Or i should consider buying high end MCU.
gilbertgan
Freshie
 
Posts: 4
Joined: Thu Jan 06, 2011 7:29 pm

Re: Accelerometer

Postby happyrush » Thu Jan 13, 2011 8:24 pm

Hi waiweng83,

You are miss-understanding accelerometer function,when sensor's sensing element parallel to the earth horizontal, it is 0g. sensing element is a micro-machine element.

if you eant to get 0.00 degree meaning that you need to get 0g.

accelerometer is one of the tilt angle sensor, ADXL355 can do up to 0.1 degree and ADXL322 can do up to 0.05 degree resolution if you use 16 bit sigma-delta ADC.

The accelerometer can be 1g, 2g and 3g to 8g is for vibration measurement.

We normally use 1g and 2g for tilt angle.have a look on MEMS technology http://www.digipas.com
happyrush
Novice
 
Posts: 24
Joined: Tue Jul 20, 2010 10:52 pm

Re: Accelerometer

Postby waiweng83 » Fri Jan 14, 2011 12:48 pm

happyrush WROTE:Hi waiweng83,

You are miss-understanding accelerometer function,when sensor's sensing element parallel to the earth horizontal, it is 0g. sensing element is a micro-machine element.

if you eant to get 0.00 degree meaning that you need to get 0g.

accelerometer is one of the tilt angle sensor, ADXL355 can do up to 0.1 degree and ADXL322 can do up to 0.05 degree resolution if you use 16 bit sigma-delta ADC.

The accelerometer can be 1g, 2g and 3g to 8g is for vibration measurement.

We normally use 1g and 2g for tilt angle.have a look on MEMS technology http://www.digipas.com


Hi, you are right only if the robot is static and not moving as I explained here:

First of all, you would need to know how the accelerometer can be used to measure tilt angle. Like its name suggests, accelerometer measures acceleration. But how does it relate to the tilt angle? It's because the gravity of the earth is one type of acceleration with the value of 9.8m/s2 which is equal to 1G. When the measuring axis of the accelerometer is parallel to the gravity force, it measures 1G while if it's perpendicular to the gravity, it measures 0G.


But one thing you missed out is, accelerometer does not measure pure gravity acceleration (where we calculate the tilt angle from). You mentioned that accelerometer can be used to measure vibration as well right? But how? Because accelerometer measures dynamic acceleration which is caused by vibration.

Another example is the fluid inside human ear act like a tilt sensor and enable us to balance. When we stand still, or moving in a constant speed, we know which way is up and which way is down, don't we? But if we are on a roller-coaster, can we differentiate which way is up or down if we close our eyes?
With the power of dream, nothing is impossible...
User avatar
waiweng83
Moderator
 
Posts: 208
Joined: Wed Apr 15, 2009 2:17 pm

Re: Accelerometer

Postby happyrush » Fri Jan 14, 2011 11:45 pm

Hi waiweng83,

refer to your words:
"When the measuring axis of the accelerometer is parallel to the gravity force, it measures 1G while if it's perpendicular to the gravity, it measures 0G."

you are opposite the facts.For accelerometer, most of them are MEMS technology, When the measuring axis of the accelerometer is parallel to the gravity force, it measures 0G.You can easily find out this fact if you know what is the structure of accelerometer.And in fact, accelerometer not only in 1G, they can be 2 to 16G.

We understand that accelerometer will affect by acceleration.So during using it, you can stop your robot for a while to take a reading of the angle just take you less than 1 second, only less than 1 second of static unless the robot as fast as a airplane then it is not applicable.

If you not really understand how accelerometer can use for vibration, please go to http://www.freescale.com or http://cache.freescale.com/files/sensor ... A1211D.pdf on how they use it to measure vibration.In their datasheet, they stated that their sensor can do vibration measurement.

All the accelerometer can detect vibration, hardisk also use them inside to protect from damage...if vibration too strong, hardisk will off awhile.

"But if we are on a roller-coaster, can we differentiate which way is up or down if we close our eyes?" We are human surely cannot but accelerometer can, we can get the acceleration positive and negative. Please compare apple to apple, do not compare apple to elephant.


But anyway, it just a discussion and share my experience for this kind of sensors. Of course, there are many way to measure tilt angle but MEMS sensors is the smallest in size.Useful link:http://www.analog.com , http://www.kionix.com,http://www.st.com
happyrush
Novice
 
Posts: 24
Joined: Tue Jul 20, 2010 10:52 pm

Re: Accelerometer

Postby fido » Fri Mar 18, 2011 11:43 am

i just bought ADXL335 ..i wanna use it in my project for airbag for motorcyclist..is it possible i use this mechanism?from what i've read on the data sheet, different axis will produce different output..so, i thought of using this accelerometer as a sensoring mechanism..if the chip is put in a different position(1g and -1g for x and y axis), it will produce a different voltage..i want to compare all the three output before it punctures the compressed air..and another one is what is the output voltage output of x, y and z if we supply 3V?take example if we have 1g output on the x-axis..
fido
Fledgling
 
Posts: 1
Joined: Fri Mar 18, 2011 10:57 am

Re: Accelerometer

Postby robosang » Sun Mar 20, 2011 11:17 am

fido WROTE:i just bought ADXL335 ..i wanna use it in my project for airbag for motorcyclist..is it possible i use this mechanism?from what i've read on the data sheet, different axis will produce different output..so, i thought of using this accelerometer as a sensoring mechanism..if the chip is put in a different position(1g and -1g for x and y axis), it will produce a different voltage..i want to compare all the three output before it punctures the compressed air..and another one is what is the output voltage output of x, y and z if we supply 3V?take example if we have 1g output on the x-axis..


Well, not really uses accelerometer before, but I know it detect acceleration, our earth gravity is one of the acceleration too :lol:

Of course different axis have different output, else what for they do it in 3 axis? Acceleration is vector value, it is directional.

Did the datasheet give you the spec of output voltage? Do a simple test, power it up, test the voltage from each axis and change the orientation against earth gravity, you should understand the concept.

Just like this: http://www.dimensionengineering.com/datasheets/DE-ACCM3D.pdfrefer to second page
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Accelerometer

Postby sheng86 » Fri Nov 25, 2011 9:53 pm

i'm using ADXL335 and PIC16F887, i would like to ask about the ADC conversion for ADXL335. and the programming code which i'm using MPLAB IDE.
could anyone teach me for that?

best regards
thanks.
sheng86
Greenhorn
 
Posts: 2
Joined: Fri Nov 25, 2011 9:49 pm

Re: Accelerometer

Postby kl84 » Mon Nov 28, 2011 9:24 pm

sheng86 WROTE:i'm using ADXL335 and PIC16F887, i would like to ask about the ADC conversion for ADXL335. and the programming code which i'm using MPLAB IDE.
could anyone teach me for that?

Not the same PIC and accelerometer model but the concept is there...have a look at this DIY project in Cytron's website.
User avatar
kl84
Amateur
 
Posts: 166
Joined: Thu Jul 08, 2010 12:14 pm

PreviousNext

Return to Sensor

Who is online

Users browsing this forum: No registered users and 21 guests

cron