Any ideas on how to detect someone jumping with arduino sensors?

I am building a Sonic game with my son from scratch in which the walking front and back controls are using a joystick. I want the jumping action to require the player to actually jump.

My quesiton - what physical sensors can be used to physically detect a jump?

May be an ultrasonic sensor that is mounted near one's feet and any time the player jumps, it would detect the object distance in front of it increase to a big number and that would mean a jump?

any other smarter ways of detecting a jump?

An accelerometer will work. They detect any significant change in motion, so you will need to choose a suitable threshold.

Accelerometer first (gyro sensor to realize turns).
Ultrasonic sensor: more for distance: maybe: if jumper disappears from view... but you do not know if up or down, and not knowing how much (an LED light barrier would to do the same job to see the jumpers has left its spot).

Jumping is acceleration.

When you jump at the peak height of your jump you are essentially weightless. That is the force of gravity is zero. So when you read zero from an accelerometer channel in the direction of the jump, that indicates you have jumped. All the way down from your jump, you will be in free fall and will read zero from the accelerometer.

I once used a Bluetooth accelerometer to play sound samples depending on which way it was tilted. When I threw it up in the air and detected free fall I played a "wheeeeee...." sample. I am too old to jump much these days.

did a similar project recently sending data every 20mSec from a LSM9DS1 iNEMO Inertial Module to a Andriod smartphone for display using BLE

Very great comment done by Grumpy_Mike: it brings myself to question again: "what can an accelerometer measure?" The acceleration - but what is it? (and which?)

First statement: acceleration is NOT "the speed" - it is the change of speed (difference).

But when I jump - it changes the speed (it slows me down, stops, and I speed up again when I am falling down to earth again. What would it measure during these phases?

I would "assume": nothing, all the time zero, never mind if I still "fly" upwards, stop or fall backwards to ground.

BTW: I think, an accelerometer cannot measure the earth gravitational acceleration (g): when no change in speed happens, e.g. stationary on ground - zero.
Even when "flying freely" in the space (I jump and feets not on ground anymore) - also nothing (even the speed changes).

I would assume: when you jump, you lift your body and try to jump into the air - as soon as your feet has left the ground (and no force anymore) - it measures zero acceleration.
Never mind if you slow down during jumping/"flying" (due to earth gravity), you stop at top point and you reverse direction (falling down now to earth) - it will always measure zero during all phases, never mind if you change velocity (in which direction you "fall").

I imagine the accelerometer as this: it has a tiny mass inside: it can realize if the shell, the housing, starts moving but the internal mass does not yet (due to inertia). When you jump and you have the ground (no forces anymore) - both are affected by the same: both speed up, slow down, stop at the same time, or fall back with the same "speed".
The sensor will not see anymore "different forces", both, the housing (reference) and the sensor (the tiny internal mass) are moving now with the same speed (even the velocity is changed).

Imagine it as: it is actually an "inertia measurement device": is the reference (housing/shell) moving with other speed as the sensor mass (the tiny "pendulum" inside)? If both are affected by the same "effect" (slowing down, speeding up), in the same way: no indication that there is an acceleration (the difference is zero).

So, jumping up, falling down, when in "free motion" should give you acceleration of zero, even you slow down on the way up or you speed up again on the way down.
Or again: a speed change is not really any indication for an accelerometer: Just if the speed change is different to the "expected speed change" due to the acceleration affecting both "parts" in sensor (intertia) - it will realize if speeding up faster as "expected" or "slowing down" more as "expected". If all changes speed in the same way = a constant acceleration, potentially measured as zero in an "inertia sensor".

As long you are in free fall, even speeding up with the gravity acceleration g - there is no change: the acceleration factor has not changed.
The same for jumping up into "free air": the first acceleration (pushing back from earth surface) is gone, now "free movement". Even it slows you down on the jump: there is not any force, not any difference for object and sensor (both are affected in the same way, no difference): the acceleration (earth gravity) slows you down, you start to fall back to earth, you stop, you turn the direction, you fall down, even with increasing speed - the acceleration remains the same. All measured remains the same (zero).

Potentially, your accelerometer will measure zero as value as soon you have "left the earth ground" until you land again on earth.

But tricky:
You cannot assume, a measured value zero means "free floating in the air", a jump has been done. The same value is measured if you are stationary (zero), sitting on the ground:
So, in math terms: you need a second derivative: you have to track if the acceleration has changed (acceleration is the first derivative of speed - a speed change, a 2nd derivative the change of acceleration - needed here).
Now you track if also the acceleration has changed (the second derivative): if so, you know there was a force to speed up (or down). If this becomes zero: no force and now "freely moving" or "stationary" . During "free movement" - no indications (all zero), even sitting on the ground.
You would know it was a jump, if you have measured a "positive" acceleration ( a change: the 2nd derivative). If it has stopped (zero) - the body/object is "freely moving" or back on rest. No statement about the speed, e.g. if stopping or reversing direction.

You can just "realize" the end of the free fall, person has landed again on the ground - if you measure now a "negative" acceleration: when "flying stops", the sensor does not move anymore, but the internal mass keeps going to fly still in same direction. This abrupt stop creates a difference and you see now a "negative" acceleration.

So, in order to know if a person has jumps: the difference at start on acceleration value, a long time zero (freely moving) and a negative acceleration when it lands.
So, when the person starts its jump, as long as it has not left the earth ground - there should be a positive acceleration. If strong enough to leave the ground - you have to do the math (maybe he was just stretching his body).

When zero again - no idea if he is in "free fall" or has stopped the body stretching, still sitting on ground.

So, my conclusion: even you can measure the acceleration (from sensor any value) - without the knowledge about the mass of the moving body/object - you do not have a clue if it was a jump or not, strong enough to "leave the ground".

BTW: the change of acceleration gives you small hint: if slow - the mass might be large. But you do now know how strong the force to cause acceleration. It results in: if you do not know the mass of the accelerated object - you cannot make any statement about "what happens".

You have to consider mass (weight, on earth) and the change of acceleration (2nd derivative of speed), in order to get a clue "how strong the force applied" was and if body could have really left the earth ground for a "free flight".

Just measuring any values on sensor does not seem to make any sense to me: you have to do the math in order to "predict" what the body is doing now ("flying freely through the air" or just stretching/moving his body and still not strong enough to "fly").

Good luck.

Yes there is a force slowing you down, gravity.
ANY change in speed will register an acceleration, positive or negative in the direction of movement.

Assume positive acceleration is down.

1). Stationary on the ground, acceleration = 1G
2). Jumping up until feet leave the ground, acceleration of the body = 1G plus upward change in velocity. Acceleration goes up.
3). Feet have left the ground, body slows down, acceleration = 1G plus upward change in velocity . Acceleration goes down.
4). At Apogee zero velocity , zero velocity change, acceleration = 1G. Acceleration stable.
5). Free fall, downward change in velocity due to gravity, acceleration = 1G - 1G = 0, Acceleration = 0.

I hope that's right, hot day today, significantly more blood in the caffeine stream.

Tom... :smiley: :+1: :coffee: :australia:

Agreed.

@tjaekel I didn't really like the "no force are applied if the object is in a steady state".
As theory as my accelerometer module give me a constant value directed to the ground. And I know (excluding altitude correction) that's the vector as a value of +1g at rest.

Actually, I used this in my calibration methods: I collect raw data at rest from X and Y axis to determine the actual position offset (the card is never absolutely plane) then scale the Z axis considering (thanks Pythagore, I have trouble managing sinus and cosinus):
square root(X²+Y²+Z²) = 1g (directed to the ground/rest state)

You are wrong here, it measures the acceleration due to gravity when it is stationary.

In any frame of reference a rate of change in speed acts exactly like gravity. So when you are in free fall the frame of reference is not moving and you experience no gravity in that field. That is why in an orbiting spacecraft, which is in a circular orbit, you experience weightless and any accelerometer would show a zero reading. In an elliptical orbit there would be slight changes you could measure with an accelerometer. The more eccentric the orbit the more changes you could detect.

Don't believe everything you read in personal messages sent you outside this forum. Who would you rather believe, a university lecturer in physics, or say for example a dentist.

Your conclusions are wrong. Just try it and see what happens. You detect the fall down not the jump up. Although you could if you wanted detect the jump up but that is much more difficult. You can't fall down unless you have first jumped up.

@TomGeorge has a good explanation.

I agree with my mistake: if stationary - there should be the earth gravity measured.
I do not want to argue: but gravity is not a force.

I would guess: when you jump and leave the ground - you measure zero already, not just when free falling.

Never mind: my statements are not right.

It is all in your honor!

there you're right but for an IMU working on an arduino board, lets stay into Newton's principles! :+1:

Did you know that Newtonian Physics is good enough to get NASA to all the outer planets. The only time you have to use Einstein's equations is when you try to visit Mercury.

The only time you have to consider gravity as an exchange of the hypothetical virtual partials called a Graviton is in sub atomic interactions.

Otherwise it is something best considered as a force until we understand it more completely.

The genius thing about Newton is that he was considering what kept the planets and moons apart in orbits round each other. At the time all those considering the question, including Newton, we're looking for some sort of repulsive force that kept them apart. But in the apocryphal story about the falling apple, he realised it was an attractive not a repulsive force that did it.

1 Like

I agree! Stay with Newtons law (forget Einstein). My statement "gravity is not a force" is related to Einstein.
Again: I think, when you jump and you are "freely moving" (no force applied anymore): you will measure zero gravity (zero acceleration):
Consider the Zero-G planes, the flight path, the parabola: when you still move upwards in the air, even slowing down due to gravity, but in the same ratio as the speed reduction - there is not a force, no acceleration.
The same in the "free-fall tower": shoot an object straight up (in vacuum), let it decelerate, stop, fall down - during all these phases - no acceleration measured (even the gravity causes this flight path): a nice Zero-G state for the object.

Yes, you can consider gravity is a force (Newton's law is correct for daily use). In "free motion", when the accelerometer is "freely moving" as inside the housing, moving with the same speed - I think, it will not measure the gravity (acceleration is zero, even you change the speed due to gravity).

So, my "guess": when you try to jump, you push away from the ground: you see a change on accelerometer. It should increase the value. As soon as you have left the ground, no force applied anymore and now a deceleration (trying to fall backwards, slowing down the speed), it might show you zero (the mass inside does not have a weight). At least when you "freely" fall down back to earth: no acceleration can be measured (Zero G). When you see an acceleration during free fall: it is the air resistance causing it (a force applied again).

So, I think, the indication for a jump is: you see a change on measured value (force applied), it changes to small (or even almost zero) = the jumper is now in the air (no force), and an opposite large acceleration again (when you land, a force again = the resistance of the soil).
So, a "jump indication" is potentially: has the acceleration changed? And how much?

When the acceleration goes smaller (even almost zero), smaller as gravity measured when sitting stationary on ground - you tried to jump, for sure. To say, you have left the ground, depends on the speed of acceleration change (and for how long it happened (in relation to your mass)).

So, taking gravity as a force: when sitting on ground - there is a force, you measure the (earth gravity) force. When freely moving (upwards and falling back) - no force (no acceleration). Hard stop on landing - a force again.

BTW: it is already Mr. Einstein:
When the object with accelerometer is "freely falling" down to earth: the accelerometer does not see a force. Both object and sensor are falling with the same speed, the accelerometer is weightless. So, the "internal observer" (the accelerometer) does not see a force and has no clue if speeding up or slowing down (just when air resistance acts - it slows down and accelerometer will see the "air resistance force").

But if you watch the system from the outside ("outside observer"), you see that the falling object is speeding up. Now you assume correctly - there must be a force applied.

This is already "Relativity". WHERE do you observe matters.

Never mind: you can keep going to see accelerometer as measuring a force applied. Just member: the accelerometer in a free falling object is the internal observer. It might see "no force" during some phases "of flight".
But measuring a force (= acceleration) does not tell you if you are moving (e.g. still sitting on the ground), if you are slowing down still or not (air resistance keeps the speed constant after a while and there is force again), or when zero force - is there a speed change? (sure, when falling back but measured gravity is zero).

Accelerometer measures the strength of a force, but not the speed.

It measures acceleration, not force. Force and acceleration are two completely different concepts.

Use springs or strain gauges to measure force.

What is acceleration?
The speed change caused by a force. So, it measures a force. Force and Acceleration are NOT two different concepts! Acceleration is the change of speed (e.g. increased) by applying a (constant) force. Without a force - no acceleration (or deacceleration).
So, I would argue still: it measures at the end if a force is there.
If the acceleration is constant - the force is constant.

It is pretty obvious, isn't it? Newton says: F = m * a
So, the m (mass) is constant - the acceleration (here a, or g for Gravity) is constant: it is directly the force (Newton's Second Law).

BTW: you can measure an acceleration just if a force is there.
Acceleration is the change of speed due to a force. So measuring the acceleration is measuring the force. Isn't it?

You are welcome to wallow in your confusion about basic high school physics concepts, but a technical forum like this one is not a good place to display it so prominently.

1 Like

In a zero G flight path you feel a G force pushing you back into your seat when flying up the parabola, you can also measure it. I have seen this reported as 1.8G. It is only at the apex of the parabola does the weightlessness occur as in the vertical direction the plain is is free fall. The reason you can't extend the weightless time above 10 seconds or so, is that you want the plane and passengers to survive the experience.

Now this is a total misunderstanding of relativity, which refers to the constancy of the speed of light and the passage of time. It says nothing about things occurring at events that happen much slower than 0.9 the speed of light.

You are mixing up frames of reference and what you think of as absolute positions, like falling down.

All that matters for your jump problem is the forces experienced by the frame of reference, because that is what has the accelerometer in it. The "feet leaving the ground" has no effect at all that can be detected easily inside the frame of reference.

"hmmm", but you agree with me: the "frame of reference" (the "Relativity") is there, don't you?
Never mind: my message was "just to think" what (should) happen (based on Physics).

BTW: not just the "apex" : a free raising object has also zero gravity (you miss the force to fly upwards compared to keep going upwards without a force/thrust).

Check the "zero gravity tower" in Germany:
Zero Gravity Tower in Germany
It shows also zero gravity when object is moving up (it doubles the time for the zero gravity phase tests already during the "raising phase" of flight).

Never mind: enough to add here (even I was not always correct, no reason to keep arguing).
The message was: "think and compare with other systems".

BTW: it is not just the speed of light: every GPS system - the reference clock - used and sent from inside the GPS satellite - must be corrected. Even these satellites don't fly near the speed of light, there is a "clock difference".
Forget Einstein, but his "effects" are there, even in daily use (and you use it when driving your car and with navigation system).
It does not matter here: but what matters is the "Relativity" in terms of "frame of reference". Agreed, by both sides (I guess).

OMG. OP, are you still out there?

I believe you're looking for an accelerometer. This One is easy to work with and is scalable. It's not the most accurate in town but you're just wanting to detect a magnitude of change. Can't go wrong for $5.