Using a relay for motor control
=Using a relay for motor control
Relays are versatile electronic switches that can power on and off many devices. Here we will discuss a simple circuit to turn on and off your DC motor. In this example, we will use a Arduino UNO, but any microcontroller that outputs 5V on its digital pins will work. What you will need is the following:
1 x Arduino UNO (or other microcontroller) 1 x 5V relay board 1 x A dc motor 3 x jumper cables
Wiring your motor with a relay
Wiring your relay can be done like this:
[[File:How-To-Use-A-Relay-With-Arduino.jpg|300px]
There are three pins on the board that allow you to connect the relay board to your Arduino. These should be connected as follows:
Arduino -> Relay Board
5V -> VCC GND -> GND D2 -> SIG/IN
Now let's connect the motor to the relay. First connect the ground (-) of the power supply directly to the motor. The connect your power