The requirement of this question is to control the tilt to make the ball perform the required actions on a flat plate, because in most cases the ball is in contact with the plate, and the deformation of the ball and the plate can be ignored. Therefore, in this question The motion of the ball can be approximately viewed as the motion of a particle on a two-dimensional plane.
Controlling the movement of the ball can be mainly divided into three processes: identifying the position and movement status of the ball, performing relevant calculations and judgments, and controlling the tilt angle of the board. The tilt of the board can be decomposed into the two directions of the x and y axes. The tilt angles in these two directions can be controlled by two servos respectively. At the same time, the movement of the ball can also be decomposed into these two axes. Moreover, because the inclination angle of the plate is small, the inclination of each axis and the acceleration of the ball on that axis can be regarded as approximately proportional. To sum up, the core function of this work is to detect the movement of the ball in two directions respectively, use the PID algorithm to calculate and control the tilt angle of the board in both directions, and realize the specified movement of the ball. This work uses openMV4 image recognition to determine the movement of the ball and perform PID calculations, and uses the MG946R servo and link structure to control the deflection of the board. In addition, considering the realization of various actions required in the question and the point errors caused by the deformation of the support structure, an STM32F103MCU is added to achieve dynamic control of the target point through communication with openMV. The overall system block diagram of this work is as follows
Because openMV is a ready-made product, I won’t go into details here. The schematic diagram in this project is the STM32 control board that controls the target point of the ball. 1.STM32F103 minimum system: including STM32F103 microcontroller, crystal oscillator, filter capacitor and other components to ensure the normal operation of the STM32 microcontroller to achieve control functions. 2. Stabilized power supply module: All other electrical components in this work are powered by 5V. In order to simplify the power supply structure, this module is used to step down 5V to the 3.3V required by STM32 to achieve compatibility with external 5V power supply. 3. Input device: including keyboard and joystick. Through the input device, the target point of the ball can be manually controlled to achieve the actions specified in the question. ~~~~ Photos of finished PCB:
Work function demonstration video: Link: https://pan.baidu.com/s/1Am4mEMFgGC5JmoANlwDd5w Extraction code: l3qg
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet