Pulse-width modulation (PWM
•Pulse-width modulation (PWM), or pulse-duration
modulation (PDM), is a method of reducing the average
power delivered by an electrical signal, by effectively
chopping it up into discrete parts.
• The average value of voltage (and current) fed to the load is
controlled by turning the switch between supply and load on
and off at a fast rate.
• The longer the switch is on compared to the off periods, the
higher the total power supplied to the load.
3.
Duty cycle
• Theterm duty cycle describes the proportion of 'on' time
to the regular interval or 'period' of time; a low duty cycle
corresponds to low power, because the power is off for
most of the time.
• Duty cycle is expressed in percent, 100% being fully on.
When a digital signal is on half of the time and off the
other half of the time, the digital signal has a duty cycle of
50% and resembles a "square" wave.
4.
• When adigital signal spends more time in the
on state than the off state, it has a duty cycle
of >50%.
• When a digital signal spends more time in the
off state than the on state, it has a duty cycle
of <50%. Here is a pictorial that illustrates
these three scenarios:
6.
Applications
Servo control
• isa method of controlling many types
of hobbyist servos by sending the servo a
PWM (pulse-width modulation) signal, a series
of repeating pulses of variable width where
either the width of the pulse (most common
modern hobby servos) or the duty cycle of a
pulse train (less common today) determines
the position to be achieved by the servo.
7.
Applications
• Telecommunications
• Intelecommunications, PWM is a form of
signal modulation where the widths of the
pulses correspond to specific data values
encoded at one end and decoded at the other.
• Pulses of various lengths (the information
itself) will be sent at regular intervals (the
carrier frequency of the modulation).
8.
Applications
Power delivery
• PWMcan be used to control the amount of
power delivered to a load without incurring the
losses that would result from linear power
delivery by resistive means.
• Drawbacks to this technique are that the
power drawn by the load is not constant but
rather discontinuous ,and energy delivered to
the load is not continuous either.
9.
Applications
Voltage regulation
• PWMis also used in efficient voltage
regulators.
• By switching voltage to the load with the
appropriate duty cycle, the output will
approximate a voltage at the desired level.
• The switching noise is usually filtered with
an inductor and a capacitor.
10.
Applications
Soft-blinking LED indicator
•PWM techniques would typically be used to
make some indicator.
• The light will slowly go from dark to full
intensity, and slowly dimmed to dark again.
11.
• Servo motoris an electrical device which can be used to
rotate objects (like robotic arm) precisely.
• Servo motor consists of DC motor with error sensing negative
feedback mechanism. This allows precise control over
angular velocity and position of motor. In some cases, AC
motors are used.
• It is a closed loop system where it uses negative feedback to
control motion and final position of the shaft.
• It is not used for continuous rotation like conventional AC/DC
motors.
• It has rotation angle that varies from 0° to 180°.
12.
What is aServo Motor?
• A servo motor is a type of motor that
can rotate with great precision.
• Normally this type of motor consists of a
control circuit that provides feedback on the
current position of the motor shaft, this
feedback allows the servo motors to rotate
with great precision.
13.
Principle of Operationof Servo Motors
• A servo consists of a Motor (DC or AC), a
potentiometer, gear assembly, and a
controlling circuit. First of all, we use gear
assembly to reduce RPM and to increase
torque of the motor.
14.
Principle of Operationof Servo Motors
• As shown in above figure Servo motor has three pins for its operation
as,
• +VCC (RED)
• - Connect +VCC supply to this pin. For SG90 Micro Servo it is
4.8 V (~5V).
• Ground (BROWN)
• - Connect Ground to this pin.
• Control Signal (ORANGE)
• - Connect PWM of 20ms (50 Hz) period to this pin.
15.
Principle of Operationof Servo Motors
• It consists of dc motor, gear assembly and feedback control circuitry.
PWM signal is used to control the servo motor. It is applied on control
signal pin.
• Servo feedback control circuitry contains comparator which compares
the control signal (PWM) and potentiometer reference signal to
generate error signal which is later amplified and given to the DC motor.
• DC motor shaft is connected to potentiometer shaft (knob) through gear
assembly. So rotating DC motor rotates potentiometer, which in term
changes potentiometer reference signal given to the comparator.
• At some position of shaft, both potentiometer signal and control signal
strength match, which produces zero error signal output. Hence
rotation continues till comparator output error signal becomes zero and
DC motor stops.
16.
How does ServoWorks
• Servos are controlled by sending an electrical
pulse of variable width, or pulse width
modulation (PWM), through the control wire.
There is a minimum pulse, a maximum pulse,
and a repetition rate.
17.
How does ServoWorks
• A servo motor can usually only turn 90° in either
direction for a total of 180° movement.
• The motor's neutral position is defined as the
position where the servo has the same amount of
potential rotation in the both the clockwise or
counter-clockwise direction.
• The PWM sent to the motor determines position of
the shaft, and based on the duration of the pulse
sent via the control wire; the rotor will turn to the
desired position.
18.
• The servomotor expects to see a pulse every
20 milliseconds (ms) and the length of the
pulse will determine how far the motor turns.
For example, a 1.5ms pulse will make the
motor turn to the 90° position.
• Shorter than 1.5ms moves it in the counter
clockwise direction toward the 0° position, and
any longer than 1.5ms will turn the servo in a
clockwise direction toward the 180° position.
19.
Types of ServoMotors
• hey come in two types: AC and DC. AC servos
can handle more current surges and are
usually used in industrial machines, so they
are more likely to be found there.
20.
Types of ServoMotors
• Looking at it from a performance standpoint, the
primary difference between AC and DC motors is in
the inherit ability to control speed.
• With a DC motor, the speed is directly proportional
to the supply voltage with a constant load.
• And in an AC motor, speed is determined by the
frequency of the applied voltage and the number of
magnetic poles.
21.
Types of ServoMotors
• While both AC and DC motors are used in
servo systems, AC motors will withstand
higher current and are more commonly used
in servo applications such as with robots, in-
line manufacturing and other industrial
applications where high repetitions and high
precision are required.
22.
Types of ServoMotors
• Brushed or brushless is the next step. A DC Servo
Motor is commutated mechanically with brushes,
using a commutator, or electronically without
brushes.
• While the majority of motors used in servo systems
are AC brushless designs, brushed permanent
magnet motors are sometimes employed as servo
motors for their simplicity and low cost.
23.
Types of ServoMotors
• The working principles of a DC servo motor are the
construction of four major components, a DC motor, a
position sensing device, a gear assembly, and control
circuit.
• The working principles of an AC servo motors are based
on the construction with two distinct types of AC servo
motors, they are synchronous and asynchronous
(induction).
• The synchronous AC servo motor consist of stator and
rotor. The stator consists of a cylindrical frame and stator
core.
25.
• What youneed to do now is write a program
that will input the user for a position, and then
write that position to the servo.
• The purpose of this is to determine the natural
range of your particular servo
26.
• include <Servo.h>//Load the servo Library
• int pos = 0; // variable to store the servo position
• int servoPin= 9; //Servo is hooked to pin 9
• int servoDelay=25; // 25 millisecond delay after each servo write
• Servo myPointer; //Create your servo object. I call mine 'myPointer'
• void setup()
• {
• Serial.begin(9600);
• myPointer.attach(servoPin); // attaches the servo myPointer to pin servoPin,
which should be pin 9
• }
27.
• void loop(){
• Serial.println("Where would you like the Servo?"); //prompt user for position
• while (Serial.available()==0) { //wait for user input
• }
• pos=Serial.parseInt(); //read user input into pos
• {
• myPointer.write(pos); //set servo position to pos
• delay(servoDelay); // waits 15ms for the servo to reach the position
• }
• }
28.
• Again, playwith it yourself, and use this code
only if you get stuck. Also, realize that my
servo operates from 15 to 170 degrees, so
that is why I used those numbers. You need to
determine the range of motion for your servo,
and use those numbers in the program.
29.
• #include <Servo.h>
•int pos = 0; // variable to store the servo position
• int servoPin= 9;
• int servoDelay=25;
• Servo myPointer;
• void setup()
• {
• Serial.begin(9600);
• myPointer.attach(servoPin); // attaches the servo on pin 9 to the servo
object
• }