设计说明书
总字数:17000+
摘要
随着家庭用电设备日益增多,市电供电稳定性对日常生活的影响愈发显著,停电或电压异常不仅会导致家电无法正常使用,还可能影响冰箱冷藏、安防设备运行等关键需求。对于家庭用户而言,若缺乏可靠的应急供电方案,突发供电故障将带来极大不便,甚至造成财产损失。因此,研发一种能实时监测市电状态、自动切换应急供电且具备充电管理功能的家用应急电源系统,具有重要的现实意义。
本设计提出了一种基于 STM32F103C8T6 单片机的家用应急电源系统。系统主要功能包括:通过 10K 分压式电阻模数转换模块检测输入市电电压值,判断市电是否处于异常或停电状态,通过继电器模拟市电电源的通断;当市电电压低于或高于设定阈值(异常或停电)时,系统自动切换至应急电源供电,同时继电器模拟应急电源开启;市电异常时,蜂鸣器发出间断警报声,指示灯点亮以提醒用户;通过另一 10K 分压式电阻检测应急电源电压值,当应急电源电量低于设定值时,蜂鸣器报警且指示灯点亮,提示电量即将耗尽;当市电恢复正常(电压与设定阈值匹配)时,系统可通过太阳能板为应急电源(锂电池)自动充电;通过 OLED 显示屏实时显示市电电压值、应急电源电压、各项设置限值及应急电源剩余电量。
该家用应急电源系统的作用在于,为家庭用户提供了一种可靠、智能的应急供电解决方案。通过实时监测市电状态实现自动供电切换,保障关键家电持续运行;结合太阳能充电与电量预警功能,确保应急电源始终处于可用状态,有效应对突发供电故障,提升家庭用电的安全性与便利性,减少停电带来的生活困扰与财产损失。
关键词:STM32F103C8T6 单片机;家用应急电源系统;市电监测;供电切换;太阳能充电
Household emergency power supply system
Abstract
With the increasing number of household electrical equipment, the stability of mains power supply has a more significant impact on daily life. Power outages or abnormal voltage can not only cause household appliances to be unable to function normally, but may also affect key needs such as refrigerator refrigeration and security equipment operation. For household users, if there is a lack of reliable emergency power supply solutions, sudden power supply failures will cause great inconvenience and even result in property losses. Therefore, developing a household emergency power supply system that can monitor the status of the mains in real time, automatically switch emergency power supply, and has charging management functions has important practical significance.
This design proposes a household emergency power supply system based on STM32F103C8T6 microcontroller. The main functions of the system include: detecting the input mains voltage value through a 10K voltage divider resistor analog-to-digital conversion module, determining whether the mains is in an abnormal or power-off state, and simulating the on/off of the mains power supply through relays; When the mains voltage is lower or higher than the set threshold (abnormal or power outage), the system automatically switches to emergency power supply, and the relay simulates the opening of emergency power supply; When the mains power is abnormal, the buzzer emits intermittent alarm sound and the indicator light lights up to remind the user; Detect the voltage value of the emergency power supply through another 10K voltage divider resistor. When the power level of the emergency power supply is lower than the set value, the buzzer will sound an alarm and the indicator light will light up, indicating that the power is about to be exhausted; When the mains power returns to normal (voltage matches the set threshold), the system can automatically charge the emergency power source (lithium battery) through solar panels; Real time display of mains voltage, emergency power supply voltage, various setting limits, and remaining power of emergency power supply through OLED display screen.
The function of this household emergency power supply system is to provide a reliable and intelligent emergency power supply solution for household users. By monitoring the real-time status of the mains power supply, automatic power switching can be achieved to ensure the continuous operation of key household appliances; Combining solar charging and power warning functions to ensure that emergency power is always available, effectively responding to sudden power supply failures, improving the safety and convenience of household electricity use, and reducing the inconvenience and property losses caused by power outages.
Keywords:STM32F103C8T6 microcontroller; Household emergency power supply system; Municipal power monitoring; Power supply switching; solar charging
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 电压检测模块电路设计
3.4 继电器模块电路设计
3.5 声光报警模块电路设计
3.6 OLED 显示模块电路设计
3.7 按键模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 电压检测模块子流程设计
4.5 OLED显示流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 电压检测与 OLED 显示功能测试
5.3 市电异常与应急供电切换功能测试
5.4 应急电源低电量报警功能测试
5.5 太阳能充电功能测试
5.6 按键阈值设置功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!