设计说明书
总字数:16000+
摘 要
随着生活的日益富足,智能消费已成为未来发展趋势,当前我国都保持着人工售货的方式进行售卖,需要消耗大量的人力、物力、财力,因此设计可以进行自动售卖的智能系统具有一定的研究价值和研究意义;此次设计一款基于STM32单片机自动售卖机,用户可以3*3的矩阵键盘模拟9种商品,当按下某个商品时,显示商品名及价格;通过红外计数管检测投币数量,当数量一致时,通过步进电机正转180°模拟出货,出货后5s后,步进电机反转180°回归,并清除显示的商品;通过触发型光敏电阻检测光照,当光照过低,则打开补光灯,照亮商品;通过显示屏显示售货机的相关数据;通过AT24C02存储商品名、价格、数量等数据,并可实现掉电保存数据;通过扫码枪实现扫码支付功能。此外,通过WIFI模块实现无线通信功能,手机端有3个界面,分别代表库存界面、销量界面、销售额界面,该设计可以实现自动售卖的功能,可以节省大量的人力和物力,所以此次设计具有一定的研究价值和实际意义。
关键词:自动售卖;矩阵键盘;货物选择;单片机;AT24C02
Abstract
With the increasing abundance of life, intelligent consumption has become the future trend of development, China is currently maintaining the way of manual sales for sale, need to consume a lot of manpower, material resources, financial resources, so the design can carry out automatic sales of intelligent system has a certain research value and research significance; This design is based on STM32 single chip microcomputer vending machine, the user can simulate 9 kinds of goods with 3*3 matrix keyboard, when pressing a product, display the product name and price; The number of coins is detected through the infrared counter tube. When the number is consistent, the stepper motor is turned 180° to simulate shipment. After 5s after shipment, the stepper motor reverses 180° to return, and the displayed goods are cleared. Detect the light through the trigger photoresistor, when the light is too low, turn on the fill light to illuminate the product; Display the relevant data of the vending machine through the display screen; The AT24C02 stores data such as product name, price and quantity, and can save data after power failure. The scanning code payment function is realized through the scanning code gun. In addition, the wireless communication function is realized through the WIFI module, and the mobile phone has three interfaces, respectively representing the inventory interface, sales interface and sales interface. The design can realize the automatic sales function and save a lot of manpower and material resources, so the design has certain research value and practical significance.
Keywords: automatic sale; Matrix keyboard; Cargo selection; Single-chip computer; AT24C02.
目录
第1章 绪论
1.1 选题背景及实际意义
1.2 国内外发展历程
1.3 本论文研究目标与框架
第2章 系统设计方案
2.1 主要元器件选择
2.2 整体设计方案
第3章 硬件设计
3.1 单片机最小系统
3.2 OLED显示模块电路
3.3 矩阵键盘模块
3.4 光敏电阻电路模块
3.5 步进电机模块
3.6 红外对射模块(测速/计数)电路
3.7AT24C02存储模块电路
3.8 扫码枪模块
3.9 LED照明模块电路
3.10云平台无线通信模块
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3矩阵键盘子流程
4.4 OLED显示流程设计
4.5步进电机子流程
4.6存储模块子流程
4.7WiFi模块子流程设计
第5章 实物制作与调试过程
5.1电路焊接总图
5.2上电运行实物测试
5.3商品购买实物测试
5.3补光实物测试
5.4扫码枪付款实物测试
5.5WiFi模块实物测试
结 论
参考文献
致 谢
附录1:原理图
附录2:PCB
附录3:主程序
购买后可查看具体内容!