项目编号:mcuclub-dz-358
设计简介:
项目名:自动售货机
项目编号:mcuclub-dz-358
单片机类型:STC89C52
具体功能:
1、通过3*3的矩阵键盘模拟9种商品,当按下某个商品时,显示商品名及价格
2、通过按下确认键后,通过红外计数管检测投币数量,当数量一致时,通过步进电机正转180°模拟出货,出货后5s后,步进电机反转180°回归,并清除显示的商品。当支付超过10s未出现投币数增加,则恢复初始界面。出现余量为0时电机不工作
3、通过AT24C02存储商品数量,实现掉电保存数据
4、通过LCD12864显示屏显示数据
5、通过蓝牙模块连接手机,查看商品数
总字数:15965
摘 要
随着人们生活水平的提高,智能购物已成为未来的发展趋势,当前我国都保持着人工售货的方式进行售卖,需要消耗大量的人力、物力、财力,因此设计智能售卖系统具有一定的研究价值和研究意义。
本系统设计一款基于STC89C52单片机自动售货机,通过3*3的矩阵键盘模拟9种商品,当按下某个商品时,显示商品名及价格;当确认按键被按下后,通过红外计数管检测投币数量,当数量一致时,通过步进电机正转180°模拟出货,出货后5s后,步进电机反转180°回归,并清除显示的商品。当支付超过10s未出现投币数增加,则恢复初始界面。出现余量为0时电机不工作;通过AT24C02存储商品数量,实现掉电保存数据;通过LCD12864显示屏对相关数据进行显示。此外,通过蓝牙模块实现无线通信功能,并进行商品数的查看。该设计可以实现自动售卖的功能,可以节省大量的人力和物力,所以此次设计具有一定的研究价值和实际意义。
关键词:自动售卖;矩阵键盘;显示屏;单片机;AT24C02
Abstract
With the improvement of people’s living standards, intelligent shopping has become a future development trend. Currently, China maintains a manual sales method for sales, which requires a large amount of manpower, material resources, and financial resources. Therefore, designing an intelligent sales system has certain research value and significance.
This system designs an automatic vending machine based on the STC89C52 microcontroller, which simulates 9 types of products through a 3 * 3 matrix keyboard. When a certain product is pressed, the product name and price are displayed; After the confirmation button is pressed, the quantity of coins is detected through an infrared counter. When the quantity is consistent, the shipment is simulated by rotating the stepper motor forward 180 °. After 5 seconds of shipment, the stepper motor reverses 180 ° to return and clear the displayed product. When the payment exceeds 10 seconds without any increase in coin count, the initial interface will be restored. When the margin is 0, the motor does not work; By storing the quantity of goods through AT24C02, data can be saved after power failure; Display relevant data through the LCD12864 display screen. In addition, wireless communication is achieved through the Bluetooth module and the number of products can be viewed. This design can achieve the function of automatic sales, which can save a lot of manpower and material resources. Therefore, this design has certain research value and practical significance.
Keywords: automatic sales; Matrix keyboard; Display screen; Single chip microcomputer; AT24C0
目录
第1章 绪论 5
第2章 系统设计方案 8
第3章 硬件设计 11
第4章 系统程序设计 25
第5章 仿真测试 30
第6章 实物制作与调试过程 34
结 论 38
参考文献 39
致 谢 40