1、 基于单片机自行车测速系统设计基于单片机自行车测速系统设计 学院名称: 机电工程系 专业名称: 机电一体化 年级班别: 2011 级 113 班 姓 名: 指导教师: 2013 年 12 月 I 基于单片机自行车测速系统设计 摘 要 随着科技的迅速发展,单片机的应用也越来越广泛,并带动传统控制检测技术不断更 新。现在的车速表大多是电子式的,用 LED 数码管或 LCD 即时显示,显示更加直观。电子 式车速表采用接触车速传感器代替软轴传动,可使车速表的安装位置不受距离限制,进一 步有效地克服了机械式车速表中的诸多不足。 本次设计给出了以 AT89C2051 为核心,利用单片机的运算和控制功能,并
2、采用系统化 LED 显示模块实时显示所测速度的设计方案,以及串口数据存储电路和系统软件。 该方案由于使用了数码管显示模块和 E2PROM,以及高效快速算法,因而可在节约系统 资源和简化程序设计的基础上保证测量精度和系统实时性。其中信号预处理电路包含信号 放大、波形变换和波形整形:信号预处理电路中的放大器用于对待测信号进行放大,以降 低对待测信号的幅度要求;波形变换和波形整形电路则用来将放大的信号转换成可与单片 机接口的 TTL 信号。通过单片机的设置可使 INT0 引脚能够对内部定时器 T0 的工作进行 控制,这样能精确地测出加到 INT0 引脚的正脉冲宽度(即测出脉冲信号的期) 。速度显示
3、部分采用数码显示, 所得的数据采用 I2C 总线, 并通过 E2PROM 来存储, 因而节省了所需 单片机的口线和外围器件, 同时也简化了显示部分的软件编程。 本方案实现了电动车速度即时显示,并可通过控制两个按键显示速度或里程,同时加 入了超速语音报警功能,使之更加人性化。 关键词 单片机;霍尔传感器;数码显示;语音报警;DC/DC 变换器 II The bicycle Speed system design based on single-chipDoped Abstract With the rapid development of technology, more and more wi
4、despread application of microcomputer, and promote the traditional control detection technology constantly updated. Electronic speedometer flexible shaft using the contact speed sensor instead of driving, speed tables can be installed without distance limitations, and further to effectively overcome
5、 the mechanical disadvantages of speed in the table. The AT89C2051 is designed to give the core of computing and the use of microcomputer control, and adopting a systematic LED display module shows the measured real-time speed design, and the serial data storage circuits and system software. The pro
6、gram due to the use of the digital display module and E2PROM, and efficient fast algorithm, thus saving resources and simplifying programming system based on the system to ensure accuracy and real-time. Signal pre-processing circuit which includes signal amplification, wave conversion and waveform shaping: signal pre-processing circuit in the amplifier for the amplified signal could be to reduce the requirements on signal amplitude; wave transformation and