news 2026/6/13 8:19:34

【dz-955】基于单片机的出租车计价器设计

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-955】基于单片机的出租车计价器设计

摘要

随着城市交通的不断发展,出租车作为便捷的公共交通工具,其计价的准确性与智能化水平日益受到关注。传统出租车计价器存在时间区分不精准、单价调整繁琐、数据存储易丢失等问题,依赖人工干预设置夜间加价,易引发计价纠纷,难以满足现代出行对透明化、自动化计费的需求。​

基于 STC89C52 单片机的出租车计价器设计,整合了 DS1302 时钟模块、MX1508 电机驱动模块、KY-003 霍尔检测模块、AT24C02 存储模块、按键、LCD1602 显示屏及声光报警装置等,实现了出租车计费的自动化与智能化。系统核心功能包括:通过 DS1302 获取实时时间,自动判断白天(6:00-22:00)与夜间(22:00 - 次日 6:00)时段,分别执行不同计价标准(白天起步价 5 元 / 3 公里,超出后 2.5 元 / 公里;夜间起步价 8 元 / 3 公里,超出后 3 元 / 公里);通过 KY-003 霍尔模块检测车轮转速换算里程,MX1508 驱动电机模拟行驶状态,速度超限时触发声光报警;借助 AT24C02 存储价格参数、总单量、总里程等数据,防止掉电丢失;支持通过按键查看日总单量、总里程、总金额并清除记录,同时可修改时间、设置速度最大值及调整价格参数;通过 LCD1602 实时显示时间、当前速度、累计里程、单价及总金额等信息。​

该系统的实现,有效提升了出租车计价的准确性与智能化水平,减少了人工干预导致的误差与纠纷,确保了计费透明化,为出租车运营管理提供了高效解决方案,同时为同类车载计费设备的研发提供了参考,具有较高的实际应用价值。​

关键词:STC89C52;出租车计价器;霍尔检测;智能计费;数据存储;时钟模块

ABSTRACT

With the continuous development of urban transportation, taxis, as convenient public transport tools, have increasingly drawn attention to the accuracy and intelligence of their metering. Traditional taxi meters have problems such as imprecise time differentiation, cumbersome unit price adjustment, and easy loss of data storage. They rely on manual intervention to set night surcharges, which can easily lead to metering disputes and are difficult to meet the needs of modern travel for transparent and automated billing.​

The taxi meter design based on the STC89C52 microcontroller integrates DS1302 clock module, MX1508 motor driver module, KY-003 Hall detection module, AT24C02 storage module, buttons, LCD1602 display, and sound and light alarm devices, realizing the automation and intelligence of taxi billing. The core functions of the system include: obtaining real-time time through DS1302, automatically distinguishing between daytime (6:00-22:00) and nighttime (22:00-next day 6:00) periods, and implementing different pricing standards respectively (daytime starting price is 5 yuan for 3 kilometers, 2.5 yuan per kilometer beyond that; nighttime starting price is 8 yuan for 3 kilometers, 3 yuan per kilometer beyond that); detecting wheel speed through KY-003 Hall module to convert mileage, driving the motor through MX1508 to simulate driving status, and triggering sound and light alarm when the speed exceeds the limit; storing price parameters, total orders, total mileage and other data with AT24C02 to prevent loss due to power failure; supporting viewing daily total orders, total mileage, total amount and clearing records through buttons, and modifying time, setting maximum speed and adjusting price parameters; displaying real-time time, current speed, accumulated mileage, unit price and total amount through LCD1602.​

The implementation of this system effectively improves the accuracy and intelligence level of taxi metering, reduces errors and disputes caused by manual intervention, ensures billing transparency, provides an efficient solution for taxi operation management, and also offers a reference for the research and development of similar on-board billing equipment, with high practical application value.​

Keywords:STC89C52; Taxi meter; Hall detection; Intelligent billing; Data storage; Clock module

目录

第 1 章 绪论

1.1 研究的目的及意义

1.2 国内外发展情况

1.3 本文主要研究内容

第2章 设计思路与方案论证

2.1 主要元器件选择

2.1.1 主控芯片选择

2.1.2 时钟模块选择

2.1.3 电机驱动与测速模块选择

2.1.4 存储模块选择

2.1.5 按键模块选择

2.1.6 显示模块选择

2.1.7 声光报警模块选择

2.2整体设计方案

第 3 章 硬件设计

3.1 主控电路模块

3.2 时钟模块电路

3.3 电机驱动与测速模块电路

3.4 存储模块电路

3.5 显示模块电路

3.6 按键模块电路

3.7 声光报警模块电路

第4章 系统程序设计

4.1 编程软件介绍

4.2 系统主流程设计

4.3 独立按键

4.4 LCD1602液晶显示子流程

4.5 速度检测子流程设计

4.6 直流电机速度调节子流程设计

第 5 章 实物测试

5.1 整体实物测试

5.2 时钟与计费功能测试

5.3 里程与速度检测功能测试

5.4 存储模块功能测试

5.5 显示模块功能测试

5.6 按键功能测试

5.7 声光报警功能测试

第 6 章 总结与展望

6.1 总结

6.2 展望

致谢

参考文献

附录

附录一:原理图

附录二:PCB

附录三:主程序

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/6/12 1:51:58

【dz-959】基于嵌入式的GPS定位系统和智能语音播报系统设计

摘 要 在现代社会,随着物联网技术的飞速发展,人们对实时定位和信息交互的需求日益增长。传统的定位系统往往只能提供单一的视觉信息,缺乏直观的交互体验。因此,设计一种集成了定位与语音交互功能的嵌入式系统具有重要的现实意义。…

作者头像 李华
网站建设 2026/6/10 22:09:26

jQuery EasyUI 数据网格 - 列运算

下面直接给你最实用、最常见的列运算(calculated column 底部合计统计)方法,jQuery EasyUI datagrid 支持超级好,复制粘贴就能用,领导最爱的“单价*数量金额自动计算 底部总金额/平均值”全都有! 方法1&…

作者头像 李华
网站建设 2026/6/11 13:22:47

企业环境中.NET 3.5离线部署实战指南

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 开发一个企业级.NET Framework 3.5离线部署工具,包含:1) 图形化界面选择安装源路径;2) 自动识别域内计算机;3) 批量静默安装功能&…

作者头像 李华
网站建设 2026/6/13 6:18:16

TVBoxOSC调试实战指南:从零掌握5大排障核心技能

TVBoxOSC调试是每个用户必须掌握的关键技能,面对设备连接异常、界面无响应、功能模块失效等常见问题,一套系统化的调试方法能帮你快速定位并解决问题。本指南将带你从基础到进阶,掌握TVBoxOSC调试的核心要点。 【免费下载链接】TVBoxOSC TVBo…

作者头像 李华
网站建设 2026/6/11 0:36:50

AI助力Ubuntu输入法开发:从零到一键部署

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 开发一个基于Ubuntu的智能输入法,支持拼音和五笔输入,具有用户词库记忆功能。使用Python和GTK开发,集成AI模型优化输入预测。要求代码结构清晰&a…

作者头像 李华
网站建设 2026/6/13 0:04:37

1小时打造专属视频下载器:you-get原型开发实战

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 快速开发一个定制视频下载器原型,基于you-get核心功能。特殊需求:1) 只下载特定分辨率(如1080p) 2) 自动添加片头片尾 3) 下载完成后自动转MP3 4) 集成到Tel…

作者头像 李华