Friday, July 22, 2011

Accelerometers: what are they for and how they work?

By posting Doodle today, Google has drawn attention to something that not everyone knew by now: some notebooks have built-in accelerometers. This chip is commonly used in current smartphones and tablets, for them to detect the tilt of the device and change the interface or interact with applications in accordance with the movements.


But a notebook is not exactly a device that requires an accelerometer. After all, most people carry it from one side to the other off. And even if they carry the devices connected, they do not expect that what is on the screen move with the tilt of the laptop.

So what some manufacturers include this chip in notebooks? I wrote this post to answer exactly that question.

What is the accelerometer?
Greatly simplifying an article of almost 4000 words in Wikipedia, an accelerometer is used to measure the acceleration of a body (usually what is on it) in relation to gravity. Depending on the complexity of the accelerometer used, which varies with the number of its axles, it can also measure the direction of this force.


An early version of the chip LIS302DL, an accelerometer from STMicroelectronics
Here is one more thing that maybe nobody knows about: there are dozens of types of accelerometers. While the concept and purpose of the accelerometer is the same, they can detect acceleration in different ways such as by magnetic induction, piezoelectricity or by using optical and thermal sensors.

What first realized its usefulness?
First of all, it is good to explain that, at least on laptops, the accelerometer is only a part of a system far more complex. In Apple's case, this system is part of the Sudden Motion Sensor - somehow, he lifted up his usefulness, but details about it a little more forward.

The first notebook to feature Apple's built-in system that the PowerBook has been launched by the company in 2005. But it is misleading to think that the giant apple was the pioneer. In 2003, IBM (prior to its PC division was bought by Lenovo) had a line of ThinkPads that featured the so-called HDAPS, who wore an accelerometer on the same principle of SMS.

Besides the two, Acer also has its GraviSense, HP developed its so-called 3D DriveGuard and Dell created a named Free Fall Sensor. At some point, a notebook of these companies used their systems with the objective of which is explained below.

What is it for?
Despite the wide variation of names, the main objective of a system that uses accelerometers is basically the same and quite simple: protect data in HD. The system is responsible for detecting when a notebook is falling and make the recording heads lock into position, preventing data from being lost in the eventual impact with the ground.

Over time, some manufacturers of hard drives such as Seagate and Western Digital, now include a detection system capable of falling on your disks, making it unnecessary to its implementation by the manufacturer of the notebook itself (and this implementation has fallen into disuse). Still, Apple remains the chip including all laptops manufactured by it today.

Despite this specific use, not to say that the chips are fit only for that. Did not take long for programmers, specifically those owners of Apple laptops, they realize that they could fool with the chips directly. As a result, some programs have to support interaction with them. At the end of this article I quote a few that you can download and test.

Compatibility of systems and browsers
If you take into account the constantly changing world of technology, accelerometers are not exactly new devices. But they are embedded in hardware and systems designed specifically for use by manufacturers of hardware, desktop operating systems have ignored their existence for a long time.

You will not see, for example, a laptop with Windows 98 by taking advantage of the accelerometer, unless a developer can modify the code system itself. But with some special programs created by the manufacturers can take advantage of this chip with Windows XP and Vista and Windows 7 comes with an own API for this.

Correct me if I'm wrong, but for what looked, Linux has no native support for accelerometers, although it can be easily implemented with few lines of code in the kernel. The OS X, in turn, supports the accelerometer from the first notebook PCs with the chip in mid-2005, and never lost support.



In the case of browsers, and depending on the hardware support and system, the accelerometer can only be accessed if it is implemented by its manufacturer. Mozilla has given support to it from Firefox 3.6 and Google did the same in any version of Chrome launched in 2010. I could not find any reference to support for accelerometers in the desktop version of Safari or Opera.

Examples of applications
By having continuous support in Mac OS X, the number of applications for the system that make use of the accelerometer is considerably higher than for Windows or Linux. And their usefulness is very doubtful, but serve to entertain you for a few minutes.

Smackbook Pro (Mac OS, Linux)
It is an application that serves to move applications to a slap in the MacBook display or notebook computer with Linux. We can say that it is an alt + tab more violent than usual.

Seismac (Mac OS)


A program that turns your MacBook into a seismic detector. Perfect for those who live in Chile and other countries where earthquakes are constant problems.

iAlertU (Mac OS)


This is the most useful of all. Using the accelerometer sensor, it detects when the MacBook is moved, and with the built-in camera takes a picture of the person responsible for doing the movement and alerts the computer owner. Simple and efficient.