I have seen many hacks about remote triggering automatic gate openers (wifi, bluetooth, whatever-wireless-protocol-connected). But, correct me if I am wrong, I cannot find any open source hardware project about a controller board for a typical 2 motors configuration usually found in a lot of houses like the one I live in.
Finally, after burning the existing controller board delivered with the (proprietary) automatic gates (silly me), I decided to design my own board and make it OSHW (and software).
It is a way for me to learn a few things I have in minds since quite a while: kicad software, decent power switching motor H-bridge.
System design document:
Here are the features that I need to make an automatic gate opener to work for a dual arm entrance gate:
- 2x H-brige for 2 DC motors (24V like most of the automatic systems). The motor-controlled arm opens and closes, so each motor must rotate in both directions.
- a current monitoring device for each H-bridge to detect the limit of each gate (fully open and fully close). It is similar to a electric car window device: when a peak current is detected, controller stops the motor. An overcurrent condition may be caused by an obstacle (cars, children, ...) during an opening or closing movement, stop the gate has to stop to be secure.
- acceleration-controlled start and stop: to prevent too much inrush current, the motor has to follow an acceleration curve to prevent inrush current during the start or stop phase. Moreover, the gate tends to oscillate if the motor starts and stop brutally. So it is better to keep those critical phases under control. The motor is connected to its DC power supply via a MOSFET. By switching its gate with a PWM output of a microcontroller, we can speed-up or slow-down the motor with the PWM duty cycle.
- My double-wing gate has a priority to respect whether it opens or closes. So the controller has to setup two different sequences for the opening or the closing process. I have to implement a delay between the first and the second arm.
- Ideally, I want my controller to be smart enough to learn (at the initialization of the board) how many time it needs to open or close. In that way, the controller can time-out if a sequence lasts too much time. It should also report some issue. This "smart" feature should also determine the delay beetween each arm and the speed of the motor (it must slow down in order not to bounce againt the mechanical limit of the arm).
- Most of the automatic gate controller have an awful human-machine interface: if you have more that a few leds and push-buttons, your controller must be very pricy. So I'd like to implement a wizard interface to initialize the system. There are a few steps that has to be humanly assisted to setup the controller for your particular needs. Let's make them understandable, at least by me, and preferably to my mother also. It could be as simple as a USB cable to a terminal program that writes, in plain english text, what you have to do and what the controller is actually doing. Not pricy at all, but way better than morse code on 2 or 3 leds (I wish I could decode Morse code too, but it is another story).
- HF remote control, because I am lazy :-)
- rfid reader in case the remote control battery fails
- dry-contact input to add a push button, a mechanical key, ...
- I want a gateway to a computer board (like a raspberry pi or another SBC computer). Well, I don't need that, but I am miserable and with all that Internet of Things thing, I feel it is mandatory these days to have a wifi controlled gate opener ;-) More seriously, it is nice to log unwanted events in case of something goes wrong and I want to keep the system open(!) for future features like a video intercom.