Arduino Automatic Gate Controller - Coding Advice

Hi Guys/Gals,

I am building a gate controller to replace a Liftmaster circuit board that has been fried. I have the gate arm, the batteries, the AC to DC converter already, so just need to remove the gate circuit board and replace it with the arduino mega and relay board. In fact, it is pretty much there, but it would be great to see if anyone else is interested in checking my code to tell me where I am being stupid.

The whole principal of the controller is that to get to the closing position, it waits for a gate arm switch to close, and then uses a Hall Sensor to count the number of revolutions after the switch is closed. Once the preset closing revolutions are reached, the gate should know that it is closed. The same principal is used for the gate opening.

There is loads more functionality in there, such as delay timers, force sensors, disgnostic LEDs and "Learning Mode".

The specific problem that I have is the sketch size, and it would be great for some good coding advice on how to reduce this. Also, the main bug that I have is that it appears to be missing Hall Sensor commands, which means that the gate doesn't always open/close to the correct predefined position.

Now it is really hard for anyone to test this out without having the shield, the relay board and the gate arm, but I am wondering if anyone is willing to double check my code and help me out with this.

You can see a picture of the shield that I have built, and I have shown how this is connected to the external components.

Is there anyone out there that would be interested in reviewing my code? It is quite lengthy!

hey!
sure bud, I will take a look at your code. Just sent me it via private mesagge, And I'll have a look at it!

kind regards,
-Goldfile

Hi LeeD

I was looking at trying to create the same as my gate motor has blown and the cost of a new one is enormous. Would you be so kind to share the code with me please?

Hello LeeD I'm a newbe. I'm trying to replace my mighty mule circuit board on my gate. It sounds like it
works just like yours. Would you please share the coding with me.

Thanks
Don

Based on my use of a Mighty Mule double gate, I know the controller tests for the gate being closed before opening the gate. The microswitch actuator arm got grease on the tip and when the weather was cold, held the switch from actuating. When the sun warmed the gate arm, it worked fine. finally found the problem after a long search. I am sure it a safety feature.

Paul

Hi Lee

I've had a little to do with the commercial industry doors as well as gates. Early (and many hydraulic) systems just use timers and/or current sensing, some just timers. Position encoders, hall effect or more commonly light pulse are great except that every now and then they either lose steps or change slightly. Most systems have some way of recalibrating internally to compensate.

Any chance I could look at your code?

Cheers

Matthew

Any way i could get a look at that code as well? Im trying to build a 12vdc contoller for a gate with a blown board myself and it would help me out alot because im such a noob to programming its sad.

tbmkrmrkm, See that you have had problems with your gate controller. Same here, have changed control board in the mighty mule 500 twice. Cant keep changing boards. Could you share with me your thinking and how and what you did with Arduino to get up and going again. I have no exp with this but am a would like to see if I could do this

Sorry I know this is an old post, but did anyone ever get the code for this? I am working on a similar project for work and would be good to have somewhere to start..

Thanks