In one of our previous Arduino project, we used a PIR motion sensor to detect movement. PIR sensors use infrared that is emitted by objects to detect movement. In this tutorial, we are going to use a MPU6050 sensor that has build-in accelerometer and gyroscope to detect movement.
The latter is often used in drones, balancing robots and other devices that need to measure position and angles.
We will have to use a few advanced techniques in order to increase the accuracy of the data extracted from the sensor. For the sake of simplicity, we will solely use the sensor here as a motion detector.
Let’s dive into the projet.
Parts needed
Making
Make sure you do not make any confusion while purchasing the MPU6050, it is similar to the MPU9250. If you use the MPU9250, there is just no guarantee all will work fine. The color of the LED is not important, feel free to use any color.
Here is the schematic
The MPU6050 uses an I2C for communication, the SCL and SDA pins are connected on the analog pin 4 and 5.
I will suggest you use a breadboard to connect the MPU, it makes it easier.
When the connections are ready, we can upload the program to the Arduino. It reads data from the MPU6050 and displays them on the serial monitor. At the same time, it checks if the sum of the absolute value of the gyroscope reads is bigger than 0.2. If it does, it will power the LED.
Here is the screenshot of serial monitor.
And there we go! The sensor is very sensitive. It can even detect a slight shift in position as shown in the video below when I know at the table.
This can be the beginning of a very exciting project. Over to you and your imagination. Check out our other projects here.
You might also like:
- Arduino hx711 tutorial
- Arduino magnetic switch
- Best Arduino Kits
- gifts for engineering students
- gifts for engineers
- mpu6050 Arduino projects
- Current sensor Arduino
- Soil Moisture Sensor With Arduino
- Arduino Count up Timer Using the Nokia 5110 LCD
- Arduino Yun: Integrating or Juxtaposing Arduino with Linux
- Arduino Projects: Line Follower Robot
- Arduino RFID Project for Beginners
- Arduino MOSFET Project
- Which Arduino Should You Buy
- What Can You Do With Arduino Boards?
- Great Alternatives to the Arduino Microcontroller
- Arduino Projects: Color Sensor
- Arduino IDE Alternatives
- Arduino Mega vs. Uno
- Arduino Projects: Arduino LCD Display
- Read Arduino Rotary Encoders
- A Selection of the Best Arduino Simulators
- Arduino Projects: IR Receiver
- Arduino Light Sensor Project
- Arduino Projects: Arduino Decibel Meter
- Arduino Stopwatch Project
- Arduino Bluetooth RC Car Project
- Arduino Temperature Logger Project
- Arduino Projects: Arduino 7 Segment Display
- Arduino Projects: Clap ON Clap OFF Light
- Arduino Relay Project
- Install a Library Onto the Arduino IDE
- Arduino Projects: Rainfall Detector
- Arduino Projects: RGB LED Arduino
- Arduino Stepper Motor Project
- Arduino Projects: Arduino DC Motor Control
- The Top Affordable Arduino Robot Kit
- Arduino 3D Printed Case
- Arduino Projects: Asynchronous LEDs Blink
- Arduino Projects: Ultrasonic Distance Sensor
- Arduino Projects: LED – 4X4X4 LED Cube
- Arduino Car Projects: Build an Obstacle Avoiding Robot With Less Than $30
- Arduino Projects: Servo Potentiometer Control
- Arduino LED Project: Knight Rider
- Arduino Projects: PIR Motion Sensor
- The Difference between Arduino and Raspberry Pi
- Top 9 Books Every Engineer Should Read
- Top Used Sensors for Arduino
- First Hand on the Arduino Uno Board