In this project I utilize the power of Arduino to create a circuit to power a sliding gate. The main aim of this project is to utilize a dead sliding gate with a functioning AC motor and automate the system using an Arduino, a couple of relays, a 433MHz reciever, a 433MHz transmitter and some crafty electrical skills. The system creates a method of powering the gate's motor when required and to decide whether to open or close the gate.
The Arduino constantly listens to a set response from the transmitter, in this case it is the remote used to open or close the gate. The transmitter operates on two channels, where each channel has its on unique ID. Once this ID is recieved by the 433MHz reciever, it sends a signal to the Arduino which controls the Relays to power the motor.Methodology
Step 1 : Powering the motor
The configuration to powerthe motor is shown below. In order for the motor to move the gate in theforward(close) direction, the Main winding should be connected to the main’s power.
In order for the motor tomove in the opposite(open) direction, the Secondary winding should be connected tothe main’s power.
It is necessary to identify which wire corresponds to which winding. Usually the wires are not labelled and this can be identified with trial and error by supplying AC power to the wire.
In my case, I was working with a 220~240VAC motor. I was able to identify the Neutral wire easily as it was blue in color which is a standard color used to indicate the Neutral terminal.
Next, I connected the Live terminal to the red wire, which made the motor turn in the forward direction. This indicated that I supplied power to Main Winding of the Motor.
Note: Make sure that the starter capacitor is connected properly and functioning. This ensures that the motor has adequate starting torque.
Step 2 : Stopping the motor
The mains power isprovided to the motor through a limiter switch. As soon as the gate reaches oneend the limiter switch is triggered which opens the circuit and stops the main’s from supplyingpower to the motor.
Step 3 : Using relays to control the motor
The relay has two contactpoints; Normally open and Normally closed.
The Normally closed pathis used to power the Main winding of the motor. This was chosen to ensure thatwhen the system was reset or if something went wrong in the system, the motorwould ensure that the gate was kept closed at all times.
The Normally open path isused to power the Secondary winding of the motor. The normally open path is closed when the coil inside the relay is energized. This can be done by sending a 5V signal from the Arduino as the relays used are operating under 5V.
By using two paths topower the motor ensures that power is not provided simultaneously to the Mainand Secondary windings of the motor.
This Relay(R2) is operatedthrough pin 8 of the Arduino.
A second relay(R1) is used tobreak the circuit in order for the motor to stop if the Arduino receives thecommand from the receiver while the gate is moving.
The Arduino constantlychecks the receiver if it has received any command. Once a command is issuedthe Arduino reroutes power to the motor in order for it to close or open thegate.
The main purpose of thesecond relay is to give the system enough time to reroute the system to powerthe motor without instantly changing the direction at which the motor isturning. Once the rerouting is complete the relay switches off and power issupplied to the motor to turn in the opposite direction.
This Relay is operatedthrough pin 9 of the Arduino.Purpose of the Second Relay
If the system is halfwaythrough closing the gate and receives the command from the receiver to open thegate, the relay is activated to reroute power to the secondary winding. Sincethis happens almost instantaneously the relay is under constant pressure fromthe reverse voltage generated by the motor due to sudden seize of power ontothe main winding. Furthermore, damaging the contacts of the relay permanentlyif continuously stressed.
With the help of anadditional relay the power supply is disconnected to the motor and gives thesystem a time of 10 seconds to reroute power to the necessary windings. Thisreduces the stress on the contacts of the relay and increasing their lifetime.
Relay protection method:Suppression Capacitors
Whena DC motor is suddenly stopped a negative current loop is created by the coilof the motor, this is due to the inductive properties of a coil. However thiscan be neutralized by installing a feedback diode to provide a path for thenegative current to flow.
Whenan AC motor is suddenly stopped through a switch it creates a high voltagebuild up on the switch contacts.
Suppressioncapacitors are used to prevent the high voltage build up on the relay contactswhen the motor is told to operate in the opposite direction. This protects therelay contacts.
Step 4 : To configure the receiver
Thereceiver operates at 433 MHz, Arduino’s program is continuously looped to checkthe receiver’s signal port. Once the correct signal is received, Arduino thenactivates Relay 1(R1) in order for Relay 2(R2) to route power to the motor.
When data is sent from the transmitter it is received by the receiver in the form of an integer. In my case, using the serial monitor of the Arduino I was able to see the value the receiver was able to pick up.
The main reasons for using a higher radio frequency for communication is that the operating range is high and the signal is received by the receiver even if there are a few obstacles blocking the signal. This can only be achieved by high frequency radio waves.
In my project I was able to get a working radius of about 30ft for the system to activate.
Note: The functioning radius of the system can be expanded by a few feet by soldering a long length of wire to the Antenna port in the receiver module.