Accéder au contenu principal

Garage door sensor with Arduino nano

I needed to have a way to know the state of my garage door. 

Several solutions where at my disposal so as to do that;
  • hack the existing control central to be able to know the position of the door and send the status wireless to my 433Mhz to MQTT gateway
  • add an external sensor and send the status wireless to my 433Mhz to MQTT gateway
  • One of these two options with a cable
After some investigations on the control central of my garage door I have deducted that there is no "closed" "open" contact, indeed the stop of the motor seems to be detected by the fact that it is "forcing" maybe by detecting some over current.
The sensor that I have at the bottom of this garage door is in case there is an obstacle in the course of the door. Sending a stop to the motor. Unfortunately I can't use this due to the fact it is not actionned at the end of the course.


Safety sensor of the garage door (cannot be hacked for state recognition)


I had to choose solution 2 and build an external sensor, as I had in stock a sonar and an arduino nano I took these two components to build the core of the sensor, added to that I used a 433mhz cheap emitter to send the open or close signal (which in fact are two different numerical values) due to the fact that it is easier for me than putting a long cable between my gateway and the garage door.

At final the bill of material is:
  • Arduino nano
  • Sonar HC SR04
  • 433Mhz emitter
  • 433Mhz wire antenna
  • Electrical box
As I have power supply at disposal close to the door I'm going to power the sensor with this.

I will place the sensor normal to the door, when the door is closed it will be at a distance of approximately 5cm, when it is open we will reach the maximum of the sensor. A condition statement checking this distance is making the job of saying I'm open or I'm close.

Here is the simple schematic:



Here is the program:

Here is the circuit:



And how it looks like at final:



Working perfectly with the 433Mhz gateway and OpenHAB.







Commentaires

  1. Ce commentaire a été supprimé par un administrateur du blog.

    RépondreSupprimer
  2. It's indeed important to take into account the security of the systems we are diying, thanks for the link. Regarding this garage door there is no hack of the initial system it is working off the shelf. The sensor is an add to know the state of the door not to act on it.

    RépondreSupprimer

Enregistrer un commentaire

Posts les plus consultés de ce blog

433toMQTTto433 - Bidirectional ESP8266 NodeMCU gateway between RF 433Mhz signal and MQTT

The goal  is to act as a gateway between 433Mhz sensors and a MQTT broker or between the MQTT broker and 433Mhz actuators, It enables to:
receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data publish MQTT data to a different topic related to received 433Mhz signal 
It can be an interesting part in an home automation system so as to interface sensors and actuators (wall sockets) with software like openhab.

List of compatible sensors here

The interest of putting this gateway to an ESP8266 and not on a raspberry pi is to be able to manage security actions at gateway level (power on a siren, cut power to certain devices) following RF data received by sensors without being dependent to the PI for security related actions.

[EDIT] all infos are now centralized into the github repository take a look at it you will find up to date info about OpenMQTTGateway

You need:

Software:

MosquittoArduino IDE latest version (tested ok with 1.6.10)esp8266 board added to t…

Infrared IR, 433mhz and MQTT on ESP8266 bidirectional gateway OpenMQTTGateway

Following discussions on the home assistant forum people gave me the idea to add Infrared communication to the 433mhz gateway. 

The goal is to act as a gateway between 433Mhz sensors, infrared remote controls and a MQTT broker or between the MQTT broker and 433Mhz actuators, infrared devices, It enables to:
receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data publish MQTT data to a different topic related to received 433Mhz signal receive MQTT data from a topic and send infrared signal corresponding to the received MQTT data publish MQTT data to a different topic related to received infrared signal 
It can be an interesting part in an home automation system so as to interface sensors and actuators (wall sockets), your tv, home cinema, hifi ... with software like openhab or home assistant.

List of compatible RF sensors here

[EDIT] all infos are now centralized into the github repository take a look at it you will find up to date info about OpenMQT…

433toMQTTto433 - Bidirectional Arduino gateway between RF 433Mhz signal and MQTT

The goal of the Arduino 433toMQTTto433 is to act as a gateway between 433Mhz sensors and a MQTT broker or between the MQTT broker and 433Mhz actuators, It enables to:
receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data publish MQTT data to a different topic related to received 433Mhz signal 
It can be an interesting part in an home automation system so as to interface sensors and actuators with software like openhab.

The interest of putting this gateway to an arduino and not on a raspberry pi is to be able to manage security actions at arduino level (power on a siren, cut power to certain devices) following RF data received by sensors without being dependent to the PI for security related actions.

[EDIT] all infos are now centralized into the github repository take a look at it you will find up to date info about OpenMQTTGateway

You need:
Arduino UNO W5100 Ethernet shield 433Mhz Receiver XD RF 5V and transmitter FS1000A 
Transmitter VCC must be p…