stabilization table for accurately balancing a loose element william brown phillip chen eric...

Post on 15-Jan-2016

222 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

STABLEStabilization Table for Accurately Balancing a Loose Element

William BrownPhillip Chen

Eric HuckenpahlerLaura HughesBrian IbelingChris Johnson 1

Critical Design ReviewDecember 13th, 2012

Project Overview

Develop a robust control system that is capable of balancing a ball at a plate’s origin.

Allow users to control the plate and ball’s position with various devices.

Integrate interactive games.

Capable of fully autonomous operation.

Operate from AC wall power.2

3

System Block Diagram

4

Progress Since PDR

Constructed physical model to demonstrate plate and motor interaction.

Communicated and translated touchscreen data to motor rotation.

5

Mechanical System & Motor Interface

Mechanical Design

From PDR:

6

Mechanical Design

7

Motor

The motor:

 

       

•Sparkfun•4.8 to 6.0V•Analog actuation•Torque around 6kg*cm•Small Footprint•$12•180 degrees of movement

Motor

The motor:

 

       

•Hitech•4.8 to 6.0V•Small Footprint•Digital actuation•Torque around 343 oz-in•$70•90 degrees of movement

Pivot

We could have used: Ball bearing

Fiberglass rod

Shaved down hinges

Rotating pivot

 

Pivot

Or, this nail.

Arms

Fiberglass is finally appropriate Rigidity issues may force us into

aluminum arms

Joints

Binding posts were chosen over shoulder bolts Cheaper and easier to find Works for both arm-to-arm and arm-to-

plate connections

Motor-to-Arm

Bolted it down with the included screws Acrylic base needed to secure screws Motor arm was imperfect

Arm-to-Plate

15

We could have used: Ball bearings

Pneumatics

Gears

Magnets

 

Arm-to-Plate

Or, a small hinge:

Mechanical Design: Pending

There are still questions to answer How will the second motor affect

rotational stability? The motion is software limited, but

should we physically limit this as well?

18

Power Design

19

Power Design

We are strongly considering the use of a computer PSU to supply the power to our project

20

Power Design

Why? Integrated/compact design Efficiency Safety Very high quality control▪ No fried controllers!

21

Power Design

PSU supplies 12V, 5V, and 3.3V lines

We will need to create a converter circuit on PCB to supply 6V to motors

PCB will be used for power distribution

22

Control System

23

Control System

The current control system is fairly theoretical

Testing will determine whether or not a different approach to controlling the ball will be necessary

24

Control System

Control based off of second-order physical system

Forces on the ball were linearized with respect to angle to simplify system

Using a line of best fit of to gave a good approximation with .

Max difference between real and estimated accelerations is

25

Control System

26

Control System

Factoring in rotational inertia, the position of the ball can be modeled as

Sanity check: A constant angle input does cause a constant acceleration

27

Control System

For the first design, a simple case was chosen.

A function that can control this was found to be

28

Control System: Simulink Model

29

Control System

30

Control System

Possible issues: This model is highly theoretical. It

remains to be seen if all forms of disturbances can be rejected▪ If problems arise, a more robust approach will

be needed Microcontrollers don’t work in the

Laplace domain!

31

Plate Touchscreen Sensor

32

Touchscreen Accuracy

Large touchscreen wasn’t accurate enough

33

Touchscreen Accuracy

Smaller touchscreen showed smoother results

34

Analysis

We need a more accurate large touchscreen that will still react to the ball’s weight when the touchscreen is at an angle

35

Software System

36

Software System

Simple main file Initialize peripherals Main loop▪ Check state and act accordingly

Header file for each peripheral More modular Keeps code readable

37

Software Interrupts

Primarily soft interrupts Best for an embedded environment Easy to set flags which will determine

states

Some hard interrupts Good for emergency shutoff and other

time-critical tasks

38

Microcontroller Software Interface

39

Hardware-Software Interaction & Microcontroller Usage

Hardware interaction with software, requires careful planning

General hardware Interaction

Wifi/Eth.

Joystick

Cell Phone

Computer

Local Interface

Bluetooth

PIC32 Micro

UART

UART

USBADCDI/O

DI/OUART

User Input &

ball feedback

UART

Hardware HW Action

Debugging Hardware

PMPLCD screen & 7-segment debug

display

Touch Screen DI/OADC

PWM Motor Control

41

On-chip hardware

Important PIC32 built in peripherals 5 UART channels 1x Parallel Buss 16 Channel ADC 5x 16 bit Digital Timers 8x DMA channels

42

Ethernet/Wifi

Wireless chip: 1x UART and 2x DMA channels to prevent the processor from having to wait for data.

Wifi/Eth.

Cell Phone

Computer

PIC32 MicroUART

User Input &

ball feedback

43

Debugging Port

1x UART and 2x DMA channels to keep the processor from having to wait for data to arrive.

PIC32 Micro UART

Debugging Hardware

44

Bluetooth

1x UART and 2x DMA channels to prevent the processor from having to wait to acquire data.

Cell Phone Bluetooth PIC32 MicroUART

User Input &

ball feedback

45

Joystick

Flexibility in choice On-board USB 2.0 On-The-Go host

support with dedicated DMA channels

Extra DI/O and ADC pins for a game port Joystick.

46

Other Forms of User Input Digital push buttons. Should be

triggered by interrupts to provide highest response rate to user & button functionality

Local Interface

PIC32 Micro

DI/OUART

User Input &

ball feedback

47

LCD Screen

Fastest operation uses PMP bus to control parallel port enabled devices.

PIC32 Micro PMPLCD screen & 7-segment debug

display

48

Table Control

2x PWM outputs, one for each motor, each require a 32bit timer to output slow enough.

Requires 4 of the 5 16bit timers.

Needs to be updated at 50Hz to maximize control systems abilities.

PIC32 Micro PWM Table Control

49

Touch Screen

2x ADC pins Need to be triggered to sample at a steady

frequency in order to calculate velocity. Will likely involve the use of the 5th timer.

2x DI/O pins Needs to update at highest rate TBD.

Hopefully 100-200Hz

PIC32 Micro

Touch Screen DI/OADC

User Input &

ball feedback

50

Peripheral Utilization

Hardware Number Available

Number Used

UART 5 3

Parallel Buss 1 1

ADC’s 16 2-4

16 bit digital timers 5 5

General Purpose DMA channels

8 6

General DI/O Lots +-12

Knowing this information, need to carefully program our processor otherwise system will fail to meet hard deadlines.

51

Approximate Pin Usage

Using a good number of the available I/O pins as well.

Hardware Number Pins/Feature

Number Used

UART 2 6

Parallel Buss 11 11

ADC’s 1 2-4

16 bit digital timers 1 2 required PWM signals

General DI/O Plenty +-12

Total: +-35 pins

52

Software System: Scheduling

53

Software System: Scheduling

Need some scheduler to deal with multiple demands made on processor at a time:

Various demands should only be ignored so long before being addressed

54

Software System: Scheduling

If only one demand is made at a time, scheduling is simple: Deal with the demand and wait for

another one

Problems arise when multiple demands arrive at the same time or arrive during another demand: How should we pick which demand to

address first?

55

Software System: Scheduling

Simple Priority Based Scheduling: Easy to code and debug Provides minimal control over scheduling

and ignores deadlines completely—can lead to starvation Why

am I always last?

56

Software System: Scheduling

Variable Priority Based Scheduling: Some difficulty debugging Provides extensive but unintuitive

control over scheduling and can indirectly address soft deadlines Sometimes the

world appreciates me

as I deserve

57

Software System: Scheduling

Time Slice Based Scheduling: Provides extensive and intuitive control over

scheduling and predictable deadlines

Difficult to code and debug

Increased context switching inevitably leads to poorer performance

Poor design could lead to insufficient processor time being given to demands

58

Software System: Scheduling

More complex systems yield better results but are more difficult to implement

Use simpler systems to begin with and then upgrade to more complex system if simpler system is insufficient for our purposes

59

User Interface

User Interface

User

Interaction User

Interface

Control System

DesiredPosition

User Interface

61

User

Parse Input (joystick)

Control System

DesiredPosition

Parse Input (tablet/pho

ne)

Physical

State

Input

Game Mode

Standard Mode

Art Mode

Interface

62

User Interface: Software Architecture

Multiple methods of manipulating and viewing the same control system: Model View Controller

63

System Risks

64

Risks: Mechanical System

Ball’s speed and weight too great Non-steel ball with higher frictional

coefficient

Dual motor interaction and locking Ball joints rather than door hinges Redesign motor arms

65

Risks: Software System

Parallel processing for touchscreen, UI devices, and motor actuation Optimize code Split responsibilities over 2 processors

Noisy PWM signal for motors Filter signal output Split responsibilities over 2 processors

66

Risks: Control System

Unable to meet deadlines for data analysis and plate actuation Adjust control code to predict ball behavior

Optimize code for faster runtime operation

Faster processor

Split responsibilities over 2 processors

67

Division of Labor

P = Primary S = Secondary

Task Brian Ibeling Laura Hughes William Brown Phillip Chen Eric Huckenpahler Chris Johnson

Motor Control S P S Mechanical/

Structure P S S

Power Board S S P

ADC Board S S P Command and Data Handling S P S S

TouchScreen Control S S P S

User Interface Control S S P

User Interface Device Comm S S P

Documentation P S S S S S

68

Estimated BudgetItem Unit Price Quantity Unit Total

MechanicalServomotor $77 4 $308Aluminum (0.5” x 0.5” x 6”) $20 4 $80Plexi-glass Plate $40 1 $40External Case $50 1 $50Steel Ball $10 1 $10

ElectricalMicrochip PIC32 Development Board $70 2 SampledPower PCB Creation $45 3 $135AC AC Transformer $20 3 $606V Regulator $15 3 $453.3V Regulator $15 3 $45Touchscreen Sensor $50 1 $50Joystick $20 1 $20LEDs $0.15 100 $15Breakout ADC Board Creation $45 3 $135Touchscreen Driver $7 2 $14Misc. Dev Components (Resistors, Caps, headers) $50 1 $50

Net Estimated Budget$1057

69

Schedule

70

Milestone 1: Week 7

Structure fully developed Basic control algorithm implemented Rev 1 Power PCB developed and

tested Testing plans implemented

71

Milestone 2: Week 12

System integration complete Fine control algorithm actuating Rev 2 (3 if needed) Power PCB

complete Aesthetics fully developed Documentation complete

72

Design Expo

Capcakes = capstone + cupcakes Fully functional system Games implemented and available

to guests Aesthetically pleasing system and

presentation

73

Questions?

74

Extra Slides

75

Block Diagram

Control System: Basic Control Mode

Ball resting at origin

Touchscreen senses ball movement

Ball’s offset and speed calculated

Motors and plate

actuated

Ball Centered?

No

Yes

76

Control System: User Interface

Ball resting at initial position

UI device sends data

Plate tilt or ball offset calculated

Motors and plate

actuated

77

Ball at final

position?No Yes

Complete

top related