Current Location:Home > Solution > automation
Design of workshop environment monitoring robot based on ARM

In the complex industrial production workshop environment, the robot can complete the workshop environment monitoring task through the complex workshop environment, and transmit the environmental data back to the upper computer through the wireless Wi Fi module, providing an effective workshop unmanned monitoring scheme, improving work efficiency and ensuring the safety of personnel and equipment.


In the chemical industry, food industry and textile industry, in order to ensure the storage environment, process flow and equipment performance, there are certain requirements for environmental conditions, and the environment of the workshop needs to be monitored to ensure the normal operation of production activities. Monitoring is also necessary in some industries, where workshops can produce pollutants that harm people's health and equipment.


In order to solve the above problems, an intelligent environment detection system based on STM32 and alicloud is designed, but its acquisition node is relatively fixed and not flexible enough. An intelligent vehicle for environmental information acquisition is designed, but its chassis uses crawlers, low moving speed and efficiency, large volume, and is not suitable for workshop environment. Using sensor network for monitoring requires a large number of sensors and server systems, which is expensive and not conducive to promotion.


In order to solve the above problems, a workshop environment monitoring robot is designed based on ARM core microprocessor. The robot uses a two-wheel balanced chassis, which has the advantages of high efficiency, flexibility, fast movement speed and strong trafficability. The robot is equipped with gas sensor module, temperature and humidity sensor module, camera and Wi Fi image transmission module, attitude sensor module. The robot overcomes the above shortcomings, has strong practicality, and provides a guarantee for industrial production.


1 overall system design

The overall structure of the robot system is divided into hardware layer and software layer. Among them, the hardware layer includes motion layer, control layer, communication layer and perception layer. The perception layer mainly includes various sensors that monitor and collect environmental information, the control layer is a micro controller based on ARM core, the motion layer includes the chassis motor of robot motion, and the communication layer is a Wi Fi image transmission module.


Hardware design of 2 workshop environmental monitoring robot system

The main control of the robot system adopts stm32f407 processor based on ARM core. This series of MCU has rich peripheral interfaces and on-chip resources, outstanding low-power performance and rich development routines. MCU is responsible for communication and control with all levels of robot hardware. Including robot motion control, motor current command transmission, gas sensor, temperature and humidity sensor data acquisition and processing, Wi Fi module data upload control. Data acquisition and processing of body attitude sensor.


2. 1 power module design

The system requires 3.3V, 5V and 24V power supplies, so 24V lithium polymer batteries are used as the power source of the robot system. The power supply of the system is divided into three levels: 24V power input, tps54540 synchronous step down 5V power supply and mt2492 synchronous step down 3.3V power supply.


Mt2492 is a synchronous buck converter developed by Xi'an Aerospace Minxin company, which has an output current of 2 A. the output voltage is configured through the feedback resistance network. According to the calculation formula provided in the data book, the feedback resistance network is configured as RHS=67.5 K Omega, RLS=15 K Omega.


2.2 attitude sensor module design

The robot adopts a balanced chassis, and in order to keep the chassis balanced and upright, the posture of the robot chassis needs to be measured. The attitude sensor module uses mpu6050 chip for attitude detection. The chip is an IMU (inertial measurement unit) product of invensense company, which can detect the motion data of triaxial acceleration, angular velocity and temperature data at the same time. Using the DMP library provided by the official, the sensor data can be processed, the Euler angle of the three axes can be calculated directly from the motion data of acceleration and angular velocity, and the attitude data of the three axes of the chassis yaw, pitch and roll can be obtained directly. After the chip DMP unit completes the attitude data solution, it will trigger the MCU interrupt through the int pin, and then send the data to the MCU through the I2C interface to receive the attitude sensor data in the interrupt service function.


2.3 gas sensor module design

The robot has the function of harmful gas detection, which can monitor the concentration of harmful gas in the workshop in real time. Mq135 gas detection module is used for harmful gas detection. The gas sensing material used in the sensor is tin dioxide (SnO2), which has low conductivity in clean air. When there is polluting gas in the environment where the sensor is located; The conductivity of the sensor increases with the concentration of polluting gases in the air. Mq135 sensor has high sensitivity to ammonia, sulfide and benzene vapor, and is also ideal for monitoring smoke and other harmful gases.


Through the integrated gas sensor module detection circuit, the change of conductivity can be converted into a digital signal corresponding to the gas concentration, and the trigger threshold can be set through the pot. When the concentration of harmful gas exceeds the threshold, the module outputs a high level, and the MCU directly reads the module signal output through io.


2.4 temperature and humidity sensor module design

In order to ensure production needs and monitor the temperature and humidity of the workshop, the robot is equipped with dht12 temperature and humidity sensor module, which is a digital signal output sensor integrated with microprocessor. Inside the sensor, temperature sensor, humidity sensor and an 8-bit high-performance MCU are integrated at the same time. The sensor elements include a capacitor humidity sensing element and an NTC temperature measuring element. The module applies the a.d.c. inside the integrated microprocessor to collect data and output data through I2C interface. The sensor module has low cost, can measure relative humidity and temperature at the same time, and greatly reduces the production cost of the robot.

Design of 2.5 Wi Fi image transmission module


The robot needs remote control and data upload. Considering that the robot works in the workshop environment, the Wi Fi camera image transmission module is selected to upload the images and robot data collected by the camera at the same time. The camera image transmission module adopts esp32-cam, which is based on esp32 microprocessor, and the computing power of the processor is as high as 600dmips. The module integrates Wi Fi image transmission, serial port transmission and camera, and can view images and uploaded data directly in the upper computer software. The module adopts 802.1.1 communication standard, and the transmission speed can reach 150 bit/S. The module uses a 5V power supply for power supply, the baud rate of the serial port is set to 115 200, and the data of the robot sensor is uploaded using the serial port for transmission. When in use, the client is connected to the wireless hot spot of the module, and the client supporting the module can be started.


The data is transmitted directly in the form of string, and the refresh frequency is 20 Hz, which not only ensures the real-time upload of data, but also avoids occupying too much upload channel bandwidth. In the data uploaded by the serial port,/N is the starting bit of the data, "harmful gas", "temperature" and "humidity" are the data name, and the data name followed by a number is the value of the data.


Software design of robot system for environmental monitoring in 3 workshop

The software part of the robot system includes initial program, sensor data acquisition program, host computer data upload program, remote control program and chassis control program.


Because the robot software includes multiple threads, the software system is developed based on FreeRTOS, and the parallel processing on millisecond time scale is realized through FreeRTOS's time slice scheduling function.

The software initializing program initializes each peripheral of the single chip microcomputer, makes each sensor enter the working state, initializes FreeRTOS, and runs each thread.

The sensor data acquisition program processes the data collected by each sensor, processes it into a string and sends it to the upper computer through the serial port.

The remote control program will set the motion state of the robot chassis through the data collected by the serial port to realize the motion control of the robot chassis.

The chassis control program controls the movement of the chassis through the chassis controller.


The balanced chassis uses the chassis controller to control the motion of the chassis. In order to ensure the passing performance and stability of the chassis, the combination of sliding mode control and PID control is adopted. The sliding mode controller is used to stabilize the angle of the balanced chassis, the PID controller is used to stabilize the speed of the balanced chassis, and the sliding mode controller and the PID controller form a cascade structure.

The digital PID controller can be obtained by discrete PID controller in continuous domain, which is obtained by trapezoidal method.


4 workshop environmental monitoring robot test

In order to verify the overall function and performance of the robot, the laboratory environment is selected to verify the function of the robot.


First, the passing performance of the robot is tested. Simulating the road environment of the workshop, a drop of 150 mm in height is set on the path of the robot, and the observed motion attitude of the robot is shown in Figure 6:

Robot posture through drop

When the robot passes through the drop, its posture deviates due to the interference of the drop, and it quickly recovers its upright stability after touching the ground.


Test the data acquisition function of the robot. After the robot is powered on, the robot is placed in the laboratory environment for testing, and the connection between the system and the upper computer is established through the Wi Fi module, so that the robot's data acquisition and upload functions are in a normal working state. The return data collected on the upper computer is shown in Figure 7:


Sensor data collected by upper computer

Through the serial communication function of Wi Fi module, the robot returns the data to the upper computer of the robot, and realizes the function of environmental data acquisition and upload.


5 closing remarks

Based on ARM core microprocessor, the software and hardware system of workshop environment monitoring robot is designed. After experimental verification, the robot chassis has strong passing performance and can adapt to complex workshop environment. Through the sensors carried by the robot to measure environmental data, it can return the collected data in time to complete the task of workshop environmental monitoring, which has strong practicality, meets the needs of workshop environmental monitoring in the process of industrial production, and provides a guarantee for industrial production.


Copyright © UDU Semiconductor