Difference between revisions of "Using a relay for motor control"
(Created page with "===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...") |
|||
Line 14: | Line 14: | ||
Wiring your relay can be done like this: | Wiring your relay can be done like this: | ||
− | [[File:How-To-Use-A-Relay-With-Arduino.jpg|300px] | + | [[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: | There are three pins on the board that allow you to connect the relay board to your Arduino. These should be connected as follows: |
Revision as of 16:27, 12 July 2024
=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:
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