Professional Documents
Culture Documents
Experiment Title: 2.3
Experiment Title: 2.3
Experiment Title: 2.3
1. Aim:
2. Apparatus:
DC motor, Potentiometer, Arduino Uno, L293D, Breadboard, Battery, Connecting Wires
3.Theory:
Generally, DC motors rotate at a constant speed(RPM) in clockwise or anticlockwise
directions depending upon the polarity of the current that is provided to it. In this project, we
are trying to slow down or boost the speed of the motor with the help of an Arduino board.
The potentiometer that we are using is responsible for the speed of the motor. You can rotate
the potentiometer and the speed of the motor varies accordingly. The Arduino generates
control signals based on the input from the variable resistor but the motor cannot process
them directly so we are using an L298N motor driver. This driver module provides the
correct output signals so the motor can rotate perfectly.
4. Circuit Diagram:
5. Program:
#define m1 2
#define m2 3
#define m3 4
#define m4 5
int Pot=A0;
int val;
void setup()
pinMode(m1,OUTPUT);
pinMode(m2,OUTPUT);
pinMode(m3,OUTPUT);
pinMode(m4,OUTPUT);
Serial.begin(9600);
void loop()
{
val=analogRead(Pot);
val=map(val,0,1023,0,255);
Serial.println(val);
analogWrite(m1,val);
analogWrite(m3,val);
6. Result: Designing of simple DC motor control circuit using Arduino is verified after
uploading the program.
• learned how to control DC motor with an Arduino Uno and an L298N motor driver.
• used the potentiometer to control the speed of the motor.
Evaluation Grid: