Go Down

### Topic: Determining accleration due to gravity (Read 16809 times)previous topic - next topic

#### Ben1234

##### Sep 18, 2012, 05:07 pm
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.

#### CrossRoads

#1
##### Sep 18, 2012, 06:29 pm
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
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### Ben1234

#2
##### Sep 18, 2012, 07:21 pm
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.

#### Ben1234

#3
##### Sep 18, 2012, 08:20 pm
Never mind I figured it out. Sorry for the inconvenience.

#### CrossRoads

#4
##### Sep 19, 2012, 03:24 am
What was the solution?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

#### Ben1234

#5
##### Sep 20, 2012, 05:08 pm
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

#### Far-seeker

#6
##### Sep 21, 2012, 11:38 pm

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.

#### Delta_G

#7
##### Sep 26, 2012, 05:43 am

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.
Ad hoc, ad loc, and quid pro quo.  So little time - so much to know!  ~Jeremy Hillary Boob Ph.D

#### packocrayons

#8
##### Oct 12, 2012, 03:27 am
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.

#### Far-seeker

#9
##### Oct 12, 2012, 06:33 pm

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.

#### MarkT

#10
##### Oct 15, 2012, 01:04 am
Of course the real mind-bending thing is to realize that the accelerometer is correct, an object in free fall isn't accelerating
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### packocrayons

#11
##### Oct 15, 2012, 01:38 am
Depends how long it's been in freefall.

#### AWOL

#12
##### Oct 15, 2012, 11:14 pmLast Edit: Oct 15, 2012, 11:16 pm by AWOL Reason: 1
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.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

#### michinyon

#13
##### Oct 21, 2012, 05:18 pm
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.

#### JimboZA

#14
##### Oct 21, 2012, 05:41 pm
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
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

Go Up

Please enter a valid email to subscribe

### Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy