Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›Accelerometers

Comparison · Intermediate · 3 min read

Accelerometers

ADXL345, LIS3DH, ADXL335 and MMA8452 Compared

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerWhat an accelerometer measuresWhich chip to chooseReading tilt from an ADXL345Vibration and 3D printer tuningPractical tipsTry itCommon mistakesFAQsParts and next steps
Short answer

An accelerometer measures acceleration along three axes, which lets you detect tilt, taps, free fall and vibration. The ADXL345 and LIS3DH are the most popular digital choices: both are 3.3 V I2C or SPI chips with selectable ranges up to 16 g. The ADXL335 is an analog alternative. If you also need rotation, use a six-axis chip such as the MPU6050.

Key specs at a glance

ADXL345
±2/4/8/16 g, 13-bit full resolution, I2C 0x53 (0x1D alt) or SPI, tap and free-fall detection
LIS3DH
±2/4/8/16 g, 12-bit, I2C 0x18/0x19 or SPI, very low power, 3 ADC inputs
ADXL335
Analog ±3 g, output scales with supply, about 300 mV/g at 3 V
MMA8452Q
±2/4/8 g, 12-bit, I2C 0x1D/0x1C, orientation detection
Supply
Chips run at 1.8 to 3.6 V; many breakouts add a regulator and level shifter
Interfaces
I2C for simplicity, SPI for fast data (vibration)
01

What an accelerometer measures

A MEMS accelerometer contains a tiny proof mass on springs. When the chip accelerates, or when gravity pulls on the mass, the displacement is converted to a number for each axis. At rest, one axis reads about 1 g because gravity is acceleration, which is why an accelerometer can tell tilt.

It cannot tell heading (compass direction) and it cannot separate gravity from motion by itself. For rotation rate you need a gyroscope, and for heading a magnetometer.

02

Which chip to choose

Digital chips are easier to use because the ADC is built in. Analog parts need a clean reference.

ChipOutputRangeStrong pointsWatch out for
ADXL345I2C / SPI±2 to ±16 gTap, double-tap, free-fall; fast SPI; many libraries and 3D printer support3.3 V chip; check module level shifting
LIS3DHI2C / SPI±2 to ±16 gUltra-low power, FIFO, extra ADC inputs; used on Adafruit and SparkFun boardsTwo I2C addresses; 12-bit
MMA8452QI2C±2 to ±8 gOrientation and tap detection built inOlder design, fewer new modules
ADXL335Analog X, Y, Z±3 gSimple, no bus neededNeeds a stable 3.3 V ADC reference and noise filtering
MPU6050I2C±2 to ±16 g plus gyroAccelerometer and gyroscope in oneNeeds filtering for tilt
ADXL345
Output:
I2C / SPI
Range:
±2 to ±16 g
Strong points:
Tap, double-tap, free-fall; fast SPI; many libraries and 3D printer support
Watch out for:
3.3 V chip; check module level shifting
LIS3DH
Output:
I2C / SPI
Range:
±2 to ±16 g
Strong points:
Ultra-low power, FIFO, extra ADC inputs; used on Adafruit and SparkFun boards
Watch out for:
Two I2C addresses; 12-bit
MMA8452Q
Output:
I2C
Range:
±2 to ±8 g
Strong points:
Orientation and tap detection built in
Watch out for:
Older design, fewer new modules
ADXL335
Output:
Analog X, Y, Z
Range:
±3 g
Strong points:
Simple, no bus needed
Watch out for:
Needs a stable 3.3 V ADC reference and noise filtering
MPU6050
Output:
I2C
Range:
±2 to ±16 g plus gyro
Strong points:
Accelerometer and gyroscope in one
Watch out for:
Needs filtering for tilt
03

Reading tilt from an ADXL345

This sketch reads the raw X, Y, Z registers over I2C and turns them into pitch and roll. Keep the board still while testing, because movement adds to gravity.

ADXL345 tilt on Arduino (I2C) · Arduino C++Verify & upload in Electrolark
#include <Wire.h>
const uint8_t ADDR = 0x53;          // SDO low = 0x53, SDO high = 0x1D

void writeReg(uint8_t reg, uint8_t val) {
  Wire.beginTransmission(ADDR);
  Wire.write(reg);
  Wire.write(val);
  Wire.endTransmission();
}

void setup() {
  Serial.begin(115200);
  Wire.begin();
  writeReg(0x2D, 0x08);             // POWER_CTL: measurement mode
  writeReg(0x31, 0x08);             // DATA_FORMAT: full resolution, +/-2 g
}

void loop() {
  Wire.beginTransmission(ADDR);
  Wire.write(0x32);                 // DATAX0
  Wire.endTransmission(false);
  Wire.requestFrom(ADDR, (uint8_t)6);
  uint8_t b[6];
  for (int i = 0; i < 6; i++) b[i] = Wire.read();
  float x = (int16_t)(b[0] | (b[1] << 8)) * 0.0039;   // g
  float y = (int16_t)(b[2] | (b[3] << 8)) * 0.0039;
  float z = (int16_t)(b[4] | (b[5] << 8)) * 0.0039;
  float pitch = atan2(x, sqrt(y * y + z * z)) * 57.2958;
  float roll  = atan2(y, sqrt(x * x + z * z)) * 57.2958;
  Serial.print(pitch); Serial.print(" "); Serial.println(roll);
  delay(100);
}
04

Vibration and 3D printer tuning

For vibration you need a fast sample rate, so use SPI and a chip with a FIFO. An ADXL345 wired to the Raspberry Pi SPI header (or a vendor kit with the sensor already on a board) is the standard tool for measuring printer resonances. Firmware such as Klipper uses the data for input shaping, which cancels ringing on printed corners and allows faster printing. Mount the sensor firmly on the toolhead and the bed.

05

Practical tips

  • ✓Power digital chips at 3.3 V unless the module states 5 V tolerance, and use the right I2C pull-ups (see I2C).
  • ✓Pick the smallest range that fits. ±2 g is finest for tilt and step counting; use ±16 g for impacts.
  • ✓Average a few readings or add a low-pass filter. Raw data is noisy.
  • ✓Calibrate: lay each axis flat and note the offset from 1 g.
06

Try it: Adc resolution calculator

Change the values and the diagram and results update as you type.

07

Common mistakes to avoid

  • !Powering a 3.3 V accelerometer breakout from 5 V without a regulator.
  • !Using too large a range and losing resolution.
  • !Expecting tilt readings to stay accurate while the board is moving.
  • !Leaving an I2C address pin floating.
  • !Mounting the sensor on a flexible part when measuring a printer.
08

Frequently asked questions

ADXL345 or LIS3DH?

Both work well. LIS3DH is lower power and common on wearable boards; ADXL345 is popular for 3D printer tuning and has tap detection.

Can an accelerometer measure speed or distance?

Not reliably. Integrating acceleration twice drifts within seconds.

What is 1 g?

The acceleration of gravity, 9.81 m/s². A resting sensor reads 1 g on the axis pointing at the ground.

Can it detect free fall?

Yes. When all axes read near zero g, the sensor is in free fall. The ADXL345 has a built-in free-fall interrupt.

Is an accelerometer the same as an IMU?

An IMU combines an accelerometer with a gyroscope and sometimes a magnetometer.

How do I get a tap or knock detector?

Use the ADXL345 or MMA8452 tap interrupt or watch for peaks in the readings.

Parts for this guide

  • ADXL345 Triple-Axis Accelerometer Sensor Module – I2C/SPI Interface
    ₹187View
  • Adafruit LIS3DH Triple-Axis Accelerometer ±2/4/8/16g – I2C/SPI, STEMMA QT/Qwiic
    ₹799View
  • ADXL335 3-Axis Analog Accelerometer Sensor Module
    ₹599View
  • MMA8452 GY-45 3-Axis Accelerometer Module – I2C Digital Output
    ₹121View
Shop Accelerometers, Gyroscopes & IMUs

Calculators

Adc resolution calculator

Terms in this guide

AccelerometerA sensor that measures acceleration, including gravity, along one or more axes; used to detect tilt, vibration and movement.g-forceAcceleration measured relative to gravity. 1 g is 9.81 m/s2, the pull you feel standing still.GyroscopeA sensor that measures rotation rate, in degrees per second.IMUInertial measurement unit: a combined accelerometer and gyroscope, sometimes with a magnetometer.I2CInter-Integrated Circuit: a two-wire bus (SDA and SCL) that connects many devices by address.SPISerial Peripheral Interface: a fast bus with clock, data in, data out and a chip-select line per device.Full-scale rangeThe largest value a sensor can measure, such as plus or minus 2 g or up to 65,535 lux. Smaller ranges give finer resolution.

Projects that use it

Put this into practice: 20 step-by-step builds in our project library use parts from this guide.

Beginner · 45 minutesVibration and tamper alarmView projectIntermediate · 2–3 hoursThree-zone security alarm on an Arduino MegaView projectBeginner · 45 minutesWhich surface vibrates most?View project
Browse all 20 projects

Keep learning

Component guideIntermediateMPU6050 Accelerometer and GyroscopeThe MPU6050 is a 6-axis motion sensor that combines a 3-axis accelerometer and a 3-axis gyroscope on one chip and talks over I2C at address 0x68.3 min read · SensorsConcept explainerIntermediateI2C ExplainedI2C is a two-wire bus that lets one microcontroller talk to many sensors and displays using a data line (SDA) and a clock line (SCL).4 min read · Electronics FundamentalsConcept explainerIntermediateSPI ExplainedSPI (Serial Peripheral Interface) is a fast four-wire bus: SCK carries the clock, MOSI carries data from the controller, MISO carries data back, and a separate chip-select (CS) line per device chooses who is listening.3 min read · Electronics FundamentalsComponent guideBeginnerVibration, Shock and Tilt Sensors (SW-420, SW-520D)Vibration and tilt sensors are simple switches that close or open when shaken or tilted.3 min read · SensorsConcept explainerBeginnerADCs ExplainedAn analog-to-digital converter (ADC) measures a voltage and returns a number.4 min read · Electronics Fundamentals

Sources

  • Analog Devices ADXL345 and ADXL335 datasheets
  • STMicroelectronics LIS3DH datasheet
  • NXP MMA8452Q datasheet

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat an accelerometer measuresWhich chip to chooseReading tilt from an ADXL345Vibration and 3D printer tuningPractical tipsTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide4 items · ₹1,706

ADXL345 Triple-Axis Accelerometer Sensor Module – I2C/SPI Interface · Adafruit LIS3DH Triple-Axis Accelerometer ±2/4/8/16g – I2C/SPI, STEMMA QT/Qwiic · ADXL335 3-Axis Analog Accelerometer Sensor Module · MMA8452 GY-45 3-Axis Accelerometer Module – I2C Digital Output

Run itChange the inputs and watch the output
Serial monitor115200 baud
9.99 -4.98

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question