In the circuit, add the compiled code to the program: Right-click on the 80C51 in U1, select the component, and then left-click to bring up the component's properties dialog box. In the Properties dialog, add in ProgramFile in the window. Hex file: Double-click "Open file icon" and select the file to be added: Add the 51code.hex file compiled in KeilC51 to the AT89S52 component model in the circuit. Click the Play button to view the circuit simulation result: Move the model of the pedal - the sliding resistance RV1. Observe that the motor model rotates with it, and the circuit simulation is consistent with the result of program design.
Associated debugging of the system simulation circuit model Keil can also be associated with Proteus debugging, Keil as a software debugging interface, Proteus as a hardware simulation and debugging interface.
(1) Copy the VDM51.dll file in the Proteus installation directory to the C51BIN directory of the Keil installation directory. (2) Edit the tools.ini file in C51 to add: TDRV1=BIN/VDM51.DL. (3) Open Proteus, draw the corresponding circuit, select useremotedebugmonitor in Proteus debug menu. (4) Enter Keil's project menu optionfortarget 'project name'. In the DEBUG option, select ProteusVSMMonitor-51Driver in the drop-down menu at the top of the right column and enter setting. The IP address of the camera is 127.0.0.1. The port number must be 8000. (5) Debug in Keil, and check the intuitive result in Proteus. .
Simulation results Open the simulation circuit of Proteus, run the program, and adjust the position of the sliding rheostat that simulates the throttle pedal, so as to simulate the rotation of the stepper motor. It can be seen from the figure that when the “running†in the simulation control button in the lower left corner of the interface is in the pressed state, the motor rotor starts to move, and the position of the motor rotor changes with the change of the analog pedal contact point. . Through simulation, we can see that the entire system can implement design ideas well.
Physical Experiment The purpose of the physical experiment is to detect the signal of the throttle pedal, and through the calculation of the electronic control unit, output to the drive chip of the stepper motor to complete the control of the stepper motor. The control system uses the incremental PID control according to the throttle pedal signal and the throttle opening signal to calculate the optimal desired throttle opening value, and calculates the number of pulses and drives the stepping by the drive chip according to the step angle. Motor.
The debugged program is written into the microcontroller through software. The entire experimental device includes an electronic control unit (ECU), an electronic throttle valve assembly (including a stepper motor, a throttle sensor), and a throttle pedal (for the convenience of experimentation, the use of adjustable Resistive simulation of the throttle pedal) to form a simple experimental device. By changing the resistance of the adjustable resistor, observe the change in the angle of the stepper motor. The experiment proves that the circuit system of the program and architecture is correct: it can receive the voltage signal sent from the throttle pedal and can send data to the MCU; the MCU can calculate the number of pulses in time and drive the stepping motor to drive the chip to achieve Purpose.
Conclusion The simulation of the electronic throttle control system was tested in the virtual environment of the single-chip microcomputer built by Proteus software and Keil. From the above simulation example, it can be seen that the use of Proteus as a microcontroller simulation experiment is fast, convenient, intuitive, and autonomous. The advantages of designing and verifying programs have achieved very satisfactory results. Therefore, in the future, the electronic throttle control system for simulation design and physical experiments, shorten the cycle, improve product quality, reduce development and design costs have a good application prospects.
Glide Skin Smooth Skin,Natural Rubber Glide Skin
Dongguan JinYe Sports Apparatus Co., Ltd , https://www.g5rubber.com