This shows you the differences between two versions of the page.
|
pm:prj2025:vradulescu:valentin.pletea [2025/05/28 23:22] valentin.pletea |
pm:prj2025:vradulescu:valentin.pletea [2025/05/30 09:55] (current) valentin.pletea [Laboratory Functionality Integration] |
||
|---|---|---|---|
| Line 12: | Line 12: | ||
| |NUCLEO-F401RE Development Board|1|Mouser Electronics|€13.13|[[https://ro.mouser.com/ProductDetail/STMicroelectronics/NUCLEO-F401RE?qs=fK8dlpkaUMvGeToFJ6rzdA%3D%3D|Mouser]]|[[https://www.st.com/resource/en/data_brief/nucleo-c031c6.pdf|STM32F401RE Datasheet]]| | |NUCLEO-F401RE Development Board|1|Mouser Electronics|€13.13|[[https://ro.mouser.com/ProductDetail/STMicroelectronics/NUCLEO-F401RE?qs=fK8dlpkaUMvGeToFJ6rzdA%3D%3D|Mouser]]|[[https://www.st.com/resource/en/data_brief/nucleo-c031c6.pdf|STM32F401RE Datasheet]]| | ||
| |MPU6050 Gyroscope/Accelerometer Module|1|Mouser Electronics|€8.55|[[https://ro.mouser.com/ProductDetail/Olimex-Ltd/MOD-MPU6050?qs=SUpef6bDnvVsH%252Bq1tWOBKA%3D%3D|Mouser]]|[[https://ro.mouser.com/datasheet/2/306/RM-MPU-60xxA_rev_4-736751.pdf|MPU6050 Datasheet]]| | |MPU6050 Gyroscope/Accelerometer Module|1|Mouser Electronics|€8.55|[[https://ro.mouser.com/ProductDetail/Olimex-Ltd/MOD-MPU6050?qs=SUpef6bDnvVsH%252Bq1tWOBKA%3D%3D|Mouser]]|[[https://ro.mouser.com/datasheet/2/306/RM-MPU-60xxA_rev_4-736751.pdf|MPU6050 Datasheet]]| | ||
| - | |TowerPro MG996R Servo Motor|2|TowerPro|RON 80|[[https://towerpro.com.tw/product/mg996r/|TowerPro]]|[[https://towerpro.com.tw/product/mg996r/|MG996R Specifications]]| | + | |TowerPro MG996R Servo Motor|2|TowerPro|RON 25|[[https://cleste.ro/motor-servo-mg996-13kg-360g.html|Cleste]]|[[https://towerpro.com.tw/product/mg996r/|MG996R Specifications]]| |
| |Module DC-DC Step Down LM2596S|2|Optimus Digital|12.99 RON|[[https://www.optimusdigital.ro/en/adjustable-step-down-power-supplies/1109-lm2596-dc-dc-step-down-module-5a.html|Optimus]]|[[https://www.optimusdigital.ro/en/adjustable-step-down-power-supplies/1109-lm2596-dc-dc-step-down-module-5a.html|Module Specifications]]| | |Module DC-DC Step Down LM2596S|2|Optimus Digital|12.99 RON|[[https://www.optimusdigital.ro/en/adjustable-step-down-power-supplies/1109-lm2596-dc-dc-step-down-module-5a.html|Optimus]]|[[https://www.optimusdigital.ro/en/adjustable-step-down-power-supplies/1109-lm2596-dc-dc-step-down-module-5a.html|Module Specifications]]| | ||
| - | |Mini Breadboard|2|Mouser Electronics|€2.60|[[https://ro.mouser.com/ProductDetail/OSEPP-Electronics/LS-00047?qs=w%2Fv1CP2dgqofvkXBf4F3MQ%3D%3D|Mouser]]|[[https://www.osepp.com/accessories/components/162-ls-00047-solder-able-breadboard-mini|LS-00047 Datasheet]]| | ||
| - | |Resistors Kit|1|Mouser Electronics|€10.84|[[https://ro.mouser.com/ProductDetail/SparkFun/COM-10969?qs=WyAARYrbSnYDX0pYE0qQCg%3D%3D|Mouser]]|[[N/A]] | ||
| |Plusivo Kit|1|Optimus Digital|RON 40|[[https://www.optimusdigital.ro/en/kits/12026-plusivo-electronics-starter-kit-0721248990075.html?search_query=plusivo+kit&results=56|Optimus]]| | |Plusivo Kit|1|Optimus Digital|RON 40|[[https://www.optimusdigital.ro/en/kits/12026-plusivo-electronics-starter-kit-0721248990075.html?search_query=plusivo+kit&results=56|Optimus]]| | ||
| + | |Acumulator LiPo GENS ACE G-Tech Soaring 7.4 V/ 2200 mA/ 30C XT60|1|Sierra|RON 88|[[https://www.sierra.ro/cumpara/acumulator-lipo-gens-ace-g-tech-soaring-7-4-v-2200-ma-30c-xt60-2371|Sierra]]| | ||
| + | |||
| ==== Block Diagram ==== | ==== Block Diagram ==== | ||
| - | {{:pm:prj2025:vradulescu:screenshot_from_2025-05-28_23-17-21.png?200|}} | + | {{:pm:prj2025:vradulescu:screenshot_from_2025-05-28_23-17-21.png?500|}} |
| The diagram above shows the complete architecture of the stabilization system. The main blocks are: | The diagram above shows the complete architecture of the stabilization system. The main blocks are: | ||
| Line 49: | Line 49: | ||
| ==== Electrical Schematics ==== | ==== Electrical Schematics ==== | ||
| - | {{:pm:prj2025:vradulescu:screenshot_from_2025-05-28_23-19-50.png?200|}} | + | {{:pm:prj2025:vradulescu:screenshot_from_2025-05-28_23-19-50.png?500|}} |
| The complete electrical schematic shows in detail all connections between components, including: | The complete electrical schematic shows in detail all connections between components, including: | ||
| Line 70: | Line 70: | ||
| ==== Sensor MPU6050 Schematics ==== | ==== Sensor MPU6050 Schematics ==== | ||
| - | {{:pm:prj2025:vradulescu:named_pins_6050.jpg?200|}} | + | {{:pm:prj2025:vradulescu:named_pins_6050.jpg?300|}} |
| ==== Microcontroller Pin Configuration ==== | ==== Microcontroller Pin Configuration ==== | ||
| Line 86: | Line 86: | ||
| |GPIOA|PA5|LD2|GPIO_Output|Indicator LED for diagnostics| | |GPIOA|PA5|LD2|GPIO_Output|Indicator LED for diagnostics| | ||
| - | {{:pm:prj2025:vradulescu:screenshot_2025-05-25_022914.png?200|}} | + | {{:pm:prj2025:vradulescu:screenshot_2025-05-25_022914.png?500|}} |
| === I2C1 Configuration === | === I2C1 Configuration === | ||
| Line 118: | Line 118: | ||
| ==== Functionality Demonstration ==== | ==== Functionality Demonstration ==== | ||
| - | {{:pm:prj2025:vradulescu:whatsapp_image_2025-05-16_at_03.38.31.jpeg?200|}} | + | {{:pm:prj2025:vradulescu:whatsapp_image_2025-05-16_at_03.38.31.jpeg?350|}} |
| - | The image above shows the current hardware setup, featuring: | + | The image above shows the sensor hardware setup, featuring: |
| * STM32F401RE Nucleo development board | * STM32F401RE Nucleo development board | ||
| * MPU6050 sensor connected via I2C | * MPU6050 sensor connected via I2C | ||
| Line 126: | Line 126: | ||
| I have tested the functionality of the MPU6050 sensor and obtained valid orientation data. After applying the Kalman filter, the data is stable and accurate. | I have tested the functionality of the MPU6050 sensor and obtained valid orientation data. After applying the Kalman filter, the data is stable and accurate. | ||
| + | |||
| + | {{:pm:prj2025:vradulescu:whatsapp_image_2025-05-29_at_01.13.15.jpeg?350|}} | ||
| + | |||
| + | This image shows the servo motor used for Y axis, including the support printed 3D via Fusion 360 and the cross gear. | ||
| + | |||
| + | {{:pm:prj2025:vradulescu:1.jpg?400|}} | ||
| + | |||
| + | Here is the almost final state of the project, soldering the motor pins with the corresponding DC-DC modules. | ||
| + | |||
| + | {{:pm:prj2025:vradulescu:2.jpg?400|}} | ||
| + | |||
| + | This image represents the 3D printing moment, for supports and platform base. | ||
| ==== Power Consumption Calculations ==== | ==== Power Consumption Calculations ==== | ||
| Line 230: | Line 242: | ||
| * Temporary buffers are reused where possible to reduce peak memory usage | * Temporary buffers are reused where possible to reduce peak memory usage | ||
| - | ==== Sensor Calibration ==== | + | ==== Sensor Calibration ==== |
| - | The calibration process for the MPU6050 was implemented in several steps: | + | Initial Angle Determination: |
| - | + | * Initial angles are calculated from accelerometer data at startup | |
| - | * Gyroscope Bias Calibration: | + | * These angles initialize the Kalman filter states |
| - | * The device is placed in a stationary position at startup | + | * Ensures stable starting point for the filter |
| - | * 500 gyroscope readings are collected over approximately 5 seconds | + | |
| - | * The average value for each axis is calculated and stored as the gyroscope bias | + | |
| - | * This bias is then subtracted from all subsequent gyroscope readings | + | |
| - | + | ||
| - | * Accelerometer Calibration: | + | |
| - | * A six-position calibration procedure was used (placing the sensor flat on all six sides) | + | |
| - | * For each position, 100 readings are averaged to determine the accelerometer response | + | |
| - | * A 3x3 calibration matrix is calculated to correct for misalignment and scale errors | + | |
| - | * The calibration matrix is applied to all raw accelerometer readings | + | |
| - | + | ||
| - | * Initial Angle Determination: | + | |
| - | * Initial angles are calculated from accelerometer data using arctangent functions | + | |
| - | * These initial angles are used to initialize the Kalman filter states | + | |
| - | * This ensures the filter begins with accurate orientation information | + | |
| - | + | ||
| - | The calibration parameters are stored in memory and applied continuously during operation. The calibration procedure significantly improved angle estimation accuracy from ±5° to better than ±0.5° in static conditions. | + | |
| + | Automatic Bias Correction: | ||
| + | * The Kalman filter continuously estimates gyroscope bias | ||
| + | * No manual calibration required | ||
| + | * Bias estimation improves over time during operation | ||
| ==== Servo Control System ==== | ==== Servo Control System ==== | ||
| The servo control implementation includes: | The servo control implementation includes: | ||
| Line 298: | Line 298: | ||
| ==== Laboratory Functionality Integration ==== | ==== Laboratory Functionality Integration ==== | ||
| The project leverages several functionalities covered in laboratory sessions: | The project leverages several functionalities covered in laboratory sessions: | ||
| - | |||
| - | * GPIO Control (Lab 0): | ||
| - | * Used for system status indicators | ||
| - | * Implemented LED indicators for system status | ||
| - | * Configured button input for user interaction and calibration trigger | ||
| * UART Communication (Lab 1): | * UART Communication (Lab 1): | ||
| Line 380: | Line 375: | ||
| Based on many results like this, I generated, using Python, two graphics witch demonstrate the stability of this filter: | Based on many results like this, I generated, using Python, two graphics witch demonstrate the stability of this filter: | ||
| - | {{:pm:prj2025:vradulescu:kalman_filter_stability.png?200|}} | + | {{:pm:prj2025:vradulescu:kalman_filter_stability.png?400|}} |