The 4 Most Popular Motion Sensors in Consumer Electronics

So far we’ve examined the four types of motion and motion’s 6 degrees of freedom by considering your life as an airline pilot. This week we’ll discuss how to detect linear and angular motion using the most popular motion sensing devices in consumer electronics products: accelerometers, gyroscopes, magnetometers and cameras.

As a refresher refer to our figure of the mobile phone and the 6 degrees of freedom we detect – linear x, y and z as well as roll, pitch and yaw. And if you look really carefully, you’ll notice that we flipped the X and Y axes on you from last week since the mobile people decided they needed to be different from the navigation people.  (Sorry, your time as a jet setter was short lived. Now back to reality.)

Motion's Six Degrees of Freedom

Motion's Six Degrees of Freedom Mapped On To Smart Phone

Accelerometers

The Wii and the iPhone popularized the use of motion sensing accelerometers and allowed people to play natural motion games like tennis and tilt-based games such as Doodle Jump. Accelerometers also played an important function by supporting the landscape / portrait rotation on your phone.

Accelerometers are devices that measure force along an axis. Our figure below shows the basics of an accelerometer: a mass is suspended by springs and free to move about an axis. The sensor measures displacement or distance of the mass relative to center. The displacement enables the sensor to determine the linear acceleration of the mass in that direction. Today’s accelerometers typically measure the various forces along our three linear axes and not just the two shown below.

acc

Accelerometer - Mass on a Spring

When the device containing the accelerometer is completely still, the mass on the spring will be offset by the force of gravity pulling it down to earth. So accelerometers are great at measuring the force of gravity – at least when completely still. And knowing this, we can derive the tilt of an object, which is its roll and pitch. Unfortunately yaw isn’t affected by gravity and can’t be directly measured with an accelerometer.

Gyroscopes

So accelerometers are great; they can measure the linear acceleration of an object including gravity, but they can’t measure twisting or rotating motions very well. This is where a gyroscope is really handy. A gyro is an electronic sensor that determines angular velocity around our three axes of roll, pitch and yaw. The physical properties of a gyroscope are more complex to explain than an accelerometer, so if you want to learn more we suggest you look here.

Gyroscope

Gyroscope

With our gyroscope we can also determine the device’s orientation in 3D space. Knowing our angular velocity, we can compute our angular position over time. At least we could if we knew the starting point. Which a gyro doesn’t provide since it has no frame of reference like gravity. So we’ll probably need to combine our gyro and accelerometer data together to do Interesting Things™ – like Nintendo did with their Wii Motion Plus accessory.

Magnetometers

One thing that our accelerometers and gyros can’t do by themselves is determine absolute heading to answer questions like “Are we flying towards London England or London Ontario?” Or more pragmatically, “Which way am I facing when looking at the map on my smart phone?”

A magnetometer on the other hand can give us direction. A mag – the cool name for magnetometer – is a device that measures the strength or direction of a magnetic field. Sort of like a compass. Or exactly like a compass. So with a mag we know which way is north.

Magnetometer

Hall Effect Magnetometer

There are various types of magnetic sensors and our figure shows the basics of a simple Hall effect sensor. Electrons passing through a perpendicular magnetic field are affected by the this field – they don’t follow a straight line path and instead are pulled towards a side. From this we can determine the direction of the field. These sensors also generate a voltage that is proportional to the strength of the magnetic field.

Cameras

Finally, we have optical and image sensors that can be used to measure distance and direction from an object. So let’s say we mount a camera in a TV set and look at a person’s hand (like Microsoft’s Kinect) or at a gaming remote control (like the Wii Remote). The camera intrinsically knows its field of view and based on the size and location of the object it captures, can determine both the angular direction and distance from the TV.

Camera

Camera Basics

Putting the Pieces Together

So we’ve briefly talked about the four most popular motion sensing devices. Our accelerometers, gyroscopes, and magnetometers are inertial sensing devices meaning they measure motion data from the point of view of the object in motion. Cameras are non-inertial and they compute motion from an external reference point such as the TV set or personal computer. Sometimes inertial and non-inertial sensors are needed depending on the use case and which motion parameters are really important. We’ll cover the All Important Use Cases™ in a future blog post. And we’ll also talk about how these devices can be used together to solve interesting problems.