0% found this document useful (0 votes)
14 views

Module 3 Micro Controller and Motor Control

Uploaded by

andrecanonicato
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Module 3 Micro Controller and Motor Control

Uploaded by

andrecanonicato
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Microcontrollers

Module 3
Microcontrollers
Microcontrollers is a compact
integrated circuit designed to
govern a specific operation in
an embedded system. A
typical microcontroller
includes a processor, memory
and input/output (I/O)
peripherals on a single chip.
Microcontrollers are made up of several key
components:
• Central processing unit (CPU) - The CPU is the brain of the
microcontroller. It executes instructions that are stored in memory
• Memory- Microcontrollers have two types of memory: RAM (random
access memory) and ROM (read-only memory). RAM is used to store
data that the CPU is currently working on, while ROM is used to store
the program that the microcontroller is running.
• Input/output (I/O) pins - I/O pins allow the microcontroller to
interact with the outside world. They can be used to connect to
sensors, actuators, and other devices.
• Clock - The clock provides a timing signal to the CPU. This signal is
used to synchronize the operations of the microcontroller
Some Popular Microcontrollers
Arduino Uno Raspberry Pi ESP32
The Arduino Uno is a The Raspberry Pi Pico is a The ESP32 is a Wi-Fi and
popular and easy-to-use low-cost, high- Bluetooth-enabled
microcontroller that is performance microcontroller that is
often used by beginners. microcontroller that is popular for projects that
It is relatively popular for a wide range need to connect to the
inexpensive and has a of applications. It is very internet. It is a bit more
large and supportive affordable and has a lot of expensive than other
community. processing power for its options, but it offers a lot
size of functionality.
What can you do with microcontrollers?
• Control robots: You can use microcontrollers to control the movement
of robots, sensors, and other devices. This can be used to create
educational robots, hobbyist robots, or even industrial robots.
• Create interactive devices: You can use microcontrollers to create
interactive devices such as games, toys, and art installations. This can
be a great way to express your creativity and learn about electronics.
• Automate tasks: You can use microcontrollers to automate tasks such
as watering plants, turning on lights, and monitoring your home
security. This can save you time and make your life easier.
Motor Controls
In this chapter, we will interface different types of motors with the
Arduino board (UNO) and show you how to connect the motor and
drive it from your board.

There are three different type of motors −


• DC motor
• Servo motor
• Stepper motor
DC motor (Direct Current motor)
A DC motor (Direct Current motor) is the most common type of motor.
DC motors normally have just two leads, one positive and one negative.
If you connect these two leads directly to a battery, the motor will
rotate. If you switch the leads, the motor will rotate in the opposite
direction.
Servo Motor
A Servo Motor is a small device that has an output shaft. This shaft can
be positioned to specific angular positions by sending the servo a coded
signal. As long as the coded signal exists on the input line, the servo will
maintain the angular position of the shaft. If the coded signal changes,
the angular position of the shaft changes. In practice, servos are used in
radio-controlled airplanes to position control surfaces like the elevators
and rudders. They are also used in radio-controlled cars, puppets, and
of course, robots.
Servo Motor
Servos are extremely useful in robotics. The motors are small, have built-in
control circuitry, and are extremely powerful for their size. A standard servo such
as the Futaba S-148 has 42 oz/inches of torque, which is strong for its size. It also
draws power proportional to the mechanical load. A lightly loaded servo,
therefore, does not consume much energy.
The guts of a servo motor is shown in the following picture. You can see the
control circuitry, the motor, a set of gears, and the case. You can also see the 3
wires that connect to the outside world. One is for power (+5volts), ground, and
the white wire is the control wire.
Working of a Servo Motor
The servo motor has some control circuits and a potentiometer (a variable
resistor, aka pot) connected to the output shaft. In the picture above, the pot can
be seen on the right side of the circuit board. This pot allows the control circuitry
to monitor the current angle of the servo motor.
If the shaft is at the correct angle, then the motor shuts off. If the circuit finds
that the angle is not correct, it will turn the motor until it is at a desired angle.
The output shaft of the servo is capable of traveling somewhere around 180
degrees. Usually, it is somewhere in the 210-degree range, however, it varies
depending on the manufacturer. A normal servo is used to control an angular
motion of 0 to 180 degrees. It is mechanically not capable of turning any farther
due to a mechanical stop built on to the main output gear.
The power applied to the motor is proportional to the distance it needs to travel.
So, if the shaft needs to turn a large distance, the motor will run at full speed. If
it needs to turn only a small amount, the motor will run at a slower speed. This is
called proportional control.
How Do You Communicate the Angle at Which the Servo Should Turn?
The control wire is used to communicate the angle. The angle is
determined by the duration of a pulse that is applied to the control wire.
This is called Pulse Coded Modulation. The servo expects to see a pulse
every 20 milliseconds (.02 seconds). The length of the pulse will
determine how far the motor turns. A 1.5 millisecond pulse, for example,
will make the motor turn to the 90-degree position (often called as the
neutral position). If the pulse is shorter than 1.5 milliseconds, then the
motor will turn the shaft closer to 0 degrees. If the pulse is longer than
1.5 milliseconds, the shaft turns closer to 180 degrees.

You might also like