Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using the iPhone accelerometer in a car

I want to use the iPhones's accelerometer to detect motions while driving. I'm a bit confused what the accelerometer actually measures, especially when driving a curve.

Car driving a curve

As you can see in the picture, a car driving a curve causes two forces. One is the centripetal force and one is the velocity. Imagine the iPhone is placed on the dashboard with +y-axis is pointing to the front, +x-axis to the right and +z-axis to the top.

My Question is now what acceleration will be measured when the car drives this curve. Will it measure g-force on the -x-axis or will the g-force appear on the +y axis?

Thanks for helping!

UPDATE!

For thoses interested, as one of the answers suggested it measures both. The accelerometer is effected by centrifugal force and velocity resulting in an acceleration vector that is a combination of these two.

enter image description here

like image 748
ChrisIsBack Avatar asked Apr 19 '12 06:04

ChrisIsBack


People also ask

How are accelerometers used in cars?

This is why accelerometers are used in automobile collision safety systems, for example. When a car is acted on by a powerful dynamic force, the accelerometer (sensing a rapid deceleration) sends an electronic signal to an embedded computer, which in turn deploys the airbags.

Will my iPhone detect a car crash?

While you're driving or you're a passenger in a motor vehicle, the motion sensor with a high dynamic range gyroscope and high-g accelerometer, GPS, barometer, microphone, and advanced motion algorithms work together in your iPhone or Apple Watch to accurately detect a crash.

How does the iPhone accelerometer work?

When the phone accelerates in a particular direction, some of these springs will get compressed in order to make the tiny test mass also accelerate. The accelerometer measures this spring compression and uses that to determine the acceleration of the phone. With that, it will know if it is facing up or down.

How accurate are iPhone accelerometers?

Typical phone accelerometer chips resolve +/- 2g @ 12 bits providing 1024 bits over full range or 0.0643 ft/sec^2 lsb. The rate of sampling depends on clock speeds and overall configuration. Typical rates enable between one and 400 samples per second, with faster rates offering lower accuracy.


2 Answers

I think it will measure both. But don't forget that the sensor will measure gravity as well. So when your car is not moving, you will still get accelerometer readings. A nice talk on sensors in smartphones http://www.youtube.com/watch?v=C7JQ7Rpwn2k&feature=results_main&playnext=1&list=PL29AD66D8C4372129 (it's on android, but the same type of sensors are used in iphone).

like image 121
JohanB Avatar answered Oct 05 '22 02:10

JohanB


Accelerometer measures acceleration of resultant force applied to it (velocity is not a force by the way). In this case force is F = g + w + c i.e. vector sum of gravity, centrifugal force (reaction to steering centripetal force, points from the center of the turn) and car acceleration force (a force changing absolute value of instantaneous velocity, points along the velocity vector). Providing Z axis of accelerometer always points along the gravity vector (which is rare case for actual car) values of g, w and c accelerations can be accessed in Z, X and Y coordinates respectively.

like image 43
hoha Avatar answered Oct 05 '22 03:10

hoha