摘 要本次设计基于 STM32F103 芯片,使用 Keil4 和 ARM 仿真器开发一款能自动分类和液晶显示的智能垃圾桶系统。该系统包含一下模块:检测模块、循环扫描模块、OLED 显示模块、多路 PWM 控制输出模块、舵机控制模块。本次设计使用以上模块,实现扫描垃圾颜色功能、OLED 提醒功能、控制分流板分类垃圾功能。系统的设计使用到了两个芯片,作为主芯片 STM32 如果检测到辅芯片 C51 的信号,就针对该信号进行垃圾分类处理并且在液晶显示相关分类信息。在没有垃圾投递信号情况下,主芯片仅提供实时时钟和温湿度的液晶显示功能。系统的软件设计使用到了程序的循环扫描法,对辅芯片的信号输出端进行不定时的扫描,以达到主芯片在接收垃圾投递信号后能及时作出对 OLED 液晶和舵机的信号输出处理的功能。在主芯片循环扫描信号输入之余,程序还运用定时输出来控制舵机的精准转动,以确保垃圾分类的准确性。系统运行时响应速度快,能及时反馈给使用者相关信息,方便人们使用。关键词:Keil4、ARM 仿真器、系统模块、循环扫描法、定时输出控制、AbstractThis design is based on STM32F103 chip, using Keil4 and ARM emulator to develop a smart trash can system that can automatically classify and display liquid crystal. The system includes the following modules: detection module, cyclic scanning module, OLED display module, multi-channel PWM control output module, steering control module. The above modules are used in this design to realize the function of garbage color scanning, OLED reminding and garbage sorting on the control splitter. In the design of the system, two chips are used as the main chip STM32. If the signal of the auxiliary chip C51 is detected, garbage classification is carried out for the signal and relevant classification information is displayed in the liquid crystal. In the absence of a garbage delivery signal, the main chip provides only a real-time clock and LCD display of temperature and humidity.The software design of the system USES the cyclic scanning method of the pro...