L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

31
L

Transcript of L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

Page 1: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

L

Page 2: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

Deepali MittalHarshad Sawhney

INTRODUCTION TO MOTORS, SERVOS AND STEPPERS

Page 3: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

Mechanical Aspects of Robotics

Page 4: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

DC MOTORS

• Designed to work on DC power.

• Mainly of three types : – Permanent Magnet Type– Brushed DC Motors– Brushless DC Motors

Page 5: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

DC MOTORS

• These are simple motors used for simple purpose. • Apply +12V (generally) and they start rotating. Apply -12V and they rotate in the opposite direction! • Speed can be reduced by reducing the voltage supplied, however that’s not an efficient way of doing things.• Torque and speed are inter-related. A 10rpm motor has relatively high torque. Generally a 100rpm – 300rpm

Page 6: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

THEORY OF SERVOMECHANISMS

• Closed loop control whose output is some mechanical position or velocity set by a reference input(required output).

• A servomotor consists of an electric motor ,feedback device, electronic controller.

• The feedback device for servomotors is typically an encoder or resolver built into motor frame

Page 7: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

SERVO MOTORS

• Servo motors have three wires: power, ground, and signal.

• The power wire is typically red, and should be connected to the 5V pin on the Arduino board.

The ground wire is typically black or brown and should be connected to a ground pin on the Arduino board.

The signal pin is typically yellow, orange or white and should be connected to a digital pin on the Arduino board.

• Note that servos draw considerable power, so if you need to drive more than one or two, you'll probably need to power them from a separate supply (i.e. not the +5V pin on your Arduino). Be sure to connect the grounds of the Arduino and external power supply together.

Page 8: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

SERVO MOTORS

• They are used for specific purposes (for instance, in grippers, etc.)

• They have a restricted rotation of 180 or 360 degree. The least rotation angle possible is 1 degree.

• They are driven through microcontrollers. Power comes separately from a battery (12V, generally).

• Arduino has one line command for driving a servo . Using an Atmega PWM needs to be generated to drive a servo.

• Speed can be reduced by sending the commands at a delay. This doesn’t reduce the efficiency of the motor.

Page 9: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

SERVO MOTORS

• The basic behind Servo Control is Pulse Width Modulation.

• Pulse Parameters :• Minimum Pulse• Maximum Pulse • Repetition Rate• The general concept is to simply send an ordinary logic

square wave to your servo at a specific wave length, and your servo goes to a particular angle (or velocity if your servo is modified). The wavelength directly maps to servo angle

Page 10: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

DRIVING THE MOTOR

• The microcontrollers like Atmega16 and Arduino have a current rating of 5-10 mA.

• The normal DC motor’s current ratings start from 150 mA and above.

• So the motor cannot be directly attached to the Atmega,

hence a motor-driver is used.

• Generally, L298, L293 are used to drive simple DC motors. The servo motors already have a power cable and a different

control cable which can directly be connected to the microcontrollers.

Page 11: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

MOTOR DRIVER

Page 12: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.
Page 13: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.
Page 14: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

STEPPER MOTORS

• Electromechanical device which converts electrical pulses into discrete mechanical movements.

• The speed of the motor shafts rotation is directly related to the frequency of the input pulses

• Length of rotation is directly related to the number of input pulses applied.

• Brushless motors.• Full torque at stand still.• Open loop control.

Page 15: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

DISADVANTAGES

• Precise positioning.• Use whenever controlled movement is

required.• Where you need to control rotation

angle, speed, position and synchronism.

ADVANTAGES AND WHEN TO USE

• Not easy to operate a high speeds.

• Open Loop Control so it could have errors.

• Higher torque stepper motors are very costly.

Page 16: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

UNIPOLAR VS BIPOLAR MOTORS

Page 17: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

UNIPOLAR VS BIPOLAR MOTORS

• The bipolar motor needs current to be driven in both directions through the windings.• The centre tap on the unipolar motor allows a

simpler driving circuit, limiting the current flow to one direction. • Drawback :In unipolar motor there is limited

capability to energize all windings at any time, resulting in a lower torque compared to the bipolar motor.

Page 18: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

PHASES

• Generally two phases.• But three or five phases

also exist

Two Phase Stepper

Page 19: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

STEPPER DIAGRAMS

Page 20: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

STEP ANGLE CALCULATION

• Right Hand Rule used to determine magetics flux direction• the torque is proportional to the number of

winding turns and the current• Step angle=360 /(NPh * Ph)=360/N

• NPh = Number of equivalent poles per phase = number of rotor poles• Ph = Number of phases• N = Total number of poles for all phases together

Page 21: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

STEPPING MODES

• Wave Drive (1 phase on): A -> B -> A’ -> B’• Disadvantage:Unipolar use only 25% and bipolar only 50% of

the total motor winding. Hence not maximum torque used.

• Full Step Drive (2 phases on): AB -> A’B -> A’B’ ->AB’• Unipolar motor uses only 50% while the bipolar motor uses

the entire winding.

• Half Step Drive (1 & 2 phases on): AB -> B -> A’B -> A’ -> A’B’ -> B’ -> AB’ -> A

• Microstepping : currents in the windings are continuously varying to be able to break up one full step into many smaller discrete steps.

Page 22: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

POWER DISSIPATION

• A stepper motor rated at 6V and 1A per phase and has two phases.• Then P= V X I• P=6 X 2 = 12 W

• Select a motor driver suitably.

Page 23: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

TORQUE VS SPEED

Speed

Torque

Maximum Holding Torque

Page 24: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

ARDUINO CODE

Page 25: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

• H-bridge• L293/L293D• Timer• Pulse Width Modulation

MOTOR DRIVERS

Page 26: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

H-BRIDGE

• An electronic circuit that enables a voltage to be applied across a load in either direction.

Page 27: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

HOW TO RUN MOTORS THROUGH AN MCU ?

• Never connect the MCU pins directly to the motors.

• The Atmega16 has a current rating of 5-10 mA.

• The normal DC motor’s current ratings start from 150 mA and above which arises a need for a Motor and MCU interface.

• So the motor cannot be directly attached to the ATmega, hence a motor-driver is used… (eg: L293/L293D, L298, etc…)

Page 28: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

L293/L293D MOTOR DRIVER

It has two H-bridges, hence two motors can be driven.

Note: A motor driver doesn’t amplify current, it only acts as switches. An L293 is nothing but four switches.!

Page 29: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

L293

• Drivers are enabled in pairs, with drivers 1 and 2 being enabled by the EN Pin. For EN=1 or +5V, the outputs are active and in phase with their inputs.• When EN Pin is low, the output is low(disconnected),

irrespective of the input.• Asserting both logics to either high or low will stop

the motor.

Page 30: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

L298 VS L293

• L293 is a quadruple half-H driver while L298 is a dual full-H driver • Output current per channel = 1A for L293 and 2A for

L298. • Protective Diodes against back EMF are provided

internally in L293D but must be provided externally in L298.

Page 31: L. Deepali Mittal Harshad Sawhney INTRODUCTION TO MOTORS, SERVOS AND STEPPERS.

SPEED CONTROL

• To control motor speed, we can use pulse width modulation or PWM, applied to Enable Pins of L293.

• PWM is the scheme in which the duty cycle of a square wave output from the microcontroller is varied to provide a varying average DC output.

• What actually happens by applying a PWM pulse is that the motor is switched ON and OFF at a given frequency. In this way, the motor reacts to the time average of the power supply.