IOT终端设备-门磁传感器设计

目录

前言

功能构想

物料以及代码

原理图

物模型

实物


前言

选择门磁传感器作为智能家居系统的第一款设备,主要有以下几个方面的考虑.

功能简单:目前主要构想通过门磁传感器来检测冰箱门是否长时间未关闭 而产生警报

物料简单:目前市面上可以各种门磁提供选择

开发简单:目前门磁传感器主要可以通过IO来接入,不需要协议上的对接,这样可以大程度上减少前期的开发时间

功能构想

冰箱门磁传感器主要作为一个低功耗传感器,使用ESP8266开发.功能非常简单.

接入三个门磁传感器,对应冰箱的三个门,当冰箱门被打开时,唤醒单片机,上报触发属性,并开始计时.如果规定时间内没有关闭的话,将会上报警告.

该警告会触发智能家居系统的警报器发出响声,并将警告推送到小程序

物料以及代码

单片机:ESP8266

SDK:ESP8266_RTOS_SDK

门磁:MC-38 单价3.5

原理图

待定

物模型

{
    "profile": {
        "productFatherID": 2345,
        "productID": 1007,
        "productSubID": 3,
        "productName":"门磁传感器"
    },
    "nature":{
        "Name":null,
        "productUUID":null,
        "location":null
    },
    "properties": [
        {
            "identifier": "door1_onoff",
            "name": "door1_onoff",
            "accessMode": "r",
            "required": true,
            "dataType": {
                "type": "bool",
                "specs": {
                    "0": 0,
                    "1": 1
                }
            }
        },
        {
            "identifier": "door2_onoff",
            "name": "door2_onoff",
            "accessMode": "r",
            "required": true,
            "dataType": {
                "type": "bool",
                "specs": {
                    "0": 0,
                    "1": 1
                }
            }
        },
        {
            "identifier": "door3_onoff",
            "name": "door3_onoff",
            "accessMode": "r",
            "required": true,
            "dataType": {
                "type": "bool",
                "specs": {
                    "0": 0,
                    "1": 1
                }
            }
        }
    ],
    "events": [
        {
            "identifier": "door_open_alarm_event",
            "name": "door_open_alarm_event",
            "desc": "开门超时警告",
            "type": "error。",
            "required": true,
            "outputData": [
                {
                    "identifier": "alarm",
                    "name": "alarm",
                    "dataType": {
                        "type": "bool",
                        "specs": {
                            "0": true,
                            "1": false
                        }
                    }
                }
            ],
            "method": null
        }
    ],
    "services": [
        {
            "identifier": "set_heartbeat_time_services",
            "name": "set_heartbeat_time_services",
            "desc": "设置上传心跳包的时间",
            "required": true,
            "callType": "sync",
            "inputData": [
                {
                    "identifier": "set_heartbeat_time_s",
                    "name": "set_heartbeat_time_services",
                    "dataType": {
                        "type": "int",
                        "specs": {
                            "min": 5,
                            "max": 60,
                            "unit": null,
                            "unitName": "s",
                            "step": 1
                        }
                    }
                }
            ],
            "outputData": null,
            "method": null
        },
        {
            "identifier": "set_door_open_alarm_time_services",
            "name": "set_door_open_alarm_time_services",
            "desc": "设置打开超时时间",
            "required": true,
            "callType": "sync",
            "inputData": [
                {
                    "identifier": "set_door_open_alarm_time_s",
                    "name": "set_door_open_alarm_time_s",
                    "dataType": {
                        "type": "int",
                        "specs": {
                            "min": 10,
                            "max": 300,
                            "unit": null,
                            "unitName": "s",
                            "step": 1
                        }
                    }
                }
            ],
            "outputData": null,
            "method": null
        }
    ]
}

实物

  • 8
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值