So I would like to have a sensor that can detect rotation (around the vertical axis only is needed) and that detects motion (no specific direction, only be able to detect if the sensor is moving). I would like it to be wireless and transmit the data to a Mac via bluetooth or whatever is the best. I was looking at this one but was wondering how I could make it send the data and if it's suitable for what I'm trying to do (if it can measure rotation and motion). I can buy an arduino too if needed.

Thanks in advance!


1 Answer 1


You chose a pure accelerometer. It is best for measuring linear acceleration (including gravity), but for rotation around the vertical axis you should rather look for a gyroscope (measures rotation) or a magnetometer (measures orientation to north). There are many boards available (you can find some here https://www.sparkfun.com/pages/accel_gyro_guide), but you have to consider your required accuracy.

The second requirement is more difficult: According to Newton's law you can not decide if an object is moving with constant velocity or not, because no external force is applied that could be measured. So you have to consider side effects. For example:

  • If your object is moving, there must have been a previous acceleration that you can measure with an accelerometer. You can integrate over the acceleration to get the current speed, but that is quite noisy and error prone.
  • Most movements come with vibrations that can be measured with an accelerometer.
  • You can measure the current position and therefore your speed with a GPS module. This is only useful outdoors and for higher speeds.

There are other options (like time-of-flight measurements of radio waves), but I would try one of these first.

The third requirement is a radio connection. I would start with a Raspberry Pi and a WiFi stick, because it is quite easy to set up and has a reasonable range and data rate and you can connect your sensor directly to the Raspberry Pi.

EDIT: According to the commets, you want to measure movements of your legs and feet. This narrows down the possibilities:

  • With an accelerometer it is quite easy to determine if someone is moving or standing still, because the foot is constantly accelerating and decelerating.
  • Getting the current speed is quite difficult - actually when walking, a foot has v=0 over ground half of the time.
  • But you can analyze the acceleration pattern and try to count the number of steps.
  • Since you want to attach it to your leg, an Arduino might be more reasonable because of the reduced power consumption, but it will make the wireless connection more difficult.
  • Buy an IMU and a GPS module and try how far you can get.
  • \$\begingroup\$ But the Raspberry Pi is pretty expensive right? And can't I detect if an object is just moving, not depending on what direction? \$\endgroup\$
    – stenlan
    Nov 10, 2014 at 6:44
  • \$\begingroup\$ A Raspberry Pi is about 35 EUR, an Arduino about 20 EUR, so there is no big difference. If you want to be cheap, build your own microcontroller board (e.g. based on an ATmega). Regarding your "movement detection": Please read the answer again and then enhance your question to describe which movement you want to measure. \$\endgroup\$
    – koalo
    Nov 10, 2014 at 6:50
  • \$\begingroup\$ I want to measure any movement in any direction but I don't need to know the direction. Only if it's moving fast or slow, not exactly speed in MpH or something. \$\endgroup\$
    – stenlan
    Nov 10, 2014 at 6:56
  • \$\begingroup\$ But of what? As written in the answer you can not measure constant velocity movement (think the other way around: is there anything NOT moving?). So you have to say what it is that is moving to find an alternative. \$\endgroup\$
    – koalo
    Nov 10, 2014 at 6:59
  • \$\begingroup\$ Well, the sensor should be attached to my leg/foot. Don't phones have this "motion detection"? \$\endgroup\$
    – stenlan
    Nov 10, 2014 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.