Overview
The ADXL335 is a classic 3-axis analog MEMS accelerometer manufactured by Analog Devices. Housed in a compact 16-lead LFCSP package, it measures dynamic acceleration (motion, vibration, shock) and static acceleration (gravity tilt) across a full-scale range.
Unlike digital accelerometers (such as the ADXL345 or MPU6050) that output or SPI registers, the ADXL335 features pure ratiometric analog voltage outputs for X, Y, and Z axes. Each axis output voltage is centered at ( at 3.3V supply) and shifts by . It is widely used in simple tilt switches, RC model leveling, and analog microcontroller projects.
Quick reference
Module supply voltage (VCC) | 3.3 V to 5.0 V DC (GY-61 module includes 3.3V regulator) |
IC supply voltage (VDD) | 1.8 V to 3.6 V DC (3.3 V nominal) |
| Output signal | 3 Ratiometric Analog Voltages () |
| Full-scale range | (typical) |
| Sensitivity | (at 3.3V supply) |
| Zero- bias voltage | ( at 3.3V supply) |
| Operating current | typical |
Pinout
Common 5-pin GY-61 breakout board header:
| Pin | Name | Type | Description |
|---|---|---|---|
| 1 | VCC | Power | Supply voltage (+3.3 V to +5.0 V DC) |
| 2 | GND | Power | Ground reference (0 V) |
| 3 | X / XOUT | Analog Output | X-axis acceleration analog voltage |
| 4 | Y / YOUT | Analog Output | Y-axis acceleration analog voltage |
| 5 | Z / ZOUT | Analog Output | Z-axis acceleration analog voltage |
Specifications
| Parameter | Symbol | Min | Typ | Max | Unit | Conditions |
|---|---|---|---|---|---|---|
| Supply Voltage (Module) | 3.3 | 3.3 / 5.0 | 5.5 | V | Power rail with 3.3V regulator | |
| Active Supply Current | — | 350 | 450 | µA | ||
| Full-Scale Range | — | g | Minimum range | |||
| Sensitivity | 270 | 300 | 330 | mV/g | Ratiometric to | |
| Zero- Voltage Output | 1.5 | 1.65 | 1.8 | V | ||
| Bandwidth (X, Y) | 0.5 | 500 | 1600 | Hz | Set by external filtering caps | |
| Bandwidth (Z) | 0.5 | 500 | 550 | Hz | Set by external filtering cap |
Analog Voltage Conversion Formula
Because outputs are ratiometric (proportional to supply voltage ), acceleration in -force is calculated as:
For a 10-bit ADC reading on Arduino (3.3V reference ):
Wiring
| ADXL335 Pin | → | Arduino Uno | ESP32 | Notes |
|---|---|---|---|---|
VCC | 3.3V | 3.3V | Connect 3.3V pin to Arduino AREF pin | |
GND | GND | GND | System ground | |
X | Analog A0 | VP / GPIO36 (ADC1) | X-axis analog signal | |
Y | Analog A1 | VN / GPIO39 (ADC1) | Y-axis analog signal | |
Z | Analog A2 | GPIO34 (ADC1) | Z-axis analog signal |
ADC Reference Matching:
- Because ADXL335 output sensitivity scales with supply voltage ( at 3.3V vs at 5V), the microcontroller ADC reference () MUST match the ADXL335 supply voltage.
- On 5V Arduino boards, connect the Arduino 3.3V pin to the
AREFpin and callanalogReference(EXTERNAL)in software.
Example
const int xPin = A0;
const int yPin = A1;
const int zPin = A2;
// Zero-g ADC baselines (calibrated per sensor)
int zeroG_X = 512;
int zeroG_Y = 512;
int zeroG_Z = 512;
void setup() {
Serial.begin(9600);
// Set ADC reference to 3.3V AREF pin on 5V Arduino Uno
analogReference(EXTERNAL);
}
void loop() {
int rawX = analogRead(xPin);
int rawY = analogRead(yPin);
int rawZ = analogRead(zPin);
// 3.3V / 1024 = 3.22 mV per count; 300 mV/g sensitivity -> 0.0107 g per count
float gx = (rawX - zeroG_X) * 0.0107;
float gy = (rawY - zeroG_Y) * 0.0107;
float gz = (rawZ - zeroG_Z) * 0.0107;
Serial.print("X: "); Serial.print(gx); Serial.print(" g\t");
Serial.print("Y: "); Serial.print(gy); Serial.print(" g\t");
Serial.print("Z: "); Serial.print(gz); Serial.println(" g");
delay(200);
}
Common mistakes
- Not setting
analogReference(EXTERNAL)on 5V Arduino: Reading a 3.3V analog sensor using a default 5.0V ADC reference reduces measurement resolution and distorts -force math. - Forgetting per-sensor zero- offset calibration: Manufacturing tolerances introduce offset shifts. Place the sensor flat on a level surface and calibrate zero- ADC constants for X and Y, and for Z.
Notes
- ADXL335 vs ADXL345: ADXL335 is 3-axis analog ( max); ADXL345 is 13-bit digital /SPI ( max).
Assets & downloads
- datasheetdatasheet
- product-pagereference