Uploaded by Luis Manuel Roxas

Roxas.LuisManuel LE10

advertisement
Laboratory Exercise 10 – DC Motor Controls
Luis Manuel L. Roxas
Bachelor of Science in Mechanical Engineering
Visayas State University
Baybay City, Philippines
luismanuelroxas8@gmail.com
Abstract— The speed of the DC motor will be controlled
using an Arduino Uno in this project. Connect to a serial port
and define pin modes after assigning a variable to a motor pin.
Wait for the Serial Monitor to display the speed value you
provided. Following transmission, the data is converted from
string to integer and saved in variable motorSpeed. This course
focused on designing a circuit that would use a DC motor and
control its speed with Arduino. Trying to use another code to
figure out what occurs to the motor and how it works. Play with
the Run and Stop parameters to make the motor spin for a
longer period of time.
B. Circuit Diagram
Keywords—DC motor, Arduino, Code, Motor
I. INTRODUCTION
A direct current motor, often known as a DC motor, is an
electrical machine that converts electrical energy into
mechanical energy by employing a direct current to generate
a magnetic field [1].
II. OBJECTIVES
A. Objectives
• To use the DC motor in a circuit.
•
To control the speed of the DC motor using
Arduino.
•
To create an Arduino program to regulate the
speed of DC motor commands.
B. Scope and Limitation
This project focused on building a circuit that will use a
DC motor and control its speed using Arduino. Trying to use
another code to figure out what occurs to the motor and how
it works. Experiment with the Run and Stop settings to make
the motor spin for a longer period of time. In addition, choose
a separate Arduino Pin and enter a text string into the Serial
Monitor. This activity was limited to the resources available.
III. METHODOLOGY
A. Materials
MEng 125n – Basic Electronics
2nd Semester SY 2021-2022
Instructor: Engr. Philip Caesar L. Ebit
C. Code
This first code was the code to be used in this laboratory.
This is the second code that is used in this laboratory for the
post lab questions.
an influence on the performance of the DC motor. The runtime
value is represented in milliseconds.
Because the function only converts numbers to integers,
entering a text string into the Serial Monitor will not cause the
motor to spin.
PINs can be changed; either PWM or non-PWM will
function, however Analog PINs will not. To change the PIN,
modify the variable motorPin's assigned number.
Always verify the DC motor if it is working or if the wire
is correctly connected to the DC motor during the student's
learning experience. Also, make sure the code is appropriately
copied.
V. CONCLUSIONS AND RECOMMENDATIONS
A direct current motor, sometimes known as a DC motor,
is an electrical machine that transfers electrical energy into
mechanical energy by generating a magnetic field using a
direct current [1]. Connect to a serial port and define pin
modes after assigning a variable to a motor pin. The value of
motorSpeed is utilized when the motor starts spinning until a
fresh value is introduced.
ACKNOWLEDGMENT
IV. RESULTS AND DISCUSSIONS
The Arduino Uno R3 is a microcontroller featuring an
ATmega328 AVR dual-inline package (DIP) processor that
may be removed [2].
A USB cable connects the Arduino to a computer,
allowing data from the software application to be read [3].
A direct current motor (DC motor) is a mechanical device
that converts electrical energy into mechanical energy [4].
Signal diodes are bipolar devices with two terminals that
conduct current when biased forward and cease current flow
when biased backward [5].
Because the BC547 is an NPN transistor, current flows
from the collector to the emitter when power is applied to the
base (control pin) [6].
A resistor is a two-terminal passive electrical component
that uses electrical resistance to serve as a circuit element [7].
A breadboard is a plastic board that is used to connect
electrical components [8].
Connecting wires are required to connect the DC Motor,
330 ohm resistor, Diode, and Transistor NPN - BC547 to the
Arduino Uno board.
A PC running Arduino software is used to upload the code
to the Arduino board.
The student had a problem with the DC motor because it
was not included in the kit and he had to buy one or borrow
one from a friend. But when he discovered that they had a
damaged electric fan, he crushed it and used the DC motor to
finish the activity.
For the length of the second program, the DC motor has
no speed configuration. It also comes to a halt for the stated
time. Changing the runtime and stop time settings will have
MEng 125n – Basic Electronics
2nd Semester SY 2021-2022
Instructor: Engr. Philip Caesar L. Ebit
The student would wish to thank our Lord for permitting
him to pursue and complete this activity, which has led him to
his current employment route, especially during this time of
the pandemic.
Thank you for making it so simple to obtain laboratory
supplies across the internet, Shoppee, and Bos electronics
Baybay.
The student wishes to express his heartfelt appreciation to
his family for their constant support.
Finally, he would like to convey his appreciation to his
mentor, Engr. In addition to the standard laboratory manual
requirements, Philip Caesar Ebit.
VI. REFERENCES
[
"iqsdirectory," [Online]. Available:
1 https://www.iqsdirectory.com/articles/electric-motor/dc]
motors.html. [Accessed 6 June 2022].
[
"Pololu," [Online]. Available:
2 https://www.pololu.com/product/2191?fbclid=IwAR2FE
] WU9SQ5YkJL5N8IlQyEk5FPgQA_hU1lZ8iZ98891Odk
KVvEAky4rCTg#:~:text=The%20Arduino%20Uno%20
R3%20is,be%20used%20as%20analog%20inputs.
[Accessed 6 June 2022].
[
"L-com," [Online]. Available: https://www.l3 com.com/frequently-asked-questions/what-is-a-usb]
cable?fbclid=IwAR2Ztp9T57Sli9Q8iG954NxyaAQKjfSWejwVyAEMRnduqNiIDVw8u
W5woY#:~:text=The%20term%20USB%20stands%20fo
r,printers%2C%20scanners%2C%20and%20more.
[Accessed 6 June 2022].
[
"byjus," [Online]. Available:
4 https://byjus.com/physics/dc-motor/. [Accessed 6 June
]
2022].
[
"electronicstutorials," [Online]. Available:
5
https://www.electronics] tutorials.ws/diode/diode_4.html#:~:text=The%20Signal%
20Diode,The%20Signal%20Diode,current%20flow%20when%20
reverse%20biased. [Accessed 6 June 2022].
[
"bcrobotics," [Online]. Available: https://bc6
robotics.com/shop/npn-bc547] transistor/#:~:text=The%20BC547%20is%20a%20NPN,t
he%20load%20in%20a%20circuit.. [Accessed 6 June
2022].
MEng 125n – Basic Electronics
2nd Semester SY 2021-2022
Instructor: Engr. Philip Caesar L. Ebit
[
"electronics.stackexchange," [Online]. Available:
7 https://electronics.stackexchange.com/questions/27561/w
]
hy-we-use-330-ohm-resistor-to-connect-aled#:~:text=330%20ohms%20may%20be%20used,operat
ing%20at%20the%20desired%20current.. [Accessed 6
June 2022].
[
"pcmag," [Online]. Available:
8 https://www.pcmag.com/encyclopedia/term/breadboard?f
] bclid=IwAR1Jm9O9dVUeSnfBBtKX3TfzvB7ZqMAXC
Am5gjj5b3AFMpzioemfriO1HJw. [Accessed 6 June
2022].
Download