| Excavators have a wide range of applications in urban construction,agricultural water conservancy and industrial development.With the development of intelligence,the unmanned operation of large industrial site engineering has become the main trend.The excavation operation of the excavator is carried out by the expansion and contraction of the hydraulic cylinder.In order to control the terminal to grasp the excavator movement status in real time,it is convenient for the terminal to react in time when there is a control deviation and realize the real-time monitoring and precise control of the excavator,therefore,it is necessary to design a displacement acquisition system of the hydraulic cylinder to collect the displacement data of the hydraulic cylinder in real time,and then get the excavator movement status according to the actual measured displacement combined with the kinematic knowledge.motion state.In this paper,we combine existing research and knowledge to carry out hydraulic cylinder excavator displacement acquisition research.Firstly,a device simulating the motion of hydraulic cylinder is designed for displacement acquisition experiments under laboratory conditions.Based on this device,an AT89C2051 microcontroller as the slave and STM32 as the host displacement acquisition method is proposed in combination with RS485 bus technology,and a displacement acquisition system is developed,through which the slave can be placed inside the hydraulic cylinder barrel to collect data in practical applications,and the host can be placed inside the cab to analyze and calculate the slave data and upload them to the upper computer system.Secondly,the hardware circuit and software programming of the master and slave machine are designed to realize the system functions.The slave is responsible for signal acquisition and communication with the host.The circuit part includes core circuit,power supply circuit,signal acquisition interface and RS485 communication interface circuit,in which the reset part of the core circuit is designed with watchdog circuit,and the optocoupler isolation circuit and power supply isolation circuit are added to strengthen the stability of signal transmission and power supply.The host part is responsible for signal processing,data storage,data upload and communication with the slave,and the circuit part mainly includes power circuit module,RS485 communication interface circuit module,SD card storage module,OLED display module and WIFI communication module and other parts.Again,the software system is designed according to the functional requirements of each module combined with various types of underlying open source code.The slave part completes the system initialization program and carries out signal acquisition work in the interrupt program,and the master and slave complete the transfer of displacement data by formulating the RS485 communication protocol between them.The host part completes the system initialization program,including serial port initialization,OLED initialization,SD card initialization,WIFI initialization and RS485 initialization,etc.After that,the received data is transferred to the signal processing program,and data decoding,data storage and data transmission are realized in the signal processing program.After that,the hydraulic cylinder of the excavator is modeled,and the data related to the hydraulic cylinder of the excavator is introduced to solve the kinematic positive and negative operations based on the D-H method,and the excavator workspace is shown by the coordinate axes based on the kinematic positive solution,and the maximum digging height,maximum digging radius and maximum digging depth of the excavator are analyzed.Finally,the system was tested,and the data acquisition and bucket tip position calculation were carried out in the upper computer system,and the displacement data measured by different ranges at three speeds were recorded,and the relative and absolute errors were obtained,and the error law was summarized,and the causes of the errors were analyzed.The displacement acquisition results show that the average relative error is controlled within 3% and the stability is good,which meets the requirements of hydraulic cylinder displacement acquisition. |