0% found this document useful (0 votes)
10 views18 pages

Speed Control of DC Motor

The document outlines the process of controlling the speed of DC motors using an Arduino microcontroller, emphasizing the use of Pulse Width Modulation (PWM) signals. It includes a methodology for connecting components, writing code, and a circuit diagram for implementation. The conclusion highlights the practical applications of this technique in industries such as robotics and automation.

Uploaded by

aadi.sureka35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views18 pages

Speed Control of DC Motor

The document outlines the process of controlling the speed of DC motors using an Arduino microcontroller, emphasizing the use of Pulse Width Modulation (PWM) signals. It includes a methodology for connecting components, writing code, and a circuit diagram for implementation. The conclusion highlights the practical applications of this technique in industries such as robotics and automation.

Uploaded by

aadi.sureka35
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Speed Control of DC motor

using Arduino
Table of Contents
I. Introduction

II. Methodology

III. Component

IV. Code

V. Circuit Diagram

VI. Conclusion
I Introduction

• Arduino microcontroller is an open-source electronics platform.


• It is widely used for developing interactive electronic projects.
• The platform is easy to use, and it can be used to control various actuators such as
DC, servo and steeper motors.
• This session is focuses on how to actuate and control the speed of actuators using
Arduino.

3
II Methodology
Controlling Servo Motor Speed with Arduino:
• The speed of a motor can be controlled by varying the Pulse Width Modulation (PWM)
of the control signal.
• Arduino generate a PWM signal given by the user, and further PWM signal is
responsible for actuator speed control.
• To control the speed of a motor, you need to connect the signal pin of the servo motor to
one of the digital pins of the Arduino board.
• Then, you need to write a program that generates a PWM signal using the analog Write
() function.

4
The PWM signal should have a frequency of 50 Hz and a duty cycle that
corresponds to the desired speed of the motor.

To control the speed of a motor with Arduino, the following steps should be
followed:
• Connect the servo motor to the Arduino board.

• Include the Servo.h library in the Arduino sketch.

• Initialize the motor object using the Servo class.

• Set the initial position of the servo motor using the write () function.

• Use the write Microseconds() function to control the speed of the servo motor by
varying the pulse width of the control signal.
III Components

Jumper Wires - DC Motor - A12 v DC

Used to connect motor

Arduino Board - A Motor Controller – Used


microcontroller board to control motor

5
V Circuit Diagram

Fig 1-Connecting Circuit Diagram

6
IV Code (For Single DC Motor)

5
#include <AFMotor.h>

AF_DCMotor motor(3); // '3' as motor connected to 3rd terminal


void setup() {
// put your setup code here, to run once:
}
void loop()
{
// put your main code here, to run repeatedly:
motor.setSpeed(100); // to set speed of the motor b/w 0 to 255 rpm
motor.run(FORWARD); // to run in forward direction
delay(2000);
motor.run(RELEASE); // to stop the motor
delay(1000);
motor.run(BACKWARD); // to run in backward direction
delay(2000);
motor.run(RELEASE); // to stop the motor
delay(1000);
}
For Multiple Motors
motor.run(FORWARD); // to run in forward direction
motor1.run(FORWARD);
motor2.run(FORWARD);
#include <AFMotor.h> motor3.run(FORWARD);
delay(2000);
AF_DCMotor motor(3); // '3' as motor connected to 3rd
terminal motor.run(RELEASE); // to stop the motor
AF_DCMotor motor1(1); motor1.run(RELEASE);
AF_DCMotor motor2(2); motor2.run(RELEASE);
AF_DCMotor motor3(4); motor3.run(RELEASE);
void setup() delay(1000);
{
// put your setup code here, to run once: motor.run(BACKWARD); // to run in backward direction
motor1.run(BACKWARD);
} motor2.run(BACKWARD);
motor3.run(BACKWARD);
void loop() delay(2000);
{
// put your main code here, to run repeatedly: motor.run(RELEASE); // to stop the motor
motor.setSpeed(100); // to set speed of the motor b/w 0 to motor1.run(RELEASE);
255 rpm motor2.run(RELEASE);
motor1.setSpeed(100); motor3.run(RELEASE);
motor2.setSpeed(100); delay(1000);
motor3.setSpeed(100); }
VI Conclusion

• The speed control of servo motors with Arduino is a useful technique i.e., applied in
various industries such as robotics, automation, and manufacturing.
• Using Arduino, the process becomes more accessible, cost-effective, and customizable.

7
V

Thank You!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy