A few years ago I bought a brand new swing gate controller from Mighty Mule. It would never stop the gate in the same place, leaving a big gap for my dogs to escape. Mighty Mule's tech support tried to tell me that 12.8 Volts from my brand new battery wasn't enough. I angrily cut their controller off of the actuator, threw it in the trash and built my own. This is an updated version that works really nicely. It uses a built in NRF24L02-PA radio module with a custom built remote controller. Both the controller and the remote use and embedded Atmel 328PB micro controller as the brains. The gate controller has a built in DC-DC converter that acts as a battery charger. The power input has a bridge rectifier, so the input voltage can be anywhere from about 16 - 36 volts AC or DC.
You will need two limit switches to detect when your gate is open and closed. I used my Mighty Mule actuator arm, but I think any 12 volt linear actuator that can handle the weight of your gate would work just fine. I've never tested this controller with a slide gate, but if it uses 12 volts and has limit switches, that would probably work as well.
Radio and remote control:
The radio is not actually an NRF24L01. Instead I prefer to use THESE radios. They are basically the same as the NRF24L01, but better. The quality is really consistent and they are available in a surface mount package. They are fully compatible with the RF24 library. The remote control is a little PCB with another 328PB, and an AI-Thinker radio chip in a surface mount package. It is powered by 2x3V lithium coin cell batteries. You'll need the main PCB, a top and a bottom PCB and some M3 brass standoffs to hold the three layers together. The range is about 250 feet through trees and cars!
I added a total of 6 buttons to the remote. I prefer to have 3 separate buttons for open, close and stop. You can change the code to use just one single button. I also wanted to control my garage with the same remote, so I made a simple PCB with a radio and a relay that fits in the same spot in my garage door opener as it's original radio.
Embedded micro controller
Instead of using an Arduino, I prefer to use just the main chip in the Arduino Uno and Nano, the 328P. It only costs about $2.50. I like the 328PB variant over the 328P that's used in the Arduino Uno because it's got two more GPIO pins, and it's about $.50 cheaper. To flash the firmware, you will need to use another Arduino Uno or Nano connected to the controller's programming port. In the Arduino IDE under example sketches, open the sketch called "ArduinoISP." In that sketch is wiring instructions. You will need to use a Dupont cable to connect a separate Uno to the gate controller. If you choose to use the 328PB chip, you'll need Mini Core third party board installed in your Arduino IDE. Even if you do use the 328P chip, you will need to use Mini Core, because I did not add a crystal to the board layout. With Mini Core, you can select the 328XX's internal crystal instead of using the external 16Mhz crystal that the Arduino IDE normally selects. With the Mini Core board installed in the Arduino IDE, you can select the crystal under the tools menu.
A garage door opener too
Also in the files is a simple control board for a garage door opener controller. I wanted to be able to open my garage door with the same remote, so I put this simple board together. It's just a receiver that closes a contact that's wired in parallel with the interior garage door button. There's no encryption, so you may want to consider that before using this to control your garage door. My dogs do a fine job of fending off intruders so I'm not very worried about encryption.
Building it yourself:
I made the controller with all surface mount parts so that it can be ordered assembled, or soldered with soldering paste and a stencil. The only through hole parts are the relays and the screw terminals. In the files section, you will find...
Read more »
Ian Dunn