摘要
本文主要探究了基于STC89C51单片机的智能玩具小车控制系统的软件设计与功能实现。控制系统的软件部分包括主控程序、保护程序、电机驱动程序等。单片机接收并处理车身传感器提供的位置、速度等信息,可以准确识别小车前进轨迹上是否有障碍。在检测到障碍后单片机发出指令改变电机的转速和扭矩,控制小车左转、右传、前进、后退,从而实现自动避障。同时,利用液晶屏直观显示小车当前的行驶里程和行驶速度,方便操控人员实时了解小车状况。
This paper mainly explores the software design and function realization of intelligent toy car control system based on STC89C51 single chip microcomputer.The software part of the control system includes main control program,protection program,motor driver program and so on.The single chip microcomputer receives and processes the position,speed and other information provided by the body sensor,and can accurately identify whether there are obstacles on the car's forward track.After detecting the obstacle,the MCU sends out instructions to change the speed and torque of the motor,and controls the car to pass left,right,forward and backward,so as to realize automatic obstacle avoidance.At the same time,the LCD screen is used to visually display the car's current mileage and speed,which is convenient for the operator to understand the car's condition in real time.
作者
王孝平
张建兵
Wang Xiaoping;Zhang Jianbing(School of Mechanical and Electrical Engineering and Automation,Nanhang Jincheng College,Nanjing,China)
出处
《科学技术创新》
2024年第14期215-218,共4页
Scientific and Technological Innovation