Siraitia grosvenorii sorting robot
Technical Field
The invention relates to the technical field of vegetable and fruit sorting, in particular to a siraitia grosvenorii sorting robot.
Background
Momordica grosvenori belongs to fruits of perennial vine plants in the cucurbitaceae family, and is known as "fruit of immortal interest", leaf heart shape, male and female heteroplant, flowering in summer and fruiting in autumn, and also called as "fruit of Laohuang, false balsam pear, Momordica glabra, Stephania sinica Diels, radix Stephaniae Sinicae, and Euonymus Testudinis". The momordica grosvenori is mainly produced in towns such as the Longjiang county, the Longsheng county, the Baishou county and the like in the Yongfu county and the Guisheng county of the Guangxi Zhuang nationality, the county of Yongfu county and the Longsheng county have a long-term planting history of the momordica grosvenori, the momordica grosvenori is a famous and precious local specialty of the Guilin and is one of medicine and food dual-purpose materials, and the momordica grosvenori has the main effect of relieving cough and reducing sputum. The fruits have high nutritional value, contain rich vitamin C (400-500 mg in each 100 g of fresh fruits) and glucoside, fructose, glucose, protein, lipid and the like, have different sizes, need to be sorted in the production and processing process, mostly adopt simple mechanical equipment to match with manual work for sorting at present, have poor effect and low intelligent degree, and therefore an intelligent sorting device meeting the actual condition needs to be designed urgently.
Disclosure of Invention
The invention aims to provide a siraitia grosvenorii sorting robot, which aims to solve the problems that most of the existing siraitia grosvenorii sorting robots in the background technology adopt simple mechanical equipment to match with manual sorting, the effect is poor, the intelligent degree is low, and therefore an intelligent sorting device meeting the actual situation needs to be designed urgently.
In order to achieve the purpose, the invention provides the following technical scheme: the momordica grosvenori sorting robot comprises a sorting platform, an electric control mechanical arm, a K210 slave control module, an OV5640 camera and an STM32 main control module, wherein the sorting platform comprises a horizontal wood board and an inverted L-shaped support, the position of 20cm x 9.5cm at the edge of the horizontal wood board is used as a placement point of momordica grosvenori, the OV5640 camera and the K210 slave control module are arranged right above the placement point and are convenient for shooting and graphic processing of momordica grosvenori, the inverted L-shaped support is fixed at the left edge of the upper surface of the horizontal wood board, the electric control mechanical arm is positioned at the right side of the horizontal wood board, sorting boxes are placed in front of and behind the electric control mechanical arm, the STM32 main control module is installed at the bottom of the electric control mechanical arm, the K210 slave control module is installed at the horizontal top of the inverted L-shaped support, and the OV5640 camera is installed at the outer side of the horizontal bottom of the inverted L-shaped support;
the system comprises a K210 slave control module, a KEY KEY, a K210 slave control module, a WeChat small program module, a power adapter, an LED and an electric control mechanical arm, wherein the K210 slave control module is in signal connection with an OV5640 camera, a serial port of an STM32 master control module, the SD card and the LCD, the STM32 master control module is in signal connection with a KEY KEY, a serial port of the K210 slave control module, the WeChat small program module, the power adapter, the LED and the electric control mechanical arm, the K210 slave control module is provided with a graphic processing system, the graphic processing system is designed based on a Mobilene V1 model, the STM32 master control module adopts STM32F103C8T6 as a master control chip and a loading circuit thereof, and the K210 is used as the master control chip; obtaining a picture of the momordica grosvenori through an OV5640 camera; the LCD displays the camera in real time to acquire images; the K210 slave control module is communicated with the STM32 master control module through a serial port, and the electric control mechanical arm is used for grabbing the momordica grosvenori; the KEY is used for controlling the whole robot; the LED displays the working state of the robot; the robot is controlled in real time by using Bluetooth communication through the WeChat applet module; the communication between the K210 slave control module and the STM32 master control module is carried out through a serial port; a power adapter to provide power support to the control system.
Preferably, the electric control mechanical arm comprises a bottom plate, a first digital steering engine, a tripod head bracket, a second digital steering engine, a third digital steering engine, a plurality of struts, a fifth digital steering engine, a fourth digital steering engine, a sixth digital steering engine and an acrylic claw, wherein the plurality of struts form a framework of the electric control mechanical arm, the first digital steering engine and an STM32 main control module are respectively installed on two sides of the upper surface of the bottom plate, the rotating end of the first digital steering engine is connected with the tripod head bracket through a hexagonal copper column, the tripod head bracket is connected with the bottom plate through a bearing, the top of the tripod head bracket is fixedly provided with the second digital steering engine, the rotating end of the second digital steering engine is provided with the third digital steering engine through the struts and a steering wheel, the rotating end of the third digital steering engine is provided with the fourth digital steering engine through the struts and the steering wheel, the rotating end of the fourth digital steering engine is provided with the fifth digital steering engine through the struts and the steering wheel, a rotating end of the fifth digital steering engine is provided with a sixth digital steering engine through a support column and a steering wheel, a rotating end of the sixth digital steering engine is provided with an acrylic claw through the support column and the steering wheel, a bottom plate, a bearing, a holder bracket, a framework, the steering wheel and the acrylic claw of the electric control mechanical arm are fixed through screws with different diameters, the mechanical mechanism can be designed by adopting a Jibot1 mechanical arm which is produced by the existing Zhongzhou Zhongling science and technology Limited company, and the bottom plate is positioned at the bottom of the framework and plays a supporting role; the bottom plate is connected with the holder bracket and the bearing through the hexagonal copper column, and the 360-degree rotation of the framework can be realized through the bearing; on a tripod head support, a support is used for forming a framework of an electric control mechanical arm, a digital steering engine is embedded in the support, the digital steering engine is connected with the support through a steering wheel, multi-freedom-degree movement of the electric control mechanical arm can be realized, an acrylic claw is connected to the tail end of the support, the digital steering engine is embedded in the support, so that a grabbing function is realized, 6 digital steering engines are totally installed in the electric control mechanical arm to realize 6-freedom-degree movement of the electric control mechanical arm, and 1 steering engine is respectively arranged on the tripod head support and the acrylic claw; 4 steering engines are embedded into the framework, so that the purpose of flexibly grabbing by the electric control mechanical arm is achieved.
Preferably, the serial port of the STM32 master control module is in signal connection with the serial port of the K210 slave control module through a level conversion module, so as to realize communication.
Preferably, the loading circuit of the STM32 main control module comprises a bluetooth interface, a communication interface, a function button, a power interface, a digital steering engine power supply voltage selection end, a PWM steering engine voltage stabilizing circuit, an SWD simulation interface circuit, an LED control circuit, a steering engine interface, a voltage stabilizing power supply circuit, a crystal oscillator circuit, a USB circuit, a BOOT button, a reset button and a buffer circuit.
Preferably, the MobilenetV1 model is implemented by using a method provided by Maixhub.
Preferably, the voltage stabilizing circuit of the PWM steering engine selects an MP1584 voltage stabilizing chip which stabilizes 7.5V input voltage to 5V to supply power to a control system; the input voltage of the voltage-stabilizing circuit ranges from 4.5V to 28V; the highest output can be 3A direct current, and the device also comprises 4 10uf patch capacitors; 2 100nf patch capacitors; 4 100K ohm chip resistors; 1 200K ohm resistor; 1 resistance of 39K ohm; 1 4.7uH patch inductor with a rated current of 800mA and 1 general-purpose diode.
Preferably, the USB circuit includes a MICRO USB socket and a CH340E USB serial-to-serial chip, and is connected to the serial port 1 of the STM32 main control module, and is used to download programs and 1 universal diode 1N4007, and 3 capacitors of 0.1 uf.
Preferably, the SWD simulation circuit is provided with 1uf capacitor and is used for connecting ST-Link, so that a debugging program and a downloading program are convenient.
Preferably, the voltage-stabilizing power supply circuit is an RT9193 linear voltage stabilizer, the maximum input voltage of the voltage-stabilizing power supply circuit is 5.5V, the maximum output current of the voltage-stabilizing power supply circuit is 300mA, and the output voltage is stabilized to be 3.3V; the voltage stabilizing circuit also comprises 4 1uf patch capacitors.
Compared with the prior art, the invention has the beneficial effects that: the OV5640 camera is adopted, an illuminating lamp is used for forming an image acquisition system, a K210 slave control module is used for carrying a Mobilene V1 model to serve as an image processing system, an STM32 main control module is used for controlling a digital rudder cluster to form a motion control system of an electric control mechanical arm, the state of the control system is fed back in real time through a WeChat small program module, LED display and LCD display, and the mechanical arm is opened to sort the momordica grosvenoris of different specifications into the classification box.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic structural view of the present invention;
FIG. 2 is a top view of FIG. 1;
FIG. 3 is a system diagram of a K210 slave control module according to the present invention;
FIG. 4 is a system diagram of the STM32 master control module of the present invention;
FIG. 5 is a schematic structural view of the electric control mechanical arm shown in FIG. 1;
FIG. 6 is a schematic diagram of an STM32 master control module chip according to the present invention;
FIG. 7 is a schematic diagram of a Bluetooth interface of the present invention;
FIG. 8 is a schematic view of a communication interface according to the present invention;
FIG. 9 is a schematic diagram of a KEY button according to the present invention;
FIG. 10 is a schematic diagram of a power interface according to the present invention;
FIG. 11 is a schematic view of a jumper interface according to the present invention;
FIG. 12 is a diagram of a voltage stabilizing circuit of a PWM steering engine according to the present invention;
FIG. 13 is a schematic diagram of an SWD emulation interface of the present invention;
FIG. 14 is a schematic diagram of an LED circuit of the present invention;
FIG. 15 is a schematic view of an interface of a steering engine according to the present invention;
FIG. 16 is a circuit diagram of a regulated power supply of the present invention;
FIG. 17 is a circuit diagram of a crystal oscillator according to the present invention;
FIG. 18 is a USB circuit diagram of the present invention;
FIG. 19 is a schematic view of the BOOT and reset button of the present invention;
FIG. 20 is a buffer circuit diagram according to the present invention;
FIG. 21 is a graph illustrating model accuracy in accordance with the present invention;
FIG. 22 is a flow control diagram of the steering engine of the present invention;
FIG. 23 is a diagram illustrating the interrupt service function of timer 2 according to the present invention;
FIG. 24 is a flow chart of the slave control of K210 according to the present invention;
FIG. 25 is a display of a large fruit LCD according to an embodiment of the present invention;
FIG. 26 is a diagram of an LCD display according to an embodiment of the present invention;
FIG. 27 is a LCD display of a fruit of the present invention;
FIG. 28 is a schematic view of packing large and medium fruits according to the present invention;
FIG. 29 is a schematic view of the packing of small fruits according to the embodiment of the present invention;
FIG. 30 is a schematic diagram of an embodiment of a WeChat applet control;
FIG. 31 is a schematic diagram of a key and LED function test according to an embodiment of the present invention.
In the drawings, the components represented by the respective reference numerals are listed below:
the technical scheme includes that the technical scheme includes 1-a horizontal wood board, 2-an electric control mechanical arm, 3-an inverted L-shaped support, 4-K210 slave control modules, 5-OV5640 cameras, 6-a level conversion module, 7-a classification box, 8-an STM32 main control module, 20-a bottom plate, 21-a first digital steering engine, 22-a holder support, 23-a second digital steering engine, 24-a third digital steering engine, 25-a support column, 26-a fifth digital steering engine, 27-a fourth digital steering engine, 28-a sixth digital steering engine and 29-an acrylic claw.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention.
Referring to fig. 1-4, the present invention provides a technical solution: the momordica grosvenori sorting robot comprises a sorting platform, an electric control mechanical arm 2, a K210 slave control module 4, an OV5640 camera 5 and an STM32 main control module 8, wherein the sorting platform comprises a horizontal wood board 1 and an inverted L-shaped support 3, the inverted L-shaped support 3 is fixed on the left edge of the upper surface of the horizontal wood board 1, the electric control mechanical arm 2 is positioned on the right side of the horizontal wood board 1, a sorting box 7 is placed in front of and behind the electric control mechanical arm 2, the STM32 main control module 8 is installed at the bottom of the electric control mechanical arm 2, the K210 slave control module 4 is installed at the horizontal top of the inverted L-shaped support 3, and the OV5640 camera 5 is installed on the outer side of the horizontal bottom of the inverted L-shaped support 3;
the K210 slave control module 4 is in signal connection with an OV5640 camera 5, a serial port of an STM32 master control module 8, an SD card and an LCD, the STM32 master control module 8 is in signal connection with a KEY KEY, the K210 slave control module 4 is in serial port, a WeChat small program module, a power adapter, an LED and an electric control mechanical arm 2, the K210 slave control module 4 is provided with a graphic processing system, the graphic processing system is designed based on a Mobilenet V1 model, and the STM32 master control module 8 adopts STM32F103C8T6 as a master control chip and a loading circuit thereof
Referring to fig. 5, the electric control mechanical arm 2 includes a bottom plate 20, a first digital steering engine 21, a pan-tilt bracket 22, a second digital steering engine 23, a third digital steering engine 24, a plurality of support columns 25, a fifth digital steering engine 26, a fourth digital steering engine 27, a sixth digital steering engine 28 and an acrylic claw 29, the plurality of support columns 25 form a framework of the electric control mechanical arm 2, the first digital steering engine 21 and an STM32 main control module 8 are respectively installed on two sides of the upper surface of the bottom plate 20, a rotating end of the first digital steering engine 21 is connected with the pan-tilt bracket 22 through a hexagonal copper column, the pan-tilt bracket 22 is connected with the bottom plate 20 through a bearing, the second digital steering engine 23 is fixed on the top of the pan-tilt bracket 22, the third digital steering engine 24 is installed on the rotating end of the second digital steering engine 23 through the support columns 25 and a steering wheel, the fourth digital steering engine 27 is installed on the rotating end of the third digital steering engine 24 through the support columns 25 and the steering wheel, the fifth digital steering wheel 26 is installed on the rotating end of the fourth digital steering wheel 27 through the support columns 25 and the steering wheel, a sixth digital steering engine 28 is arranged at the rotating end of the fifth digital steering engine 26 through a strut 25 and a steering wheel, and an acrylic claw 29 is arranged at the rotating end of the sixth digital steering engine 28 through the strut 25 and the steering wheel;
referring to fig. 6-20, JP1 is a bluetooth module interface, JP2 is a communication interface with the K210 slave control module 4, JP3 is a power interface terminal, JP4 is a digital steering engine power supply voltage selection terminal, and JP5 and JP6 ports are sixth digital steering engine 28 connection ports;
u1 is MP1584 chip, U2 is stm32f103c8t6 chip, U3 is RT9193 chip, U4 is usb interface, U5 is CH340E chip;
p1 is SWD simulation interface circuit, Y1 is 8M crystal oscillator; d1, D2 and D6 are protection diodes, Power is a Power display end, and the LED is a working state lamp;
KEY and BOOT are function KEYs, and RESET is a RESET KEY;
the serial port of the STM32 master control module 8 is in signal connection with the serial port of the K210 slave control module 4 through a level conversion module 6;
the loading circuit of the STM32 main control module 8 comprises a Bluetooth interface, a communication interface, a function key, a power interface, a digital steering engine power supply voltage selection end, a PWM steering engine voltage stabilizing circuit, an SWD simulation interface circuit, an LED control circuit, a steering engine interface, a voltage stabilizing power supply circuit, a crystal oscillator circuit, a USB circuit, a BOOT key, a reset key and a buffer circuit;
the MobilenetV1 model is realized by adopting a method provided by Maixhub;
the BOOT KEY, the reset KEY and the KEY KEY are all red-handle patch light-touch switches, and a 1uf patch capacitor and a 10K ohm patch resistor are arranged in a reset KEY circuit;
the voltage stabilizing circuit of the PWM steering engine selects an MP1584 voltage stabilizing chip which stabilizes 7.5V input voltage to 5V to supply power to a control system; the input voltage of the voltage-stabilizing circuit ranges from 4.5V to 28V; the highest output can be 3A direct current, and the device also comprises 4 10uf patch capacitors; 2 100nf patch capacitors; 4 100K ohm chip resistors; 1 200K ohm resistor; 1 resistance of 39K ohm; 1 4.7uH patch inductor, wherein the rated current of the inductor is 800mA and 1 general diode;
the crystal oscillator circuit adopts 8M passive crystal oscillator and 2 22pf patch capacitors;
the USB circuit comprises a MICRO USB mother socket and a CH340E USB serial port conversion chip, and is connected with a serial port 1 of an STM32 main control module 8 and used for downloading programs and 1 universal diode 1N4007 and 3 capacitors of 0.1 uf;
the LED control circuit selects a surface-mounted light-emitting diode; 2 10K ohm chip resistors;
the interface terminal is a screw type wiring terminal with the rated voltage of 300V; rated current is 10A; the jumper wire selection interface is a power supply selection end of the steering engine;
the SWD simulation circuit is provided with 1uf capacitor and is used for connecting the ST-Link, so that a program can be conveniently debugged and downloaded;
the steering engine interface circuit adopts 3 multiplied by 6 upright pins, and each pin is respectively connected with a power supply end, GND (ground) and a PWM (pulse-width modulation) signal wire;
the buffer circuit selects 4 220uf aluminum electrolytic capacitors with the rated voltage of 16V;
the Bluetooth interface circuit and the communication interface circuit both adopt 2 100R chip resistors and 1N5819 Schottky diode to protect the chip;
the voltage-stabilizing power supply circuit adopts an RT9193 linear voltage stabilizer, the maximum input voltage of the voltage-stabilizing power supply circuit is 5.5V, the maximum output current of the voltage-stabilizing power supply circuit is 300mA, and the output voltage is stabilized to be 3.3V; the voltage stabilizing circuit also comprises 4 1uf patch capacitors.
The training samples adopt momordica grosvenori photos with different specifications and the resolution of 224 x 224, the total amount of the samples reaches 540, and the model is gradually adjusted to ensure that the recognition accuracy of the momordica grosvenori photos reaches the highest.
After the light is added and the training sample is enlarged, the accuracy of the model is improved greatly, as shown in fig. 21: the accuracy of the model is increased along with the increase of the training times, the training accuracy and the testing accuracy of the model are rapidly increased at the initial stage of the training of the model, and the growth speeds of the model and the testing accuracy are slowed down along with the further training of the model; when the epoch reaches 100, the model finishes training; when the model training approaches to the tail sound, the training accuracy and the testing accuracy are stabilized at about 85 percent; the test accuracy of the model is not reduced along with the improvement of the training accuracy, the model is not over-fitted, and the model can be put into use.
In an STM32 main control program, the most important is the writing of a mechanical arm control program, wherein a mechanical arm is controlled by 6 digital steering engines, and the digital steering engines are controlled by a timer 2 to output PWM to control the angle conversion of the digital steering engines; the steering engine control function is shown in fig. 22, and the timer 2 interrupt service function is shown in fig. 23;
the main control program comprises a digital steering engine, an LED, a function key, Bluetooth and a control program of serial port communication of a master plate and a slave plate;
the K210 slave machine has the functions of acquiring a picture of the momordica grosvenori in real time by an OV5640 camera; calling a classification model Mobilene V1; the serial port sends classification information in real time; the LCD displays the shooting information of the camera in real time; k210 slave programming is shown in FIG. 24;
example (b): testing and analyzing a fructus momordicae recognition model (Mobilene model); as shown in fig. 25, the model runs for 66ms, the probability that the luo han guo is considered as a big fruit by the model is 0.83, the probability fluctuates from time to time, and the fluctuation range is: 0.81 to 0.86; the big fruits can be well identified by the known model;
as shown in fig. 26, the model operating time is 66ms, the probability that the luo han guo is considered as a medium fruit by the model is 0.63, and the fluctuation range is: 0.62 to 0.68; the model can better identify the medium fruits, and the judgment probability of the model is low because the size of the medium fruits is close to that of the small fruits, and the average difference between the size of the medium fruits and the size of the small fruits is 6mm in length;
as shown in fig. 27, the model operating time is 66ms, the probability that the momordica grosvenori is judged to be a small fruit by the model is 0.89, and the fluctuation range is 0.86-0.91, so that the small fruit can be well identified by the model. An electric control mechanical arm sorts the momordica grosvenori to test and analyze; as shown in fig. 28, the mechanical arm can pack 1 big fruit and 2 medium fruits into boxes respectively; as shown in fig. 29, the mechanical arm can pack 9 small luo han guo, and a bubble pad is padded under each box to protect the luo han guo from being damaged by collision during the sorting process.
Controlling test and analysis by the WeChat small program; after the sorting system is connected, commanding the siraitia grosvenorii sorting robot to start sorting work through a start button of a WeChat small program; after the mechanical arm finishes the sorting work, the Siraitia grosvenori sorting robot is instructed to stop sorting through the small program stop button, the Siraitia grosvenori robot is instructed to stop sorting through the small program reset button in the sorting process and reset to the initial state, and the sorting robot is controlled as shown in the figure 30.
Testing and analyzing other control functions; as shown in fig. 31, when the lo han guo sorting robot is in a working state, the green LED is on, and when it is in a standstill state, the green LED is off; when the KEY is pressed, the momordica grosvenori sorting robot can be commanded to start and stop working.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.