As an Amazon Associate we earn from qualifying purchases.
An accelerometer measures acceleration, including the constant pull of gravity. A gyroscope measures how fast something rotates. Together they let a small board work out how it is tilted, shaken or turned. This page covers two common sensor modules for embedded projects: the ADXL335 accelerometer and the MPU-6050 gyro and accelerometer module. It explains how each works and how to choose between them.
Accelerometer vs gyro: what each one does
The two sensors measure different things, and the difference affects which module you need.
- Accelerometer: measures acceleration along one, two or three axes. When the board is still, it reads gravity, so you can estimate tilt. It also picks up vibration, taps, shocks and sudden movement.
- Gyroscope: measures angular rate, meaning how quickly the board rotates around each axis. It is good at tracking quick turns but drifts slowly over time if you integrate its readings.
An accelerometer on its own is enough for tilt, shock or vibration detection. If you need to follow rotation smoothly, such as in a self-balancing robot or a motion-controlled device, you usually combine both sensors.
ADXL335 3-axis accelerometer (analog output)
The ADXL335 is a triple-axis accelerometer with analog output. It gives one voltage per axis (X, Y and Z), and each voltage changes with the acceleration on that axis. Its measurement range is about ±3 g, which suits tilt sensing, gesture input and detecting knocks or vibration.
Because the outputs are analog, you read them with an ADC. Most microcontrollers have one built in, including the ATmega328 used on many Arduino boards, so you only need three analog input pins. The ADXL335 itself runs from a low supply voltage (roughly 1.8 V to 3.6 V). Breakout boards often add a regulator, so check your board before connecting it to 5 V.
Listing details from the original page:
- Price: 240
- Quantity remaining: 20
These figures come from the original listing and stock may have changed. Check the current details before ordering.
When the ADXL335 is a good choice
- You only need acceleration or tilt, not rotation.
- You want simple wiring and readings you can check with a basic ADC.
- You are building a learning project, such as a tilt switch, a vibration alarm or a motion trigger.
Two practical points help here. Power the sensor from a clean, stable supply, because analog readings are sensitive to noise. And calibrate by recording the reading on each axis when the board is level, then use those values as your zero reference. Averaging several samples also gives steadier results.
MPU-6050 gyro and accelerometer module
The MPU-6050 puts a 3-axis gyroscope and a 3-axis accelerometer on one chip, so it is often called a 6-axis motion sensor. The module is sold as a small breakout board, which makes it easy to use in embedded projects.
One correction to the original listing: the MPU-6050 is not an analog gyro. It converts its measurements internally and sends the data to your microcontroller as digital values over the I2C bus, which needs only two signal lines plus power and ground. It also offers selectable ranges for both sensors, so you can trade measurement range against resolution to suit your project.
Listing details from the original page:
- Price: 145
- Quantity remaining: 2
As with the ADXL335, these numbers come from the original listing, so confirm availability before you buy.
When the MPU-6050 is a good choice
- You need both rotation and acceleration, for example for balancing robots, drones or handheld motion controllers.
- You want to save analog pins and read everything over I2C.
- You plan to combine the two sensors (sensor fusion) to get a more stable estimate of orientation.
Gyro readings drift over time, and accelerometer readings are noisy during movement. A complementary or Kalman filter blends the two so each covers the other’s weakness. Many hobby libraries for Arduino and similar boards already include this.
ADXL335 vs MPU-6050 at a glance
- Sensing: the ADXL335 measures acceleration on 3 axes. The MPU-6050 adds a 3-axis gyro for 6 axes in total.
- Output: the ADXL335 is analog and needs an ADC. The MPU-6050 is digital over I2C.
- Wiring: the ADXL335 takes three analog pins plus power. The MPU-6050 takes two I2C lines plus power.
- Best for: the ADXL335 suits tilt, vibration and shock detection. The MPU-6050 suits orientation and motion tracking.
Where these modules are used
Motion sensors turn up in many small builds. A vibration-triggered earthquake alert system simulation shows how an accelerometer can detect ground movement. A safety project like the iron box automatic turn-off system shows how it can sense whether an appliance has been left untouched. For a gesture-based input device, see the wireless 3D mouse project, which uses an accelerometer to track hand movement.
If your project needs to send sensor data without wires, the wireless module guides cover options such as XBee, Bluetooth and WiFi. You can also browse the products page for other sensors and modules.
Tips for getting clean readings
- Check the logic level. Make sure your microcontroller and the module use compatible voltages, and use level shifting where needed.
- Mount the sensor firmly. A loose board adds vibration that you will see as noise in the data.
- Calibrate at rest. Record the offsets while the board is still and level, then subtract them in software.
- Filter the data. Use averaging or a low-pass filter for accelerometer data, and a fusion filter if you use the gyro as well.
- Keep wires short. This matters most for analog signals, which pick up noise more easily.
FAQ
What is the difference between an accelerometer and a gyro?
An accelerometer measures acceleration, including gravity, so it can tell you tilt and detect shocks. A gyro measures rotation speed. Many motion projects use both for a fuller picture of movement.
Is the MPU-6050 analog or digital?
It is digital. The MPU-6050 sends its readings over I2C. The ADXL335, by contrast, has analog outputs that you read with an ADC.
Can I use the ADXL335 with an Arduino?
Yes. Connect the X, Y and Z outputs to three analog input pins and supply power at a voltage the module accepts. Then read the values with analogRead and calibrate them against a level position.
Which module is better for a beginner?
The ADXL335 is simpler to understand because you read plain voltages. The MPU-6050 is more capable and needs only two data wires, but you will need to learn a little about I2C and filtering.




