Summary of 3-axis Accelerometer Sensor-ADXL335 Interfacing with ATmega32
This article explains interfacing an ADXL335 3-axis accelerometer with an ATmega32 microcontroller to measure tilt. The system converts analog sensor outputs to digital values via the microcontroller's ADC and displays results on a 16x2 LCD.
Parts used in the ADXL335 Interfacing Project:
- ADXL335 accelerometer sensor
- AVR ATmega32 microcontroller
- 16X2 alphanumeric LCD
ADXL335 accelerometer sensor is a MEMS (Microelectromechanical systems) sensor which can measure static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion, shock, or vibration. The accelerometer sensor is used in mobile devices, gaming systems, disk drive protection, image stabilization, sports devices, health devices and etc. The analog outputs are ratio metric: that means that 0g measurement output is always at half of the 3.3V output (1.65V), -3g is at 0V and 3g is at 3.3V with full scaling in between. The ADXL335 accelerometer sensor gives three analog output values which correspond to three coordinate axes: – x-axis, y-axis and z-axis values.
In this project, we will learn How to interface a 3-axis accelerometer sensor-ADXL335 with AVR ATmega32 microcontroller. Here, we will measure the tilt of the accelerometer sensor or the material to which the accelerometer sensor is attached and we will display the three outputs of accelerometer sensor in a 16X2 alphanumeric LCD. But, the three outputs of 3-axis accelerometer sensor are analog in nature and microcontroller cannot process the analog signal directly. So, first it will convert the three analog outputs of ADXL335 accelerometer sensor to digital values using its analog to digital converter and then it will display the three converted digital values in the 16X2 alphanumeric LCD. Now, we will tilt the accelerometer sensor or the material to which the sensor is attached in different direction and we will see the changes in its output values in the 16×2 alphanumeric LCD.
For more detail: 3-axis Accelerometer Sensor-ADXL335 Interfacing with ATmega32
- What is the primary function of the ADXL335 sensor?
It measures static acceleration of gravity for tilt sensing and dynamic acceleration from motion, shock, or vibration. - How does the project handle analog signals from the sensor?
The microcontroller uses its analog to digital converter to convert the three analog outputs into digital values. - What display device is used in this setup?
A 16X2 alphanumeric LCD is used to display the three converted digital values. - Can the ATmega32 process analog signals directly?
No, the microcontroller cannot process analog signals directly without conversion. - How many axes does the ADXL335 output correspond to?
It provides three analog output values corresponding to the x-axis, y-axis, and z-axis. - What happens when the sensor is tilted?
Tilting the sensor causes changes in its output values which are visible on the LCD. - What is the voltage reference for the 0g measurement?
The 0g measurement output is always at half of the 3.3V output, which is 1.65V. - What range of g-force corresponds to the full scaling?
-3g is at 0V and 3g is at 3.3V with full scaling in between.

