Git Product home page Git Product logo

sensorhub's Introduction

SensorHub

Travis build License

SensorHub is responsible for interpreting readings from multiple sensors and transmitting them via MQTT. It can serve as an example of how to solve such a problem.

Situation

In my house there are six wired sensors, including four PIR sensors and two contact sensors. They need 12V to operate and separately wires are used for the signal. The signal resistance is 4.7K ohm when inactive and 9.4K ohm when active.

Solution

I designed a PCB that supplies 12V and can accommodate an ESP32 S2 mini. The MCU delivers 3.3V to one side of the six signal lines. At the other side a voltage divider is created by placing a 4.7K ohm resistor between the signal output and ground. Thus theoretically 1.65V will be measured when inactive and 1.1V when active.

Measurements are taken at a rate of 25 per second, and the values are smoothed and evaluated. Any change in status is sent via MQTT. The current status is repeated at least every five minutes.

A total of eight LEDs can be controlled, with two of them reserved for signaling connection and MQTT traffic, while the remaining six LEDs can be utilized to display the status of the sensors.

sensorhub's People

Contributors

bolukan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.