DyingGasp电路(掉电检测电路)设计

DyingGasp功能解释:在终端设备意外掉电时立即发送信号给局端设备,告知局端设备该终端设备即将断电离线。常用于通信设备,如当ONU离线时,OLT可通过该ONU是否发送过dyinggasp信号来判断ONU是掉电离线还是通信异常导致离线。

电路设计:在这里插入图片描述
如上图所示,系统输入电压为12V,CPU供电为5V或由5V转换的其他电压,U1为电压比较器。

当正常供电时,U1 IN+电压为12V分压后的5.26V,高于IN-的5V,IN+>IN-, OUT管脚输出高电平。

当系统掉电时,12V电压降低至11V时,IN+电压低于5V,IN-电压由于超级电容C1的存在仍然保持5V,IN+<IN-,此时OUT输出低电平。

CPU检测到OUT电平由高变低后触发dyinggasp,利用超级电容的电量做相关处理,如向局端/云端发送掉电通知,保存数据等。
此电路的优势是调节分压电阻可以随意设置触发电压。还有一种电路是利用复位芯片来实现掉电检测。

/*
这是一段测试代码
*/
//为了防止系统判断推荐受影响
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse
```/*
这是一段测试代码
*/
//为了防止系统判断推荐受影响
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse

猜你喜欢

转载自blog.csdn.net/jsf120/article/details/123375868