# Is it hard to get the speed of movement with mpu6050?

Hello

I want to calculate the speed of movement using mpu6050.
I'm going to use this sensor to calculate the speed of movement like a speedometer. Is it possible to implement a little bit with the value of accel? It will be used for bicycle helmets, so there will be a lot of shaking and tilting, so can we measure the speed using this sensor?

Thank you.

(I'm sorry if my English translation was weird.)

In theory you can numerically integrate the acceleration to get the approximate current speed, but in practice, using consumer grade accelerometers, this works only for short periods of time and under certain circumstances.

Read more about why here, especially the section titled "Using Accelerometers to Estimate Position and Velocity".

It will be used for bicycle helmets, so there will be a lot of shaking and tilting, so can we measure the speed using this sensor?

No. For a bike, use wheel rotation sensors or a GPS to measure speed.

It will be used for bicycle helmets, so there will be a lot of shaking and tilting, so can we measure the speed using this sensor?

NO. absolute impossible. mpu6050 measure acceleration. How should your program distinguish between an acceleration/decceleration coming from a head-shake / coming from the body as a whole moving forward?

You are writing about bicycle-helmets. Do you want to measure speed on bicycles or on something else?
You should give an overview of the whole project. A good working solution highly depends on what it is.

There might be very different solutions for what you want in the end.

best regards Stefan

Hello

Then, can I only print the value when I move more than a certain amount using the mpu6050?
The angle is output from the accel on the mpu6050, but I want to make sure that the angle is not output when it is barely moving.
Is there any way to do this?

Thank you.

What value?

What angle?

Hi yscheol,

maybe it helps if you are put into the role of the other forum-members:

"Yes you can print values depending on values."

How much does such a sentence help? Not at all.

I would have to describe in much more details how and what exactly has to be written as code if it should be of any help for you.

So if you want more precise help you have to describe precisely what you want to do.
An important information is to give an overview over your project.

best regards Stefan

@yshceol, It looks like you went back and edited one of your posts. Please don't do that without annotating it with some sign like "Edit -"... it makes the responses seem wrong, and makes the thread hard to follow. It's best not to do it at all.

may be using a GPS would be more appropriate ?