What is the design of the control system of the steel tape measure?
What is the design of the control system of the steel tape measure?
The control system mainly takes the single-chip microcomputer as the core, and controls the operation of the actuator through the serial communication between the upper PC and the lower single-chip microcomputer. The industrial camera is installed on the detection trolley, which is driven by the stepping motor, and the single-chip microcomputer realizes the movement distance, direction and speed control of the stepping motor according to the control commands sent by the upper computer. The action of the whole system is controlled by the PC through the serial communication between the microcontroller and the PC.
Serial communication is adopted between the PC and the single-chip computer. Since the level logic of the serial port of the PC is RS-232C level, and the level logic of the STC89C52RC serial port is TTL level, the two cannot be directly connected, so level conversion is required. In the system, MAX232 is selected as the device for level conversion. The RS-232C serial signal converted by MAX232 is then connected to the DB9 socket and connected to an external PC to establish an RS-232C communication interface. Use the 3 pins P2.0, P2.1, P2.2 of the P2 port of the microcontroller to output pulse, steering and enable signals respectively, and send them to the stepper motor driver.