In: Electrical Engineering
How do you connect a relay switch to a servo motor to turn it on/off? (Schematic)
Figure shows the schematic of the relay connection for controlling the DC motor.
Same circuit can be used for turning servomotor on/off through relay as shown.
Replace DC motor of the circuit with servo motor as connections shown in the figure and directly connect the signal pin of servo motor with the Arduino pin on which controlling signal is generated for controlling servo.
Along with relay you will need 1N4007 PN Junction Diode, 2N2222 NPN Transistor, 1KΩ Resistor and push button.
Diode acts as freewheeling diode, Transistor acts as a switch for turning relay on/off, resistor is used for current limiting purpose.
As shown in the circuit, a servomotor with power supply will be connected in series between the Normally Open (NO) terminal and the Common (COMM) terminal.
A button is connected between Arduino's Pin 12 and the ground to decide when to turn on the relay and when to turn it off.
So whenever the push button is pressed arduino will detect LOW signal on pin12. This will send high singal to pin 7and trasistor will turn on. As a result, the coil is energized in the relay. Thus, the coil's moving contact, which was initially in the position Normally Closed (NC), will be attracted to the electromagnet and move to the position Normally Open (NO). This action will connect the motor with the power supply and motor will start to rotate as per control signal to the servo motor.
You can also change the way you want to turn transistor on or off in place of push button.