CN114115054A - Online detection robot control system based on neural network - Google Patents

Online detection robot control system based on neural network Download PDF

Info

Publication number
CN114115054A
CN114115054A CN202111441257.7A CN202111441257A CN114115054A CN 114115054 A CN114115054 A CN 114115054A CN 202111441257 A CN202111441257 A CN 202111441257A CN 114115054 A CN114115054 A CN 114115054A
Authority
CN
China
Prior art keywords
control system
lcd
stm32
neural network
pin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111441257.7A
Other languages
Chinese (zh)
Inventor
葛前
刘斌
任建
何璐瑶
杜兵
杨井凡
马浩宁
张松
许光达
解社娟
张琳琦
刘训佶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenyang University of Technology
Original Assignee
Shenyang University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenyang University of Technology filed Critical Shenyang University of Technology
Priority to CN202111441257.7A priority Critical patent/CN114115054A/en
Publication of CN114115054A publication Critical patent/CN114115054A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P80/00Climate change mitigation technologies for sector-wide applications
    • Y02P80/40Minimising material used in manufacturing processes

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the field of industrial nondestructive testing, in particular to an online testing robot control system based on a neural network. The lower computer comprises a stm32 single chip microcomputer minimum control system, an SRAM memory expansion and starting mode setting interface module, a USB communication serial port I, an ultrasonic sensor, a buzzer, a switch circuit module, a serial port communication module and a stepping motor drive, and the upper computer adopts a pyAI-K210 single chip microcomputer and comprises a camera, an LED indicator light, an LCD display, a minimum control system and the like. The invention can not only detect the surface defects, but also classify the identified defects, thereby reducing the manual processing of the defect information and providing a basis for the repair of various types of defects, thereby realizing the extension of human vision and reducing the manpower and material resources.

Description

Online detection robot control system based on neural network
Technical Field
The invention belongs to the field of industrial nondestructive testing, and particularly relates to an online testing robot control system based on a neural network.
Background
Along with the development of economy, the development of artificial intelligence is changing day by day, the application scope of machine vision and industrial robot is also more and more extensive, and for nondestructive test, newly-built pipeline is filled with many operational environments or the condition that artificial vision is difficult to satisfy the detection, and the appearance of defect on-line testing robot has improved operating conditions, but to defect detection in the past often can only detect out the defect but can not classify the defect of discernment to detect the problem such as precision and can not accurately discern, greatly reduced detection efficiency and detection quality. In modern industrial detection, how to design a defect online detection robot control system which meets the defect detection and classifies the defects, has the characteristics of high precision, high efficiency, safety, reliability, high automation, reduction of manpower and material resources and the like becomes a hot point problem which is urgently needed to be solved in the field of nondestructive detection.
Disclosure of Invention
Object of the Invention
The invention provides an online detection robot control system based on a neural network, and aims to solve the problems that the existing nondestructive detection technology cannot classify identified defects and cannot accurately identify the detection precision.
The technical scheme is as follows:
the utility model provides an online inspection robot control system based on neural network, this control system comprises lower computer and host computer two parts, its characterized in that: the lower computer adopts a stm32 single chip microcomputer, wherein a stm32 single chip microcomputer minimum control system is respectively connected with an SRAM memory extension, a USB communication serial port I, an ultrasonic sensor, a buzzer, a stepping motor drive interface, a starting mode setting interface and a switch circuit; the upper computer adopts a pyAI-K210 singlechip, wherein a K210 minimum control system is respectively connected with the OV2460 camera, the LCD, the power supply, the wireless LED indicator light and the USB communication serial port II.
And the pyAI-K210 singlechip is connected with a USB communication serial port I of the stm32 singlechip through a USB communication serial port II.
The stm32 singlechip minimum control system adopts an F103ZET6 singlechip; a stepping motor interface of a minimum control system of the stm32 singlechip is connected with a motor controller interface driven by a stepping motor; CS, LCK, SO and SI pins of SRAM memory expansion are respectively connected with PB12, PB13, PB14 and PB15 of a minimum control system of a stm32 singlechip; the RXD pin and the TXD pin of the USB communication serial port I are respectively connected with the PA9 pin and the PA10 pin of the stm32 minimum control system; the pins Trig and Echo of the ultrasonic sensor are respectively connected with pins PA1 and PA2 of a minimum control system of a stm32 singlechip; a BEEP pin of the buzzer is connected with a PA0 pin of a stm32 singlechip minimum control system; the pins of DJ0, DJ1, DJ2 and DJ3 driven by the stepping motor are respectively connected with the pins of PB6, PB4, PB3 and PB5 of a stm32 singlechip minimum control system; a BOOT0 pin of the start mode setting interface is connected with a BOOT0 pin of a minimum control system of the stm32 singlechip; a power supply output port of the USB communication serial port I is connected with a port of the switch circuit VUSB; and a VBTN port of the switch circuit is connected with a power supply input port of a minimum control system of the stm32 singlechip.
The stepping motor drive configurations PB6, PB4, PB3 and PB5 are multiplexed outputs, and PB6, PB4, PB3 and PB5 are started to serve as PWM output pins; the period of the output PWM is controlled by the values of the ARR register and the PSC register; TIM14_ CH1 is PWM mode; the duty cycle is controlled by modifying TIM14 — CCR1 to control stepper motor speed.
Pins of OV2460 camera signal output ports OV _ D0, OV _ D1, OV _ D2, OV _ D3, OV _ D4, OV _ D5, OV _ D6 and OV _ D7 in the upper computer are respectively connected with pins of IO32, IO33, IO30, IO31, IO28, IO29, IO26 and IO27 of a K210 minimum control system;
LCD _ CS, LCD _ RST, LCD _ DC, LCD _ WR, LCD _ D7, LCD _ D6, LCD _ D5, LCD _ D4, LCD _ D3, LCD _ D2, LCD _ D1, LCD _ D0, 12C1_ SCL and 12C1_ SDA pins of the LCD display are respectively connected with IO46, IO8, IO6, IO5, SPI0_ D7, SPI0_ D6, SPI0_ D5, SPI0_ D4, SPI0_ D3, SPI0_ D2, SPI0_ D1, SPI0_ D0, IO39 and IO37 pins of the K210 minimum control system;
a power supply VBAT pin is connected with a 5V pin of a K210 minimum control system;
the wireless TxD, RxD, nReady and nReload pins are connected with the RxD, TxD, IO35 and IO34 pins of the K210 minimum control system;
the LED _0 and LED _1 indicator light interfaces of the LED indicator light are connected with IO17 and IO15 interfaces of the K210 minimum control system;
ISP _ TX and ISP _ RX of the USB communication serial port II are connected with IO43 and IO45 interfaces of the K210 minimum control system interface.
A crystal oscillator circuit is arranged in the OV2640 camera, a 24M clock is generated to be used as the input of the OV2640, 2.8V and 1.3V working voltages are provided, and 2 x 4 double rows of pins are arranged.
The pyAI-K210 single chip microcomputer is in communication with the computer through wireless.
The first step is as follows: the trolley carrying the stm32 single-chip microcomputer and the pyAI-K210 single-chip microcomputer is placed in a detected place, a switch is turned on to start the single-chip microcomputer to work, a camera on the pyAI-K210 single-chip microcomputer can collect information of an identified object, a pyAI-K210 program can identify an acquired image, an LCD (liquid crystal display) can display detected image information in real time, stm32 can control a steering engine to rotate through an IO (input output) interface, movement of the trolley is achieved, the ultrasonic sensor starts to work, the trolley can automatically avoid when an obstacle is encountered in the current direction, and meanwhile, an LED0 indicating lamp can flicker green;
the second step is that: when the image shot by the camera is processed by the pyAI-K210 singlechip to find that no defect exists, the trolley can continuously move forwards until all the conditions of the detection object are collected;
the third step: when the pyAI-K210 single chip microcomputer collects defective information, the LCD display can display the defective position on the screen and identify and label the type of the defect, meanwhile, the USB communication module is communicated with the stm32 single chip microcomputer, the stm32 sends an instruction to enable the buzzer to warn and the LED1 to flicker red, the stm32 sends a rotation stopping instruction to the steering engine through an IO port to enable the trolley to stop advancing, and the wifi communication module on the pyAI-K210 single chip microcomputer is communicated with an external computer to send the defective information to the external computer;
the fourth step: after the wifi communication module and the external computer are communicated, the pyAI-K210 sends an instruction to the stm32 single chip microcomputer through USB serial port communication again, and the stepping motor is controlled to rotate to enable the trolley to move.
The pyAI-K210 singlechip comprises an OV2640 camera image acquisition program, an LCD display program, a USB serial port communication program and a weight file program of a trained MobileNet V2 neural network stored in the SD card; the method comprises the steps of training a pipeline defect recognition model, firstly dividing a data set, preprocessing collected pictures into 244x244 standard pictures, then randomly selecting 80% of the pictures as a training set, and taking the rest pictures as a test set; building a MobileNetV2 deep learning neural network by using a Tensorflow framework in a program, starting to train parameters, carrying out random amplitude on a weight and neuron bias, and continuously adjusting the neural network parameters according to errors so that the model has the recognition capability; the OV2640 camera image acquisition program is characterized in that a camera is initialized, the OV2640 camera performs register configuration through OV _ SCL and OV _ SDA, then configures a corresponding IO port state, sets OV _ PWDN to be 0, exits a power-down mode, then pulls down OV _ RESET to RESET OV2640, then configures DCMI related settings, sets a first parameter as a capture mode, selects a synchronization mode through a second parameter, sets a pixel clock polarity through a third parameter, sets a vertical synchronization polarity VSYNC through a fourth parameter, sets a horizontal synchronization polarity through a fifth parameter, sets a frame capture rate through a sixth parameter, and sets an extended data mode through a seventh parameter; then configuring DMA; then setting the image output size of OV2640 to enable DCMI capture; capturing a wiring harness template picture, then adjusting the brightness of a camera to search for a target area, fitting the area where the target possibly appears, searching for the best target area and drawing the target area.
In the third step, the LED indicator lamps comprise an LED0 lamp and an LED1 lamp which are respectively a red lamp and a green lamp correspondingly, when the trolley normally moves forward, the green LED1 lamp is normally on, and when a defect is detected, the red LED0 lamp flickers; a resistor of 1K ohm is connected in series behind each LED lamp of the LED lamp circuit to play a role in limiting current, interfaces of an LED0 and an LED1 of the LED indicator lamp are connected with an IO17 pin and an IO15 pin of a K210 minimum control system, and the PWR lamp is a working indicator lamp and can be turned on when the trolley works; the step motor drive firstly gives a signal to the step motor to enable the step motor to work; then starting a TIM14 clock, configuring PB6, PB4, PB3 and PB5 as multiplexing output, and starting PB6, PB4, PB3 and PB5 as PWM output pins; setting the values of two registers of ARR and PSC to control the period of output PWM; then TIM14_ CH1 is set to PWM mode; enable TIM 14; TIM14 — CCR1 was modified to control duty cycle control stepper motor speed.
The advantages and effects are as follows:
1. the defect recognition robot has the advantages that the defect recognition robot replaces manual detection, is small and light in size, low in price and high in detection speed, is provided with complete functions, and can save more manpower and material resources by comprising a training model module of a neural network, an image acquisition module, an information processing module of a pyAI-K210 system, an image display module, a wifi wireless module, a communication module, a motion module, a buzzer and an LED module.
2. By adopting the pyAI-K210 single chip microcomputer and the OV2640 camera, the detection speed is improved, the detection precision is higher, the product is detected in all directions in real time, the collected information can be summarized and analyzed, the defect can be conveniently searched by an external computer, and a suggestion is provided for subsequent work.
3. The deep learning neural network adopts MobileNet V2, MobileNet V2 is an improvement on MobileNet V1, is a lightweight convolution neural network, and is a network constructed based on separable convolution, and standard convolution is divided into two operations: the method comprises the steps of deep convolution and point-by-point convolution, wherein the channels of the feature map are expanded through point-by-point convolution operation, the number of features is enriched, the precision is further improved, the training model of the neural network processes the image, the defective image is judged and the defect is classified and labeled, manual processing of the image is reduced, and the classified defect provides a basis for defect repair.
4. The movement of the trolley adopts Mecanum wheel movement, and compared with an omnidirectional wheel, the wheat wheel can synthesize resultant force in any direction by a rotating speed method, so that the trolley can move in all directions, transverse friction can be greatly reduced when the trolley is steered in situ, and the service life can be prolonged.
Drawings
FIG. 1 is a block diagram of the present invention;
FIG. 2 is a schematic diagram of the stm32 single chip microcomputer of the present invention;
FIG. 3 is a schematic diagram of the pyAI-K210 single chip microcomputer of the present invention;
FIG. 4 is a block diagram of a process for operation of the defect identification robot of the present invention;
FIG. 5 is a block diagram of the LCD display process of the present invention;
FIG. 6 is a block diagram of the LED indicator light routine of the present invention;
fig. 7 is a block diagram of the OV2460 camera program of the present invention;
FIG. 8 is a block diagram of an ultrasonic obstacle avoidance process of the present invention;
FIG. 9 is a block diagram of the cart stepper motor of the present invention;
fig. 10 is a block diagram of a WIFI module process of the present invention;
FIG. 11 is a block diagram of a defect identification system of the present invention;
FIG. 12 is a block diagram of the model training routine of the present invention;
FIG. 13 is a circuit diagram of the minimum system control unit of the stm32 single chip microcomputer of the present invention;
FIG. 14 is a schematic diagram of the W25Q64 memory expansion of the present invention;
FIG. 15 is a circuit diagram of a USB power interface of the present invention;
FIG. 16 is an ultrasonic sensor of the present invention;
FIG. 17 is a schematic diagram of a buzzer in accordance with the present invention;
FIG. 18 is a step motor drive circuit diagram of the present invention;
FIG. 19 is a block diagram of the pyAI-K210 minimal system of the present invention;
FIG. 20 is a circuit diagram of an OV2640 camera image acquisition of the present invention;
FIG. 21 is a schematic diagram of an LCD display of the present invention;
fig. 22 is a schematic diagram of a WIFI module of the present invention
FIG. 23 is a circuit diagram of the LED indicator light of the present invention;
FIG. 24 is a circuit diagram of a USB communication serial port II according to the present invention;
reference numerals: the system comprises a stm32 single-chip microcomputer minimum control system, an SRAM memory expansion circuit, a USB communication serial port I, an ultrasonic sensor 4, a buzzer 5, a stepping motor drive circuit 6, a starting mode setting interface 7, a switch circuit 8, a 9.K210 minimum control system, an OV2460 camera 10, an LCD display 11, a power supply 12, a wireless circuit 13, an LED indicator light 14 and a USB communication serial port II 15.
Detailed Description
The invention is further described below with reference to the accompanying drawings:
as shown in fig. 1, the flow diagram of an online detection robot control system based on a neural network includes 2 singlechips, which are stm32F103ZET6 singlechip and pyAI-K210 singlechip, wherein stm32F103ZET6 includes 1.stm32 singlechip minimum control system, 2.SRAM memory extension, 3.USB communication serial port one, 4. ultrasonic sensor, 5 buzzer, 6. step motor drive, 7. start mode setting interface, 8. start mode setting interface switch circuit, pyAI-K210 singlechip includes: 9. minimum control system, 10.OV2460 camera, 11.LCD display, 12. power module, 13. wireless and 14.LED indicator light, etc
As shown in fig. 2 and 3, the online detection robot control system based on the neural network comprises a stm32 single chip microcomputer minimum control system 9, an SRAM memory extension 2, a USB communication serial port one 3, an ultrasonic sensor 4, a buzzer 5, a stepping motor drive 6, a start mode setting interface 7, and a start mode setting interface switch circuit 8, wherein the upper computer adopts a pyAI-K210 single chip microcomputer, and the upper computer comprises the minimum control system 9, an OV2460 camera 10, an LCD display 11, a power supply module 12, a wifi wireless module 13, an LED indicator light 14, a USB communication serial port two 15 and other parts. Storage signal input ports SPII _ NSS, SPII _ SCK, SPII _ MISO and SPII _ MOSI of the SRAM memory extension 2 are respectively connected with storage signal output ports PB12, PB13, PB14 and PB15 of the stm32 singlechip minimum system control unit 1; the RXD and TXD pins of the USB serial port circuit 3 are connected with PA9 and PA10 interfaces of the stm32 minimum control system 9; the Trig and Echo pins of the stm32 ultrasonic sensor 4 are connected with the PA1 and PA2 pins of the minimum system control unit 1; the BEEP pin of the buzzer 5 is connected with the PA0 pin of the minimum control system unit 1; the pins of DJ0, DJ1, DJ2 and DJ3 of the stepping motor 6 are connected with the pins of PB6, PB4, PB3 and PB5 of the stm32 singlechip minimum control system 9; an output signal port BOOT0 of the start mode setting interface circuit 7 is connected with a start mode input signal port BOOT0 of the stm32 singlechip minimum system control unit 1; the starting mode setting interface switch circuit is connected with a VBAT pin of the minimum control system 9; OV _ D0, OV _ D1, OV _ D2, OV _ D3, OV _ D4, OV _ D5, OV _ D6, OV _ D7, OV _ SCL, OV _ SDA, OV _ PCLK, OV _ HEEF, OV _ VSYNC, OV _ XVCLK, OV _ PWDN and OV _ RESET interfaces of the OV2640 camera acquisition module 10 of the upper computer are connected with IO32, IO33, IO30, IO31, IO28, IO29, IO26, IO27, 59IO 24, IO25, IO22, IO23, IO20, IO21, IO18 and IO19 pins of the pyAI-K210 single-chip microcomputer; LCD _ CS, LCD _ RST, LCD _ DC, LCD _ WR, LCD _ D7, LCD _ D6, LCD _ D5, LCD _ D4, LCD _ D3, LCD _ D2, LCD _ D1, LCD _ D0, 12C1_ SCL and 12C1_ SDA pins of the LCD display module 11 are respectively connected with IO46, IO8, IO6, IO5, SPI0_ D7, SPI0_ D6, SPI0_ D5, SPI0_ D4, SPI0_ D3, SPI0_ D2, SPI0_ D1, SPI0_ D0, IO39 and IO37 pins of the pyAI-K210 single-chip microcomputer; the VBAT pin of the power supply module 12 is connected with the 5V pin of the pyAI-K210 singlechip; the TxD, RxD, nReady and nReload pins of the wifi wireless 13 are respectively connected with the IO9, IO7, IO35 and IO34 pins of the pyAI-K210 single chip microcomputer; the LED _0 and LED _1 indicator light interfaces of the LED indicator light module 14 are connected with the IO17 and IO15 interfaces of the pyAI-K210 minimum control system 9; the pyAI-K210 single chip microcomputer is connected with IO43 and IO45 interfaces of the pyAI-K210 single chip microcomputer interface through ISP _ TX and ISP _ RX of the USB serial port circuit 15.
As shown in fig. 4, the working flow of the robot is shown, after each system module is initialized, each module starts to work, the trolley starts to move, the camera collects images, the LCD screen displays the images collected by the camera, when a defective image is identified, the USB communication serial port in the pyAI-K210 single chip microcomputer of the upper computer sends an instruction to stm32, the buzzer on the stm32 single chip microcomputer starts to warn, the LED red light starts to flash, the trolley stops moving forward, meanwhile, the pyAI-K210 single chip microcomputer communicates with an external computer through the wifi serial port module, information of the defective image is sent, after the sending is finished, the USB communication serial port in the pyAI-K210 single chip microcomputer of the upper computer continues to send a forward instruction to the stm32 single chip microcomputer, and the trolley continues to move forward.
As shown in fig. 5, the LCD display of the present invention initializes each port of the LCD and keeps DISP equal to 0, the screen is turned on to write the content into the cache, each controller of the LCD is turned on, and the DISP is set to a high level, so that the module enters a working state and the display screen displays normally.
As shown in fig. 6, the LED indicator program of the present invention first enables the IO port clock, initializes the parameters of the IO port, then pulls up and pulls up the PF9 and PF10 ports and the normal output mode, and finally sets the PF9 and PF10 ports active low.
As shown in fig. 7, the camera image capturing program of the OV2640 is initialized first; then configuring DCMI related settings, respectively setting pixel clock polarity, setting vertical synchronization polarity VSYNC, setting horizontal synchronization polarity, setting frame capture rate, and then setting image output size and resolution of OV2640 to enable DCMI capture; the identified image is captured, all areas of the image are captured by the scanning surface, and the captured image is sent to the control system.
As shown in fig. 8, in the ultrasonic obstacle avoidance flow chart of the present invention, ultrasonic waves start timing while transmitting sound waves, finish timing when receiving sound waves returning when encountering an obstacle, calculate a distance by calculation, when a set distance is reached to reach an obstacle avoidance condition, the steering engine starts to rotate a certain angle to the left or right, and when the steering engine walks for a certain distance, the steering engine continues to walk after rotating to the original set angle.
As shown in fig. 9, the flowchart of the step motor driving of the present invention, the step motor driving program firstly gives a signal to the step motor to make it work; then starting a TIM14 clock, and starting PB6 as a PWM output pin; setting the values of two registers of ARR and PSC to control the period of output PWM; TIM14 — CCR1 was modified to control duty cycle control stepper motor speed.
As shown in fig. 10, which is a flow chart of the wifi module of the present invention, when the trolley starts to work, the wifi module is simultaneously turned on to connect with the external computer, and the detected defect information is sent to the external computer through the wifi module, so that the worker can timely know the type and repair method of the defect.
As shown in fig. 11, which is a flowchart of defect identification of the present invention, when the camera acquires image information in the pipeline, the MobileNetV2 deep learning classification subroutine starts to process the image and identify the defect, classifies the identified defect, and sends information from the upper computer to the lower computer.
As shown in fig. 12, which is a flowchart of a model training procedure, garbage classification model training first divides a data set, preprocesses collected images into 244 × 244 standard images, and then randomly selects 80% as a training set, and the rest is a test set. And (3) building a MobileNetV2 deep learning neural network by using a Tensorflow framework in a program, starting to train parameters, carrying out random amplitude on the weight and the neuron bias, and continuously adjusting the neural network parameters according to errors so that the model has classification capability.
Fig. 13 shows a minimum control system chip of stm32F103C8T6 single chip as a lower computer, which has a 32-bit microcontroller, and hardware packaged by LQFP48, having 20K × 8bit SRAM, 64K × 8bit FLASH, 4 16-bit timer/counter, and 48 pins, wherein GPIO ports are PA0-PA15, PB0-PB15, PC13-PC15, PD0-PD1, which abandons von neumann structure, adopts harvard structure, separates instruction storage and data storage, and data access is not in the instruction bus, thereby increasing the operating speed of MCU, and GPIO has 8 modes including up-pull and down-pull input modes.
As shown in fig. 14, a schematic diagram of W25Q64 memory expansion is shown, which has a capacity of 64Mb, and divides the capacity of 8 mbytes into 128 blocks, each block has a size of 64 kbytes, and it has a larger storage space, thus solving the problem of insufficient memory due to larger size of programs.
As shown in fig. 15, the USB module is provided, the USB interface has power supply and program download functions, and the VUSB is the USB power supply voltage of the control unit, so that power can be supplied to the entire control unit through the USB interface, and the written program can be downloaded to the stm32 minimum system control unit. The RXD pin and the TXD pin of the USB interface circuit are connected to the PA9 pin and the PA10 pin of the stm32 minimum system control unit, and can be used for communication between the two single-chip microcomputers.
Fig. 16 shows a schematic diagram of an ultrasonic sensor, the ultrasonic wave used is HC-SR04, and the ultrasonic sensor calculates the distance between an obstacle and a vehicle by using the principle that the emitted sound wave bounces against the obstacle. When the device is initialized, both a trig port and an echo port are set to be low, firstly, high-level pulses of at least 10us are sent to the trig (8 square waves of 40K are automatically sent outwards by a module), then, the rising edge is captured by an echo end, a timer is started to start timing while the rising edge is captured, the falling edge of the echo is again captured, the time of the timer is read when the falling edge is captured, namely the time of running of ultrasonic waves in the air, and the distance from the ultrasonic waves to an obstacle can be calculated according to the test distance (high-level time, sound velocity (340M/S))/2.
Referring to fig. 17, a schematic diagram of the buzzer of the present invention, the buzzer can be powered by 5V voltage, and a resistor is connected to prevent the buzzer from burning out due to excessive current.
As shown in fig. 18, a 57 stepper motor is adopted for driving the stepper motor, and the motor-controlled DJ0 pin, DJ1 pin, DJ2 pin and DJ3 pin are respectively connected with the PB6 pin, the PB4 pin, the PB3 pin and the PB5 pin of the stm32 minimum system control unit.
As shown in FIG. 19, pyAI-K210 is developed by 01Studio design, is a development board of RSIC-V architecture, has 64-bit dual-core system, is mainly characterized by compatibility with pyBoard interface, onboard lithium battery input and charging circuit, lead-out reset and function keys, and is reasonable in design.
Fig. 20 shows an OV2640 camera, which has an active crystal oscillator for generating a 24M clock as XVCLK input of OV2640, and a voltage stabilizing chip for providing stable 2.8V and 1.3V operating voltages, and communicates with the outside through a2 × 9 double row pin (P1); because of no electrical property, the camera module can be directly connected with the camera driving module.
Fig. 21 shows an LCD panel module of the present invention, which uses 2 × 16 double rows of mother boards connected to a 24P bus on a floor, and has no electrical property, the driver is the common ST7789V, and uses an 8-bit interface to communicate with pyAI-K210, and these need to program ST7789 to implement the driver, and then establish various functions such as character display and picture display.
As shown in fig. 22, the WIFI wireless interface is used to wirelessly transmit the identified defect information to an external computer terminal, and TxD, RxD, nReady, nrreload ports of the modules are connected to RxD, TxD, IO35, IO34 ports of the minimum control system.
As shown in fig. 23, which is a schematic diagram of an LED indicator, the LED indicator includes two lamps, namely an LED0 and an LED1, which correspond to a red lamp and a green lamp, respectively, the green LED1 is normally on when no defect is found, and the red LED0 flashes when a defect is found. A1K ohm resistor is connected in series behind each LED lamp of the LED lamp circuit to achieve the effect of current limiting, the interfaces of the LED0 and the LED1 of the LED lamp circuit are connected with pins 21 and 22 of the stm32 minimum system control unit, and the PWR lamp is a work indicator lamp and is turned on when the trolley runs.
As shown in fig. 24, the USB communication serial port two is described, and ISP _ TX and ISP _ RX of the USB communication serial port two 15 are connected to IO43 and IO45 of the K210 minimum control system 9 interface.
The robot realizes the function of controlling the robot to perform online defect detection, effectively solves the problems of incapability of identifying and inaccurate identification and incapability of classifying defects in the defect detection process, has small size and is suitable for any occasions, and reduces the manpower and material resources.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the invention, and are not intended to limit the embodiments of the present invention, and it will be obvious to those skilled in the art that various changes and modifications can be made on the basis of the above description, and all embodiments cannot be exhaustive, and obvious changes and modifications included in the technical solutions of the present invention are within the scope of the present invention.

Claims (10)

1. The utility model provides an online inspection robot control system based on neural network, this control system comprises lower computer and host computer two parts, its characterized in that: the lower computer adopts a stm32 singlechip, wherein a stm32 singlechip minimum control system (1) is respectively connected with an SRAM memory extension (2), a USB communication serial port I (3), an ultrasonic sensor (4), a buzzer (5), a stepping motor drive (6), a starting mode setting interface (7) and a switch circuit (8); the upper computer adopts a pyAI-K210 singlechip, wherein a K210 minimum control system (9) is respectively connected with the OV2460 camera (10), the LCD display (11), the power supply (12), the wireless (13), the LED indicator light (14) and the USB communication serial port II (15).
2. The neural network-based online inspection robot control system of claim 1, wherein: the pyAI-K210 single chip microcomputer is connected with a USB communication serial port I (3) of the stm32 single chip microcomputer through a USB communication serial port II (15).
3. The neural network-based online inspection robot control system of claim 1, wherein: the stm32 singlechip minimum control system (1) adopts an F103ZET6 singlechip; a stepping motor interface of the stm32 singlechip minimum control system (1) is connected with a motor controller interface of a stepping motor drive (6); CS, LCK, SO and SI pins of the SRAM memory extension (2) are respectively connected with PB12, PB13, PB14 and PB15 of the stm32 singlechip minimum control system (1); the RXD pin and the TXD pin of the USB communication serial port I (3) are respectively connected with the PA9 pin and the PA10 pin of the stm32 minimum control system; pins Trig and Echo of a pin of the ultrasonic sensor (4) are respectively connected with pins PA1 and PA2 of a stm32 singlechip minimum control system (1); a BEEP pin of the buzzer (5) is connected with a PA0 pin of a stm32 singlechip minimum control system (1); the pins of DJ0, DJ1, DJ2 and DJ3 of the stepping motor drive (6) are respectively connected with the pins of PB6, PB4, PB3 and PB5 of the stm32 singlechip minimum control system (1); a BOOT0 pin of the start mode setting interface (7) is connected with a BOOT0 pin of the stm32 singlechip minimum control system (1); a power supply output port of the USB communication serial port I (3) is connected with a port of a VUSB of the switch circuit (8); and a VBTN port of the switch circuit (8) is connected with a power supply input port of the stm32 singlechip minimum control system (1).
4. The neural network-based online inspection robot control system of claim 1, wherein: the stepping motor drive (6) is provided with PB6, PB4, PB3 and PB5 which are multiplexed output, and PB6, PB4, PB3 and PB5 which are used as PWM output pins are started; the period of the output PWM is controlled by the values of the ARR register and the PSC register; TIM14_ CH1 is PWM mode; the duty cycle is controlled by modifying TIM14 — CCR1 to control stepper motor speed.
5. The neural network-based online inspection robot control system of claim 1, wherein: an OV2460 camera (10) signal output port OV _ D0, OV _ D1, OV _ D2, OV _ D3, OV _ D4, OV _ D5, OV _ D6 and OV _ D7 in the upper computer are respectively connected with IO32, IO33, IO30, IO31, IO28, IO29, IO26 and IO27 pins of a K210 minimum control system (9);
LCD _ CS, LCD _ RST, LCD _ DC, LCD _ WR, LCD _ D7, LCD _ D6, LCD _ D5, LCD _ D4, LCD _ D3, LCD _ D2, LCD _ D1, LCD _ D0, 12C1_ SCL, and 12C1_ SDA pins of the LCD display (11) are connected with IO46, IO8, IO6, IO5, SPI0_ D7, SPI0_ D6, SPI0_ D5, SPI0_ D4, SPI0_ D3, SPI0_ D2, SPI0_ D1, SPI0_ D0, IO39, and IO37 pins of the K210 minimum control system (9), respectively;
a VBAT pin of a power supply (12) is connected with a 5V pin of a K210 minimum control system (9);
the TxD, RxD, nReady and nReload pins of the wireless (13) are connected with the RxD, TxD, IO35 and IO34 pins of the K210 minimum control system (9);
the LED _0 and LED _1 indicator light interfaces of the LED indicator light (14) are connected with the IO17 and IO15 interfaces of the K210 minimum control system (9);
ISP _ TX and ISP _ RX of the USB communication serial port two (15) are connected with IO43 and IO45 interfaces of the K210 minimum control system (9) interface.
6. The neural network-based online inspection robot control system of claim 1, wherein: a crystal oscillator circuit is arranged in the OV2640 camera (10), a 24M clock is generated to be used as the input of the OV2640, 2.8V and 1.3V working voltages are provided, and 2 x 4 double rows of pins are arranged.
7. The neural network-based online inspection robot control system of claim 1, wherein: the pyAI-K210 single chip microcomputer is communicated with a computer through a wireless (13).
8. The use method of the neural network-based on-line inspection robot control system according to claim 1, characterized in that: the method comprises the following steps:
the first step is as follows: the trolley carrying the stm32 single-chip microcomputer and the pyAI-K210 single-chip microcomputer is placed in a detected place, a switch is turned on to start the single-chip microcomputer to work, a camera on the pyAI-K210 single-chip microcomputer can collect information of an identified object, a pyAI-K210 program can identify an acquired image, an LCD (liquid crystal display) can display detected image information in real time, stm32 can control a steering engine to rotate through an IO (input output) interface, movement of the trolley is achieved, the ultrasonic sensor starts to work, the trolley can automatically avoid when an obstacle is encountered in the current direction, and meanwhile, an LED0 indicating lamp can flicker green;
the second step is that: when the image shot by the camera is processed by the pyAI-K210 singlechip to find that no defect exists, the trolley can continuously move forwards until all the conditions of the detection object are collected;
the third step: when the pyAI-K210 single chip microcomputer collects defective information, the LCD display can display the defective position on the screen and identify and label the type of the defect, meanwhile, the USB communication module is communicated with the stm32 single chip microcomputer, the stm32 sends an instruction to enable the buzzer to warn and the LED1 to flicker red, the stm32 sends a rotation stopping instruction to the steering engine through an IO port to enable the trolley to stop advancing, and the wifi communication module on the pyAI-K210 single chip microcomputer is communicated with an external computer to send the defective information to the external computer;
the fourth step: after the wifi communication module and the external computer are communicated, the pyAI-K210 sends an instruction to the stm32 single chip microcomputer through USB serial port communication again, and the stepping motor is controlled to rotate to enable the trolley to move.
9. The use method of the neural network-based online detection robot control system according to claim 8, characterized in that: the pyAI-K210 singlechip comprises an OV2640 camera image acquisition program, an LCD display program, a USB serial port communication program and a weight file program of a trained MobileNet V2 neural network stored in the SD card; the method comprises the steps of training a pipeline defect recognition model, firstly dividing a data set, preprocessing collected pictures into 244x244 standard pictures, then randomly selecting 80% of the pictures as a training set, and taking the rest pictures as a test set; building a MobileNetV2 deep learning neural network by using a Tensorflow framework in a program, starting to train parameters, carrying out random amplitude on a weight and neuron bias, and continuously adjusting the neural network parameters according to errors so that the model has the recognition capability; the OV2640 camera image acquisition program is characterized in that a camera is initialized, the OV2640 camera performs register configuration through OV _ SCL and OV _ SDA, then configures a corresponding IO port state, sets OV _ PWDN to be 0, exits a power-down mode, then pulls down OV _ RESET to RESET OV2640, then configures DCMI related settings, sets a first parameter as a capture mode, selects a synchronization mode through a second parameter, sets a pixel clock polarity through a third parameter, sets a vertical synchronization polarity VSYNC through a fourth parameter, sets a horizontal synchronization polarity through a fifth parameter, sets a frame capture rate through a sixth parameter, and sets an extended data mode through a seventh parameter; then configuring DMA; then setting the image output size of OV2640 to enable DCMI capture; capturing a wiring harness template picture, then adjusting the brightness of a camera to search for a target area, fitting the area where the target possibly appears, searching for the best target area and drawing the target area.
10. The use method of the neural network-based online detection robot control system according to claim 8, characterized in that: in the third step, the LED indicator lamp (14) comprises an LED0 lamp and an LED1 lamp which are respectively a red lamp and a green lamp correspondingly, when the trolley normally moves forward, the green LED1 lamp is normally on, and when a defect is detected, the red LED0 lamp flickers; a resistor of 1K ohm is connected in series behind each LED lamp of the LED lamp circuit to play a role in limiting current, interfaces of an LED0 and an LED1 of the LED indicator lamp (14) are connected with an IO17 pin and an IO15 pin of a K210 minimum control system (9), and the PWR lamp is a working indicator lamp and can be turned on when the trolley works; the step motor drive (6) firstly gives a signal to the step motor to enable the step motor to work; then starting a TIM14 clock, configuring PB6, PB4, PB3 and PB5 as multiplexing output, and starting PB6, PB4, PB3 and PB5 as PWM output pins; setting the values of two registers of ARR and PSC to control the period of output PWM; then TIM14_ CH1 is set to PWM mode; enable TIM 14; TIM14 — CCR1 was modified to control duty cycle control stepper motor speed.
CN202111441257.7A 2021-11-30 2021-11-30 Online detection robot control system based on neural network Pending CN114115054A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111441257.7A CN114115054A (en) 2021-11-30 2021-11-30 Online detection robot control system based on neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111441257.7A CN114115054A (en) 2021-11-30 2021-11-30 Online detection robot control system based on neural network

Publications (1)

Publication Number Publication Date
CN114115054A true CN114115054A (en) 2022-03-01

Family

ID=80368412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111441257.7A Pending CN114115054A (en) 2021-11-30 2021-11-30 Online detection robot control system based on neural network

Country Status (1)

Country Link
CN (1) CN114115054A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114536343A (en) * 2022-03-24 2022-05-27 沈阳工业大学 Wire smoothing and detecting robot control system and method based on machine vision

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458798A (en) * 2019-06-20 2019-11-15 长沙理工大学 Damper defective vision detection method, system and medium based on critical point detection
CN110954599A (en) * 2019-12-23 2020-04-03 河南工业职业技术学院 Method and system for detecting defects of mechanical parts
KR20210041346A (en) * 2019-10-07 2021-04-15 코렐테크놀로지(주) Robotic system for pipe non-destructive inspection
US20210209343A1 (en) * 2020-06-30 2021-07-08 Beijing Baidu Netcom Science And Technology Co., Ltd. Image recognition method, apparatus, device, and computer storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458798A (en) * 2019-06-20 2019-11-15 长沙理工大学 Damper defective vision detection method, system and medium based on critical point detection
KR20210041346A (en) * 2019-10-07 2021-04-15 코렐테크놀로지(주) Robotic system for pipe non-destructive inspection
CN110954599A (en) * 2019-12-23 2020-04-03 河南工业职业技术学院 Method and system for detecting defects of mechanical parts
US20210209343A1 (en) * 2020-06-30 2021-07-08 Beijing Baidu Netcom Science And Technology Co., Ltd. Image recognition method, apparatus, device, and computer storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王恒心,李江: "走进人工智能", 浙江工商大学出版社, pages: 212 - 228 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114536343A (en) * 2022-03-24 2022-05-27 沈阳工业大学 Wire smoothing and detecting robot control system and method based on machine vision
CN114536343B (en) * 2022-03-24 2024-01-30 沈阳工业大学 Wire stroking and detecting robot control system and method based on machine vision

Similar Documents

Publication Publication Date Title
US12035050B2 (en) Information acquisition device, method, patrol robot and storage medium that adjusts a luminance parameter according to contrast and grayscale information of an image
CN114115054A (en) Online detection robot control system based on neural network
CN202736348U (en) Car driver driving skill practice guiding and examination scoring device
CN111974704A (en) Garbage classification detection system and method based on computer vision
CN107941465A (en) Display module test method and device
CN107765695A (en) Crusing robot and cruising inspection system
CN218332314U (en) HIL simulation test platform based on intelligent driving area controller
CN111832379A (en) Unmanned aerial vehicle real-time video detection system based on convolutional neural network
CN113084776A (en) Intelligent epidemic prevention robot and system based on vision and multi-sensor fusion
CN117576153A (en) Target tracking method and system
CN204496799U (en) Embedded robot
CN208537982U (en) A kind of Omni-mobile intelligent carriage based on omnidirectional vision
CN104881034A (en) Sailboard experiment system and sailboard measure method
CN111230856A (en) Robot based on FPGA target recognition
CN209357268U (en) Torque test stand and torsional moment test system
CN220019880U (en) Navigation device based on SLAM and Ackerman chassis
Liu et al. Design and Implementation of Intelligent Medicine Delivery Car Based on K210
CN114972973A (en) Quantitative detection method and system for pipeline magnetic flux leakage defect and electronic equipment
CN109848963A (en) A kind of toxic gas detection robot
CN113655750B (en) Building construction supervision system and method based on AI object detection algorithm
CN204116963U (en) Based on the quadrotor intelligence reconnaissance system that image recognition is followed the tracks of
CN220231752U (en) Portable colloidal gold immunochromatography test paper quantitative determination equipment
CN207037471U (en) The detection of multiple intelligent bodies and tracks of device
CN219467731U (en) Vehicle driving system based on FPGA visual perception
Wen et al. A Prototype of Visual Navigation Self-driving Car Architecture Based on EAIDK310 and STM32

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination