Overview
This tutorial explains how to interface the ADXL375 Accelerometer module with the Arduino Microcontroller to measure acceleration in the X, Y, and Z axes.
Today, we will introduce you to a very powerful and highly advanced accelerometer called ADXL375, which can measure acceleration up to ±200 g. You might be familiar with accelerometer modules like ADXL335 or ADXL345, as well as MPU6050. Well, these modules are good for simpler projects but fail miserably when working on applications that require high precision, high resolution, and extreme ranges.

This is the ADXL375 module, which is a digital MEMS accelerometer from Analog Devices. The sensor is small and thin, with ultra-low power consumption as low as 35 µA in measurement mode. The best thing about this sensor is that it can measure acceleration up to ±200 g. Imagine reading such a high gravitational pull of the Earth or measuring the acceleration of a very fast-moving object—here, the ADXL375 is perfect.
In this tutorial, we will first go through the ADXL375 features, capabilities, pinout, and other details. Then, we will show you how you can use this sensor with Arduino using C++ code. The same sensor can also be interfaced with ESP32 and Raspberry Pi Pico. You may follow the ADXL375 ESP32 guide as well as ADXL375 Raspberry Pi Pico guide.
Components Required
The foollowing are the components required for this tutorial.
| S.N. | Components Name | Quantity | Purchase Link |
|---|---|---|---|
| 1 | Arduino Nano Board | 1 | Amazon | AliExpress |
| 2 | ADXL375 Accelerometer | 1 | Amazon | AliExpress |
| 3 | 0.96" I2C OLED Display | 1 | Amazon | AliExpress |
| 4 | Connecting Wires | 10 | Amazon | AliExpress |
| 5 | Breadboard | 1 | Amazon | AliExpress |
ADXL375 Accelerometer
The ADXL375 is a small, thin, 3-axis accelerometer that provides low power consumption and high resolution measurement up to ±200 g.

The digital output data is formatted as 16-bit, two’s complement data and is accessible through a SPI or I2C digital interface. It supports a bandwidth of up to 1 Kilo Hertz. The bandwidth is selectable via Serial Command. An integrated memory management system with a 32-level FIFO buffer can be used to store data to minimize host processor activity and lower overall system power consumption.

The sensor has the ability to determine shock, even, or could be used in an activity or inactivity monitoring system. One shocking thing to notice about this module is, it has a 10,000g shock survival, which is amazing. According to the datasheet, it could be used for concussion and head trauma detection, and also for high-force event detection. To learn more about the ADXL375 Module, you may go through the ADXL375 Datasheet.
ADXL375 Features & Specifications
- Measurement Range: ±200 g (fixed) with 13-bit two ’s-complement output
- Sensitivity: 49 mg/LSB (0.049 g/LSB) → ~0.4805 mg resolution when converted to m/s²
- Power Consumption:
- Measurement mode: 35 µA typical
- Standby mode: 0.1 µA typical (VS = 2.5 V)
- Note: Supply current varies with output data rate/bandwidth setting
- Output Data Rate / Bandwidth:
- User-selectable via serial registers
- Bandwidth up to 1 kHz (ODR up to 1 kHz)
- FIFO Buffer: 32-sample watermark FIFO reduces host-processor load
- Event Detection:
- Single-tap / double-tap (impulse) detection
- Activity/inactivity monitoring with programmable thresholds & durations
- Digital Interfaces:
- I²C (7-bit address = 0x53 when ALT_ADDRESS = LOW)
- SPI (3- or 4-wire)
- Supply Voltage: 2.0 V to 3.6 V
- I/O Voltage Range: 1.7 V to VS
- Operating Temperature: –40 °C to +85 °C
- Shock Survivability: 10,000 g (non-operating)
- Package / RoHS: 3 × 5 × 1 mm LGA, RoHS-compliant
Hardware Connection between Arduino & ADXL375 Accelerometer
First, let’s perform basic testing of ADXL375 with the Arduino Nano. Here is the simple schematic

We can connect the ADXL375 to the Nano via the I²C interface.

We can simplify the breadboard wiring with jumper cables and ensure the ADXL375 is oriented as shown on the breakout board.
Source Code/Program: Getting Acceleration Readings
To develop firmware, we can use the well-written ADXL375 Adafruit library/a>. You can download the repository from GitHub and add it to the Arduino IDE via the Library Manager.
Next, the following code is the modified example sketch for I²C mode.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
#include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_ADXL375.h> // ——— I²C SETUP ——— // Use the “default Wire” constructor (just the sensor ID) Adafruit_ADXL375 accel = Adafruit_ADXL375(12345); // If you ever need to override the address, you can call begin(0x53) below. // ALT_ADDRESS pin tied to GND → 0x53. void displayDataRate(void) { Serial.print("Data Rate: "); switch (accel.getDataRate()) { case ADXL343_DATARATE_3200_HZ: Serial.print("3200 "); break; case ADXL343_DATARATE_1600_HZ: Serial.print("1600 "); break; case ADXL343_DATARATE_800_HZ: Serial.print("800 "); break; case ADXL343_DATARATE_400_HZ: Serial.print("400 "); break; case ADXL343_DATARATE_200_HZ: Serial.print("200 "); break; case ADXL343_DATARATE_100_HZ: Serial.print("100 "); break; case ADXL343_DATARATE_50_HZ: Serial.print("50 "); break; case ADXL343_DATARATE_25_HZ: Serial.print("25 "); break; case ADXL343_DATARATE_12_5_HZ: Serial.print("12.5 "); break; case ADXL343_DATARATE_6_25HZ: Serial.print("6.25 "); break; case ADXL343_DATARATE_3_13_HZ: Serial.print("3.13 "); break; case ADXL343_DATARATE_1_56_HZ: Serial.print("1.56 "); break; case ADXL343_DATARATE_0_78_HZ: Serial.print("0.78 "); break; case ADXL343_DATARATE_0_39_HZ: Serial.print("0.39 "); break; case ADXL343_DATARATE_0_20_HZ: Serial.print("0.20 "); break; case ADXL343_DATARATE_0_10_HZ: Serial.print("0.10 "); break; default: Serial.print("???? "); break; } Serial.println("Hz"); } void setup(void) { Serial.begin(115200); while (!Serial) delay(10); Serial.println("ADXL375 I²C Accelerometer Test"); // Initialize I2C Wire.begin(); // Try to start the sensor on address 0x53 if (!accel.begin(0x53)) { Serial.println("Ooops, no ADXL375 detected ... Check your wiring!"); while (1) delay(10); } // (Optional) change data rate — default is 100 Hz accel.setDataRate(ADXL343_DATARATE_100_HZ); // Note: range is fixed at ±200 g on the ADXL375 Serial.println(); accel.printSensorDetails(); displayDataRate(); Serial.println(); } void loop(void) { sensors_event_t event; accel.getEvent(&event); Serial.print("X: "); Serial.print(event.acceleration.x); Serial.print(" "); Serial.print("Y: "); Serial.print(event.acceleration.y); Serial.print(" "); Serial.print("Z: "); Serial.print(event.acceleration.z); Serial.println(" m/s^2"); delay(500); } |
Upload this code to the Arduino Nano Board and then open the Serial monitor. You will see the Acceleration data on the serial monitor for all the x, y, and z axes.
The x and y data should be almost zero as the sensor is placed on a flat surface. The z-axis data should be almost 9.8 m/s2 due to the gravitational pull of the Earth. But it’s showing some offset readings. That’s why you modified the code for auto calibration.
Source Code/Program: Read Acceleration with Auto Calibration
Here is another code for reading the correct values of acceleration in the x, y, and z axis.
We first average 100 readings with the board held flat to compute x_offset, y_offset, and z_offset = avg_z – 9.80665 m/s². Then, on each loop, we subtract those offsets from the raw readings so that X/Y read ~0 and Z reads ~9.8 m/s² when the sensor is level.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
#include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_ADXL375.h> // I²C constructor; we’ll call begin(0x53) below. Adafruit_ADXL375 accel = Adafruit_ADXL375(12345); // Offsets computed at startup: float x_offset = 0, y_offset = 0, z_offset = 0; // Helper to print current data rate void displayDataRate() { Serial.print("Data Rate: "); switch (accel.getDataRate()) { case ADXL343_DATARATE_3200_HZ: Serial.print("3200"); break; case ADXL343_DATARATE_1600_HZ: Serial.print("1600"); break; case ADXL343_DATARATE_800_HZ: Serial.print("800"); break; case ADXL343_DATARATE_400_HZ: Serial.print("400"); break; case ADXL343_DATARATE_200_HZ: Serial.print("200"); break; case ADXL343_DATARATE_100_HZ: Serial.print("100"); break; case ADXL343_DATARATE_50_HZ: Serial.print("50"); break; case ADXL343_DATARATE_25_HZ: Serial.print("25"); break; case ADXL343_DATARATE_12_5_HZ: Serial.print("12.5"); break; default: Serial.print("?"); break; } Serial.println(" Hz"); } void setup() { Serial.begin(115200); while (!Serial) delay(10); Serial.println("ADXL375 I²C Auto-Cal Accelerometer"); // --- I²C on custom ESP32 pins SDA=21, SCL=22 --- Wire.begin(); // Start the sensor at address 0x53 if (!accel.begin(0x53)) { Serial.println("ERROR: ADXL375 not found. Check wiring!"); while (1) delay(10); } // Optional: change from default 100 Hz accel.setDataRate(ADXL343_DATARATE_100_HZ); Serial.println(); accel.printSensorDetails(); displayDataRate(); Serial.println(); // --- AUTO CALIBRATION --- Serial.println("Calibrating... keep sensor FLAT and STILL"); const int SAMPLES = 100; float sum_x = 0, sum_y = 0, sum_z = 0; sensors_event_t evt; for (int i = 0; i < SAMPLES; i++) { accel.getEvent(&evt); sum_x += evt.acceleration.x; sum_y += evt.acceleration.y; sum_z += evt.acceleration.z; delay(20); } float avg_x = sum_x / SAMPLES; float avg_y = sum_y / SAMPLES; float avg_z = sum_z / SAMPLES; // X/Y → zero; Z → 1 g x_offset = avg_x; y_offset = avg_y; z_offset = avg_z - SENSORS_GRAVITY_STANDARD; Serial.print("X offset = "); Serial.println(x_offset, 4); Serial.print("Y offset = "); Serial.println(y_offset, 4); Serial.print("Z offset = "); Serial.println(z_offset, 4); Serial.println("Calibration done!\n"); } void loop() { sensors_event_t evt; accel.getEvent(&evt); // apply offsets float x = evt.acceleration.x - x_offset; float y = evt.acceleration.y - y_offset; float z = evt.acceleration.z - z_offset; Serial.print("X: "); Serial.print(x, 2); Serial.print(" Y: "); Serial.print(y, 2); Serial.print(" Z: "); Serial.print(z, 2); Serial.println(" m/s^2"); delay(500); } |
Upload this code again to the Arduino Nano Board. The reading will be correct now.
To observe the change in reading, shake the sensor or move the sensor, or jerk it. You will see a massive change in the reading.
Displaying Arduino ADXL375 Acceleration readings on OLED Screen
Lets add a 0.96″ I2C OLED Display to the Arduino & ADXL375 module. Instead of displaying the accelerometer readings on Serial Monitor, lets now display it on OLED Screen.
Here is a simple connection diagram. The OLED display is an I2C Module. So we just need to connect the OLED Display to the I2C pins on Arduino Nano Board.
Here is the breadboard assembly of ADXL375 Accelerometer with Arduino and OLED Display.
For the coding part, we need to add Adafruit GFX and Adafruit SSD1306 OLED libraries to the Arduino IDE library folder.
Copy the following code and upload it to the Arduino Nano Board.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
#include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_ADXL375.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> // ── ADXL375 I²C ───────────────────────────────────────────────────────────── Adafruit_ADXL375 accel = Adafruit_ADXL375(12345); // ── OLED DISPLAY ──────────────────────────────────────────────────────────── #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels #define OLED_RESET -1 // No reset pin Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); // ── calibration offsets ───────────────────────────────────────────────────── float x_offset = 0, y_offset = 0, z_offset = 0; void setup() { Serial.begin(115200); while (!Serial) delay(10); Serial.println("ADXL375 + SSD1306 Auto-Cal Example"); // Init I²C on ESP32 default pins (21=SDA,22=SCL) Wire.begin(); // Init ADXL375 @0x53 if (!accel.begin(0x53)) { Serial.println("ERROR: ADXL375 not found!"); while (1) delay(10); } accel.setDataRate(ADXL343_DATARATE_100_HZ); // Init OLED if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { Serial.println("ERROR: SSD1306 not found!"); while (1) delay(10); } display.clearDisplay(); display.setTextSize(1); display.setTextColor(SSD1306_WHITE); display.setCursor(0, 0); display.println("Calibrating..."); display.display(); // ── Auto-calibrate on flat/still surface ─────────────────────────────────── const int SAMPLES = 100; float sx=0, sy=0, sz=0; sensors_event_t evt; for (int i=0; i<SAMPLES; i++) { accel.getEvent(&evt); sx += evt.acceleration.x; sy += evt.acceleration.y; sz += evt.acceleration.z; delay(20); } float avg_x = sx / SAMPLES; float avg_y = sy / SAMPLES; float avg_z = sz / SAMPLES; x_offset = avg_x; y_offset = avg_y; z_offset = avg_z - SENSORS_GRAVITY_STANDARD; Serial.print("Offsets → X:"); Serial.print(x_offset,4); Serial.print(" Y:"); Serial.print(y_offset,4); Serial.print(" Z:"); Serial.println(z_offset,4); // Show offsets on OLED briefly display.clearDisplay(); display.setCursor(0,0); display.print("X offset: "); display.println(x_offset,2); display.print("Y offset: "); display.println(y_offset,2); display.print("Z offset: "); display.println(z_offset,2); display.display(); delay(1500); } void loop() { sensors_event_t evt; accel.getEvent(&evt); // apply calibration float x = evt.acceleration.x - x_offset; float y = evt.acceleration.y - y_offset; float z = evt.acceleration.z - z_offset; // ── OLED DISPLAY ───────────────────────────────────────────────────────── display.clearDisplay(); display.setTextColor(SSD1306_WHITE); // Header (small font) display.setTextSize(1); display.setCursor(0, 0); display.println("Acceleration (m/s^2)"); // X line display.setTextSize(2); // big numbers display.setCursor(0, 10); display.print("X:"); display.print(x, 1); display.setTextSize(1); // small units display.print(" m/s2"); // Y line display.setTextSize(2); display.setCursor(0, 28); display.print("Y:"); display.print(y, 1); display.setTextSize(1); display.print(" m/s2"); // Z line display.setTextSize(2); display.setCursor(0, 46); display.print("Z:"); display.print(z, 1); display.setTextSize(1); display.print(" m/s2"); display.display(); delay(200); } |
After uploading the code, the OLED display will start showing you the acceleration reading in x, y and z axis.












