Motor Controlled with Arduino

Motor Controlled with Arduino

A simple way to control a motor with a potentiometer and an Arduino.

  • 42,580 views
  • 26 comments
  • 99 respects

Components and supplies

About this project

About

In order to understand how MOFSETs work I hooked one up to an Arduino. It controls a motor and an LED. The speed of the motor and brightness of the LED are controlled by a potentiometer.

Demo

Code

sketch.cC/C++
sketch.c
#define MOF_PIN 6
#define POT_PIN A1

int pot = 0;

void setup() {
  pinMode(MOF_PIN, OUTPUT);
  pinMode(POT_PIN, INPUT);
  Serial.begin(9600);
}

void loop() {
  pot = analogRead(POT_PIN);
  Serial.println(pot);
  
  analogWrite(MOF_PIN, pot/4);
}

Schematics

Fritzing capture
I drew this by looking at the photo so I'm not 100% sure it's correct.
Control%20dc%20motor%20with%20arduino%20and%20pot bb
Full Fritzing file
control%20dc%20motor%20with%20arduino%20and%20pot.fzz
Wiring
Img 20140427 153858

Comments

Similar projects you might like

Bluetooth Controlled Bot (Using Adafruit L293D Motor Driver)

Project showcase by Chandran N

  • 13,992 views
  • 2 comments
  • 18 respects

Clap Controlled DC Motor

Project tutorial by Nakshatra401

  • 7,882 views
  • 1 comment
  • 12 respects

Simple Programmable Robotic Arm

Project showcase by Ryan Chan

  • 165,677 views
  • 110 comments
  • 378 respects

Temperature-controlled RGB LED

by Benjamin Larralde

  • 35,996 views
  • 9 comments
  • 47 respects

3D Printed Stepper Motor

Project tutorial by Anthony Garofalo

  • 19,303 views
  • 11 comments
  • 68 respects

Control Speed and Direction of Motor

Project in progress by ahmed soliman

  • 26,667 views
  • 6 comments
  • 34 respects
Add projectSign up / Login