TILT DETECT ESP32

 

EX NO 11                                            TILT DETECT

LINK:   TILT DETECT

Aim

To interface a tilt detection sensor with a microcontroller and identify the direction of tilt movement using sensor data.

Requirements

Hardware Components

  • Arduino/ESP32 development board

  • MPU6050 tilt or accelerometer sensor

  • OLED display module

  • USB cable

  • Breadboard

  • Jumper wires

Software Requirements

  • Arduino IDE

  • Embedded C / Arduino programming language

  • Adafruit GFX library

  • Adafruit SSD1306 library

  • Wire library

Procedure

  1. Connect the MPU6050 sensor to the microcontroller using I2C communication pins.

  2. Interface the OLED display module with the controller board.

  3. Provide proper power supply connections to all components.

  4. Open the Arduino IDE and install the required libraries for the sensor and display.

  5. Write the program to initialize the MPU6050 sensor and OLED display.

  6. Configure the program to read acceleration values along different axes.

  7. Upload the program to the microcontroller board.

  8. Tilt the sensor in different directions such as left, right, up, and down.

  9. Observe the detected direction displayed on the OLED screen and Serial Monitor.

  10. Verify the sensor response and record the observations for different tilt positions.

Result

The tilt detection system was successfully implemented using the MPU6050 sensor and OLED display. The system accurately detected the direction of tilt movement and displayed the corresponding output on the screen.

No comments:

Post a Comment