46
MICROSTEPPING OF STEPPER MOTOR (Sponsored Project by T.I.F.R. , Mumbai) Presented by – Tejas Mishra (B80393068) Shrinath Thube (B80393119) Anup Palarapwar (B80393146) Under the guidance of Prof. (Dr.) C. S. Garde

Microstepping of stepper Motor

Embed Size (px)

Citation preview

Page 1: Microstepping of stepper Motor

MICROSTEPPING OF STEPPER MOTOR

(Sponsored Project by T.I.F.R. , Mumbai)

Presented by – Tejas Mishra (B80393068)

Shrinath Thube (B80393119)

Anup Palarapwar (B80393146)

Under the guidance of Prof. (Dr.) C. S. Garde

Page 2: Microstepping of stepper Motor

2

IN THIS PRESENTATION- Introduction Our AIM. Basic Working of Stepper Motor Specification of motor. Block Diagram. Selection of Component‘s Working of modules Schematics & Layouts Simulation Results Hardware Testing Relationship between speed & Timer Value Relationship between speed & Number of Steps Speed of Motor

Page 3: Microstepping of stepper Motor

3

INTRODUCTION Experiment at TIFR Mumbai. It requires extremely smooth motion and

precise positioning. Full-step and Half-step modes lead to very

jerky motion. Microstepping results in very smooth motion.

Page 4: Microstepping of stepper Motor

4

OUR AIM - Driving of Stepper motor in Micro-stepping

mode. Step angle divide into 16 steps. RPM control upto 220 RPM Position control using limit switches.

Page 5: Microstepping of stepper Motor

5

BASIC WORKING OF BIPOLAR STEPPER MOTOR

One Phase

ON

Two Phase

ON

Half Phase

ON

Micro-steppin

g

Page 6: Microstepping of stepper Motor

6

1. ONE PHASE ON1.1 Current Flow Diagram

Page 7: Microstepping of stepper Motor

7

1.1 Current Flow Diagram

Page 8: Microstepping of stepper Motor

8

1.2 Voltage Waveform

Page 9: Microstepping of stepper Motor

9

2. TWO PHASE ON 2.1 Current Flow Diagram

Page 10: Microstepping of stepper Motor

10

2.2 Voltage Waveform

Page 11: Microstepping of stepper Motor

11

3. HALF PHASE ON3.1 Current Flow Diagram

Page 12: Microstepping of stepper Motor

12

3.2 Voltage Waveform

Page 13: Microstepping of stepper Motor

13

4. MICROSTEPPING MODE

Page 14: Microstepping of stepper Motor

14

SPECIFICATION OF MOTOR

Holding Torque – 120Ncm Motor Case Temperature: 100°C (212°F)

max. Can operate at rates to 20,000 steps

per second (6000 rpm)

Motor Type No. of

Leads

Current

(Amps)

Voltage (Vdc)

Resistance

(Ohms)

Inductance (mH)

KML061F03 4 1.4 4.19 3 15.5

Page 15: Microstepping of stepper Motor

15

BLOCK DIAGRAM

Page 16: Microstepping of stepper Motor

16

SELECTION OF COMPONENTS

Parameter ATMEGA32 PIC18F452

PWM 4 2

Timers 4 3

EEPROM 1024b 256b

GPIO 32 32

ADC 8ch,10b 8ch,10b

Supply Voltage 2.7-5.5V 5V

1. Selection of Controller

Based on the above parameters we have selected Atmega 32 as it is sufficient for our application.

Page 17: Microstepping of stepper Motor

17

Parameter IRF540 IRF640 IRF840

Vdss(V) 100 200 500

Id(A) 33 18 8

Rds(ohm) 44m 150m 850m

Vgs(th) 4 4 4

Pd(Tc=323K) 110W 125W 100W

Turn-on time 46ns 30ns 37ns

Turn-off time 74ns 30ns 69ns

2. Selection of Switch

Based on the above parameters we have selected IRF540 as it is sufficient for our application.

Page 18: Microstepping of stepper Motor

18

Parameter IR2104 IR2110

Deadtime 0.5us Not available

Io 200mA 1A

Iqbs 55uA 230uA

Delay matching Yes Yes

Turn-on time 0.6us 0.12us

Turn-off time 0.15us 0.1us

3. Selection of Driver Controller

Based on the above parameters we have selected IR2104 as it is sufficient for our application.

Page 19: Microstepping of stepper Motor

19

WORKING OF MODULES1. Working of H-Bridge Driver

Page 20: Microstepping of stepper Motor

20

2. Working of Controller

Atmega32

Page 21: Microstepping of stepper Motor

21

PIN CONFIGURATION OF CONTROLLERSr. No

Requirement

Pin used Description

1 Motor WindingsWinding 1Winding 2Winding 3Winding 4

 Pin C2Pin C1Pin C3Pin C0

 Here pins PC0 to PC4 are set as output

pins which sets motor position.

2 LCD Data pin D4Data pin D5Data pin D6Data pin D7

Register SelectEnable

Read/Write

 Pin C4Pin C5Pin C6Pin C7Pin D4Pin D5Ground

 Here pins PC0 to PC4 & PB0 to PB1 are set as output pins which send data to

LCD & for R/S & E. R/W is directly grounded.

3 Limit Switches

End 1End 2

 Pin D2Pin D3

 Two external interrupts are used here, response at falling edge to detect the

end position4 PWM

PWM1PWM2

 

 Pin B3Pin D7

 Two 8 bit PWM are used here to control

the current through windings.

5 KeypadRow 1Row 2Row 3

Column 1Column 2Column 3

 Pin A5Pin A6Pin A7Pin A2Pin A3Pin A4

 Here we have used 3X3 keypad. For this

pin PA2 to PA7 are used as input pins which take inputs like number of steps

and maximum speed (in RPM) from users and feed to controller.

Page 22: Microstepping of stepper Motor

22

Supply 1• Regulated

power supply for controller (5V)

Supply 2• Regulated

power supply for H bridge (12V)

Supply 3• Unregulat

ed power supply for motor windings (0-34V)

3. Power Supply

Page 23: Microstepping of stepper Motor

23

SCHEMATICS Schematic of Controller Board

B0 (XCK/T0)1

B1 (T1)2

B2 (INT2/AIN0)3

B3 (OC0/AIN1)4

B4 (SS)5

B5 (MOSI)6

B6 (MISO)7

B7 (SCK)8

RESET9

XTAL212 XTAL113

D0 (RXD) 14

D1 (TXD) 15

D2 (INT0) 16

D3 (INT1) 17

D4 (OC1B) 18

D5 (OC1A) 19

D6 (IC1) 20

D7 (OC2) 21

C0 (SCL) 22

C1 (SDA) 23

C2 (TCK) 24

C3 (TMS) 25

C4 (TDO) 26

C5 (TDI) 27

C6 (TOSC1) 28

C7 (TOSC2) 29A7 (ADC7)33 A6 (ADC6)34 A5 (ADC5)35 A4 (ADC4)36 A3 (ADC3)37 A2 (ADC2)38 A1 (ADC1)39 A0 (ADC0)40

VCC 10

GND 11

AVCC 30

GND 31

AREF 32

UC1

ATmega32A-U

12

Y1XTAL

22pF

CC5

Ca

22pF

CC6

Ca

GND

1 23 45 67 89 10

PC4

Header 5X2

miso

+5

GNDGNDGNDGND

NCresetsckmosi

23

1

SC2

SW-SDT

+

23

1

SC3

SW-SDT

10K

RC2

Res2

LD1

LED1

+5

GND104

CC2Ca

104

CC3Ca

3k3

Reset

Res2+5

reset

100pF

CC7

Cap2

GND

12345678910111213141516

PC1

Header 16

D7D6D5D4

D7D6D5D4

EN

rsGND+5GND

+5GND

GND+5 GND

+12V

mosimisosck

330R

RC1

Res2

123

PC6

Header 3

+5A1GND

A0A1

A2A3

A5A4

A2A3A4A5

B2

GNDD2 D3

D2D3

+5+5+5

GNDGND

PWM2

PWM1OC1BOC1AIC1

B4

A6A7

PWM1PWM2

WR

PWM1

123

PC7

Header 3

123

PC8

Header 3

GND

123

PC9

Header 3

+5

GNDB2

A6A7

DACSEL

B2104

CC4Ca

100pF

CC9Cap2

100pF

CC8Cap2

1K

RC10Res2

1K

RC11Res2

+5 +5

1K

RC12Res2

100pF

CC1Cap2

1K

RC13Res2

1K

RC14Res2

1K

RC15Res2

B5 B6 B7

123

PC10

Header 3

+5A0GND

SC1

SW-PB

1234567

PC3

Header 7

+5

GND

rsEN

Int4 Int5 Int5

12

PJumper

Header 2

+5Int51

2

PJumper1

Header 2

+5Int4

A1

1 23 45 67 89 10

PC2

Header 5X2

GND GND

IN1IN2

IN3

IN4

IN1IN2

IN3

IN4

PWM1PWM2

12345678910

PC5

Header 10

+5GNDOUTAOUTB

Page 24: Microstepping of stepper Motor

24

SCHEMATICS Schematic of Driver

VCC1

COM4

VB 8HO 7

VS 6

LO 5

IN2

SD3

UM1 IR2104

VCC1

COM4

VB 8HO 7

VS 6

LO 5

IN2

SD3

UM2

IR2104

DM9

Diode 1N914

DM10Diode 1N914

470uF,25V

CM1

Cap

100uF,35v

CM7Cap

104

CM8Cap

100uF,35V

CM9Cap

104

CM10Cap

LED

LED0 1K

RM9

Res2

+12SD1IN1

GND

+12SD2IN2

GND

HO1

LO1

HO2

LO2MT2

MT1

+12 GND

GND

MT1MT2

+12

104

CM4

Cap

+12 GND

104

CM5

Cap

+12 GND

Q2IRF540N

Q1IRF540N

Q4IRF540N

Q3IRF540N

DM1Diode 1N4937

DM2Diode 1N4937

DM3Diode 1N4937

DM4Diode 1N49371K

RM1

Res2

1K

RM2

Res2

1K

R3

Res2

1K

R4

Res2

LO2

HO2

LO1

HO1

MT2MT1

+Unreg

DM13

Diode 1N914

DM14

Diode 1N914

DM16

Diode 1N914

DM15

Diode 1N914

Sen1

1K

R10Res2

-Unreg

Vb2

Vb1

G2

G1

G4

G3

VCC1

COM4

VB 8HO 7

VS 6

LO 5

IN2

SD3

UM3 IR2104

VCC1

COM4

VB 8HO 7

VS 6

LO 5

IN2

SD3

UM4

IR2104

DM11

Diode 1N914

DM12Diode 1N914

100uF,35v

CM11Cap

104

CM12Cap

100uF,35V

CM13Cap

104

CM14Cap

+12SD3IN3

GND

+12SD4IN4

GND

HO3

LO3

HO4

LO4MT4

MT3

MT3MT4

Q6IRF540N

Q5IRF540N

Q8IRF540N

Q7IRF540N

DM5Diode 1N4937

DM6Diode 1N4937

DM7Diode 14937

DM8Diode 1N49371K

R5

Res2

1K

R6

Res2

1K

R7

Res2

1K

R8

Res2

LO4

HO4

LO3

HO3

MT4MT3

+Unreg

DM17

Diode 1N914

DM18

Diode 1N914

DM20

Diode 1N914

DM19

Diode 1N914

Sen2

1K

R11Res2

-Unreg

Vb4

Vb3 G6

G5

G8

G7

104

CM2

Cap

+12 GND

104

CM3

Cap

+12 GND

1234

P7

Header 4

-Unreg

-Unreg

SD2SD11 2

3 45 67 89 10

PM1

Header 5X2

GND GND

SD3

SD4

Page 25: Microstepping of stepper Motor

25

SCHEMATICS Schematic of Power Supply

12

PP1

Input-Unreg

1234

PP3

6A Rectifier

123

PP5

LM350

123

PP6

7805

123

PP7

7912

+Unreg-Unreg

+12Ac+

--12Ac

+Unreg

-Unreg

GND

-

GND+12

GND+5

GND--12

123

PP2

Input-12

+12AcGND-12Ac

+ 0.22uF,50V

CP8

Cap2

0.22uF,50V

CP9Cap2

+12

GND

+5

GND

GND

-12

GND

100pF

CP10Cap

100pF

CP11Cap

100pF

CP12Cap

100pF

CP1Cap2

100pF

CP3Cap2

100pF

CP4Cap2

100pF

CP6Cap2-

1K

RP1

Res2

1K

RP2Res2

1K

RP3Res2

1K

RP5Res2

100uF,25V

CP13Cap2

100uF,25V

CP14Cap2

+12

GND

+5

GND

-

100pF

CP2Cap2

+12

+12V

0.22uF,50V

CP15Cap2GND

GN

D

+12

+

Page 26: Microstepping of stepper Motor

26

LAYOUTS Top Layout

Page 27: Microstepping of stepper Motor

27

LAYOUTS Bottom Layout

Page 28: Microstepping of stepper Motor

28

SIMULATION RESULTS Winding State

Page 29: Microstepping of stepper Motor

29

PWM Waveforms

Page 30: Microstepping of stepper Motor

30

Current through Motor Winding

Page 31: Microstepping of stepper Motor

31

LCD Sequence

Page 32: Microstepping of stepper Motor

32

HARDWARE TESTING Reference Waveform from IR2104 Datasheet

Page 33: Microstepping of stepper Motor

33

HARDWARE TESTING1. Input & PWM waveform

Here channel 1 represents state of one winding of stepper motor and winding 2 represents PWM value which is connected to SD of IR2104.

Page 34: Microstepping of stepper Motor

34

1. Input and PWM waveform

This is zoom in view of input and PWM waveform

Page 35: Microstepping of stepper Motor

35

2. Input and Low side gate drive output

Here channel 1 represents state of one winding whereas channel 2 represents low side gate drive output of IR2104. It is exactly same as reference waveform given in datasheet of IR2104. Voltage range (peak to peak) :- 1) Input wave – 5V

2) Low side driver – 12V

Page 36: Microstepping of stepper Motor

36

3. Input and High side gate drive output

Here channel 1 represents state of one winding whereas channel 2 represents high side gate drive output of IR2104. It is exactly same as reference waveform given in datasheet of IR2104. Voltage range (peak to peak) :- 1) Input wave – 5V

2) High side driver – 35V

Page 37: Microstepping of stepper Motor

37

4. Current through winding and PWM

In this waveform, channel 1 represents the current through motor winding whereas channel 2 represents corresponding PWM waveform. Current through winding follows shape like sin wave which represents that current through winding is increase and then decrease smoothly. Thus there is smooth variation in rotor position and microstepping is achieved.

Page 38: Microstepping of stepper Motor

38

5. Current through motor windings

Page 39: Microstepping of stepper Motor

39

5. Current through motor windings

In this waveform, channel 1 and channel 2 represents variation of current through two motor windings. Both waveforms shows that current through windings follows sine wave which are 900 in phase shift with respect to each other.

Page 40: Microstepping of stepper Motor

40

RELATIONSHIP BETWEEN SPEED & TIMER

VALUE

0 1 2 3 4 5 6

x 104

0

50

100

150

200

Timer Value

Spe

ed (i

n R

PM

)Speed vs Timer Value

Page 41: Microstepping of stepper Motor

41

RELATIONSHIP BETWEEN SPEED & TIMER VALUE

In this project, we have used 16 bit timer to control the speed of motor. Thus by varying value to be laoded in register TCNT1 (Timer/Counter register 1), speed of motor can be control. Relationship between speed and value to be loaded in TCNT1 can be represent by following formula:

This relationship between can also represent with the help of graph. In this graph, X axis represents the value that should be loaded in TCNT1 and Y axis represents the speed of motor in RPM.

Page 42: Microstepping of stepper Motor

42

SPEED & NUMBER OF STEPS RELATION

•In this case, number of micro-steps are not sufficient for motor to reach to its required speed. Thus number of micro-steps that motor is suppose to travel are completed by motor before reaching to the required speed.

Case 1 : Number of steps are

not sufficient

•In this case, number of micro-steps are sufficient for motor to reach to its required speed. Thus before completing the number of micro-steps that motor is supposed to travel are completed by motor after reaching to the required speed.

Case 2 : Number of steps are sufficient

Page 43: Microstepping of stepper Motor

43

SPEED & NUMBER OF STEPS RELATION

Number of steps are not sufficient

Case 1

Page 44: Microstepping of stepper Motor

44

SPEED & NUMBER OF STEPS RELATION

Number of steps are sufficient

Case 2

Page 45: Microstepping of stepper Motor

45

SPEED OF MOTORAfter all above tests are carried out, next test is to find

deviation of speed of motor from the reference speed that required by user. For speed measurement we have used tachometer available in laboratory.

Tachometer Specification : LTLutron DT-2234CModel No. :- S024630Range – 0.1 rpm to 999.9 rpm & 1 rpm to 999.9 rpmAccuracy – +-5 rpm for range 1 & +-1 rpm for range 2Sr. No Required Speed

(in RPM)Obtained Speed

(in RPM)1 10 11.52 30 313 50 51.94 80 79.95 100 101.16 130 1287 150 1528 160 1639 175 178

10 200 20211 220 223

Page 46: Microstepping of stepper Motor

46

THANK YOU