I have a 3' (1 meter) tall plastic gate around my yard. I would like to automatically close it with my Arduino or Raspberry Pi. Not by remote control - I just want it to detect that the gate is open, wait a few seconds, then close it.

I figure I need 2 things:

  1. A sensor to let the Arduino know if the gate is open or closed
  2. A mechanism whereby the Arduino can close the gate.

I feel good about my ability to find and implement #1, but I'm not at all sure about #2.

The gates curently use this kind of latch:

enter image description here

I figure to force-close it the mechanism would need a fair amount of force (I'm not sure how to measure or quantify this). OTOH to close it by first pulling back the latch, then pushing it closed and releasing latch seems like it would be much more complicated (?).

I'm also open to some different sort of latch to work with the robotic closer. Maybe some magnetic latch would work, but it would have to be strong enough to keep my 25lb Sheltie dog from opening it.

1 Answer 1


The thing you you are looking for is called a Linear Actuator http://amzn.to/2uWRIjV

Depending on the strength of linear actuator you get, you might not even need a latch. You can have the Arduino power the linear actuator until it senses the door fully closed or open. When it is not powered it will hold its position.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.