Instructor: Nachiket M. Kharalkar - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Instructor: Nachiket M. Kharalkar

Description:

Instructor: Nachiket M. Kharalkar – PowerPoint PPT presentation

Number of Views:66
Avg rating:3.0/5.0
Slides: 17
Provided by: nachiketk
Category:

less

Transcript and Presenter's Notes

Title: Instructor: Nachiket M. Kharalkar


1
Introduction to Microcontrollers
  • Instructor Nachiket M. Kharalkar
  •  
  • Lecture 18
  • Date 07/18/2007
  • E-mail knachike_at_ece.utexas.edu
  •  

2
Todays Agenda
  • Exam 2 coming Monday (7/23/07)
  • Lab 6 demo
  • Stepper motor interfacing
  • Lab 7 discussion
  • Quiz 2

3
(No Transcript)
4
(No Transcript)
5
Stepper motor output sequence
  • Full-step sequence 5,6,10,9,...
  • Half-step sequence 5,4,6,2,10,8,9,1,...

6
  • Two Stepper Motors Control Robot Motion
  • PT7-PT4 Right Track Stepper Motor
  • PT3-PT0 Left Track Stepper Motor

7
Driving the stepper motor
  • Forward stepping causes the motor to spin forward
  • Full-step sequence 5,6,10,9,...
  • Half-step sequence 5,4,6,2,10,8,9,1,...
  • Backward stepping causes the motor to spin
    backward
  • Full-step backward sequence 9,10,6,5,...
  • Half-step backward sequence 1,9,8,10,2,6,4,5,..

8
Stepper motor controller
9
  • org 3800
  • Pt rmb 2 pointer to current state
  • org 4000
  • out equ 0 8-bit output
  • next equ 1 4 pointers to next state
  • S55 fcb 55 8-bit output
  • fdb S55,S69,S66,S96 next for each in
  • S66 fcb 66
  • fdb S66,SAA,SAA,S55
  • SAA fcb AA
  • fdb SAA,S99,S99,S69
  • S99 fcb 99
  • fdb S99,SAA,S55,SAA
  • S69 fcb 69
  • fdb S69,SAA,S55,S55
  • S96 fcb 96
  • fdb S96,S55,SAA,SAA

FSM implementation
10
Bottom view of the robot car
11
The 24 possible motions of the robot car
12
One possible way to configure the stepper motor
car
13
Sensors on the robot car
  • Front bumper will be active PM4
  • Back bumper will be active PM3
  • Right slot sensor PM1 (20 rising falling
    edges)
  • Left slot sensor PM0 (20 rising falling
    edges)
  • ADC channel 0, will give a number from 0 to 255
    representing the X coordinate (0 on the left, 255
    on the right)
  • ADC channel 1, will give a number from 0 to 255
    representing the Y coordinate (0 on the top, 255
    on the bottom)
  • ADC channel 2, will give a number from 0 to 255
    representing the heading coordinate (0 is right,
    64 is down, 128 is left and 192 is up)

14
Plot window showing one of the mazes. The red
line is the robot car.
X Y 0
Y Actual field 0999
Y 255
X 255
X 0
15
Wall-following solutions may not work
http//www.astrolog.org/labyrnth/algrithm.htm
Does not work
16
Grading policy
  • -30 solves the maze with friction off
  • -10 solves the maze, but doesnt stop at the end
  • -10 gets stuck, or lost so that a reset is
    required to try it again (solves it on the second
    try)
  • -20 gets stuck, or lost so that a reset is
    required to try it again (solves it on the third
    try)
  • No 4th try
  • Questions style graded as usual
Write a Comment
User Comments (0)
About PowerShow.com