基于单片机的汽车车速里程表设计
2019-10-21李倩陈登峰段优
李倩 陈登峰 段优
摘 要:车速里程表是驾驶员和汽车进行信息沟通的重要接口,使驾驶员能够即时掌握车辆的行驶状况,这是汽车行驶安全的重要保障。本文提出一种基于单片机的电子式车速里程表,通过无接触式光电传感器可以測量瞬时车速和里程,可以实现限速报警功能,并具有较好的再开发功能。车速测量通过固定在电机转轴上的码盘,用光电传感器检测码盘的工作状态,使转轴转动速度的物理量转化成脉冲信号,并根据生成的脉冲频率值得到圆盘的转速,通过计算就可获得里程值和车速值,并通过LCD1602液晶屏显示出来。在本设计中通过强大的软件程序取代了复杂的硬件电路,不仅简化线路,而且降低了成本。
关键词:单片机;车速里程表;LCD1602
Abstract: Speedodometer is an important interface for information communication between drivers and vehicles, which enables drivers to grasp the driving status of vehicles in real time, and it is an important guarantee for driving safety. This paper presents a design of electronic speedometer based on single-chip microcomputer. The instantaneous speed and mileage are measured by non-contact photoelectric sensor. And the speedodometer supports speed limitation alarm and further development function. It uses photoelectric sensor to detect the working state of the code disc which is fixed on the motor shaft, the physical quantity of the rotation speed of the rotating shaft can be converted into pulse signals. According to the generated pulse frequency, the rotating speed of the disc can be obtained. The mileage value and vehicle speed value can be calculated and displayed on LCD 1602 screen. In this design, the complex hardware circuit is replaced by powerful software program, which simplifies the circuit design and reduces the cost.
电子式车速里程表,测量转速的传感器与机械部件不产生摩擦,它经过安装在变速器上的传感器获取反映车辆速度的脉冲信号,经过相应的电路设计带动指示表的变化。传感器检测端口与齿轮中被要求含有大约1.4+0.6mm的位置间隙。而当汽车行驶时, 变速器输出轴转动,经过传感器检测端与里程表转子齿轮相接洽时,敏感元件受到里程表转子的磁场影响,从而输出低电平;若传感器检测端没有与里程表转子的齿轮接洽时,敏感元件不受磁场影响,从而以高电平输出,通过这样高低电平的变化,变速器的输出轴每转动一周,传感器就会输出方波脉冲信号,由连接口传送给仪表,再经过相关电路和软件计算处理后,由显示装置就可以显示出速度。……
