ECE 445 Final Presentation

Download Report

Transcript ECE 445 Final Presentation

ECE 445 Final Presentation
Robotic Sorting of Laundry
Group 31
Danny Coombs
Anusha Nagabandi
Sid Sethupathi
Overview
● Project Description
● Design, Build, Test
o
o
o
o
Power Supply
Microcontroller Board
Kinematics
Software
● Integration
● Further Work
● Questions
Objective
● Create an automated sorting system
● Combine concepts of kinematics with
embedded systems to create a functional
device
● Automation of trivial tasks is important
o
Frees up with time to do other tasks
Block Diagram
Power Supply Design
Input: 120V AC
Output: 5V at 3A with <5% ripple
Power Supply Simulation
Simulation using PSPICE and TI model for the LM676S-3.3
120V AC
Input
~13.5V Input
10V AC
Output
3.3V Output
Transformer input/output
Switching regulator input/output
Voltage (V) vs. Time (ms)
Voltage (V) vs. Time (ms)
Power Supply Build - Failure
● Issue: 120V arc to earth ground
causing significant spark and burning
of copper on board
● Cause: Insufficient isolation between
copper wiring of 120V connection and
ground plane
● Fix:
o Removed ground plane from this
area
o Better connection between wire
and board
Power Supply Build - Final
120V AC Input
Resistive
Test Load
(5ohms)
5V 3A Switching Regulator
120V AC -> 10V AC
Rectification and Smoothing
Power Supply Test and Results
Rectification & Smoothing
Voltage at Output of Smoothing Capacitor
With 5ohm* load:
Average Voltage: 13.3V
Average Peak to Peak: 3.5V
*5ohm chosen since 1A is
expected average current from
load
Voltage (V) vs. Time (ms)
Power Supply Test and Results
Switching Regulator Output
Voltage Across Load
With 5ohm Load:
Maximum Voltage Average: 5.04V
Minimum Voltage Average: 4.86V
Peak to Peak Average: 172.1mV
Within our constraints of 5 +/- 5%
Voltage (V) vs. Time (ms)
Microcontroller Board - Design
● 3.3V Linear
regulator for uC Vcc
● Designed to be
reprogrammed from
a TI Launchpad
using SPY-BI-WIRE
● Connections for all
of the peripheral
components
Microcontroller Board - Build
Potentiometer for
LCD brightness
5V Power
Jack
Pixy Header
3.3V Linear Regulator
MSP430F5529
Microcontroller Board - Issues
Problem
● DC Power Jack
mounting
● Reset button
connection
● SPI CS and Clock
pins misconnected
Fix
● Drilled holes out at
shop
● Tore up trace, used
jumper wire
● Tore up trace, used
jumper wires
Microcontroller Board – Test
● 3.3V Output from
regulator
● Reprogrammability
● UART for Debug
● Start Button
● Reset Button
● Mode Select
✓
✓
✓
✓
✓
✓
● LED (x2) ON/OFF
● IR Sensor ADC
● PIXY SPI
communication
● PWM (x6)
● LCD screen
✓
✓
✓
✓
✓
Kinematics – Setup
Figure 2. Assigning links and joints to the arm
Figure 1. Mechanical Arm
Figure 3. Assigning coordinate systems to each joint
Forward Kinematics - Calculations
1. Specify DH Parameters
a: Link length. Distance along xi from the intersection of the xi and zi-1 axes to oi
d: Link offset. Distance along zi-1 from oi-1 to the intersection of the xi and zi-1 axes
α: Link twist. Angle from zi-1 to zi, measured about xi
θ: Joint angle (the variable). Angle from xi-1 to xi, measured about zi-1
Table 1. DH parameters for each link
Forward Kinematics - Calculations
2. Formulate Transformation Matrix
T 04 = A1*A2*A3*A4
x = a4c1c2c3c4 - a4c1s2s3c4 - a4c1c2s3s4 - a4c1s2c3s4 + a3c1c2c3 – a3c1s2s3 + a2c1c2
y = a4s1c2c3c4 – a4s1s2s3c4 – a4s1c2s3s4 – a4s1s2c3s4 + a3s1c2c3 – a3s1s2s3 + a2s1c2
z = -a4s2c3c4 - a4c2s3c4 + a4s2s3s4 – a4c2c3s4 – a3s2c3 – a3c2s3 – a2s2
Forward Kinematics - Test
Set up for Angles:
0
0
0
90
X:
Y:
Z:
0
out of page
-90
Inputs to Java code: four angle values
Outputs: (x, y, z) position of tip of claw, using 4 for each link length
0, 0, 0, 0
30, 0, 0, -45
-30, 0, -45, 0
0, 0, -90, 0
x= 12
y= 0
z= 0
x= 9.4
y= 5.4
z= 2.8
x= 8.4
y= -4.8
z= 5.7
x= 4
y= 0
z= 8
0, 0, 0, -90
0, 40, 0, 0
0, 0, -40, -90
0, 0, 0, -135
x= 8
y= 0
z= 4
x= 9.2
y= 0
z= -7.7
x= 4.5
y= 0
z= 5.6
x= 5.2
y= 0
z= 2.8
Inverse Kinematics - Calculations
•
Geometric approach: less computation time, and not difficult for such a small system
•
To ensure that the claw would point down (and to make the geometry easier to
visualize)
-Solve for first 3 angle values by solving for location of link 3
-Solve for angle 4 by iterating through values and using forward kinematics to find an
angle for which the claw is at (x, y, z+ a4)
Inverse Kinematics - Angle1, Angle 3
x, y, z
TOP VIEW:
y
θ1= tan-1(y/x)
θ1
x
SIDE VIEW:
θ3
z
2a2a3cosθ3 = r2 + z2 – a22 – a32
a3
a2
sinθ3 = √(1-cos2θ3 )
√ (r2+z2)
θ3= tan-1(sinθ3/cosθ3)
θ2
r
Inverse Kinematics - Angle 2
a = tan-1(z/r)
θ3
a2
a3
√ (r2+z2)
θ2
sinb = a3sinθ3
cosb = a3cosθ3 + a2
b = tan-1(sinb/cosb)
θ2 = a+b
b
a
θ3
a3
a2
√ (r2+z2)
θ2
a = tan-1(z/r)
sinb = a3sinθ3
cosb = a2
b = tan-1(sinb/cosb)
θ2 = a+b
Inverse Kinematics - Angle 4
• Iterate through values for angle 4 (0 to 180)
• Stop when forward kinematics equations give us desired (x, y, z) location
Iterating through values for angle 4
Test Inverse Kinematics
•
Same tests as forward kinematics, but in reverse
•
Inputs = (x,y,z) location
•
Outputs = four angle values
x= 12
y= 0
z= 0
x= 9
y= 5
z= 3
0, 0, 0, 0
31, 0, 0, -46
x= 8
y= -5
z= 6
x= 4
y= 0
z= 8
-29, 0, -44, 0
0, 0, -90, 0
Kinematics - Results
Successes
• Correct results for both forward and inverse kinematics
Shortcomings
• Restriction on the claw orientation limited our possible (x,y,z) end
locations
-We had to search through possible angle values using forward
kinematics for the otherwise unreachable locations (use for loops until
reaching desired location)
Software - Overview
● Coding for MSP430F5529
● Used Energia
● Useful libraries
○
○
○
SPI.h
Pixy.h
LiquidCrystal.h
● Data flow
○
Pixy -> MSP430 -> Actuate servos
Software – Camera (Pixy)
● PixyMon
○
Used to upload signatures to
Pixy’s flash memory
● Test SPI communication:
see appropriate values returned
from Pixy
Pixy
PixyMon
Information returned from camera, via SPI
Software - Data Acquisition
● Pixy communicates with MSP430 via SPI
Word 0
Sync (0xAA88)
Word 1
Checksum of words 2-6
Word 2
Signature Number
Word 3
x center of object
Word 4
y center of object
Word 5
width of object
Word 6
height of object
Software - Calibration
● Transformation from camera pixels to physical
(x, y, z) location
● Dead reckoning using markers with known
locations
Software - Calibration
13, 19
9, 12
Markers of known positions, used for calibration
Software - Arm Control
● Use 4 angles to set servo locations
● Lookup table
-Inputs : (x,y) desired location
-Outputs : four angle values
-Custom structs with angles
-Populated using inverse kinematics
-Filled in missing values using forward
kinematics
Software - Issues
Problem
● No native floating point
Fix
● Precompute angles and
store in LUT
● Rounding errors
● Manually tweak a few
values for accuracy
● LUT too big for
prototyping with Arduino
● Non-issue on MSP430
(8KB > 1KB RAM)
Integration
1) Assemble the arm
2) Send PWM values to motors through code and uC
--Map from motor angles to arm locations--
Motor 1:
0 degrees, Arm left
Motor 1:
180 degrees, Arm right
Integration
3) Map from angles (of calculations) to angles (of motors)
0
90
-90
90
-(x-90)
180
90
0
90
0
180
180-x
0
90
-90
x+90
0
0
180
-90
x+180
90
4) Assemble basket, camera mount, and arm
Integration
5) Take the mapping from camera pixels to xyz location, and use it for full integration testing
•
Camera sees a colored object and returns an accurate (x, y, z) center point
•
Microcontroller uses look-up table and transformations to send correct angle values to motors
•
Arm takes angle inputs and moves to desired location in basket
•
Arm picks up object and drops it off in designated location
6) Successful Demo
Integration - Challenges
● Power supply integration issue:
-Saw spikes of 4-5A during microcontroller programming due to
undefined PWM outputs ~10% of the time
-Power supply switching regulator can only output 3A before
lowering output voltage
-Undervoltage due to current spike can harm sensitive electronics,
especially PIXY and MSP430
Further Work
•
Allow use of a power supply
-Design power supply with higher current rating
-Redesign microcontroller board with a servo controller
•
Use more powerful microcontroller (MSP432)
•
Create a more generalized sorting system:
-More complicated image processing (shapes, size)
-Integrated depth sensing and arm positioning to
deal with piles of clothing
Thank you
Kevin Chen
Nathan Poland
ECE Machine Shop
ECE Service Shop
ECE 445 Course Staff
Questions?