Motor Control of an Oscillating Pendulum - PowerPoint PPT Presentation

About This Presentation
Title:

Motor Control of an Oscillating Pendulum

Description:

To oscillate the pendulum to a predefined angle and, using optical sensor ... Once the Pendulum has successfully cleared the equilibrium sensor, the length of ... – PowerPoint PPT presentation

Number of Views:86
Avg rating:3.0/5.0
Slides: 33
Provided by: mye39
Category:

less

Transcript and Presenter's Notes

Title: Motor Control of an Oscillating Pendulum


1
(No Transcript)
2
Motor Control of an Oscillating Pendulum
  • Nick Myers and Chirag Patel
  • March 9, 2004
  • Advised by Dr. James Irwin and Mr. Jose Sanchez
  • Bradley University Department of Electrical
    Engineering and Technology

3
Presentation Overview
  • Project Objectives
  • System Block Diagrams
  • Step by Step Project Goals
  • Work Completed - Hardware (Nick)
  • Work Completed - Software (Nick)
  • Work Completed - Hardware (Chirag)
  • Work Completed - Software (Chirag)
  • Initial PWM Design Plan
  • Summary of Progress
  • Possible Additions
  • Questions

4
Objectives
  • To initialize the oscillation of a weighted
    pendulum using microprocessor controlled motor
    bursts.
  • To oscillate the pendulum to a predefined angle
    and, using optical sensor outputs, maintain the
    angle of oscillation.

5
System Level Block Diagram
6
Subsystem Level Block Diagram
7
Step by Step Project Goals
  • H-bridge hardware
  • EMAC to H-bridge interface hardware
  • H-bridge switching software
  • Initial motor pulsing software
  • Incrementing motor pulsing software
  • Optical sensor hardware
  • Optical sensor interrupt software
  • Oscillation stabilization software
  • User interface software
  • Pendulum construction and wiring

8
H-bridge Hardware
Truth table for forward and backward states
9
H-bridge Hardware
  • The H-bridge uses (2) N-Channel ZVN4206
    Transistors and (2) P-Channel ZVP2106 Transistors
  • The H-bridge operates on a supply voltage of 15V
    DC
  • The inputs of the active transistors are pulled
    to Vcc
  • The voltage across the motor is approximately 12V

10
EMAC to H-bridge Hardware Interface
  • All of the outputs from the EMAC microprocessor
    board come from Port 1
  • Port 1 supplies 80uA of current
  • Additional hardware must be added for EMAC to be
    able to turn the H-bridge on/off

11
EMAC to H-bridge Hardware Interface
From EMAC
To H-bridge
12
H-bridge Microprocessor Code
  • The H-bridge will switch motor burst direction
    every time the pendulum passes equilibrium
  • Once the direction is switched, a burst will
    immediately be sent
  • The H-bridge code will be called by the
    equilibrium sensor interrupt
  • The H-bridge code will switch motor polarity by
    switching on/off two pins on Port 1

13
H-bridge Microprocessor Code
Flowchart
14
Initial Motor Pulsing Software
  • The equilibrium sensor will always be blocked
    initially
  • Interrupt driven pulsing cannot be used to begin
    pendulum oscillation
  • A constant pulse must be provided until the
    pendulum clears the equilibrium sensor

15
Initial Motor Pulsing Software
Turn on P1.4 and P1.5 and set 31H1
31H1?
Yes
No
Turn off P1.4 and set 31H0
Turn off P1.5 and set 31H1
Delay
Delay
Flowchart
16
Incrementing Motor Pulsing Software
  • Once the Pendulum has successfully cleared the
    equilibrium sensor, the length of the torque
    bursts can be increased
  • The bursts will only be sent when the equilibrium
    sensor is crossed
  • These bursts will continue to increase in length
    until the angle sensor is crossed

17
Incrementing Motor Pulsing Software
Flowchart
18
Oscillation Stabilization Software
  • When the pendulum reaches its desired angle of
    oscillation, it should remain constant at that
    desired angle
  • Once the pendulum passes the angle sensor, the
    interrupt handler will check how many times the
    sensor is crossed
  • If the pendulum is overshooting the sensor, the
    delay will be shortened

19
Oscillation Stabilization Software
Flowchart
20
User Interface Software
  • On startup, the LCD prompts the user Press A
    to Begin
  • The program is waiting to be interrupted by the
    keypad button A
  • When the keypad button A is pressed, the
    initial motor pulsing software is entered and the
    pendulum begins its oscillation

21
User Interface Software
  • As the initial motor burst software is entered,
    the LCD display changes to Press B to Stop
  • After every motor pulse, the code checks to see
    if the button B has been pressed
  • If the button has been pressed, the motor is
    turned off and the the LCD is reset to the
    initial prompt

22
Constructed Pendulum
23
Optical Sensor
  • Two optical sensors
  • Equilibrium Sensor
  • Predefined Angle Sensor
  • RF 200
  • Limits Current to 20 mA
  • IF 5V/200 20mA
  • Enough Current to transmit infrared signal
  • Not Enough Current to Damage Optical Sensor

24
Optical Sensor
  • R1 4700 to account for desired on/off switching
    times
  • ON Switching Time
  • 8us 1.7 14.4 us
  • OFF Switching Time
  • 50us 1.6 80us
  • Equilibrium and Predefined Angle Sensor Have Same
    Values.

25
Sensor Initialization
  • Equilibrium Sensor
  • Handled by Interrupt 3
  • Once obstructed Rerouted to code in order to
    output motor burst
  • Predefined Angle Sensor
  • Handled by Interrupt 4
  • Once obstructed Rerouted to code in order to
    count the number of obstructions
  • Used to determine overshoot or undershoot

26
Initial Design Plan
  • PWM signal will be used to initiate the
    oscillation of the pendulum.
  • Once pendulum is beyond the equilibrium sensor,
    timed pulse signals will be used to oscillate the
    pendulum.

27
Initial Design Plan
  • Pulse Width Measurement code used to measure
    length of time sensor is obstructed by pendulum.
  • This time will be used to control the length of
    the pulsel sent to motor to control oscillation
    of pendulum.
  • Faster the oscillation Smaller pulses
  • Slower the oscillation Larger pulses

28
Initial Design Plan
  • Pulse Width Measurement
  • Timer 2 used in gated mode
  • When P1.7 High
  • Timer begins counting
  • When P1.7 Low
  • Timer stops counting
  • Obtain time value through pulse width measurement
    when pendulum is dropped from desired angle.
  • Compare that value to value obtained each swing.
  • If value obtained gt stored value - INCREASE BURST
    LENGTH
  • If value obtained lt stored value DECREASE BURST
    LENGTH

29
Initial Design Plan
  • Initial design was not used due to the
    complications encountered
  • Proved to be more time-consuming than expected
  • However, this design can be used for changing
    loads.

30
Summary of Progress
  • Completed H-bridge hardware
  • Completed EMAC to H-bridge hardware interface
  • Completed H-bridge software
  • Completed initial motor pulsing software
  • Completed incrementing motor pulsing software
  • Completed optical sensor Hardware
  • Completed optical sensor interrupt software
  • Completed oscillation stabilization software
  • Completed user interface software
  • Completed pendulum construction

31
Possible Additions
  • Adding additional angle sensors so that user may
    choose from multiple angles of oscillation
  • Changing initial motor pulsing code so that
    changing loads could be oscillated
  • Creating power storage circuitry so that system
    could run from a lower supply voltage

32
Questions?
Write a Comment
User Comments (0)
About PowerShow.com