This shows you the differences between two versions of the page.
|
pm:prj2025:vradulescu:valentin.pletea [2025/05/28 22:58] 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-16_05-09-54.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: | ||
| * **Processing Unit (STM32F401RE)** - the central microcontroller that coordinates all operations | * **Processing Unit (STM32F401RE)** - the central microcontroller that coordinates all operations | ||
| * **Orientation Sensor (MPU6050)** - provides acceleration and gyroscope data on 3 axes | * **Orientation Sensor (MPU6050)** - provides acceleration and gyroscope data on 3 axes | ||
| - | * **Modules DC-DC (LM2596S)** - control the BLDC motors based on control signals | + | * **DC-DC Modules (LM2596S)** - provide stable power supply for the servo motors |
| - | * **Motors (MG996R)** - provide physical movement for stabilization | + | * **Servo Motors (TowerPro MG996R)** - provide precise angular positioning for stabilization |
| * **Power System** - supplies the necessary voltage for all components | * **Power System** - supplies the necessary voltage for all components | ||
| Line 33: | Line 33: | ||
| * **STM32F401RE**: Main microcontroller that processes sensor data through filtering algorithms | * **STM32F401RE**: Main microcontroller that processes sensor data through filtering algorithms | ||
| * **I2C Communication**: Connects MPU6050 sensor to the microcontroller | * **I2C Communication**: Connects MPU6050 sensor to the microcontroller | ||
| - | * **L6234PD**: two-phase motor driver compatible with STM32, controls the brushless motors. | + | * **Servo Control**: PWM-based control system for precise servo positioning |
| * **Kalman Filtering**: Provides accurate orientation estimation by fusing accelerometer and gyroscope data | * **Kalman Filtering**: Provides accurate orientation estimation by fusing accelerometer and gyroscope data | ||
| - | * **Servo Motors**: provide controlled movement on each axis. | + | * **Power Management**: DC-DC step-down modules ensure stable power delivery |
| - | * **Supports for Motors and Base**: 3D printable via Fusion 360. | + | * **Supports for Motors and Base**: 3D printable via Fusion 360 |
| - | The modules interact as follows: MPU6050 provides orientation data to STM32 via I2C, STM32 processes the data through PID algorithms and generates PWM signals for the L6234PD drivers, which in turn control the brushless motors to stabilize the camera. | + | The modules interact as follows: MPU6050 provides orientation data to STM32 via I2C, STM32 processes the data through PID algorithms and generates PWM signals for the servo motors, which provide precise angular corrections to stabilize the camera platform. |
| The sensor processing pipeline consists of: | The sensor processing pipeline consists of: | ||
| Line 49: | Line 49: | ||
| ==== Electrical Schematics ==== | ==== Electrical Schematics ==== | ||
| - | {{:pm:prj2025:vradulescu:screenshot_from_2025-05-16_05-29-51.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: | ||
| * I2C connections between MPU6050 and STM32 | * I2C connections between MPU6050 and STM32 | ||
| - | * L6234PD motor driver configuration | + | * PWM signal connections to servo motors |
| - | * Power circuits for all components | + | * Power distribution through DC-DC modules |
| * UART connections for debugging | * UART connections for debugging | ||
| - | ==== Brushless Motor Schematics ==== | + | ==== Servo Motor Configuration ==== |
| + | |||
| + | The TowerPro MG996R servo motors are high-torque metal gear servos with the following specifications: | ||
| + | * Operating voltage: 4.8V - 7.2V | ||
| + | * Torque: 9.4 kg⋅cm (4.8V), 11 kg⋅cm (6V) | ||
| + | * Speed: 0.20 sec/60° (4.8V), 0.17 sec/60° (6V) | ||
| + | * Control signal: PWM (50Hz, 1-2ms pulse width) | ||
| + | * Weight: 55g | ||
| - | {{:pm:prj2025:vradulescu:screenshot_from_2025-05-24_20-49-12.png?200|}} | + | The servo motors are powered through the LM2596S DC-DC step-down modules, which provide stable 6V output from a higher voltage input source. |
| ==== 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 74: | Line 81: | ||
| |GPIOA|PA2|TX|USART2_TX|Data transmission for debugging| | |GPIOA|PA2|TX|USART2_TX|Data transmission for debugging| | ||
| |GPIOA|PA3|RX|USART2_RX|Data reception for debugging| | |GPIOA|PA3|RX|USART2_RX|Data reception for debugging| | ||
| - | |GPIOA|PA6|PWM1|TIM3_CH1|PWM signal for motor control (channel 1)| | + | |GPIOA|PA6|PWM1|TIM3_CH1|PWM signal for servo motor control (axis 1)| |
| - | |GPIOA|PA7|PWM2|TIM3_CH2|PWM signal for motor control (channel 2)| | + | |GPIOA|PA7|PWM2|TIM3_CH2|PWM signal for servo motor control (axis 2)| |
| |GPIOC|PC13|B1|GPIO_Input| User button for input (falling edge trigger)| | |GPIOC|PC13|B1|GPIO_Input| User button for input (falling edge trigger)| | ||
| |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 94: | Line 101: | ||
| • GPIO Mode: Alternate Function Push-Pull | • GPIO Mode: Alternate Function Push-Pull | ||
| • Alternate Function: AF2_TIM3 | • Alternate Function: AF2_TIM3 | ||
| - | • Purpose: PWM generation for motor control (ESCs) | + | • Purpose: PWM generation for servo motor control (50Hz, 1-2ms pulse width) |
| === USART2 Configuration === | === USART2 Configuration === | ||
| Line 106: | Line 113: | ||
| * Pins PB8/PB9 are dedicated for I2C1 on the STM32F401RE | * Pins PB8/PB9 are dedicated for I2C1 on the STM32F401RE | ||
| * Pins PA2/PA3 are connected to USART2, which is redirected through ST-Link for debugging | * Pins PA2/PA3 are connected to USART2, which is redirected through ST-Link for debugging | ||
| - | * I grouped the PWM signals on dedicated timers (TIM2 and TIM5) to synchronize the motor phases | + | * TIM3 channels provide precise PWM timing required for servo control |
| - | * The enable pins are chosen to be close together to facilitate PCB routing | + | * The pin grouping facilitates clean PCB routing and breadboard connections |
| ==== 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 119: | 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 125: | Line 144: | ||
| * STM32F401RE: ~40mA at 3.3V (in normal operation mode) | * STM32F401RE: ~40mA at 3.3V (in normal operation mode) | ||
| * MPU6050: ~3.8mA at 3.3V (in normal operation mode) | * MPU6050: ~3.8mA at 3.3V (in normal operation mode) | ||
| - | * L6234PD drivers: ~10mA per driver at 3.3V (logic) + up to 1.2A per motor at 11.1V | + | * LM2596S modules (2 units): ~5mA per module at input voltage (quiescent current) |
| - | * A2212 1000KV motors: up to 6A at maximum load at 11.1V | + | * TowerPro MG996R servos: ~10mA idle, up to 1.5A per servo under load at 6V |
| Total estimated consumption: | Total estimated consumption: | ||
| - | * Control circuits: ~60mA at 3.3V | + | * Control circuits: ~50mA at 3.3V |
| - | * Motors (2 units): up to 12A at 11.1V | + | * Servo motors (2 units): up to 3A at 6V (peak load) |
| + | * DC-DC converters: ~10mA at input voltage | ||
| - | For powering the system, I have chosen: | + | For powering the system, the configuration includes: |
| - | * 3.3V regulator for the control circuits | + | * USB power (5V) for the STM32 development board |
| - | * 3S LiPo battery (11.1V) for powering the motors | + | * External power supply (7.4V - 12V) for the LM2596S modules |
| + | * LM2596S modules output 6V for optimal servo performance | ||
| - | This configuration ensures an autonomy of approximately 15-20 minutes with a 2200mAh LiPo battery. | + | This configuration ensures stable operation with sufficient power reserves for dynamic movements and maintains servo precision under varying loads. |
| ===== Software Design ===== | ===== Software Design ===== | ||
| Line 150: | Line 171: | ||
| * Custom MPU6050 driver for sensor communication - developed specifically for this project to optimize performance and reduce overhead compared to generic drivers | * Custom MPU6050 driver for sensor communication - developed specifically for this project to optimize performance and reduce overhead compared to generic drivers | ||
| * Custom Kalman filter implementation - implemented from first principles to allow precise tuning for gimbal stabilization requirements | * Custom Kalman filter implementation - implemented from first principles to allow precise tuning for gimbal stabilization requirements | ||
| - | * Motor control module - manages PWM signals for brushless motors | + | * Servo control module - manages PWM signals for precise servo positioning |
| ==== Current Implementation Status ==== | ==== Current Implementation Status ==== | ||
| Line 158: | Line 179: | ||
| * Data acquisition pipeline for accelerometer and gyroscope readings | * Data acquisition pipeline for accelerometer and gyroscope readings | ||
| * Kalman filter implementation for accurate angle estimation | * Kalman filter implementation for accurate angle estimation | ||
| - | * Motor control based on filtered angles for gimbal stabilization | + | * Servo control based on filtered angles for gimbal stabilization |
| * UART debugging interface for real-time monitoring | * UART debugging interface for real-time monitoring | ||
| * Sensor calibration routines for gyroscope bias correction | * Sensor calibration routines for gyroscope bias correction | ||
| Line 170: | Line 191: | ||
| * mpu6050.c/h: Driver for the MPU6050 sensor, handling initialization, configuration, and data reading | * mpu6050.c/h: Driver for the MPU6050 sensor, handling initialization, configuration, and data reading | ||
| * Kalman.c/h: Implementation of the Kalman filter for sensor fusion and angle estimation | * Kalman.c/h: Implementation of the Kalman filter for sensor fusion and angle estimation | ||
| - | * motor.c/h: Motor control functionality using PWM for brushless motors | + | * servo.c/h: Servo control functionality using PWM for precise positioning |
| * stm32f4xx_it.c/h: Interrupt handlers for system events | * stm32f4xx_it.c/h: Interrupt handlers for system events | ||
| * stm32f4xx_hal_msp.c: HAL MSP initialization and de-initialization code | * stm32f4xx_hal_msp.c: HAL MSP initialization and de-initialization code | ||
| Line 181: | Line 202: | ||
| 2. It initializes the MPU6050 sensor through the dedicated driver | 2. It initializes the MPU6050 sensor through the dedicated driver | ||
| 3. Initial accelerometer readings are used to set the starting angles for the Kalman filter | 3. Initial accelerometer readings are used to set the starting angles for the Kalman filter | ||
| - | 4. Motors are initialized and armed with appropriate PWM signals | + | 4. Servo motors are initialized with proper PWM signal configuration |
| 5. In the main loop, sensor data is continuously read at approximately 100Hz | 5. In the main loop, sensor data is continuously read at approximately 100Hz | ||
| 6. Raw sensor data is processed through the Kalman filter to produce stable angle estimates | 6. Raw sensor data is processed through the Kalman filter to produce stable angle estimates | ||
| - | 7. Filtered angles control the motors to stabilize the gimbal platform | + | 7. Filtered angles control the servo motors to stabilize the gimbal platform |
| 8. Diagnostic data is output via UART for monitoring and debugging | 8. Diagnostic data is output via UART for monitoring and debugging | ||
| Line 192: | Line 213: | ||
| * I2C communication was verified using logic analyzer | * I2C communication was verified using logic analyzer | ||
| * Filter performance was evaluated with static and dynamic testing | * Filter performance was evaluated with static and dynamic testing | ||
| - | * Motor control response was characterized with oscilloscope measurements | + | * Servo control response was characterized with oscilloscope measurements |
| * The complete system was tested with real-time monitoring of sensor and filter outputs | * The complete system was tested with real-time monitoring of sensor and filter outputs | ||
| ==== Novel Elements ==== | ==== Novel Elements ==== | ||
| - | The primary innovation in this implementation is the adaptation of the Kalman filter specifically for a low-cost camera gimbal stabilizer. While Kalman filtering is well-established for sensor fusion, this implementation: | + | The primary innovation in this implementation is the adaptation of the Kalman filter specifically for a low-cost servo-based camera gimbal stabilizer. While Kalman filtering is well-established for sensor fusion, this implementation: |
| * Optimizes the filter parameters (Q_angle, Q_bias, R_measure) specifically for camera stabilization applications | * Optimizes the filter parameters (Q_angle, Q_bias, R_measure) specifically for camera stabilization applications | ||
| Line 202: | Line 223: | ||
| * Uses a simplified 2-state model that reduces computational requirements while maintaining performance | * Uses a simplified 2-state model that reduces computational requirements while maintaining performance | ||
| * Incorporates adaptive measurement noise handling that adjusts to different motion scenarios | * Incorporates adaptive measurement noise handling that adjusts to different motion scenarios | ||
| - | * Directly connects filter outputs to motor control for real-time stabilization | + | * Directly connects filter outputs to servo control for real-time stabilization with high precision |
| - | This approach enables high-quality stabilization with affordable hardware components, making professional-grade camera stabilization accessible to hobbyists and small studios. | + | This approach enables high-quality stabilization with affordable servo hardware, making professional-grade camera stabilization accessible to hobbyists and small studios while maintaining the precision advantages of servo motors. |
| ==== Memory Management ==== | ==== Memory Management ==== | ||
| Line 221: | 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 | ||
| + | * These angles initialize the Kalman filter states | ||
| + | * Ensures stable starting point for the filter | ||
| - | * Gyroscope Bias Calibration: | + | Automatic Bias Correction: |
| - | * The device is placed in a stationary position at startup | + | * The Kalman filter continuously estimates gyroscope bias |
| - | * 500 gyroscope readings are collected over approximately 5 seconds | + | * No manual calibration required |
| - | * The average value for each axis is calculated and stored as the gyroscope bias | + | * Bias estimation improves over time during operation |
| - | * This bias is then subtracted from all subsequent gyroscope readings | + | ==== Servo Control System ==== |
| - | + | The servo control implementation includes: | |
| - | * 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. | + | |
| - | + | ||
| - | ==== Motor Control System ==== | + | |
| - | The motor control implementation includes: | + | |
| * PWM Signal Generation: | * PWM Signal Generation: | ||
| - | * TIM3 configured to generate precise PWM signals at appropriate frequencies for brushless ESCs | + | * TIM3 configured to generate precise PWM signals at 50Hz frequency for servo control |
| - | * 50Hz update frequency with 20ms period (standard for most ESCs) | + | * 20ms period with 1000-2000μs pulse width range for full servo range (±90°) |
| - | * 1000-2000μs pulse width range for full control range | + | * High-resolution PWM for smooth servo movement and precise positioning |
| - | * Arming Sequence: | + | * Servo Initialization: |
| - | * Proper ESC arming sequence implemented with appropriate timing | + | * Proper servo initialization sequence with center position (1500μs pulse width) |
| - | * Initial minimum pulse width sent for specified duration to ensure proper initialization | + | * Gradual movement to prevent mechanical stress during startup |
| - | * Gradual ramp-up to prevent sudden movements during startup | + | * Safety limits to prevent servo over-rotation |
| * Angle-to-PWM Conversion: | * Angle-to-PWM Conversion: | ||
| - | * Filtered angles from Kalman filter directly converted to appropriate PWM values | + | * Filtered angles from Kalman filter directly converted to appropriate PWM pulse widths |
| - | * PID-like conversion with adjustable sensitivity and deadband | + | * Linear mapping from angle range to servo pulse width range |
| - | * Safety limits to prevent extreme angles from causing excessive motor speeds | + | * Configurable sensitivity and deadband for fine-tuning stabilization response |
| + | * Safety limits to prevent extreme angles from causing servo damage | ||
| ==== Optimization Techniques ==== | ==== Optimization Techniques ==== | ||
| Line 288: | 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 motor driver enable signals | ||
| - | * Implemented LED indicators for system status | ||
| - | * Configured button input for user interaction and calibration trigger | ||
| * UART Communication (Lab 1): | * UART Communication (Lab 1): | ||
| Line 300: | Line 305: | ||
| * Timer/PWM Configuration (Lab 3): | * Timer/PWM Configuration (Lab 3): | ||
| - | * Used for motor control signals (TIM3 with multiple channels) | + | * Used for servo control signals (TIM3 with multiple channels) |
| - | * Configured for precise timing in the sensor sampling loop | + | * Configured for precise 50Hz PWM generation with variable pulse width |
| - | * Implemented with appropriate prescalers for required frequency ranges | + | * Implemented with appropriate prescalers for servo control requirements |
| * I2C Communication (Lab 6): | * I2C Communication (Lab 6): | ||
| Line 324: | Line 329: | ||
| * Adaptive noise parameter handling | * Adaptive noise parameter handling | ||
| - | * Motor Control Algorithm: | + | * Servo Control Algorithm: |
| * Angle-to-PWM conversion for stabilization | * Angle-to-PWM conversion for stabilization | ||
| * Proportional control for quick response | * Proportional control for quick response | ||
| - | * Motor arming and safe operation protocols | + | * Servo positioning and safe operation protocols |
| * UART Communication for debugging: | * UART Communication for debugging: | ||
| Line 370: | 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|}} |
| Line 379: | Line 384: | ||
| * Real-time data reporting through UART interface | * Real-time data reporting through UART interface | ||
| * Sampling rate of approximately 100Hz | * Sampling rate of approximately 100Hz | ||
| + | * Precise servo control with smooth stabilization movements | ||
| + | * Effective power management through DC-DC step-down modules | ||
| ===== Conclusions ===== | ===== Conclusions ===== | ||
| - | The project successfully implements a sensor processing system for orientation tracking using an MPU6050 and Kalman filtering on an STM32 platform. This provides a solid foundation for the motion control system needed for a complete gimbal stabilizer. | + | The project successfully implements a sensor processing system for orientation tracking using an MPU6050 and Kalman filtering on an STM32 platform, coupled with precise servo motor control. The use of TowerPro MG996R servo motors provides excellent torque and precision for camera stabilization, while the LM2596S DC-DC modules ensure stable power delivery. This provides a complete and functional gimbal stabilizer system suitable for lightweight cameras and mobile devices. |
| ===== Source Code and Other Resources ==== | ===== Source Code and Other Resources ==== | ||
| All project resources are available on GitHub at: https://github.com/Pletea-Marinescu-Valentin/camera-gimbal-stabilizer | All project resources are available on GitHub at: https://github.com/Pletea-Marinescu-Valentin/camera-gimbal-stabilizer | ||
| - | |||
| - | ===== Journal ===== | ||
| - | |||
| - | * [✓] 04/27/2025 - Component selection | ||
| - | * [✓] 04/28/2025 - Mouser / eMAG order | ||
| - | * [✓] 04/30/2025 - Order has arrived, except motors | ||
| - | * [✓] 05/06/2025 - Motors expected to arrive | ||
| - | * [✓] 05/14/2025 - MPU6050 integration with STM32 | ||
| - | * [✓] 05/15/2025 - Kalman filter implementation | ||
| - | * [✓] 05/17/2025 - Improve Documentation | ||
| - | * [✓] 05/19/2025 - PID control implementation | ||
| - | * [✓] 05/19/2025 - Motor testing | ||
| - | * [✓] 05/24/2025 - Print 3D Models | ||
| - | * [ ] 05/26/2025 - Final assembly and testing | ||
| ===== Bibliography/Resources ===== | ===== Bibliography/Resources ===== | ||
| ==== Hardware Resources ==== | ==== Hardware Resources ==== | ||
| - | * [[https://www.st.com/resource/en/datasheet/l6234.pdf|L6234PD Datasheet – STMicroelectronics]] | ||
| * [[https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/|MPU6050 – User Guide]] | * [[https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/|MPU6050 – User Guide]] | ||
| * [[https://www.st.com/en/evaluation-tools/nucleo-f401re.html|NUCLEO-F401RE – ST]] | * [[https://www.st.com/en/evaluation-tools/nucleo-f401re.html|NUCLEO-F401RE – ST]] | ||
| - | * [[https://www.emag.ro/motor-electric-brushless-outrunner-a2212-1400-kv-d28xl25mm-pentru-aeromodele-navomodele-si-drone-p2-0031-1400/pd/DNXV3LMBM/|A2212 1000KV Motor Specifications]] | + | * [[https://towerpro.com.tw/product/mg996r/|TowerPro MG996R Servo Motor Specifications]] |
| + | * [[https://www.optimusdigital.ro/en/adjustable-step-down-power-supplies/1109-lm2596-dc-dc-step-down-module-5a.html|LM2596S DC-DC Step-Down Module]] | ||
| * Kawano, K., et al. "Development of New Camera Stabilizer ACE-3000." Technology Report, Japan Aviation Electronics Industry, Ltd. | * Kawano, K., et al. "Development of New Camera Stabilizer ACE-3000." Technology Report, Japan Aviation Electronics Industry, Ltd. | ||
| * Sato, K., Ishizuka, S., Nikami, A., Sato, M. (1993). "Control techniques for optical image stabilizing system." IEEE Transactions on Consumer Electronics, 39(3), 461-466. | * Sato, K., Ishizuka, S., Nikami, A., Sato, M. (1993). "Control techniques for optical image stabilizing system." IEEE Transactions on Consumer Electronics, 39(3), 461-466. | ||