Experiment Title: 2.3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Experiment Title : 2.

Student Name: Riya Kumari UID: 21BCS5948


Branch: CSE-IOT Section/Group: BIT-108/B
Semester: 1st Date of Performance: 10/12/21
Subject Name: BEEE(lab) Subject Code: 21ELH-101

1. Aim:

To control the speed of dc motor using potentiometer

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.

7. Learning outcomes (What I have learnt):

• 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:

Sr. No. Parameters Marks Obtained Maximum Marks


1. Worksheet completion including writing 10
learning objectives/Outcomes.(To be
submitted at the end of the day).
2. Post Lab Quiz Result. 5
3. Student Engagement in 5
Simulation/Demonstration/Performance
and Controls/Pre-Lab Questions.
Signature of Faculty (with Date): Total Marks Obtained:

You might also like