2023 Electronic Product Design and Production Competition Questions (Simulated Industrial Conveyor Belt Item Identification System)

2023 Electronic Product Design and Production Competition Questions (Simulating Industrial Conveyor Belt Item Identification System)

Question part:

  • The competition questions will be uploaded to the resources at the end.
  • I participated in the design and production of intelligent electronic products this year, and my results were not very satisfactory. I am in the third grade of National Level 3, but I have some experience that I can share.

Function introduction:

  • Static recognition mode: 3 pictures are played continuously on the TV in the form of still pictures, each picture
    Stay for 10 seconds;
  • Low-speed recognition mode: Play continuous video on the TV at low speed (3~10cm/s) for 15s;
  • Play continuous video on the TV at high speed (10~30cm/s) for 15s;
    When the system detects the item to be tested, it first broadcasts a prompt with voice, and then illuminates it with a laser pointer.
    Detected items.
  • When the item detection system is working, whenever an item that meets the characteristic conditions is found, it will
    RS-485 communication interface sends a message to the operation and maintenance system.
  • At the end of the detection work, a set of messages will be sent to the operation and maintenance system based on the statistical data of the items detected under different detection difficulty conditions. 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, and the displayed information will automatically scroll upward after filling the screen;

Several page parts:

Part of the code:

  • Mainly to receive data from the serial port for processing.
void HAL_Camera_Process(void){<!-- -->
    if (CAMEAR_RX_BUF[0] == 0xAA & amp; & CAMEAR_RX_BUF[1] == 0x03){<!-- -->
        if (CAMEAR_RX_BUF[9] == 0x00){<!-- -->
            if (hal_data.data_running_mode > mode_static){<!-- -->
                DisplayTV_Play(play_pause);
            }
            if (hal_data.data_running_mode == mode_custom){<!-- -->
                camera_count->time_start_flag =false;
            }
        }
        if (hal_data.data_running_mode == mode_static || CAMEAR_RX_BUF[9] == 1){<!-- -->

            switch (CAMEAR_RX_BUF[2]) {<!-- -->
                case mode_static:
                    hal_data.data_mode[hal_data.receiver_num] = mode_static;
                    hal_data.voice_data.data_voice_mode[hal_data.receiver_num] = va_static;
                    break;
                case mode_slow:
                    hal_data.data_mode[hal_data.receiver_num] = mode_slow;
                    hal_data.voice_data.data_voice_mode[hal_data.receiver_num] = va_slow;
                    break;
                case mode_fast:
                    hal_data.data_mode[hal_data.receiver_num] = mode_fast;
                    hal_data.voice_data.data_voice_mode[hal_data.receiver_num] = va_fast;
                    break;
                case mode_custom:
                    hal_data.data_mode[hal_data.receiver_num] = mode_custom;
                    hal_data.voice_data.data_voice_mode[hal_data.receiver_num] = va_custom;
                    break;
                default:
                    hal_data.data_mode[hal_data.receiver_num] = mode_none;
                    hal_data.voice_data.data_voice_mode[hal_data.receiver_num] = va_none;
                    break;
            }
            /* Get color */
            hal_data.data_color[hal_data.receiver_num] = CAMEAR_RX_BUF[3];
            /* Get the shape */
            hal_data.data_shape[hal_data.receiver_num] = CAMEAR_RX_BUF[4];
            /* Get the background color */
            hal_data.data_background[hal_data.receiver_num] = CAMEAR_RX_BUF[10];
            /* The coordinate data returned */
            hal_data.data_x_coordinate[hal_data.receiver_num] = ((CAMEAR_RX_BUF[5] << 8) + CAMEAR_RX_BUF[6]);
            hal_data.data_y_coordinate[hal_data.receiver_num] = ((CAMEAR_RX_BUF[7] << 8) + CAMEAR_RX_BUF[8]);
            /* Coordinate data of steering gear */
            if (hal_data.data_running_mode == mode_static){<!-- -->
                hal_data.servo_data.servo_x = (hal_data.data_x_coordinate[hal_data.receiver_num] - 352) / 10.0;//
                hal_data.servo_data.servo_y = (hal_data.data_y_coordinate[hal_data.receiver_num] -180) / 10.0; //
            }
            if (hal_data.data_running_mode == mode_slow){<!-- -->
                hal_data.servo_data.servo_x = (hal_data.data_x_coordinate[hal_data.receiver_num] - 352) / 10.0;//
                hal_data.servo_data.servo_y = (hal_data.data_y_coordinate[hal_data.receiver_num] -180) / 10.0; //
            }
            if (hal_data.data_running_mode == mode_fast){<!-- -->
                hal_data.servo_data.servo_x = (hal_data.data_x_coordinate[hal_data.receiver_num] - 352) / 10.0;//
                hal_data.servo_data.servo_y = (hal_data.data_y_coordinate[hal_data.receiver_num] -180) / 10.0; //
            }
            /* Time display data */
            hal_data.timer_data.data_hour[hal_data.receiver_num] = rhour;
            hal_data.timer_data.data_min [hal_data.receiver_num] = rmin;
            hal_data.timer_data.data_sec [hal_data.receiver_num] = rsec;
            hal_data.timer_data.data_background[hal_data.receiver_num] = 0;
            /* Data displayed by Kunlun configuration */
            kl_cmd_info[5] = hal_data.data_mode[hal_data.receiver_num];
            kl_cmd_info[6] = hal_data.timer_data.data_hour[hal_data.receiver_num];
            kl_cmd_info[7] = hal_data.timer_data.data_min[hal_data.receiver_num];
            kl_cmd_info[8] = hal_data.timer_data.data_sec[hal_data.receiver_num];
            kl_cmd_info[9] = hal_data.data_shape[hal_data.receiver_num];
            kl_cmd_info[10] = hal_data.data_color[hal_data.receiver_num];
            kl_cmd_info[11] = hal_data.data_x_coordinate[hal_data.receiver_num];
            kl_cmd_info[12] = hal_data.data_y_coordinate[hal_data.receiver_num];
            kl_cmd_info[13] = hal_data.mode_count.data_mode1_count;
            kl_cmd_info[14] = hal_data.mode_count.data_mode2_count;
            kl_cmd_info[15] = hal_data.mode_count.data_mode3_count;
            kl_cmd_info[16] = hal_data.data_background[hal_data.receiver_num];
            /* Draw graphics coordinates */
            hal_data.draw_data.draw_x_pos[hal_data.receiver_num] = hal_data.data_x_coordinate[hal_data.receiver_num] * 0.68;
            hal_data.draw_data.draw_y_pos[hal_data.receiver_num] = hal_data.data_y_coordinate[hal_data.receiver_num] * 0.82;

        }
        if (CAMEAR_RX_BUF[11] == 0x55){<!-- -->
            /* All data received */
            hal_data.data_rc_flag = true;
        }
    }
    /* Execute function */
    if (hal_data.data_rc_flag == true){<!-- -->
        /* Send data to Kunlun configuration display screen */
        Uart_Send(uart_rs485,kl_cmd_info, sizeof(kl_cmd_info));
        /* Voice broadcast function */
        VoiceAssistant_Send_Info(hal_data.data_running_mode);
        /* Control the servo */
        Servo_Coordinate_instructions((float)(hal_data.servo_data.servo_x),(float)(hal_data.servo_data.servo_y));
        /* Turn on the laser pointer */
        hal_data.laser_status = true;
        /* Receive data pointer + + */
        hal_data.receiver_num + + ;
        /* Event execution completion flag */
        hal_data.data_rc_flag = false;
    }

The video has been uploaded to the resource

Summary:

Finally, all shared resources that can be uploaded are listed above. If you have any questions, you can read the comments