Loading...
 Pages: [1] 2 3   Go Down
 Author Topic: Determining accleration due to gravity  (Read 7544 times) 0 Members and 1 Guest are viewing this topic.
Offline
Full Member
Karma: 0
Posts: 126
 « on: September 18, 2012, 10:07:43 am » Bigger Smaller Reset

I have an accelerometer connected to an Arduino Uno that reads out 1 G when laying flat on a table. When it is in free fall that changes to 0g. Does anyone know the necessary math to convert this to acceleration so that when it is in free fall acceleration is 9.8m/s^s and when it is at rest acceleration is 0m/s^2? Thanks.
 Logged

Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 242
Posts: 16504
Available for Design & Build services
 « Reply #1 on: September 18, 2012, 11:29:52 am » Bigger Smaller Reset

Provide more info please:
accelerometer used, how connected, code.

Otherwise  there is nothing to go on besides speculating about something like this:
http://arduino.cc/en/Tutorial/ADXL3xx
 Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

Offline
Full Member
Karma: 0
Posts: 126
 « Reply #2 on: September 18, 2012, 12:21:31 pm » Bigger Smaller Reset

This is the accelerometer https://www.sparkfun.com/products/9652 with the same wiring and code as shown in this tutorial http://www.geeetech.com/wiki/index.php/MMA7361_Triple_Axis_Accelerometer_Breakout . It outputs the g forces along each axis and I have taken the square root of(x^2+y^2+z^2) to determine the magnitude. Hope this helps and thanks for your help.
 Logged

Offline
Full Member
Karma: 0
Posts: 126
 « Reply #3 on: September 18, 2012, 01:20:16 pm » Bigger Smaller Reset

Never mind I figured it out. Sorry for the inconvenience.
 Logged

Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 242
Posts: 16504
Available for Design & Build services
 « Reply #4 on: September 18, 2012, 08:24:51 pm » Bigger Smaller Reset

What was the solution?
 Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17

Offline
Full Member
Karma: 0
Posts: 126
 « Reply #5 on: September 20, 2012, 10:08:15 am » Bigger Smaller Reset

Since gravity is always constant I have to subtract that out of the values. So at rest when it said g=1 then subtract 1 *9.8m/s^2 = 0 and when it is free falling with a reading  of 0 then subtract 1 * 9.8m/s^2 = -9.8m/s^2
 Logged

USA
Offline
God Member
Karma: 14
Posts: 644
 « Reply #6 on: September 21, 2012, 04:38:55 pm » Bigger Smaller Reset

Since gravity is always constant I have to subtract that out of the values. So at rest when it said g=1 then subtract 1 *9.8m/s^2 = 0 and when it is free falling with a reading  of 0 then subtract 1 * 9.8m/s^2 = -9.8m/s^2

Technically the force of Earth's gravity is not constant from place to place and it can even slowly vary a bit over time.  However, for your purposes this is should be good enough.
 Logged

Offline
Sr. Member
Karma: 6
Posts: 398
 « Reply #7 on: September 25, 2012, 10:43:37 pm » Bigger Smaller Reset

Since gravity is always constant I have to subtract that out of the values. So at rest when it said g=1 then subtract 1 *9.8m/s^2 = 0 and when it is free falling with a reading  of 0 then subtract 1 * 9.8m/s^2 = -9.8m/s^2

Technically the force of Earth's gravity is not constant from place to place and it can even slowly vary a bit over time.  However, for your purposes this is should be good enough.

Technically technically, the force of gravity depends on mass and is called weight.  The acceleration due to gravity is the one that is relatively constant.  Although you are right it does vary slightly from place to place and time to time, but I doubt the OP is going to measure that with his accelerometer.
 Logged

Offline
Jr. Member
Karma: 1
Posts: 67
 « Reply #8 on: October 11, 2012, 08:27:54 pm » Bigger Smaller Reset

If the accelerometer is accurate enough, wouldn't it be able to detect these changes and output an acceleration? Then you could use that as a calibration to find the percentage of gravity compared to standard (9.8N/kg) at that location.
 Logged

USA
Offline
God Member
Karma: 14
Posts: 644
 « Reply #9 on: October 12, 2012, 11:33:04 am » Bigger Smaller Reset

If the accelerometer is accurate enough, wouldn't it be able to detect these changes and output an acceleration? Then you could use that as a calibration to find the percentage of gravity compared to standard (9.8N/kg) at that location.

Theoretically yes. However, I doubt the accelerometers that most of us can afford to use in our projects would be capable that level of both accuracy and precision.  I was really just engaging in some harmless snark.
 Logged

0
Offline
Tesla Member
Karma: 71
Posts: 6611
Arduino rocks
 « Reply #10 on: October 14, 2012, 06:04:04 pm » Bigger Smaller Reset

Of course the real mind-bending thing is to realize that the accelerometer is correct, an object in free fall isn't accelerating
 Logged

Offline
Jr. Member
Karma: 1
Posts: 67
 « Reply #11 on: October 14, 2012, 06:38:09 pm » Bigger Smaller Reset

Depends how long it's been in freefall.
 Logged

Global Moderator
UK
Online
Brattain Member
Karma: 137
Posts: 19028
I don't think you connected the grounds, Dave.
 « Reply #12 on: October 15, 2012, 04:14:38 pm » Bigger Smaller Reset

Quote
an object in free fall isn't accelerating
So why is its velocity increasing?
That bloke that jumped from the balloon, he was free falling, right?
And after 40 seconds, he was doing 800mph or so.
 « Last Edit: October 15, 2012, 04:16:27 pm by AWOL » Logged

Pete, it's a fool looks for logic in the chambers of the human heart.

Offline
God Member
Karma: 9
Posts: 836
 « Reply #13 on: October 21, 2012, 10:18:38 am » Bigger Smaller Reset

An object in "free fall",  certainly IS accelerating.   For objects that jump out of aircraft or fall off the edge of tables,  anyway.
If the object is equiped with an accelerometer,   it detects no acceleration because the acceleration it is actually undergoing offsets the deflection of the sensor element which normally occurs because of gravity.   That is why an accelerometer reads 0 when it is in free fall.     It doesn't mean that it is not accelerating, though.
 Logged

Johannesburg UTC+2
Offline
Edison Member
Karma: 34
Posts: 1705
 « Reply #14 on: October 21, 2012, 10:41:00 am » Bigger Smaller Reset

Quote
(9.8N/kg)

Interesting units for acceleration there....

I agree it's correct, since F=ma or a=F/m, but I've never seen acceleration expressed in any units other than displacement / time2. It's a useful way of looking at it, since what we're interested in as engineers calculating stress is the force exerted on a mass of certain size.

Hmmmm
 Logged

IT Crowd:
Roy... "Have you tried turning it off and on again?"
Moss.. "Have you tried forcing an unexpected reboot?"

 Pages: [1] 2 3   Go Up
Jump to:

© 2011 Arduino Forum: