+21622886281
Arduino DC Motor

Controlling a DC motor with Arduino

Purpose of this tutorial:

In this tutorial we will order a DC motor by the Arduino board:

1- When we press the push button, the motor turns

2- When we release the push button, the motor stops.

Necessary components

  • Arduino UNO
  • DC moteur
  • relay
  • push button
  • connecting wires
  • test plate

Mounting

As for the assembly, we can connect

  For relay:

  • (S) pin to pin 2 of Arduino
  • (+) pin to 3.3V pin of Arduino
  • (-) pin to GND pin of Arduino
  • ON pin to 5V of Arduino

For DC motor:

  • the first terminal to COM pin of the relay
  • the second terminal to GND terminal of the Arduino

For push button:

  • the first terminal to the digital terminal N°1 of Arduino
  • the second terminal to the GND terminal of Arduino

Program

Here is the program that allows to control a DC motor by Arduino.




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top