## 2 Materials and Methods
### Design of the Control System
#### 2.3.3 Control System  
The system adopts an STM32F4 microcontroller (Mir technologies company in China Shenzhen) as the core chip of the control system for picking and selecting an integrated remote-operation-type dragon-fruit-picking device. The hardware of the control system includes a steering engine for regulating the rotation of the vacuum suction device (model: TD-8120 MG, with a blocking torque of 20 kg cm, Feite model company in China Shenzhen); a ball screw stepping motor module in the horizontal drive module for controlling the left and right movements of the sucker positioning mechanism (model: 57 HS22, with an effective travel of 600 mm and a torque of 2.3 N m, Process equipment manufacturing company in China Nanjing); a ball screw stepper motor module that controls the up and down movements of the lifting platform (model: 57 BYG250H, effective stroke of 500 mm, torque of 2.8 N m, Process equipment manufacturing company in China Nanjing); an electric cylinder, used to control the movement of the end flexible claw expansion and contraction (speed of 100 mm/s, effective stroke of 250 mm); a servomotor, used to control the flexible finger opening and closing (model: 60M-R6430A5-E, torque of 1.6 N m, Huistong motor company in China Jiangsu); a DC gear motor for controlling the sorting device (model: 5D120-GU-2, Jinmaozhan micro motor company in China Shenzhen); a solenoid valve for controlling the working status of the cylinder and sucker (model: 4V210-08, 2-position 5-way, Fidelion precision manufacturing company in China Zhejiang); a relay for controlling the solenoid valve open/close (model: JQC-3 FF-S-Z, Mikolay electronics company in China Shanghai); a DC24V switching power supply; a pressure sensor (model: FSR402, external diameter: 18.3 mm, Mack sensors company in China Shanxi); a laser diffuse reflection counter-reflective photoelectric sensor (model: LS18-DS80C1, sensing distance: 80 cm, Jingwei Laser Equipment company in China Liaocheng); and a stepper motor driver (model: PFDE-DM542, incorporating three generations of 32-bit DSP processors, Process equipment manufacturing company in China Nanjing). The software part of the control system was programmed in the C language using Keil5 software (5.25 version), and the modification as well as debugging of the target detection algorithm was carried out in the Python language on PyCharm 2023. The pressure sensor, photoelectric sensor, and visual recognition system constitute the fruit information acquisition system, and the DC power supplies power for the control system. Before the work of the control system, the components are first initialized to bring the control system into a ready state; the visual recognition system then begins to identify and locate the fruit, the digital image data collected are transmitted to the microcontroller through the USB interface, and the microcontroller analyzes and processes the obtained information. When the fruit is judged to be a single fruit, the microcontroller controls the end of the flexible claw picking; when it is judged that the fruit is multifruit, the microcontroller controls the mechanical scissors picking; and when it is judged that the fruit is blocked, the microcontroller then controls the blade-shifting device to clip out the branches and fruit picking. During the process of picking, the OpenMV (Yunjiang science and technology company in China Hangzhou) module monitors the status of the fruit in real time and transmits the signal to the microcontroller through the USB interface; when it is judged to be over-ripe or damaged, the microcontroller controls the bad fruit removal system to remove the fruits. After the picking is completed, the picking system puts the fruits into the funnel; the fruits enter the sorting device through the funnel, the pressure sensor weighs the fruits, the weight signal is converted and transmitted to the microcontroller, and the voltage signal is converted into accurate weight data by the microcontroller program.