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;
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:
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 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.
Ce commentaire a été supprimé par un administrateur du blog.
RépondreSupprimerIt'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épondreSupprimerCe commentaire a été supprimé par un administrateur du blog.
RépondreSupprimer