Arduino swing gate opener


  • Gate opener motor control
  • Posts navigation
  • Automatic Door Opener using Arduino and PIR Sensor
  • How to solve the interference of automatic gates
  • Justin’s Adventures with the Gate Controller
  • DIY Chicken Coop Door Opener Arduino Solar Sun Sensor
  • Gate opener motor control

    With these limitations in mind, I started to think about possible solutions. When you push the button, it acts like one of the transmitters and causes the gate to cycle open or close. WiFi Interface? Since I actually get a decent WiFi signal everywhere on the property including all the way out at the front gate , the second thing I did was to check to see if there is a WiFi interface available for the gate controller.

    Build a WiFi Interface? After looking at the list of accessories and their installation instructions, I started to think about building a WiFi interface. My first approach was to sacrifice one of the keychain clicker transmitters, where I could simply bypass the pushbutton switch with a relay. This approach had some down sides: The transmitter runs off of a 12V camera battery, and would need to be mounted within about 20 feet of the gate controller in order to operate.

    Fortunately, the gate controller board is very well documented. Each pin is labeled. This would allow the user to open or close the gate. Solution Design 4. The reason for this, is because you still need to be able to operate the gate during a power failure. I want my solution to run off of the same battery for the same reason. Pi vs. Arduino Raspberry Pi and Arduino are the two leading single-board solutions for hobbyist, embedded electronic applications. Arduino is more of a programmable controller, where the Pi is a full-blown computer with programmable IO pins.

    Both have an inexpensive, small-form-factor version. It also means using relays for the control pins on the gate controller, which operate at 12V and would fry the Pi. The Arduino is basically meant to be a device, and that means no native WiFi support. Although there are addon boards for WiFi support, doing anything beyond a simple socket listener would probably require extensive coding, and a true server interface would be out of the question.

    Conversely, the Pi Zero W includes on-board WiFi support, and the Pi is a full-blown computer, capable of supporting a more comprehensive range of server services, such as SSH and Apache. So the choice was clear. On the Pi, I would easily be able to serve up a simple web interface, and perform remote administration via SSH.

    As a bonus, the Pi Zero W has a camera interface, and integrating a camera in to the solution means that the user can also see who is at the gate before they open it — a valuable safety feature to have. The Pi boots and runs from a micro-SD card.

    Using a slightly beefier memory card would allow me to store video from the camera, just like a DVR system. Software A simple web interface would allow anyone on the property to view the camera or operate the gate from a phone or laptop. For the back end, rather than have a mashup of PHP shelling out to call Python, I opted for WiringPi , which is already built in to Raspbian, and provides the gpio command-line tool.

    PHP calls a handful of shell scripts, which then use the gpio command to operate the gpio pins. To drive the camera, I opted for Motion , which is a simple event-driven webcam interface and controller. I was also able to write a simple media server using PHP, so that you can view videos and stills recorded by Motion. Media Server: A list of dates is listed on the left, and the hour of the day is listed across the top.

    Clicking on a specific file opens it in a new browser tab: 5. Putting it All Together I mounted the camera on top of a 6ft pole next to the gate. This converter worked really well over a range of voltages.

    On my test bench, I had it connected to a PC power supply that was putting out about The 12V terminals are hard-soldered, and I used the two little snippets of blue jacketing top-middle to cover the two solder points. Pi Zero W. Rather than using the header, I hard-soldered wires to the pins I needed. Each of two 5V relays.

    Those two heat sinks are attached to each of the LED infrared flood lights. I cut a rectangle in the enclosure, then used epoxy to insert a clear plastic cover, so that the enclosure remains completely waterproof.

    Here is a shot of the gate controller box: I had to replace the battery connectors, which were worn and rusted. This shot was taken before I connected the 12V power supply directly to the battery connectors.

    Rather than use a separate com for each of the control pins, I shared one com connection and bridged it internal to my WiFi interface. Additional Pictures and To-Do [Added: ] 6. Additional Pictures I drilled a small hole through the bottom of the controller box for the CAT5 solid-core cable that I used for my bus cable.

    This picture was taken after I installed new battery terminals. Orange-white is com mon. Internal to the wifi interface, orange-white is bridged to the com pin of the cycle relay.

    The wifi interface in its IP65 enclosure. I used a piece of CAT5 solid-core as a bus cable. The two infrared illuminators left and right are visible next to the camera center 6. To-Do List I had a failure condition, where the linux kernel apparently continued to function, but the wifi interface disconnected and failed to reconnect. A simple script will ping the gateway once per hour and reboot if no reply is received. A Normally-Closed NC pushbutton switch will be installed behind one of the rubber grommets, allowing a manual reset without disassembly.

    Pushing the switch will interrupt the normally-closed positive lead to the battery, triggering a power-off and reboot once the switch is released. The IR illuminators bounce off the acrylic lens, making true night vision impossible. I will install a baffle around the camera lens, blocking out the reflection from the IR illuminators. This project worked so well as a wifi camera, that I plan to add several more throughout the property. Currently, the housing is zip-tied to the T-post, but I intend to install proper brackets, allowing the camera angle to be adjusted.

    Posts navigation

    Ruppert Tired of closing and opening your chickens? Then you can buy something like this automatic coop door. They have certainly come down in price and there are now a few competitors available.

    You would have a warranty to go to if something breaks and instructions to reference if needed. The most expensive part of ANY door opening project is the linear actuator. The rest of the equipment is quite inexpensive and can be adapted to a wide variety of doors, whether for chickens, humans, shed, garage, platforms, or shade clothes for a boat. An easily adaptable and well documented DIY Chicken coop door. It can be run from solar power or made from a variety of scrap parts.

    Details below. The longer the length or the stronger, the more expensive. Arduino Chicken Door Instructions I spent a lot of time thinking about the design of this because I wanted the whole setup to run from a single 5V 2 amp old cell phone charger Notes on solar below. I was very excited when I was able to prove that the 12V linear actuator would run albeit slowly on a single 4. This prompted some cutting of USB wires and proof that I could keep the motor running while maintaining power to the arduino with the old charger.

    Step 1: Wiring the motor relays Physical Wiring of Double Relay block to reverse polarity of motor wires. Both blocks off or Both relays on causes no action.

    Turning One block on or the other will move the motor forward open the door or reverse close the door. More importantly, when the relay is deactivated, the motor will NOT reverse its direction — This is very important for power saving since you do not need to keep the relay active to hold the door open or closed. More detailed wiring diagram of Double relay block. The feed voltage for the relays can be up to 15 amps at V if you are going to adapt this tutorial to a higher power linear actuator for a bigger door, trailer lift, or something else like turning on a pump, lightbulb, heater, etc.

    If you use a voltage other than 5V, you will need a step down transformer in the list above to step down the voltage to 5V DC for the Arduino. Arduino reads the signal voltage and turns it into a number our code can use to decide whether to open or close the door. D2 — Signal to close one of the relays D4 — Other signal to close the other relay. I changed the design of my relay block to accommodate this and it ended up being much better for power saving.

    Cut the photocell off the board and extend the wires long enough that you will be able to put the sensor through a hole in the coop wall to test the light. Some photocell boards have a sensitivity adjustment screw, you may need to adjust this during your testing as well as the lightThreshold variable in the code. Unfinished still needs tape or solder example of connecting power supply wires to common connections.

    The skinny black and red wires from the top come from a cut USB cable plugged into a spare 2A phone charger, The three sets of Black and Red Yes one is orange, give me a break!

    The connections here are temporary for testing, but a bit of solder and electrical tape would secure these connections well. Copy and paste the code below and plug in your Arduino to your computer. Click Compile then click upload. If you encounter an error and it is your first time programming an Arduino, here are some helpful hints. The Port will be dependent on your system, but should be detected automatically. Some knockoffs require a special driver be installed, but they usually come with the driver you will need.

    Each count is 8s of sleeping. Once you confirm that the door is working as expected, change the number back to so that power is saved and the arduino only wakes every half an hour to check the light. ANY changes you make to the code must be Compiled and uploaded until you are done testing. I used electrical tape to hold the relays together. Coming out the hole in the bottom is the USB cable from my power supply, the wires for the linear actuator motor, and the two wires from the photocell I put through the wall.

    A good cover would make this quite weather proof. Keep the top hole sealed! Other Final Step: Make a door. This is actually optional as it depends on your coop.

    If you have a good free swinging door on your coop already, you can attach the linear actuator to it. These actuators are very strong. It takes some experimentation to decide where to put the brackets.

    I chose to make a separate door that my wife and kids would be able to go in and out of as they please. In the video I had not cut out the wall yet because I want to prove it worked first. Made from scrap wood. You could attach the actuator to any swing or linear door if it is smooth moving, but you may want to see the note in the optional section about an override button so you can get in if needed.

    Swing doors are preferable because you can attach closer to the hinge which will open the door wider. Note the attachment points as an example. You can see my photosensor placement at the bottom left of the electrical box. The other two wires are the power supply and the motor power cable from the relay block.

    Attach one wire from the button to the ground source and the other end to the relay IN port. Do not disconnect the wire from the arduino. Holding the button down will manually bypass the arduino and power the open circuit. We actually used the led under cabinet lights in the kitchen that light up purple so we know it was the coop and the chickens are safe or out for the day.

    This one has two USB ports you could plug and play with the design I made above. The Arduino spends most of the day sleeping and no Relays remain activated at any time, so it is configured to be very low power. The charge controller I linked to above also solves the problem on stepping down the voltage since it has 5V ports on it already. You could also hook the relay block directly the battery power to make the motor work much more quickly.

    Conclusion — Thoughts You can use this same set up to open any door, put up a boat canopy, etc. All you would need is a set of relays and a big enough power supply, the brains the Arduino and code would not be changed much I hope this gets a good reception online as I had a lot of fun building and sharing this DIY Chicken Coop Sun Light Sensing Door.

    I know there is still a lot of variability in each application, but I hope that I have inspired some of you become Makers! Please leave a comment below if you have an idea for another arduino project you would like to see!

    Ah yes, I am also supposed to tell you that the Amazon links included in this article are affiliate links. This does not change the price for you in any way, BUT if you make a purchase within 24 hours of clicking my link, I get a small percentage of Amazon.

    That percentage helps me to run this site and fund future projects. I thank you for using the links!

    Automatic Door Opener using Arduino and PIR Sensor

    The feed voltage for the relays can be up to 15 amps at V if you are going to adapt this tutorial to a higher power linear actuator for a bigger door, trailer lift, or something else like turning on a pump, lightbulb, heater, etc. If you use a voltage other than 5V, you will need a step down transformer in the list above to step down the voltage to 5V DC for the Arduino. Arduino reads the signal voltage and turns it into a number our code can use to decide whether to open or close the door.

    D2 — Signal to close one of the relays D4 — Other signal to close the other relay. I changed the design of my relay block to accommodate this and it ended up being much better for power saving.

    Cut the photocell off the board and extend the wires long enough that you will be able to put the sensor through a hole in the coop wall to test the light.

    How to solve the interference of automatic gates

    Some photocell boards have a sensitivity adjustment screw, you may need to adjust this during your testing as well as the lightThreshold variable in the code.

    Unfinished still needs tape or solder example of connecting power supply wires to common connections. The skinny black and red wires from the top come from a cut USB cable plugged into a spare 2A phone charger, The three sets of Black and Red Yes one is orange, give me a break!

    The connections here are temporary for testing, but a bit of solder and electrical tape would secure these connections well. Copy and paste the code below and plug in your Arduino to your computer.

    Click Compile then click upload. If you encounter an error and it is your first time programming an Arduino, here are some helpful hints. The Port will be dependent on your system, but should be detected automatically. Some knockoffs require a special driver be installed, but they usually come with the driver you will need. Each count is 8s of sleeping. Once you confirm that the door is working as expected, change the number back to so that power is saved and the arduino only wakes every half an hour to check the light.

    ANY changes you make to the code must be Compiled and uploaded until you are done testing. I used electrical tape to hold the relays together. Coming out the hole in the bottom is the USB cable from my power supply, the wires for the linear actuator motor, and the two wires from the photocell I put through the wall. A good cover would make this quite weather proof. Keep the top hole sealed! Other Final Step: Make a door. This is actually optional as it depends on your coop.

    If you have a good free swinging door on your coop already, you can attach the linear actuator to it. These actuators are very strong. It takes some experimentation to decide where to put the brackets. I chose to make a separate door that my wife and kids would be able to go in and out of as they please.

    In the video I had not cut out the wall yet because I want to prove it worked first. Made from scrap wood. You could attach the actuator to any swing or linear door if it is smooth moving, but you may want to see the note in the optional section about an override button so you can get in if needed. Swing doors are preferable because you can attach closer to the hinge which will open the door wider.

    Justin’s Adventures with the Gate Controller

    Note the attachment points as an example. You can see my photosensor placement at the bottom left of the electrical box.

    Other causes that can limit the wave are the presence of telephone repeaters and tower cranes on construction sites. The interference problem not only causes the automatic gate to not respond correctly following the command, but in many cases, by continuously receiving signals of the same Automatic problem gate: the solution to interference When the automatic gate does not open and does not close correctly, there is always an interference problem.

    Are you thinking of removing the automation for gates and giving up the convenient opening via radio control, why are you tired of this discomfort? Do not make this mistake because it is very easy to solve the problem of interference with automatic gates.

    DIY Chicken Coop Door Opener Arduino Solar Sun Sensor

    So what to do when the automatic gate has problems? Simple, just change the transmission frequency between the transmitter, in this case the radio control, and the receiver, that is the frequency card of the gate operator.

    It is therefore necessary to move from the In the condition in which an interference on the automatic gates disturbs the opening and closing mechanism, an automation card must be installed that receives the Once this step has been carried out correctly, the entire opening and closing system of the automatic gate will no longer have any interference problems.

    VDS Automation: our control devices For each type of frequency VDS Automation has created a series of control devices that adapt to the different types of automatic gate, offering the possibility of convenient opening and closing of your automatic gate. Our production of control equipment is divided into: Control equipment for swing gate automations; Control equipment for automations with sliding doors, barriers and overhead doors; Control equipment for shutters; Control equipment for towing and tilting automations; Accessories for control equipment such as radio receivers and modules; Loops and detectors for the correct management of automation; Transmitters and programmers for automation; Transformers for gate automation.

    All VDS Automation equipment are designed and built to be highly performing and specific for each type of gate automation. Our company has been operating exclusively in the gate automation sector for over thirty years, producing all the mechanisms and accessories that are essential for the proper functioning of the entire system.


    thoughts on “Arduino swing gate opener

    • 30.07.2021 at 20:57
      Permalink

      I consider, that you are not right. I am assured. I can defend the position. Write to me in PM.

      Reply
    • 01.08.2021 at 06:48
      Permalink

      Just that is necessary, I will participate.

      Reply
    • 07.08.2021 at 01:44
      Permalink

      I am final, I am sorry, but you could not give little bit more information.

      Reply

    Leave a Reply

    Your email address will not be published. Required fields are marked *