设计说明书
总字数:20000+
随着居民家庭用电设备数量持续增加,插座作为供电回路的末端节点,其运行状态直接关系到用电安全与能耗管理水平。传统插座只具备通断功能,缺少对电压、电流的实时监测,出现电压偏高、电压偏低、电流过载或功率异常时无法及时切断供电,长时间待机与定时通断也需要人工干预,已经难以满足家庭场景下安全用电与节能管理的实际需要。
本设计以STM32F103C8T6单片机为控制核心,采用INA219电压电流检测模块采集插座回路的电压、电流并计算实时功率,采用DHT11温湿度检测模块采集插座周边环境的温度与湿度,采用0.96英寸OLED显示屏显示实时数据与设置参数,采用三路独立按键完成定时时间、电压上限、电压下限、电流上限等参数的本地设置,采用SRD-05VDC-SL-C继电器作为执行部件实现负载通断,采用ESP8266无线模块与手机端建立连接,完成数据上传与远程开关控制。系统按功能划分为主控、采集、人机交互、执行与无线通信五个部分,各模块之间通过标准数字接口连接,硬件结构清晰,便于调试与维护。
软件部分采用模块化结构编写,包含系统初始化、电压电流采集与功率计算、温湿度采集、按键扫描与参数设置、越限判断与保护动作、定时控制、显示刷新以及无线通信等程序模块,并加入按键消抖、采集数据滑动平均、通信超时重连与参数掉电保存等可靠性处理。在仿真环境与实物样机上分别完成功能测试,测试内容覆盖电压电流监测与越限断电、温湿度采集显示、定时与阈值设置、显示与按键交互、无线远程控制以及长时间连续运行稳定性。测试结果显示,系统各项功能运行正常,监测数据与标准仪表的偏差在允许范围以内,越限保护动作及时,远程控制响应迅速,整机能够长时间稳定工作,达到了预期的设计目标。
关键词:STM32F103C8T6;智能插座;电压电流监测;继电器保护;WiFi远程控制
With the continuous growth of household electrical appliances, the socket, as the terminal node of the power supply loop, directly affects electrical safety and energy management. A conventional socket only provides on and off switching. It cannot monitor voltage and current in real time, and it cannot cut off the supply promptly when overvoltage, undervoltage, overcurrent or abnormal power occurs. Long standby periods and timed switching still depend on manual operation, which no longer meets the requirements of safe electricity use and energy saving in modern homes.
This design takes the STM32F103C8T6 microcontroller as the control core. An INA219 module measures the voltage and current of the socket loop and derives the real-time power. A DHT11 module collects the temperature and humidity around the socket. A 0.96-inch OLED display presents real-time data and configuration parameters, while three independent keys are used to set the timing duration, the upper and lower voltage limits and the current limit. An SRD-05VDC-SL-C relay acts as the switching actuator, and an ESP8266 wireless module connects the controller with a mobile phone for data uploading and remote switching. The system is divided into five parts, namely the control unit, the acquisition unit, the human-machine interaction unit, the actuator and the wireless communication unit, and the modules are connected through standard digital interfaces.
The software is organized in a modular way. It contains system initialization, voltage and current acquisition with power calculation, temperature and humidity acquisition, key scanning and parameter setting, limit judgement and protection action, timing control, display refresh and wireless communication, together with key debouncing, moving average filtering, communication timeout reconnection and power-down parameter storage. Functional tests were carried out both in a simulation environment and on a physical prototype. The tests cover voltage and current monitoring with over-limit power-off, temperature and humidity acquisition and display, timing and threshold setting, display and key interaction, wireless remote control and long-term running stability. The results show that all functions work normally, the deviation between the measured data and the reference instrument stays within the permitted range, the protection action is timely, the remote control responds quickly, and the whole machine runs stably for a long time, which meets the expected design objective.
Keywords: STM32F103C8T6; Intelligent Socket; Voltage and Current Monitoring; Relay Protection; WiFi Remote Control
目 录
购买后可查看具体内容!