Lec14 - EE319K IntroductiontoMicrocontrollers...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
16-1 EE 319K Introduction to Microcontrollers Lecture 16:Stepper Motors, TRobots Source: TRobots material by Nachiket Kharalkar 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
16-2 Stepper Motor 0101 0110 1010 1001 Interface B ipolar stepper A - + - + B Unipolar stepper - + +V - + - + - + A B A bipolar stepper has two coils,  but a unipolar stepper  divides the two coils into four parts 
Background image of page 2
16-3 Stepper Motor To rotate this stepper by 18 o , the interface flips the direction of one of the currents Rotor N N N N N S S S S S tator B A B A I I I I S N S N Ou tpu t = 0101 N N N N N S S S S S B A B A I I I I N S S N 0110 N N N N N S S S S S B A B A I I I I N S N S 1010 AB F lip B F A N N N N N S S S S S B A B A I I I I S N N S F A F B
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
16-4 FSM for Stepper Motor This stepper motor FSM has four states.  The four-bit outputs are given in binary Name Output Next S6 0110 S5 0101 S10 1010 S9 1001
Background image of page 4
16-5 Unipolar Stepper <-> 9S12 A unipolar stepper motor interfaced to a Freescale 9S12 shaft B B ' L293 +5 A A ' 1N914 Stepper Motor +V 3 6 11 14 1A 2A 3A 4A 1Y 2Y 3Y 4Y 2 7 10 15 1 9 1,2EN 3,4EN 4,5,12,13 16 8 PT3 PT2 PT1 PT0 9S12
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
16-6 Stepper Motor Controller org $4000 ; in ROM Out equ 0 Next equ 1 S5 fcb $55 ; output for this state fdb S6 ; clockwise next S6 fcb $66 fdb S10 S10 fcb $AA fdb S9 S9 fcb $99 fdb S5 main lds #$4000 jsr Timer_Init movb #$FF,DDRT ;output to stepper ldx #S5 ;initial state loop movb Out,x,PTT ;output ldy #50 jsr Timer_Wait1ms ldx Next,x ;clockwise step bra loop Speed =             (1 rotation/ 200  steps)*(1000 ms/s)(60s/min)*(1 step/ 50 ms)          = 6 RPM
Background image of page 6
16-7 In TExaS The  IO->Stepper…  command  allows  you  to  connect  stepper  motors.  Each stepper has four control wires.  Each  output  within  the  sequence  1010,  1001,  0101,  0110,  …,  will  cause the motor to make one clockwise step. Each  output  within  the  reverse  sequence  0110,  0101,  1001,  1010,  …, will cause the motor to make one counterclockwise step.    There are a fixed number steps per rotation.  Lab 9, 10 The two motors independently control the two drive wheels of a  robot car. 
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
16-8 Example
Background image of page 8
16-9 Move a Robot These four full-step commands are sufficient to move a robot COMMAN D LEFT TRACK RIGHT TRACK ∆θ ( ο 29 ∆Ξ (Μ29 ΡΟ ΒΟΤ ΜΟΤΙΟΝ (F,F) full-step forward full-step forward 0 0.5 forward (f,f) full-step backward full-step backward 0 -0.5 backward (F,f) full-step forward full-step backward -6 0 turn CW (f,F) full-step backward full-step forward 6 0 CCW
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
16-10 Possible Data Structures Only some arrows shown $05 $06 $0A $09 $50 $60 $A0 $90 $ 5 5 $ 6 6 $ A A $ 9 9 $ 5 6 $ 6 A $ A 9 $ 9 5 $ 5 A $ 6 9 $ A 5 $ 9 6 $ 5 9 $ 6 5 $ A 6 $ 9 A
Background image of page 10
16-11 Solution Layering Low level o Move forward o Move back o Turn 90 degrees CW o Turn 90 degrees CCW o Turn to North High level o Game algorithm o Search for opponents o Target and fire o Defense o Lifepacks Feedback Read sensors o (x,y) position, ADC channels 0,1 o Heading angle, ADC channel 2
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Stepper motor output sequence Stepper motor output sequence
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 32

Lec14 - EE319K IntroductiontoMicrocontrollers...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online