Using STM32 Black Pill with MPU 6050 accelerator sensor
his project focuses on developing a real-time vibration analysis system using the STM32F411CEU6 microcontroller (Black Pill) and the MPU6050 sensor, integrated through I2C communication. The MPU6050 combines a 3-axis accelerometer and a 3-axis gyroscope, providing motion and vibration data for analysis. Data acquisition and processing were implemented using STM32CubeIDE, with results displayed in Serial Studio for visualization. The system serves practical applications such as detecting vibrations in machinery, monitoring structural integrity, or analyzing dynamic motions in robotics and vehicles.
![BOM](/bropenguin847/Real-Time-Vibration-Analysis/raw/main/images\BOM.png)
- Download necessary softwares: STM32CubeIDE
- Go the ST official website. When downloading this for the first time, users need to manually create a MyST account with their email. After that, the download link will be sent to the email inbox. Simply click the link, and the download will start automatically.
- Manually setup STM32 blackpill (STM32F411CEU6) in STM32CubeIDE.
- Click on "Create a New STM32 project", enter "STM32F411CEU6" in Commercial Part Number. And select it MCUs/MPUs List.
- Enter any project name, and then select the file location. After that, click Finish.
- Go to Clock Configurations tab and configure the settings as below:
- Go to Pinout & Configurations tab and configure the settings as below:
- In the end, the pinout view should look like this.
- Finally, generate the code. A main.c file will be generated with all the settings configured. Click the code generation button (Alt + K)
- Copy the code in the main.c file
- Simply copy all the code in the main.c file in the repo and paste it all in the main.c file.
Stm32 Blackpill with USB serial