2023 Design and development of intelligent electronic product simulation industrial conveyor belt item detection system

2023 National Vocational College Skills Competition Higher Vocational Group

“GZ029 Intelligent Electronic Product Design and Development” Competition Paper 1

Title: Design and development of simulated industrial conveyor belt item detection system

1 Competition Task

Play the video of the industrial conveyor belt transporting items on the smart TV, and simulate the industrial conveyor belt item detection system (hereinafter referred to as the item detection system) to observe and detect the items transported on the conveyor belt through the camera module. When an item that meets the specified characteristics is found, a voice announcement will be made, and at the same time Use the pan/tilt to control the laser pointer and shine it on the found items.

According to the requirements of the competition question, study the technical information issued, use the components, modules, equipment, and equipment equipped on site, as well as some of the circuit modules that come with it, to complete the system configuration, circuit design, software simulation, and board manufacturing and installation of the item detection system , circuit welding, fault repair, microprocessor application software design, software and hardware debugging, system testing and other work to complete the design and development of this intelligent system. All files that need to be submitted during the competition are named according to the on-site requirements and stored in the designated directory.

    1. Based on this competition question and the technical information in the USB flash drive, analyze the working principle and functional requirements of the item detection system.
    2. There is a designated functional circuit in the system, and the USB disk file determines the functional and performance index requirements; use circuit simulation software (Multisim, Pspise, Proteus or domestic related software, etc.) to complete the circuit design, including device selection and parameter settings.
    3. Use circuit simulation software (Multisim, Pspise, Proteus or domestic related software, etc.) to simulate the specified functional circuit, and use virtual instruments in the software to measure the signal characteristics (waveform, frequency, amplitude) of the specified functional circuit.
    4. According to the design requirements of 1.2-1.3, combined with the printed circuit board design constraints 1 provided by the USB flash drive, use Jialichuang EDA or Altium Designer software to draw the printed circuit board diagram of the specified functional circuit with the circuit board layout 2, and generate a printed circuit board diagram that meets the specification requirements The printed circuit board Gerber project file is stored in the USB flash drive.
    5. According to the paper schematic diagram of a certain processor control board provided by the competition question, draw the schematic diagram in the corresponding software, and draw it into a printed circuit board according to the printed circuit board constraint requirements 2, and it can be displayed in three dimensions, where Component 5 needs to be generated by the participating team in a 3D model; PCB drawing files and 3D display screenshots are stored in a USB flash drive.
    6. Typical circuit analysis and troubleshooting. The chief referee selected a typical functional circuit board (faulty circuit board 1) on site. The participating team members analyzed its functions and performance indicators based on the schematic diagram, measured and analyzed the faults in the circuit board, and completed the fault repair task on the circuit board; they wrote a description of the fault phenomenon, Electronic documents of cause analysis and repair methods are saved to a USB flash drive, and the repaired circuit is tested using a microprocessor main control board, and the test results are displayed on the LCD display.
    7. In the competition on the next day, the completed printed circuit boards with designated functional circuits will be delivered to the participating teams, and the participating teams will complete the installation, welding, and debugging of the designated functional circuit boards.
    8. Modify the laser pointer provided on site to make it controllable on and off; the laser pointer is fixed on the pan/tilt, and the vertical distance from the front end of the laser pointer to the smart TV screen is within 50±2cm. The system controls the pan/tilt to point the laser pen beam at certain points. The specified position; the position can be set via the keyboard.
    9. According to the system requirements, install and fix various circuit boards, power modules, wiring strips and other components required to form the system in the simple chassis provided on site. The camera module and pan/tilt do not need to be installed in the chassis; complete the power supply between each circuit and module. , signal connection; rubber feet can be installed at appropriate locations on the chassis.

1.10 Complete the application software design of STM32, GD32 or STC series of microcontrollers, so that the item detection system can meet the specified functional requirements. In the video played on the smart TV, the combination of background color No. 2 and item No. 1 is used. When playing the video, the system detects items that meet the conditions of shape No. 5 and color No. 1; when a characteristic item is found, the detection results are displayed in the form of voice announcements, laser pointer instructions, etc. The video simulating the industrial conveyor belt has three different difficulty states: still, low speed and high speed. The written software code needs to be saved to a USB flash drive.

1.11 When the system is working, it is necessary to display the detected item information on the LCD display in the system. After the displayed information fills the screen, it will automatically scroll upward.

1.12 The item detection system uses RS-485 communication method (the communication protocol is provided in the USB flash drive) to send the detection results to the operation and maintenance system. When the item detection system is working, every time it finds an item that meets the characteristic conditions, it sends a message to the operation and maintenance system through the RS-485 communication interface; at the end of the detection work, it sends item detection statistics under different difficulty conditions.

2 Competition Time

The competition time is 11 hours: 3.5 hours on the first day of the competition and 7.5 hours on the second day.

3 Job Requirements

Use a 32-inch smart TV to play videos of industrial conveyor belts transporting items to simulate industrial conveyor belts transporting items. The object detection system uses a camera module to observe and detect objects transported on the conveyor belt. When an object is found that meets the specified characteristics (shape, color, etc.), it uses a voice broadcast to indicate it, and at the same time uses a laser pointer installed on the pan-tilt to illuminate the found object. instructions on the items.

The laser pointer needs to be modified on site before use, that is, the laser pointer must not be turned on when no object is found; the laser pointer can only be turned on when a characteristic object is found and instructed, and the light spot can be stably illuminated at the center of the object for more than 1 second.

Under dynamic detection conditions, the object detection system can cause the TV to pause playback when detecting and analyzing characteristic items. After the detection instructions are completed, the TV can be controlled to resume video playback. The continuous playback time accumulates to 15 seconds, and the playback is paused each time an item is detected. The time does not exceed 10s.

For details on the control methods and parameters of the PTZ, please refer to the data provided by the USB flash drive. You can choose to use the drive circuit board equipped on site to control the PTZ.

The functions described in 1.10-1.12 must be completed under the condition of autonomous operation of the system, and no human intervention is allowed during operation.

In the item detection system, the designated functional circuit is an indispensable part of the system. If the participating team cannot complete the installation and adjustment of the designated functional circuit, they can choose to use the circuit board provided on site to complete the follow-up work, but the relevant part of the work will not be counted as a score.

4 Function Implementation

Participating teams need to complete multiple tasks such as device selection, circuit design, simulation testing, PCB design, installation and welding, production and debugging, circuit fault diagnosis and repair, system application software design, system joint debugging, and work operation and maintenance.

The object detection system consists of multiple functional modules. During the competition, first ensure that the microprocessor can run normally and can download updated software; the test comes with or provides on-site circuit board modules, electrical components, etc. to ensure that they can all work normally; according to the competition The question requires modification and installation of some components; test and analyze the faulty circuit, and test the performance after troubleshooting; with the support of the microprocessor module, conduct individual tests on human-computer interaction, image detection, PTZ control, communication and other functions Or debugging, and finally system joint debugging.

Partial reference code

MX_DMA_Init(); //DMA initialization
MX_SPI1_Init(); //SPI1 initialization (used by pocket phone LCD screen)
MX_USART1_UART_Init(); //Serial port 1 initialization (used to connect to the AI recognition module)
__HAL_UART_ENABLE_IT( & amp;huart1, UART_IT_IDLE);
__HAL_UART_CLEAR_IDLEFLAG( & amp;huart1);
HAL_UART_Receive_DMA( & amp;huart1, Vision_Receive.receive_buffer, UART_BUFFER_SIZE); //Serial port 1 uses DMA to receive, and the DMA reception completion interrupt and serial port idle interrupt are enabled
MX_UART4_Init(); //Serial port 4 initialization (connect to voice module)
MAX485_Init(); //UART to 485 chip-MAX485 initialization (connected to Diwen screen)
  MX_UART5_Init(); //Serial port 5 initialization (connected to Diwen screen through MAX485)
__HAL_UART_ENABLE_IT( & amp;huart5, UART_IT_IDLE);
__HAL_UART_CLEAR_IDLEFLAG( & amp;huart5);
HAL_UART_Receive_IT( & amp;huart5, DiWenLcd_Receive.receive_buffer, 1); //Serial port 5 enables data reception interrupt and idle interrupt to receive data
uart5_receive_num = 1; //The position where mobile data is put into the serial port 5 receive buffer.
MX_TIM4_Init(); //Initialize timer 4 to control the Y-axis stepper motor of the gimbal
MX_TIM3_Init(); //Timer 3 initialization, control the infrared head to simulate remote control signal 26us
MX_TIM2_Init(); //Timer 2 initialization, control the X-axis stepper motor of the gimbal 100us

Led_Init(); //Pocket machine LED light initialization
Beep_Init(); //Pocket phone buzzer initialization
Touch_Key_Init(); //Pocket phone touch button initialization
Lcd_Pin_Init(); //Pocket machine lcd screen interface initialization
Lcd_Init(); //Pocket phone lcd screen initialization

Power_Init(); //Initialization of external power supply module
Matrix_Key_Init(); //External 4*5 button initialization
Tripod_Init(); //PTZ initialization
HAL_GPIO_WritePin(Tripod_X_EN.GPIOx, Tripod_X_EN.GPIO_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(Tripod_Y_EN.GPIOx, Tripod_Y_EN.GPIO_Pin, GPIO_PIN_SET);
Relay_Init(); //External relay initialization (controlling the laser pointer on and off)
Voice_Init(); //Voice module initialization
Infared_Init(); //Infrared transmitter initialization
DiWenLcd_Init(); //Initialization of external DiWen screen

Beep_Control(BEEP_ON);
HAL_Delay(10);
Beep_Control(BEEP_OFF); //A "beep" sound indicates that the system initialization is complete

LCD_BACKGROUND = RED;
Lcd_Clear(LCD_BACKGROUND);

4.1 Electronic circuit design

Electronic circuit design includes two parts of the competition: device selection, circuit design, simulation testing and printed circuit board diagram design.

4.1.1 Device selection and circuit design simulation

For designated functional circuits, use electronic circuit simulation software (Multisim, Pspise, Proteus or domestic related software, etc.) to carry out device selection, circuit design, parameter setting and other design work. The circuit diagram should be correct, compact and beautiful.

The circuit should be able to simulate and run, choose to configure virtual instruments, test the waveform, frequency, and amplitude of the output signal, and record the above parameters in the design form.

The schematic diagrams and simulation test result files drawn by the participating teams must be saved to a USB flash drive.

4.1.2 Printed circuit board design

Printed circuit board design includes two parts of work, both of which require the use of Jialichuang EDA or Altium Designer software to draw the printed circuit board diagram of the circuit.

First, draw the designated functional circuit that has been tested by software simulation into a printed circuit board in accordance with the circuit board layout 2 and the printed circuit board constraint requirements 1, generate a Gerber project file, save it to a USB flash drive, and deliver it to the competition organizer for production The printed circuit board is made into a printed circuit board; the printed circuit board is delivered to the participating team the next day, and the installation, welding, and debugging are completed, and it is used in the item detection system.

Second, draw the schematic diagram based on the paper schematic diagram of a certain processor control board specified in the competition question, and draw it into a printed circuit board according to the printed circuit board constraint requirements 2, generate a Gerber project file and save it to a USB flash drive. ; All components are required to be 3D models, and the designated component 5 needs to be modeled by the participating teams themselves, and the drawn printed circuit boards can be displayed in three dimensions.

4.2 Function analysis and troubleshooting of typical faulty circuit boards

This is the contingency question content of the competition. The chief referee will designate relevant personnel to extract a typical faulty circuit before the game.

Typical faulty circuit boards include but are not limited to signal generation circuits, waveform conversion circuits, signal amplification circuits, etc. The participating team members analyze the schematic diagram and describe the functions and performance indicators of the circuit board; test the circuit board, analyze the cause of the fault according to the fault phenomenon, and complete the fault repair task of the circuit board so that the circuit board can operate normally; use a microprocessor The main control board samples the output of the circuit board and displays the signals and parameters.

4.3 Installation and adjustment of item detection system

4.3.1 Item detection system composition

The modules and components that should be included in the item detection system are as follows:

  1. Microprocessor main control board
  2. LCD display and keyboard circuit board
  3. Power module
  4. PTZ and laser pointer
  5. Power driver board
  6. Camera module (and bracket)
  7. Voice module
  8. RS-485 communication board
  9. Electrical connections
  10. Smart TV

4.3.2 Installation and debugging of item detection system

Some circuit modules that make up the system require on-site installation or modification.

1) After the printed circuit board for the designated functional circuit is completed and delivered to the participating team members, the participating team must complete the installation, welding, and debugging of the designated functional circuit signal board.

If the printed circuit board design or assembly fails and cannot work properly, the finished circuit board provided on site can be used instead, but the scores for the circuit board design, installation, and debugging tasks will be deducted from the score.

2) Modify the laser pointer provided on site to make it controllable on and off; fix the laser pointer on the gimbal. The system can set the target position through the keyboard, design the microprocessor software, control the pan/tilt through the power driver board, and control the laser pointer beam to point to a specified target position.

The system power supply, various functional circuit boards, wiring strips and other components are installed and fixed in the simple chassis provided on site. The camera detection and pan/tilt mechanism can be placed outside the chassis. Complete the power and signal connections between circuits and modules so that the system can work normally and complete the object detection function.

The participating teams need to complete the structural installation, electrical connection, debugging and testing of the object detection system by themselves. When necessary, the processing conditions provided on site can be used to carry out appropriate processing and transformation of the chassis in the designated area.

4.3.3 Function implementation and operation and maintenance of the item detection system

1) System software design

Carry out system software design based on the selected microprocessor. It includes human-computer interaction software such as keyboard and monitor, camera module communication and image analysis software, PTZ control software, work operation and maintenance information communication software, etc.

2) Implementation of item detection function

Based on the on-site topic selection, determine the environment for item detection such as the background color of the conveyor belt and the combination of items, and determine the characteristics of the items to be detected such as the shape and color of the items.

Use the method of inserting a USB flash drive to play the video on the smart TV to simulate the object detection conveyor belt scene. The videos played have the following three different difficulty levels:

  1. Play 3 pictures continuously on the TV in the form of still pictures, each picture staying for 10 seconds;
  2. Play continuous video on the TV at low speed (3~10cm/s) for 15s;
  3. Continuous video is played on the TV at high speed (10~30cm/s) for 15 seconds;

When the system detects an item to be tested, it first broadcasts a prompt with voice, and then illuminates the detected item with a laser pointer.

3) Operation and maintenance of item detection system

When the item detection system is working, whenever an item that meets the characteristic conditions is found, it will send a message to the operation and maintenance system through the RS-485 communication interface. The communication protocol is provided in the issued U disk; at the end of the detection work, the The statistical data of items detected under different detection difficulty conditions sends a set of messages to the operation and maintenance system. Operation and maintenance management is implemented by touch screens such as Kunlun Tongtai. The touch screens are equipped with software that can display received messages. The above test results also need to be displayed on the LCD monitor in the system. After the display information fills the screen, it will automatically scroll upward. After the test is completed, the previous display information can be displayed by turning pages. LCD display format requirements are provided by USB flash drive.

When writing programs, contestants will transmit data reflecting the working status of the object detection system to the touch screen according to the prescribed communication protocol.

4.3.4 Human-computer interaction requirements

1) Keyboard definition

The layout and definition of the keyboard are shown in Figure 1 below. It consists of 0~9 numeric keys, “up”, “down”, “left” and “right” display control keys, F1~F4 function keys, “D” and “E” Spare keys, etc.

  1. The “0~9” numeric keys can be used to enter numbers.
  2. F4 is defined as the keyboard to set the target coordinates and control the start and stop of the working mode in which the laser pointer points to the target.
  3. F1~F3 are respectively the start and stop of the three working modes of item detection difficulty conditions.

2) LCD monitor working requirements

After the system is powered on and started, it is in a standby working state and the specified information is displayed on the display.

In the four working modes F1 to F4, the text representing the respective working mode is displayed respectively, and may also include numbers. At the same time, clocks, work timings, resting positions of characteristic items, etc. are also needed.

3) The content, format, position and grayscale (or color) displayed on the LCD monitor during system operation are determined based on the “LCD Monitor Display Format Requirements” file issued in the USB flash drive.

4.4 Professionalism

Professional qualities include safe use of electricity, operating regulations, clean environment, civilized competition, teamwork and professional ethics, etc. Players are required to follow the example during the competition. At the same time, the participating team members’ engineering capabilities, craftsmanship and aesthetics of their works will also be examined through their works.

5 Technical Documentation Requirements

Technical documents include information files and instruction files provided to the participating teams, as well as technical documents that need to be completed by the participating teams.

5.1 Technical documents provided to participating teams

Documents required to be provided to participating teams include but are not limited to:

  1. Item detection and debugging video
  2. Item detection test video
  3. Microprocessor main control board schematic diagram
  4. Printed circuit board constraints
  5. Typical functional circuit board schematic diagram
  6. Specify functional circuit design requirements
  7. LCD display display format requirements
  8. RS-485 communication protocol
  9. Data manuals for module components such as pan/tilt and voice module
  10. Participating teams submit file naming requirements

5.2Technical documents completed and submitted by the participating team

The electronic documents submitted by the participating teams are all saved in USB flash drives and submitted. Technical documents include but are not limited to:

  1. Specified functional circuit schematic diagram and simulation running test screenshots
  2. Gerber project file for designated functional circuit PCB
  3. A PCB diagram of a microprocessor main control board that can be displayed in 3D,
  4. Analysis of typical faulty circuit board functions and performance indicators
  5. Typical faulty circuit board fault testing and repair methods
  6. The source program written to realize the tasks and functions of the item detection system