Accelerometers for your Robot[The ADXL202 and the MEMSIC 2125]

Written on December 31, 2008 – 12:14 pm | by bluehash |

You’ve seen robots run on two wheels ,walk on two legs and balance just like us humans.I bet you’ve wondered whats in them that makes them “not tip over.

The device that enables this is a tiny teeny IMEM [aMicro Electro-Mechanical System] which can measure anything between ±1g to ±20g [some of the high g accelerometers measure ±20g to ±250g ]

The sensors:

What’s a “g”?
A “g” is a unit of acceleration having a value of 9.8
if you say 1g of acceleration .Its equivalent to:
1g = 1*9.8 = 9.8 m/s2
2g = 2*9.8 = 19.6m/s2

“g” in reality :

1g The acceleration exerted by the Earth’s gravity on an object or person (for example, a cell
phone on a desk experiences 1 g of acceleration).
0-2g The acceleration range experienced by a person when walking.
10-50g The acceleration experienced by an automobile in a typical crash.
100-2,000g The acceleration experienced by a laptop if it is dropped from a height of three feet onto a
concrete floor.
50,000g The acceleration experienced by a munition when shot from a cannon.


Where are Accelerometers used:

  • Robotics
    —To measure Tilt and Acceleration
  • Vibration monitoring
    —Vibration monitoring of heavy machinery
  • Alarms and Motion Detectors
  • Cellphones
    —To invert the Phone screen so that the screen is always vertical
  • Model Airplanes
    —Detecting pitch and yaw
  • Vehicle headlight aligning
  • Disk Drives
  • Vehicle Security

The following describes the two most popularly used accelerometers.
Both these accelerometers work on the same principle ,but on different technologies.

The Analog Devices ADXL202
Manufacturer :: Analog Devices
Datasheet :: pdf

The ADXL202 has a movable mass inside it which responds to vibrations,tilt or jerks.
The sensor element is a differential capacitor whose output is proportional to acceleration. The beam is made up of many interdigitated fingers.
Each set of fingers can be visualized as shown below:
Images Courtesy :

The movement of the beam is controlled by the polysilicon springs holding the beam.
These springs and the beam’s mass obey the laws of physics .
The force (F) on a mass (m) subject to acceleration (a), according to Newton’s Second Law, is
F = m a
The deflection (x) of a restraining spring according to Hooke’s Law is proportional to the applied force:
F = k x
From the above two equations…
a(acceleration) is proportional to x(displacement)

This enables us to compute the acceleration.
Once acceleration is obtained. Tilt can be obtained by monitoring each of the axes

The MEMSIC 2125
Manufacturer :: Memsic
Datasheet :: pdf

Unlike the Analog Devices ADXL which uses a movable beam, the Memsic accelerometers measure acceleration by monitoring a hot gas inside a chamber. The chamber is lined by a numerous temperature sensors which monitor the movement of the gas.
The picture below illustrates this:
Images courtesy of Parallax Inc. (, from the Stamps in
Class Forum article”
How to – Accelerometer (1) Fundamentals and Tilt

The first figure illustrates the accelerometer when it is held level.Note the position of the hot gas. The adjacent figure shows the accelerometer when tilted.The gas now shifts,changing the values of the sensors appropriately.

Output of an Accelerometer
Accelerometers like the ADXL and Memsic output their measurements in terms of PWM [Pulse Width Modulation].
For example take the ADXL202jqc which measures -2g to 2g. According to the ADXL datasheet 0g would translate to a 50% duty cycle.
A < than 0g readout with a lower than 50% duty cycle

A 0g readout with 50% duty cycle

A > than 0g readout with a greater than 50% duty cycle

Accelerometer AXIS
Both the above sensors measure 2 axis i.e the x and the y


Selection of an axis depends on your project requirements. You can even use the sensors to measure a full 360 degree of tilt. by using two accelerometers oriented perpendicular to one another.When one sensor is reading a maximum change in output per degree, the other is at its minimum.

Well thats it..these sensors do not need a lot of interfacing components. The ADXL202 just need 2 resistors and capacitors to set certain parameters while the Memsic needs even fewer components.

Related Posts

3 Responses to “Accelerometers for your Robot[The ADXL202 and the MEMSIC 2125]”

  1. Aidren says:

    Hello sir,
    How much does ADXL202 and MEMSIC 2125 cost in india? and which is reliable and better? Thanks in advance

  2. ankit bhardwaj says:

    hi sir,
    can u give me knowledge about how to use adxl202 with atmega 32,or atmel 16?
    and wats the cost of adxl 202 in india?


Welcome to my place on the web. I note down anything interesting most of them relating to my experiences, Tech, To-dos, How-tos and various hacks. Most of my time is spent in tinkering around with hardware, building robots and working with DSPs.More

Want to subscribe?

 Subscribe in a reader Or, subscribe via Email

Add to Technorati Favorites
Find entries :