Skip to content

Srividya-Manikandan/Gyroscope-based-Movement-Controller-STM32F4-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Motion-Driven Embedded Controller (STM32F4)

Project Overview

This is a bare-metal embedded system project utilizing the STM32F4xx microcontroller (specifically a Black Pill board) to implement a motion-sensing control interface. The system integrates real-time data from an MPU6050 Inertial Measurement Unit (IMU) with user input from an ADC-driven potentiometer to manage two distinct LED output modes. The entire project is developed using register-level programming, demonstrating deep knowledge of micro-controller architecture and peripheral initialization.

⚙️ Key Technical Implementations

The core achievement of this project lies in the direct, low-level control of the STM32F4's hardware peripherals.

  • Bare-Metal Development: Implemented all peripheral drivers (RCC, GPIO, ADC, I2C) by directly manipulating STM32 peripheral registers, successfully bypassing all high-level abstraction layers (HAL/LL).
  • Custom I2C Master Protocol: Engineered two separate I2C master instances (I2C1 and I2C2) from scratch, including custom logic for START, STOP, ACK/NACK, and data transfer.
    • I2C2 (MPU6050): Developed the protocol to reliably fetch 6-byte raw acceleration and gyroscope data in a multi-read transaction.
    • I2C1 (LCD): Implemented I2C to parallel conversion and transmission logic for the HD44780 LCD controller.
  • Multi-Mode Control Logic: Configured the ADC peripheral on PA0 to read a potentiometer for user input. This reading acts as a variable threshold, switching the system's output between two control modes (PC13 vs. PC14) and demonstrating state management.
  • Motion-to-Output Mapping: Translated real-time $X$ and $Y$ axis acceleration values into discrete LED control signals, including proportional on/off states and variable blinking frequencies.

🎯 Contribution Breakdown

This project was developed collaboratively with clear separation of responsibilities, verifiable through the commit history.

Contributor Focus Area Key Achievements
Srividya System Core & ADC/LED Implementation of ADC driver, GPIO/LED control, and the main control loop logic that orchestrates sensor reading and mode switching.
Adwaitha LCD Interface Register-level initialization of I2C1 bus and development of the LCD driver suite for displaying sensor outputs.
Nethra MPU6050 Driver Register-level configuration of I2C2 bus and creation of the MPU6050 read/write protocol for sensor data acquisition.

🛠️ Components & Tools

  • Microcontroller: STM32F401CCU6 (or similar STM32F4xx device)
  • Sensor: MPU6050 (3-Axis Accelerometer and Gyroscope)
  • Display: I2C 16x2 LCD Display
  • Input: Potentiometer (Analog Input)
  • IDE/Toolchain: VS Code / GCC ARM Embedded Toolchain / ST-Link Debugger

About

Engineered a bare-metal, register-level embedded controller on STM32F4, implementing custom I2C drivers for the MPU6050 gyroscope and an ADC-driven motion-to-LED control logic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages