Accelerometer is an Electromechanical device that measures the acceleration process. The forces may be Static or Dynamic. Accelerometer Chip is now available to interface with the Micro controller based projects like Robotics, Drones etc. It is a tiny chip that senses the tilt and with reference to the G-force ( Gravity) it generates a tiny output voltage. A Comparator will measure the voltage and accordingly the micro controller sends signals for the corresponding movement.
A very good example of the working of Accelerometer is the movement of Touch screen in Smart phones.
The Smartphone senses its location, wobbling between horizontal and vertical screens, dancing Icons and so many parallax effects produced are due to the Accelerometer chip . The Accelerometer chip present inside the Smart phone measures the rate of tilt. It is basically available in 2 axis or 3 axis mode. The axis is represented as X-Y-Z just like a 3D figure. Whenever you tilt your phone, the Accelerometer senses that tilt and gives a corresponding output voltage. Using a Comparator, the voltage is measured based on the tilt. So it converts the physical movement to electrical energy. Based on the electrical energy levels, the Microcontroller senses the direction of tilt. The screen then goes to the opposite side of tilt. Side wise wiping of the screen is also the trick of the accelerometer.
Accelerometer Modules are now available which works off 3-5 volts DC. There are output points like X, Y and Z to interface with the Microcontroller. The Microcontroller directs the mechanical parts of the Robot to move according to the tilt sensed by the accelerometer.