You are on page 1of 45

1

Prior Knowledge
 Mechatronics Year -1, All sessions
 Y1 all Labs
 Workshop Practice

2
Contents
 Overview of DC motor Controls
 Direction Control
 H-Bride
 Speed Control
 PWM
 Drive Electronics – L298N
 Some Special DC Motors
 Brushless DC Motor (BLDCM)
 Stepper Motor
 Servo Motor
 Activity 3
Overview of DC Motor
Controls

4
Connecting DC Motor to Battery
 A battery or a DC source has two terminals, +ve
and –ve
 Similarly a DC motor has two leads, +ve and -ve
 Before connecting a motor with battery, observe the Circuit diagram
 Match the voltage rating of the motor with
following:
M
that of battery.
 For example, if the motor is rated for 9 volt, Wiring diagram
connect with a 9 volt battery. More volt may 9v DC motor
damage the motor. Less voltage may reduce
the speed of the motor.
 Reversing the terminals of the motor with
battery terminals will change the direction of
SPST switch
rotation motor.
 Can use SPST switch for a ON/OFF control 9v battery 5
DC Motor Control Requirement
 There are two control requirements for a DC motor system:
 1. A DC motor system requires to change the direction of
rotation clockwise to anticlockwise or vis-versa, called
direction reversal
 2. A DC motor system also requires to run at variable speed.
 Example: A drone requires to run the propeller with various
speed and direction control to operate correctly.
Drone

6
Reversing Rotation of a DC Motor
 By the above method it is not easy to change the polarity of
battery (or motor) in order to change the direction of rotation of
the motor.
 You have to re-wire the entire system which is not practical
Circuit diagram
 Therefore this way of speed reversal cannot
always.
be preferred any more. M

 There are several ways to achieve this. Three


of which are as follows: Wiring diagram

9v DC motor
1. Use a DPDT switch instead of SPST and
switch the direction manually.
2. Use DPDT switch to form a H-bridge
circuit and operate manually, not an
automatic switching SPST switch

3. Use H-bridge IC with a programable 9v battery 7


Reversing Rotation of a DC Motor using
 DPDT
Wire the motor, battery and DPDT switch as follows:
 Use DPDT toggle switch with center position is OFF
Circuit diagram 1 Circuit diagram 2

ON OFF ON M ON OFF ON M

DPDT center OFF Toggle switch DPDT center OFF Toggle switch

Wiring diagram

9v battery

9v DC motor
DPDT switch
8
Reversing Rotation of a DC Motor using H-
bridgeas follows:
 Wire the motor, battery, H-bridge
 An H-Bridge circuit contains four switches.
Circuit diagram
 Motor is connected at the center of the
circuit forming an H-like arrangement.
 Closing or opening two opposite switches
at the same time reverses the polarity of the
voltage applied to the motor.
 This causes change in rotation direction of
the motor
 Closing two switches simultaneously either
from left or right arm of the bridge causes a
short circuit of the battery. This is
dangerous. 9
Reversing Rotation of a DC Motor using
 DPDT
Wire the motor, battery and H-bridge
DPDT switch as follows – manual
H-bridge:
 Use DPDT toggle switch with center position is OFF

Circuit diagram with 2 batteries Circuit diagram with single battery

S1 S4
S1 S2
M ON OFF ON M ON OFF ON M
S3 S4
S2 S3
DPDT center OFF Toggle switch DPDT center OFF Toggle switch
Wiring diagram

9v battery

9v DC motor
DPDT switch
10
Speed Control of a DC Motor
 Principle:

 Out of the three methods 3rd one is the most popular and 11
widely used:
Speed Control of a DC Motor Using POT
 Applied voltage Vand
can beMOSFET
varied by a simple setup using a
variable resistor and N-MOSFET (Metal Oxide Field Effect
Transistor,
 Rotating theIRF540
knob or IRF3205)
controls the speed of
the motor
 + ve is connected to
the Drain of the
MOSFET.
 Supply voltage depend
on MOSFET and
motor. E.g. If motor is
designed for 12V and
MOSFET is capable of
50V, the supply 12
About Pulse (chopped DC) and Duty Cycle
 DC pulses are series of ON-OFF voltages/currents generated
using circuits called Pulse Width Modulation circuits of
hardware
 Pulse or software.
is having a time period, e.g. 20 millisecond
 A pulse time period is divided into two portions, ON and OFF
 When there is only OFF period for a pulse, in effect there is no presence
of pulse. Now the pulse is said to has 0% duty cycle (only OFF period no
width).
 When there is only ON period for a pulse, in effect there is full presence
of pulse. Now the pulse is said to has 100% duty cycle (only ON period or
width).
 When there is ON and OFF period for a pulse, in effect there is part
presence of pulse depending up on the % width or duty cycle of the pulse.
 This way
Pulseby
ONvarying the
 width/duty
This pulsecycle of is
for e.g, thea pluses
12 voltthe average
pulse, output
ON and
voltage of the circuit can be varied.
OFF widths (periods) are equal. Now we say
the duty cycle is 50%. And the output volt is13
Pulse OFF 50% of 12 volt, i.e. 6 volt.
Varying Duty Cycle
 Pulses of different duty cycle for example is shown below.

14
Speed Control of a DC Motor by PWM
• Most widely used speed control method is called (PWM) or Pulse
Width Modulation. This is also another variable voltage method.

Motor Average Volt

10
V
8
V
4
V
2
V
0
Pulse width 0%, 20%, 40%, 80%, 100% V

• Instead of applying voltage directly, a series of DC pulses will be used.


The width of the pluses will be varied using a PWM circuit or logic.
The motor gets an average value of the pulse voltage that is proportional
to the Duty Cycle of the pulses. This is demonstrated above.
Motor Drive electronics
 For automatic control of both Speed and Direction can be
achieved by using dedicated electronics called Motor Drive
electronics.
 L298N is such a motor drive controller widely used for
robotics.

16
Activity 1
 Use a breadboard, DPDT toggle switch and battery to change
the direction of a DC motor.

17
Activity 2
 Use a breadboard, MOSFET, Potentiometer, rocker switch
and battery to control speed of a DC motor.

18
Some Special DC Motors

19
1. PM Brushless DC (BLDC)
 Motors
PMBLDC motors ranging from microwatts to megawatts are
increasingly being used in a wide spectrum of applications
 In BLDC the PMs are put on the rotor and the electromagnets
are moved on to the stator.
 Then a computer/control electronics is used with high power
transistors to charge up the electromagnets as the shaft turns.

20
Types of BLDC Motors
 There are two types:

 Inrunner (inner rotor): In this


conventional design, the rotor is
located at the core (center) and
stator winding surrounds it.
 Outrunner (outer rotor): Here the
rotor is external, i.e. the stator Inner rotor BLDC

windings are located at the core


(center), while the rotor carrying
the magnets surrounds the stator.

Outer rotor BLDC

21
Working of BLDC Motors
 See the animation:

 Stator windings of a BLDC motor are


connected to a control circuit (an integrated
switching circuit or inverter circuit).
 The control circuit energizes proper
Inner rotor BLDC
winding at the proper time, in a pattern
which rotates around the stator.
 Permanent magnets on the rotor try to align
with the energized electromagnets of the
stator, and as soon as it aligns, the next
electromagnets are energized.
 Thus, the rotor keeps running Outer rotor BLDC
 Hall sensors are used to determine position 22
BLDC Vs. Brushed Motors
 Brushes require frequent replacement due to mechanical
wear, hence, a brushed DC motor requires periodic
maintenance. Also, as brushes transfer current to the
commutator, sparking occurs. Brushes limit the maximum
speed and the number of poles the armature can have. These
all drawbacks are removed in a brushless DC motor. An
electronic control circuit is required in a brushless DC motor
for switching stator magnets to keep the motor running. This
 Advantages
makes a BLDC of BLDC
motor motor over less
potentially brushed motors are
rugged.
increased efficiency, reliability, longer lifetime, no sparking
and less noise, more torque per weight, etc.
 https://www.bing.com/videos/search?q=how+breshless+dc+motor+works&ru=%2fsearch
%3fq%3dhow%2bbreshless%2bdc%2bmotor%2bworks%26cvid
%3db6666bac2c7a4429ad552d4ae5362d6d%26pglt%3d43%26cc%3dAE%26FORM
%3dANSPA1%26PC
%3dU531&mmscn=vwrc&view=detail&mid=3FCF447AB1510BB841723FCF447AB1510 23
BB84172&rvsmid=4C606EEB2ADF83F056C54C606EEB2ADF83F056C5&FORM=VDQ
Applications of BLDC Motors
 BLDC motors fulfill many requirements that a brushed DC
motor does. But as they require a complicated control circuit
and due to cost considerations, they haven’t yet completely
replaced brushed DC motors, especially in low-cost
applications. Despite this, there are many applications where
BLDC motors dominate –
 Consumer electronics – computer hard drives, small cooling
fans, cd/dvd players, etc. and also in modern appliances
where quiet operation is desired – such as washing machines,
air conditioners, etc.
 Electric Vehicles – many electric vehicles including electric
and hybrid cars, electric bikes use BLDC motors.
 They have a wide range of applications in many other areas
including robotics, industrial, motion control systems, etc. 24
2. Stepper Motor
 It's a special kind of DC motor designed so you can make it
rotate through a precise angle, instead of spinning round by a
random amount. They are different than ordinary DC motors
in 4 ways:
 A Stepper Motor or a step motor is a brushless, synchronous
motor which divides a full rotation into a number of steps.
 Unlike a brushless DC motor which rotates continuously when
a fixed DC voltage is applied to it, a step motor rotates in
discrete step angles.
 The Stepper Motors therefore are manufactured with steps
per revolution of 12, 24, 72, 144, 180, and 200, resulting in
stepping angles of 30, 15, 5, 2.5, 2, and 1.8 degrees per step.
 The stepper motor can be controlled with or without feedback.
25
Stepper Motor
 It's a special kind of DC motor.

26
Stepper- Ordinary DC Motor
 It's a special kind ofDifference
DC motor designed so you can make it
rotate through a precise angle, instead of spinning round by a
random amount. They are different than ordinary DC motors
in 4 ways:
1. No brushes or commutator - brushless
2. The permanent magnets are on the inside and rotate (making up the
rotor), while the coils are on the outside and stay static (making up the
stator).
3. Instead of one large magnet on the outside (the stator) and one large
coil rotating inside it (the rotor), a stepper motor has an inner magnet
effectively divided up into many separate sections, which look like teeth
on a gear wheel. The outer coils have corresponding teeth that provide
magnetic impulses, attracting, repelling, and making the teeth of the
inner wheel rotate by small steps.
4. The final difference is that a stepper motor can stay still, in a certain
27
position, once it's rotated through a particular angle – called holding
Construction of Stepper Motors
 A stepper motor's rotor is made from two discs placed
together so we get a series of alternating north and south
poles
 Around the edge of the rotor, we have the stator: in this
example, four electromagnets that can be switched on and off
individually. Generally the electromagnets in a stepper motor
work in pairs, with each opposing pair of magnets switching
on together to make a north pole at the same time, followed by
the magnets at right angles, which also work together.

28
By Construction 3 Types
 There are mainly three types of stepper motors based on
construction
• Variable reluctance stepper motor:  They have iron core
rotor which is attracted towards the stator poles and provide
movement by minimum reluctance between stator and rotor.
• Permanent magnet stepper motor:  They have permanent
magnet rotor and they are repelled or attracted towards the
stator according to pulses applied.
• Hybrid synchronous stepper motor:  They are combination
of Variable reluctance and permanent magnet stepper motor.

29
By Type of Stator Winding 2 types
 There are mainly two types of stepper motors based on stator
winding:
 Bipolar Stepper Motor:  The stator coils on this type of motor will not
have a common wire. The driving of this type of stepper motor is different
and complex and also the driving circuit cannot be easily designed without
a microcontroller.
 Unipolar Stepper Motor:  In this type of stepper motor we can take the
center tapping of both the phase windings for a common ground or for a
common power as shown below. This makes it easy to drive the motors,
there are many types in Unipolar stepper motor as well

30
Working of Stepper Motor
 Animation of a simplified stepper motor
(unipolar)
 Frame 1: The top electromagnet (1) is turned on,
attracting the nearest teeth of the gear-shaped iron
rotor. With the teeth aligned to electromagnet 1,
they will be slightly offset from right
electromagnet (2). 
 Frame 2: The top electromagnet (1) is turned off,
and the right electromagnet (2) is energized,
pulling the teeth into alignment with it. This results
 in a rotation
Frame of bottom
3: The 3.6° in this example.  (3) is energized; another 3.6°
electromagnet
rotation occurs. 
 Frame 4: The left electromagnet (4) is energized, rotating again by 3.6°.
When the top electromagnet (1) is again enabled, the rotor will have
rotated by one tooth position; since there are 25 teeth, it will take 100
steps to make a full rotation in this example..
31
Using Stepper Motor
 It is not possible to make these motors rotate by just powering them
through a supply, so how would you do it?)
 All steppers motors do not rotate, they step and so they also known
as step motors. Meaning, they will move only one step at a time. These
motors have a sequence of coils present in them and these coils have to be
energized in a particular fashion to make the motor rotate. When each coil
is being energized the motor takes a step and a sequence of energization
 will
As youmake
canthe
seemotor take continuous
the motor steps,
has unipolar thuscoil
5-lead making it to rotate.
arrangement. There are four coils which have to be
energized in a particular sequence. The Red wires will
be supplied with +5V and the remaining four wires will
be pulled to ground for triggering the respective coil.
 We use any microcontroller to energize these coils in a
particular sequence and make the motor perform the
required number of steps. Again there are many
sequence you can use, normally a 4-step is used and for
more precise control an 8-step control can also be used. 32
The sequence table for 4-step control is shown below.
Stepper Motor Data
 The sequence table for 4-step control is shown below
 The Red lead is common for all leads.

Step Coil Energised

Step 1 A and B

Step 2 B and C

Step 3 C and D

Step 4 D and A

 Stepper Motor Data: First we know that it is a 5V Stepper motor since we


energize the Red wire with 5V. Then, we also know that it is a four phase
stepper motor since it had four coils in it. Now, the gear ratio is given to be
1:64. This means the shaft that you see outside will make one complete
rotation only if the motor inside rotates for 64 times. This is because of the
gears that are connected between the motor and output shaft, these gears33
help in increasing the torque.
Calculating Steps per Revolution
 it is important to know how to calculate the steps per
Revolution for your stepper motor because only then you can
program/drive it effectively.
 Let’s assume we will be operating the motor in 4-step
sequence so the stride angle will be 11.25° since it is
5.625°(given in datasheet) for 8 step  sequence, it will be
 Steps per revolution = 360/step angle
11.25° (5.625*2=11.25).
 Here, 360/11.25 = 32 steps per revolution.

 Advantage of Stepper motor: it has excellent position control and hence can
be used for precise control application. Also it has very good holding
torque which makes it an ideal choice for robotic applications. Stepper
motors are also considered to have high life time than normal DC or servo
motor.
 Disadvantage of Stepper motor: Cannot achieve high speeds. Also it
consumes power for holding torque even when it is ideal thus increasing34
the power consumption. 
Applications of Stepper Motor
Consumer Electronics - Stepper motors in cameras for automatic digital camera focus and zoom
functions. Stepper motors as actuators for mobile phones camera modules
• Automotive and Aircraft - Stepper motors help enable cars, SUV’s and RV’s to receive
telecommunication signals. Stepper motors are also used for cruise control, military antenna
positioners, automated sensing devices, and automated cameras. In aircrafts, stepper motors are used
in aircraft instruments, sensing devices, antennas, scanning equipment.
• Office Equipment - Stepper motors are incorporated inside PC based scanning equipment, data
storage tape drives, optical disk drive head driving mechanism, printers, bar-code printers, scanners
• Medical - Step motors are used inside medical scanners, multi-axis stepper motor microscopic or
nanoscopic motion control of automated devices, dispensing pumps, samplers, and chromatograph
auto-injectors. Also found inside digital dental photography, fluid pumps, respirators, and blood
analysis machinery
• Industrial machines - Stepper motors are used in automotive gauges, machine tooling automated
production equipment (single/multi axis stepper motor controllers) and also in retrofit kits [stepper
motor controllers and motors] for CNC machine control
• Scientific Instrumentation - Scientific Equipment Spectographs, observatory telescope positioning
• Chemical - Mixing and sampling devices utilizing stepper motor controllers and single/multi axis
stepper motor controlled environmental testing equipment.
• Security - new surveillance products for the security industry
• Gaming industry - Stepper motors are used in the motors that power slot machines, wheel spinners
35
and card shufflers
3. Servo Motors (Actuators)
 Are specially designed motors to be used in control application
and robotics.
 They are used for precise position and speed control at high
torques.
 Servo motors can be characterized according the motor
controlled by servomechanism, i.e. if DC motor is controlled
using servomechanism, it is called as DC Servo motor. Thus
major types of Servo motor may be –
 (i) DC Servo motor,
 (ii) AC Servo motor.
 Servo motors are available in power ratings from fraction of
watt upto few 100 watts. They are having high torque
capabilities.
36
 Servomechanism is basically a closed-loop system, consisting
Types of Servo Motors
 Servos come in many sizes and in three basic types: positional rotation,
continuous rotation, and linear.
• Positional rotation servo: This is the most common type of servo motor.
The output shaft rotates in about half of a circle, or 180 degrees. It has
physical stops placed in the gear mechanism to prevent turning beyond
these limits to protect the rotational sensor. These common servos are
found in radio-controlled cars and water- and aircraft, toys, robots, and
many other applications.
• Continuous rotation servo: This is quite similar to the common positional
rotation servo motor, except it can turn in either direction indefinitely. The
control signal, rather than setting the static position of the servo, is
interpreted as the direction and speed of rotation. The range of possible
commands causes the servo to rotate clockwise or counterclockwise as
desired, at varying speed, depending on the command signal. You might
use a servo of this type on a radar dish if you mounted one on a robot. Or
you could use one as a drive motor on a mobile robot.
• Linear servo: This is also like the positional rotation servo motor described
37
above, but with additional gears (usually a rack and pinion mechanism) to
Construction of Servo Motor
  It consists of a suitable motor, position
sensor and a sophisticated controller.
 The rotor of servo motor is made
smaller in diameter and longer in length,
so that it has low inertia.
 A servo has 3 wires, one for +5 volt, one
for ground and a signal wire

38
Working of Servo Motor
  The controlling device
generates a pulse of varying
length approximately every
20 milliseconds. The pulse is
normally between 1 and 2
milliseconds long. The
length of the pulse is used by
the servo to determine the
position
 The it should
control pulse rotate to.a pulse width to voltage converter. This circuit
is fed to
charges a capacitor at a constant rate while the pulse is high. When the
pulse goes low the charge on the capacitor is fed to the output via a
suitable buffer amplifier. This essentially produces a voltage related to the
length of the applied pulse. The circuit is tuned to produce a useful
voltage over a 1ms to 2ms period. The output voltage is buffered and so
does not decay significantly between control pulses so the length of time
between pulses is not critical. The current rotational position of the servo
motor output shaft is read by a sensor. This is normally a potentiometer 39
(variable resistor) which produces a voltage that is related to the absolute
Working of Servo Motor ..

 The potentiometer then feeds its current value into the Error Amplifier
which compares the current position with the commanded position from
the pulse width to  a voltage converter. The error amplifier is an
operational amplifier with negative feedback. It will always try to
minimize the difference between the inverting (negative) and non-
inverting (positive) inputs by driving its output in the correct direction.
The output of the error amplifier is either a negative or positive voltage
representing the difference between its inputs. The greater the
difference, the greater the voltage. The error amplifier output is used to
drive the motor. If it is positive the motor will turn in one direction and
if it is negative, it will turn to another direction. This allows the error40
amplifier to reduce the difference between its inputs (thus closing the
Working of Servo Motor ..
 Command
Servos are controlled by sending them a pulse of variable
width. The signal wire is used to send this pulse. The
parameters for this pulse are that it has a minimum pulse, a
maximum pulse, and a repetition rate. Given the rotation
constraints of the servo, neutral is defined to be the position
where the servo has exactly the same amount of potential
rotation in the clockwise direction as it does in the anti-
clockwise direction. It is important to note that different
servos will have different constraints on their rotation but
they all have a neutral position, and that position is always
around 1.5 milliseconds (ms).

41
Continuous Pulses to Servo
 The angle is determined by the duration of a pulse that is applied to the
signal wire. This is called Pulse Width Modulation. The servo expects to
see a pulse every 20 ms. The length of the pulse will determine how far
the motor turns. For example, a 1.5 ms pulse will make the motor turns
to a 90 degree position (neutral position). When these servos are
commanded to move, they will move to the position and hold that
position. If an external force pushes against the servo while the servo is
holding a position, the servo will resist from moving out of that position.
The maximum amount of force the servo can exert is the torque rating of
the servo. Servos will not hold their position forever though; the position
pulse must be repeated to instruct the servo to stay in position.

42
Continuous Pulses to Servo ..
 When a pulse is sent to a servo that is less than 1.5 ms the servo rotates to a
position and holds its output shaft some number of degrees anti-clockwise from
the neutral point. When the pulse is wider than 1.5 ms the opposite occurs. The
minimal width and the maximum width of pulse that will command the servo to
turn to a valid position are functions of each servo. Different brands, and even
different servos of the same brand, will have different maximum and minimum.
Generally the minimum pulse will be about 1 ms wide (some servos are 0.5ms)
and the maximum pulse will be 2 ms wide (some servo are 2.5ms).
 Position of RC servo with the signal Another parameter that varies from servo to
servo is the turn rate. This is the time it takes for the servo to change from one
position to another. The worst case turning time is when the servo is holding at
the minimum rotation and it is commanded to go to maximum rotation.

43
Activity 3
 Identify suitable motor for the following use and justify your
answer:
 1. A tri-wheeler robot for line tracking and obstacle avoidance.
 2. Cooling fan of a computer CPU
 3. Propeller motor of a helicopter
 4. Fuel control motor of a car or gas turbine
 5. Motor of a robot arm of an assembly chain

44
Any Questions?

Year 2 Session 1 Concludes


Thank You !

Vijaya Kumar

45

You might also like