motor control

10
Motor Control For the Sieg Defense Platform by Michael Dougherty Gary Look Gene Ma Reviewed by Ngochan Nguyen, Duy Le, Valdis Riekstins

Upload: blair-barlow

Post on 30-Dec-2015

22 views

Category:

Documents


0 download

DESCRIPTION

Motor Control. For the Sieg Defense Platform by Michael Dougherty Gary Look Gene Ma Reviewed by Ngochan Nguyen, Duy Le, Valdis Riekstins. Description. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Motor Control

Motor Control

For the Sieg Defense Platform

by

Michael Dougherty

Gary Look

Gene Ma

Reviewed by Ngochan Nguyen, Duy Le, Valdis Riekstins

Page 2: Motor Control

Description

• Once given a new x-value for the x-coordinate motor, this control is responsible for providing the stepper motor driver chip with the needed signals to move the stepper motor to this position.

• There is another control corresponding to the motor for the y-coordinate.

• There is a slight difference in scaling between the x and y controls.

Page 3: Motor Control

Stepper Motor Driver Chip

• The stepper motors require 0.5 mA to be driven, which the XESS board cannot provide.

• This chip receives signals from the motor control module, so that it can drive the motor.

• The chip drives the motor at 5 V.

Page 4: Motor Control

Stepper Motor Driver Chip Inputs

• CLK (pin 7) - Generated by the motor control module

• CW/CCW (pin 10) - When low, the stepper motor is driven clockwise (right), and when high, the motor is driven counter-clockwise (left)

Page 5: Motor Control

FPGA Signals

Inputs• TOUCHX[8:0] - x-coordinate to move the motor to

• RST - reset the x-coordinate motor to 256 (the x-coordinate range is 0 to 512)

• CLK - clock signal from the FPGA

Outputs• MotorX[15:0] - current x-coordinate of the motor

• MotorCon[1:0] - outputs to the Stepper Motor Chip (MotorCon[1] is CW/CCW, MotorCon[0] is CLK

Page 6: Motor Control

How It Works

• The motor control keeps track of the current coordinates and also outputs them, so that a crosshair can be displayed on the screen.

• If the input x-coordinate is less than the current one, the motor control tells the driver chip to move the motor counter-clockwise (left), and for greater than, it tells it to move the motor clockwise (right).

• There is a mapping between the number of pixels between 2 points on the screen, and the amount of stepper motor movement for the corresponding distance.

Page 7: Motor Control

footstepsfeet

steps/10

5

deg90

deg360

200

Scaling Factor

• It takes 200 steps to move the motor 360 degrees

• For example, if there are 5 feet between 2 points, and it takes 90 degrees of movement to go between them

Page 8: Motor Control

• Since it takes a lot of time (in terms of clock cycles) for the stepper motor to physically move, a one million clock cycle delay (0.042 s) is introduced before the motor is told to move again.

• MotorCon[0] is connected to the CLK pin of the driver chip. Every time the chip sees a positive edge, it moves the motor half a step in the direction given by MotorCon[1].

Page 9: Motor Control

Good Points

• The motor control will still work correctly when another coordinate is given before the motor has reached the previous one

• The delay between stepper motor signals ensures the motor has enough time to reach the correct coordinate

Page 10: Motor Control

May Need Work

• The scaling factor may need to be adjusted for certain points in the screen/motor range

• Try to shorten the delay between motor signals as much as possible