0

i'm a student who is studying the Arduino. I want to measure acceleration using arduino and any sensor. i looked at some acceleration sensors (ex, MPU6050, AXDL335), but they were just measuring gravity, not axial acceleration.

Could you tell me any sensor that can measure the axis-acceleration available with Arduino?

asked Jan 6, 2020 at 12:21
3
  • They are measuring any acceleration. Gravity just causes an acceleration in one direction. If you accelerate these sensors into a different direction, the resulting acceleration vector will be a combination of gravity and your acceleration. So these sensors are already capable of what you want to do. Or do you mean rotational acceleration? If yes, then you need a gyroscope (which is also a part of the MPU6050 I think) Commented Jan 6, 2020 at 12:25
  • But those were not able to measure in the following cases; if the sensor is leveled and accelerated x or y-dir, the directional acc of that axis is zero, and the z-dir is 1g Commented Jan 6, 2020 at 12:38
  • No, it isn't. The MPU6050 (I know this chip a little) has 3 accelerometers for each axis. When you accelerate in x, the corresponding acceleration value rises. Have you already tried something and failed with it? Then you can edit your question to include this information. Maybe you did something wrong and we might be able to help you Commented Jan 6, 2020 at 13:06

1 Answer 1

1

There is no difference between gravity and other kinds acceleration. Gravity is the constant downward acceleration of ≈9.81 m/s2. You cannot feel any difference between the force of gravity and the force you would experience on a surface without gravity that's accelerating upwards at 9.81 m/s2.

You can use the gyroscope to keep track of the orientation of the sensor, so you know the downward direction of gravity, and can correct your accelerometer measurements for it.

The problem is that gyroscope orientation measurements are subject to drift. To correct the orientation for drift, the accelerometer is used (because it can measure the direction of gravity, so you know what the downward direction is). The accelerometer only measures the exact acceleration due to gravity if the sensor is not accelerating, of course, but that's most likely not the setup you're going to use an accelerometer in.

As you can see, this is kind of a chicken and egg problem.
Luckily, there are advanced sensor fusion algorithms and complementary filters available that combine the accelerometer and gyroscope measurements, and give you a pretty good approximation for both.
I've successfully used Madgwick's algorithm for a quadcopter.
Depending on your use case, you'll have to tweak some coefficients to indicate if you rely mostly on the gyro or the accelerometer data. The MPU6050 has a DMP that can run sensor fusion algorithms on the chip itself, so the Arduino doesn't have to deal with that.

answered Jan 6, 2020 at 12:36
1
  • Correction to your your 2nd sentence - gravity appears like an upward (not downward) acceleration. Commented Jun 5, 2020 at 22:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.