• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Automation Projects / Automatic Sliding Gate Controller Circuit

DIY Circuits | Learn Basics | Arduino Coding

Automatic Sliding Gate Controller Circuit

Last Updated on July 22, 2025 by Swagatam 82 Comments

In this post we investigate a circuit, designed for implementing an automatic sliding gate or door action, and includes a set of features as specified in the request. The idea was suggested by Mr. Andreas.

Technical Specifications

Can you help me to design a simple sliding gate controller. How can work its like this...Press a switch and open the gate, after a minute the gate close again.

If during the closing someone passing in front of the gate then the gate opens again(with the help of infrared cell??).

Reaching at the end(Stopping) during opening and closing its made by magnetic or limit switch.. Note this system must work on 24V.

Many thanks,

Andreas Christodolou

The Design

The proposed automatic sliding gate controller circuit may be understood as explained in the following points:

Referring to the circuit below, it can be divided into three stages: the set-reset latch using T1/T2, the monostable timer using IC 4060 and the IR interceptor using T3/T5.

Note:

  1. Please disconnect the 100k below C1 from the ground, and connect it on C1 positive terminal, meaning the 100k should be connected right across C1 terminals and nowhere else.
  2. R6 needs to be calculated for getting a 1 minute delay before the gate initiates a reverse closing motion

Let's assume the gate to be in the "closed" position with Reed#2 actuated by the relevant gate magnet.

This ensures pin#12 of the IC 4060 to be rendered high and the IC stays inactive (pin#3 switched OFF).

In the above scenario, the relay#1 is already OFF, with its N/C position closed (because T1/T2 are OFF), and T4  is also OFF due to the absence of a base drive, which implies relay#2 is OFF and in the N/C position.

With relay#2 in N/C, the motor is switched off due to the absence of a positive link via the relay#2 N/O contact.

The entire circuit is thus in a switched OFF condition.

Now, as requested, the opening of the gate is initiated by pressing SW1 momentarily.

Pressing SW1 instantly latches T1/T2 via R4, toggling relay#1 such that its N/O contacts close, which in turn forces the motor to slide the gate towards the "open" direction.

As soon the gate slides away from its "close" position, reed#2 is released, which instantly enables the IC 4060 and it starts counting, with its pin#3 now with a logic zero.

The gate rolls on until it reaches the extreme end when the other relevant magnet fixed on the gate activates reed#1.

On activation, reed#1 pulls the base of T1 to ground via C1, breaking the latch, which in turn deactivates relay#1 and its contacts return to their N/C points.

However relay#2 still being in a switched OFF condition causes the motor to halt due to the absence of power through relay#2 (N/O) points.

In the meantime, IC 4060 completes its counting allowing a high to appear at its pin#3. (the IC now latches in this position via D2)

This immediately activates relay#2, enabling a reverse activation of the motor.

The motor starts sliding the gate towards the "close "position, and the moment it reaches the "close" end, reed#2 is activated yet again. At this position, the IC is again reset causing a no signal at its pin#3, deactivating relay#2 and....shutting off the motor. The circuit reverts to its original standby state.

Calculating the Time Delay

The universal equation for finding the timing component Rt and Ct values is:

f(osc) = 1 / 2.3 x Rt x Ct

2.3 is just a constant with regards to the ICs internal configuration.

Preventing Accidental Entry

As per the request, the circuit needs to respond to an accidental entry of an individual through the gate in the course of its closing process, in order to safeguard the individual and also the gate mechanism.

This is implemented using an infrared transmitter receiver assembly, as shown in the diagram.

D3 is a receiver IR photodiode which is kept switched ON through a perpendicular IR activated transmitter beam, focused on D3, the beam position is supposed to be in a straight line along the gate's sliding action.

As long as D3 stays actuated, T3/T5 are unable to conduct, however in the presence of an individual who may be trying to make a quick entry across the gate while its closing, would in the course obstruct the IR beam, triggering T3/T5 which in turn would conduct and disable T4, and relay#2.

With relay#2 disabled, the door would instantly stop its closing motion and halt on the spot until the individual has completely crossed the restricted line of action.

For the sake of simplicity, a momentary halting of the gate looks more appropriate, instead of enforcing a reverse opening action which might unnecessarily delay the process.

Using a Transistorized Timer Stage

The above could be much simplified by replacing the IC 4060 timer stage with transistorized delay ON timer, and by removing the IR detector stage. The complete circuit diagram could be witnessed below:

The IR Transmitter Stage

The IR transmitter which is supposed to focus a beam on D3 may be built using the following circuit:

You'll also like:

  • 25 02 pumpWater/Coffee Dispenser Motor Circuit
  • incubator layoutIncubator Using Arduino with Automatic Temperature and Humidity control
  • line follower diagramLine Follower Robot Circuit without Microcontroller or Arduino
  • lightdependantdoorlockHen House Automatic Door Controller Circuit

Filed Under: Automation Projects Tagged With: Automatic, Controller, Gate, Sliding

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

Previous Post: « Automatic Bathroom/Toilet Engage Indicator Circuit
Next Post: Sine wave PWM (SPWM) Circuit using Opamp »

Reader Interactions

Comments

Khalid Kondo says:
June 11, 2016 at 6:14 pm

hi swagatam, plz, can you help me to design a simple circuit as a switch to operate a door automatically using two gates, OR-gate and AND-gate?

Reply
bursach says:
April 24, 2016 at 9:33 am

Ok Swagatam,thanks!

Reply
bursach says:
April 23, 2016 at 1:21 pm

Hello Swagatam, one last question about the circuit. C3 condenser is it electrolytic? If it is, where is minus? To pin 9 or to R6?
Thanks in advance!

Reply
Swagatam says:
April 24, 2016 at 5:20 am

Hello bursach, C3 should be a non-polar…sorry, the 100uF is wrongly printed actually it can be a 1uF capacitor

Reply
ghotra595 says:
February 10, 2016 at 12:24 pm

Dear sir what's value of R6

Reply
Swagatam says:
February 11, 2016 at 4:30 am

it decides the time delay for the gate return from the other end.

needs to calculated as per requirement.

Reply
bursach says:
October 1, 2015 at 6:25 am

Hello Swagatam!
About this circuit, SW is a switch? Not pushbutton? Because if I want to open gate again from previous state, I have to SW to switch off first then SW to switch it on again to go for this automatic procedure open-timer-close.
Is it possible to modifie this circuit to combine in wireless opening (exmp. Remote car central locking system with remote controlers)? Also it can be added a small pwm circuits with separate timer to control speed of motor (two speeds, faster in first motion , and slower when gate is near limit switch in case of inertion force which can cause damage to limit switches). Thank you in advance!

Reply
bursach says:
October 27, 2015 at 1:12 pm

Ok, thanks!

Reply
Swagatam says:
October 27, 2015 at 1:08 pm

Yes T3 is an NPN, and by mistake it's indicated as BC557…actually it should be BC547…i'll correct it soon

resistor below C1 is required…it could be a 100k resistor

Reply
bursach says:
October 27, 2015 at 7:32 am

Swagatam, sorry for annoyance, this T3 transistor suppose it is NPN? Because its mark is BC557 and it is PNP. And that resistor without a value, below C1 in the diagram, should it be there ?

Reply
Swagatam says:
October 3, 2015 at 9:10 am

again that would be a problem because if the PWM was high then the gate would reach the end quickly and wait for the timer for too long until closed

one way to solve this is perhaps by ensuring that the timer begins counting only once reed#1 closes, that is when the gate reaches the fully open end

Reply
bursach says:
October 3, 2015 at 6:21 am

Correct, that would be a problem. But if we increase a time counting for closing it will be possible in some way…..

Reply
Swagatam says:
October 2, 2015 at 4:15 pm

the above circuit is restricted to work with a definite time interval, if a PWM is used and the gate movement is made too slow (with PWM) then it might interfere with the timer set period and the gate might reverse in the middle of its sliding procedure without reaching the fully open position.

Reply
bursach says:
October 2, 2015 at 8:16 am

No, I would like to control gate with addition to remote control with your circuit. Your circuit will not be removed. Only PWM circuit is separate from this ciruit and its part is to control motor speed when is necessery. We can add a another small timer circuit it will be on when motor is started and its purpose is only for making slow speed when it is needed (timer determine).
I will try to make a circuit what I mean, but also need a this feature of toggling a relay for a second you mentioned.

Reply
Swagatam says:
October 2, 2015 at 7:16 am

In the type of remote control that you are referring to, we have a feature in those where the relay can be configured to toggle only for a second, by appropriately tweaking the built-in selector switch, so that won't be a problem.

Do you mean to say that you want to control the gate with remote and PWM only…and eliminate the timer section? Yes it's possible if the timer section is removed

Because if the timer section is included then the PWM delay can interfere and cause unpredictable problems.

Reply
bursach says:
October 1, 2015 at 4:14 pm

Swagatam ,thank you for your fast response!
About central lock, sorry for confuse question. I meant only wireless control board with remonte control without central locking motors. Wireless control board has 4 relays, so when push the remote control button, one of these relays is On, so this could be a problem because SW is a pushbutton not a switch.
About PWM , I was thinking for slide gate 24vdc motor and its speed in decreasing for opening or closing, to reduce inertion force of the gate moving. For example, when gate is moving and waiting to proximity to one of the Reed switch, motor is in faster speed, when is it close to Reed*about 1 meter , or less which can be programabile), PWM is active and slow speed is active till gate is activate Reed switch. I hope you understand my toughts.

Reply
Swagatam says:
October 1, 2015 at 1:47 pm

Hello bursach,

SW is a push-to-ON switch…it's not an ON/OFF switch….it will connect only when pressed and disconnect the moment it's released.

yes it can be modified as per your mentioned requirement, however a central lock is supposed to be operated with a jerk, using a motorized solenoid…..so I could not understand how a PWM circuit and a sliding procedure would help for operating it.

Reply
Samir Savani says:
July 29, 2015 at 5:47 am

ok but sir i was used try and error method and find out value of register and capacitor ar 47k variable and 25v 220 mfd and it works is it ok or not please replay
it works for 3 seconds to 20 seconds
is it harmful to my circuit?

and sir i want to use it in only night time with solar battery charger over charge protection so please suggest a required circuit

Reply
Swagatam says:
July 29, 2015 at 3:16 pm

but you said that your circuit was not switching OFF after getting triggered…this was the issue with your circuit, right?

Reply
Samir Savani says:
July 28, 2015 at 10:20 am

dear sir
i want to build a circuit for my farm to prevent it from wild animals
using laser and ldr which is riggers relay for 20 to 30 seconds and automatically resets
i want to use automated solar battery charger
i was sent you my design using 555 which was starts relay properly but not stop itself
please sent me batter circuit or do needful changes in my circuit i am eagerly waiting for your answer
my farm and crop needs your help please do needful in urgent sir

Reply
Swagatam says:
July 29, 2015 at 4:34 am

Dear Samir,

I'll do it for you, but it might take a few days times….stay tuned please

Reply
Samir Savani says:
July 25, 2015 at 5:11 am

sir please replay

Reply
Samir Savani says:
July 22, 2015 at 7:12 am

dear sir
i have a circuit which is attach
please guide me how to set relay trigger time for 20 to 30 second in this circuit
actually i want to set this circuit with my farm so we can't off it

please guide me asp

thanks in adevance
Attachments area
Preview attachment laser alarm.png
[Image]

Reply
Swagatam says:
July 22, 2015 at 9:07 am

dear samir, the image link is not working

Reply
Andreas Chris says:
July 9, 2015 at 4:24 pm

Dear Swagatam,
Almost all circuit wiring pictures are posted by the owner of this blog. Can i post some for my self, how can i do that,which type of picture and how large should be?

Reply
Swagatam says:
July 10, 2015 at 4:04 am

Dear Andreas, you can use the form that's given on the top left sidebar and post your pics, I'll check it out

Reply
Andreas Chris says:
July 8, 2015 at 3:43 pm

Thanks a lot Swagatam, reversing a single phase motor its the most easiest way, i have done this many times before. Single phace ac motors always have a capacitor with three leads. When you want to reverse its direction all you have to do its to change one of this wires. Then if your not sure refer to motor's connection box. Other than that this ac motor its allready installed and cannot change it.

Reply
Swagatam says:
July 9, 2015 at 9:37 am

Thanks Andreas, OK that means that above circuit can be used with an AC motor also, I'll leave this upto the readers to tweak the relay connections as per the motor specs and individual preferences.

Reply
Andreas Chris says:
July 7, 2015 at 8:39 pm

Dear Swagatam,
i have been waiting for the design of the sliding gate opener circuitry and im very pleased to see it posted today. Im also very glad you have some time for me and dispite your busy days you make it happen !!
Although i have some comments/corrections.
1. The motor its a 5A 220V a.c (Not a 24V d.c.) so i think it needs two relays one for the forward and another one for the reverse direction.
2. As for the IR detection there are ready made transmitter and receiver working either 12 or 24vdc and at the position of D3(BP104) diode can be used the receiver's relay output (have NO/NC) to trigger it instead.
Once again many thanks for your efforts and all the help on this blog.
Andreas

Reply
Swagatam says:
July 8, 2015 at 11:03 am

Thanks Andreas, I am glad you liked it.

I am afraid, reversing an AC motor could be a complex affair….so I think a DC motor should be preferred, the voltage rating is not an issue it can be any higher value than 24V.

yes, a ready made IR proximity sensor assembly can be used instead of building one as shown in the diagram

Reply
manjunath says:
July 7, 2015 at 3:55 pm

sir,
In the first circuit below relay seems to be not connected with diode.

Reply
Swagatam says:
July 8, 2015 at 10:57 am

thanks manjunath, you are right, I'll do the correction soon

Reply
Back to Newest

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

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

Primary Sidebar

circuit simulator image

Subscribe to get New Circuits in your Email

Categories

  • Arduino Projects (95)
  • Audio and Amplifier Projects (133)
  • Automation Projects (18)
  • Automobile Electronics (103)
  • Battery Charger Circuits (87)
  • Datasheets and Components (109)
  • Electronics Theory (149)
  • Energy from Magnets (27)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (20)
  • Health related Projects (27)
  • Home Electrical Circuits (13)
  • Indicator Circuits (16)
  • Inverter Circuits (95)
  • Lamps and Lights (159)
  • Meters and Testers (71)
  • Mini Projects (28)
  • Motor Controller (68)
  • Oscillator Circuits (28)
  • Pets and Pests (15)
  • Power Supply Circuits (91)
  • Remote Control Circuits (50)
  • Renewable Energy (12)
  • Security and Alarm (64)
  • Sensors and Detectors (106)
  • SMPS and Converters (34)
  • Solar Controller Circuits (60)
  • Temperature Controllers (43)
  • Timer and Delay Relay (49)
  • Voltage Control and Protection (42)
  • Water Controller (37)
  • Wireless Circuits (31)

Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin

Recent Comments

  • Swagatam on How to Configure Resistors, Capacitors and Transistors in Electronic Circuits
  • Win Myat Han on How to Configure Resistors, Capacitors and Transistors in Electronic Circuits
  • Swagatam on Making a Thermoelectric Generator (TEG) Circuit
  • Swagatam on EGS002 Datasheet, Circuit Diagram Explained
  • Swagatam on About Me

© 2026 · Swagatam Innovations