RAPID FIRE

advertisement
RAPID FIRE
Robotically Actuated Prevention/Intervention Device Full of Innovative and Responsible Engineering
Critical Design Review
February 25, 2010
Riley Pack
Eric Pahlke
Kelly Shuster
Greg Stahl
PROJECT OVERVIEW
• The RAPID FIRE system will be able to recognize moving
targets in a room, choose the optimal target, and track it.
• Recognize one or more moving targets using digital
cameras.
• Choose the optimal target, track its movement, and fire a
projectile (foam dart or disk) at it.
• Be capable of fully autonomous operation.
• Have a user interface that allows for control of modes,
manual turret control, and image viewing.
• Operate off of AC wall power.
BLOCK DIAGRAM
Camera Board(s)
with FIFO
Power
DSP(s)
Mechanical
Control
Processor
Motors
Digital Connection
Analog Connection
Power Connection
EXPANDABLE HARDWARE ARCHITECTURE
Camera
PCB
Camera
PCB
Up to 4 DSPs
DSP PCB
Power
Supply
Camera
PCB
Up to 4 Cameras
per DSP
DSP PCB
Currently using
2 DSPs (8 total
cameras)
Motor Controller PCB
Data Connection
Camera
PCB
Power Connection
Motors
CONTROL PROCESSOR
Camera Board(s)
with FIFO
Power
DSP(s)
Mechanical
Control
Processor
Motors
Digital Connection
Analog Connection
Power Connection
CONTROL PROCESSOR
• Receives (x,y) location of optimal target from DSP
• Communicates with DSP(s) via SPI
• Triggers PWMs attached to 2 H-Bridges
• Receives feedback from 2 Optical Encoders
• Uses negative feedback PI Controller to adjust position
• Horizontal and Azimuth positions each have their
own PI Controller
CONTROL PROCESSOR
• Processor Selection
• TI Stellaris LM3S2965
• Specifications
• 50 MHz Maximum Clock Speed
• 6 PWM Channels
• 2 Quadrature Encoder Interfaces (QEI)
• Single-cycle multiply instruction and hardware divide
• Variety of common interface modules
CONTROL PROCESSOR
Target
Motor Position
from DSP
SPI Interface
Controller
Plant
Actual
Motor Position from
Optical Motor Encoder
CONTROL PROCESSOR
Target
Position
Actual
Position
KPs + KI
b = 0.045
M = 2.3kg
R = 4.5 in
T = 0.4689 Nm = 66.4 oz-in = 80% of Max Efficiency
J = 0.5*M*R2
CONTROL PROCESSOR
KP = 100
KI = 50
tR = 1.5s
tS = 5 s
20% overshoot
CONTROL PROCESSOR
CAMERA(S)
Camera Board(s)
with FIFO
Power
DSP(s)
Mechanical
Control
Processor
Motors
Digital Connection
Analog Connection
Power Connection
CAMERA(S)
• Camera Selection
• Toshiba TCM8230MD from
Sparkfun
• Specifications
• 15 or 30 FPS
• VGA or QVGA supported
• Digital Output (YUV422 or
RGB 565)
• Auto Gain Control, Auto White
Balance
http://www.sparkfun.com/commerce/
product_info.php?products_id=8667
CAMERA(S)
SDA
Camera
SCL
uC/DSP
Enable
And
Write
Strobes
Glue Logic
8-bit
Parallel
Data
FIFO
8-bit Parallel
Data to DSP
DCLK
VD
HD
FIFO to
USB
Converter
Debug to PC
CAMERA(S) – TEST BOARD
USB-FIFO
Camera
SPLD
FIFO
CAMERA(S) – TEST BOARD
• Almost Able to Take Sub-QCIF (128 x 96) Resolution
Pictures
• USB Write Speed Too Slow
• Solution: Upgrade to Faster USB Chip
CAMERA(S) – TEST BOARD
FIFO WR
USB WR
CAMERA(S) – REVISION 2
• Current Camera Status
• Ready to Order Camera Board Revision 2
• Updated USB-FIFO Chip to Allow for 8 MBytes/sec
• Changed to Asynchronous FIFO to Simplify DSP
Interface
CAMERA(S) – CAMERA / FIFO INTERFACE
CAMERA(S) – CAMERA / SPLD INTERFACE
CAMERA(S) – REVISION 2 LAYOUT
Level
Shifter
Camera
FIFO
USBFIFO
POWER
Camera Board(s)
with FIFO
Power
DSP(s)
Mechanical
Control
Processor
Motors
Digital Connection
Analog Connection
Power Connection
POWER
• Power Supply
• 12V (Motors)
• 5V (Optical Encoder & FIFO)
• Isolated Integrated DC-DC Module from TI
• 3.3V (DSP I/O Voltage)
• Linear Regulators from TI
• 3.3V (Primary I/O Voltage)
• 2.8V (Camera I/O)
• 1.5V (Camera Sensor)
• 1.26V (DSP Core)
POWER
• ATX12V V2.2 550W Power
Supply
• 12 V Line Rated to 2 x 16 A
• 3.3 V Line Rated to 25 A
• 5 V Line Rated to 25 A
DIGITAL SIGNAL PROCESSOR
Camera Board(s)
with FIFO
Power
DSP(s)
Mechanical
Control
Processor
Motors
Digital Connection
Analog Connection
Power Connection
DIGITAL SIGNAL PROCESSOR
• Processes images from CMOS cameras to detect and
track moving targets
• Subtraction for motion detection
• Blob detection algorithm
• Replaced open source library with custom
algorithm to make integration to DSP easier
• Communicates with the motor control processor
• Sends debug data to PC using FIFO to USB
• USB is an easier debug port than an LCD
DIGITAL SIGNAL PROCESSOR
• DSP Selection
• TI TMS320VC5501
• Slightly lower performance than original selection, but QFP package
greatly reduces cost and risk.
• Specifications
• 300 MHz, up to 600 MIPS
• Hardware Memory Interface
• Used for SDRAM, FIFOs, FIFO to USB
• Hardware I2C and SPI Controllers
• I2C used to control cameras and I/O expanders, and for boot loader
• SPI used to transfer data to the motor controller
• Driver Library Available from TI
DIGITAL SIGNAL PROCESSOR PCB
• Four layer board
• DSP
• SDRAM
• Hardware support for 4 cameras
• IO and I2C expanders allow multiple cameras to
send data through the DSP’s External Memory
Interface
• FIFO to USB converter (same as on camera boards)
allows the DSP to send images and computation results
to a PC
• Status: Schematic and Layout 100%, almost ready to order
DIGITAL SIGNAL PROCESSOR PCB
• Boot loader
• DSP has an I2C EEPROM boot mode
• Use an ATMEGA32 AVR to transfer code from RS232 to I2C EEPROMs
• Isolation
• All signals from the DSP connecting off the board
are isolated to protect the DSP (ISO7240 from TI)
• The 3.3V DC-DC converter for the DSP is isolated
(DCR010503 from TI)
DIGITAL SIGNAL PROCESSOR PCB
Power
5V from
MC PCB
Isolated
3.3V
DC-DC
USB
Debug
AVR
1.26V
VREG
Programming
Port
Memory Bus
I2C
I2C
Switch
Isolators/
Level Shifters
DSP
EEPROMs
To
Camera
PCB
SDRAM
Data to
MC PCB
I/O
Expanders
SPI
GPIO
LEDs/
Debug
RS232
Power Connection
DIGITAL SIGNAL PROCESSOR PCB LAYOUT
2
4
6
1
3
5
8
10
12
2
4
6
7
9
11
1
3
5
Cam1
2
I/O Expanders
4
1
2
1
1
2
2
1
2
3
3
2
15
14
13
12
2
2
4
1
2
5
7
6
5
4
2
3
2
1
11
9
10
11
14
15
16
1
12
13
10
12
7
9
11
To Cameras
1
1
16
1
8
8
Cam3
0
2
4
6
1
3
5
8
10
12
17
15
13
11
9
7
5
3
1
7
9
11
18
16
14
12
10
8
6
4
2
0
RS232
Cam2
10
9
16
15
14
13
1
12
2
11
10
10
9
1
2
2
4
6
1
3
5
8
10
12
17
15
13
11
9
7
5
3
1
7
9
11
18
16
14
12
10
8
6
4
2
Cam0
1
2
1
2
4
1
2
6
1
2
3
4
5
6
7
1
1
3
2
8
1
2
3
4
5
6
7
ISOLATORS
8
2
5
1
U_IO Expanders
1
1
2
1
2
U_Interface to Camera
7
8
1
2
1
8
2
1
1
2
2
1
2
3
7
2
1
6
2
1
1
2
1
2
4
5
2
1
5
4
2
1
1
1
2
6
3
2
1
2
7
2
2
1
1
2
2
4
6
8
1
3
5
7
10
3
2
14
16
18
20
22
24
26
28
30
32
34
36
38
17
19
21
23
25
27
29
31
33
35
37
7
6
5
4
3
2
1
DSP
2
1
4
12
9
1
11
13
15
6
2
7
3
8
4
9
5
8
7
6
5
4
3
2
1
8
7
6
5
4
3
2
1
8
7
6
5
4
3
1
2
1
2
1
2
1
2
1
2
1
2
2
1
1
11
2
2
1
2
1
2
1
2
5
6
7
8
1
9
2
1
2
1
1
1
2
3
1
2
1
2
8
U_DSP Host Port
1
2
2
1
5
2
1
1
2
4
U_DSP General
10
11
12
13
14
15
16
9
10
11
12
13
14
15
16
9
10
SDRAM
11
12
13
14
15
16
2
2
10
1
1
2
1
18
1
17
2
1
18
1
17
2
18
1
1
10
1
2
1
2
27
2
25
24
23
22
21
20
19
18
17
16
14 2
15
13
112
11
10
9
8
7
6
1
5
4
1
3
2
8
7
6
5
4
3
2
1
1
1
2
1
1
6
Boot loader
3
26
2
17
9
2
2
2
2
U_Programming and Debug
2
4
5
7
2
6
U_DSP Pow er
2
3
1
2
U_DSP Memory Control
8
11
12
13
14
15
16
17
18
19
20
2
4
1
1
9
2
1
28
7
12
7
12
1
1
7
29
30
31
32
33
34
35
36
37
38
39
40
2
41
42
1
43
44
45
46
2
47
48
49
50
51
52
53
5
54
USB
12
1
1
8
2
2
1
7
3
2
6
8
11
8
9
10
9
2
2
11
8
11
10
9
10
2
4
5
1
8
5
1
4
6
To MC
1
2
1
7
3
2
6
4
1
1
2
2
2
1
1
2
5
2
11
1
3
U_Interface to Motor Control
1
6
1
1
1
1
7
2
6
2
10
9
8
7
6
5
4
3
2
4
2
13
43
14
42
15
41
16
40
39
18
38
19
37
14
13
12
1
11
10
2
2
2
1
2
2
3
1
20
36
21
35
6
22
1
2
1
2
2
1
4
2
3
U_DSP USB
2
1
0
2
1
2
1
5
7
2
1
2
1
1
4
2
2
2
1
9
2
1
8
15
2
2
17
16
3
1
2
1
1
44
5
1
1
1
3
1
12
3
2
2
8
11
2
1
3
2
1
1
34
2
1
2
1
2
1
2
5
4
5
1
23
24
25
26
27
28
29
30
31
32
2
3
4
5
6
7
8
33
1
1
1
2
1
2
2
1
1
2
1
0
0
8
7
6
5
4
3
2
1
1
3
5
7
9
11
13
15
2
4
6
8
10
12
14
16
3
1
2
1
1
5
4
6
3
7
2
8
1
3
1
2
2
1
1
2
2
1
3
0
6
2
1
2
1
2
1
2
1
5
4
2
DIGITAL SIGNAL PROCESSOR PCB LAYOUT
To Cameras
I/O Expanders
ISOLATORS
DSP
SDRAM
Boot loader
USB
To MC
RS232
MOTION DETECTION ALGORITHM
Start
Subtract
Current
Image
From
Previous
Break Difference
Image Into an n-by-n
Grid
No
Accumulate Location
and Count of All
Pixels in Region with
Difference Above
Threshold
RegionNorm >
NORM_MIN?
Yes
Checked Each
Region?
Yes
Find Largest
Connected Set
of Regions
No
Mark Region
as Having
Motion
Find Centroid of
Regions in
Largest Set of
Connected
Regions
MOTORS/MECHANICAL
Camera Board(s)
with FIFO
Power
DSP(s)
Mechanical
Control
Processor
Motors
Digital Connection
Analog Connection
Power Connection
MOTORS/MECHANICAL
• Two rotating platforms have been created
• One platform for azimuth, one for elevation
• Rotation achieved using turntables (Lazy Susan)
• DC motors used to rotate platforms
• Controlled with H-Bridge with PWM control
• Protection for deactivation feedback voltage from
motor inductance
• Digital optical encoder used for position detection
MOTORS/MECHANICAL
• Turntable Selection
• Shepherd 9548
• Purchased from Home
Depot
• Specifications
• 500 lb Load Capacity
• 6 in. x 6 in. Size
MOTORS/MECHANICAL
• Motor Selection
• Robot MarketPlace ML-50
• Specifications
• 120 RPM
• 730 mA Nominal Current
• 3.3 A Stall Current
• 320 oz-in Stall Torque
http://www.robotmarketplace.com/pr
oducts/ML-50.html
MOTORS/MECHANICAL
• Encoder Selection
• Avago AEDB-9140-F12
• Specifications
• Optical Encoder
• 256 Cycles/Revolution
• 1024 Signal
Changes/Revolution
• Fits Motor Shaft
http://www.avagotech.com/d
ocs/AV02-1584EN
MOTORS/MECHANICAL
• H-Bridge Selection
• Texas Instruments DRV8412
• 2 X 3A Full Bridge Continuous Output (2 X 6A peak)
or
• 1 X 6A Full Bridge Continuous Output (1 X 12A peak)
• Controlled With PWM up to 500kHz
• Self-Protection Circuits
CONTROL PROCESSOR/MECHANICAL INTERFACE
SDA
uC
x2
SCL
DSP
PWM
Output
H-Bridge
Relative
Angular
Position
Changes
Current
Encoder
Mechanical
Interface
Motor
DIVISION OF LABOR
Task
Riley Pack
Eric Pahlke
Kelly Shuster
Camera Board
P
S
S
DSP Board
Hardware
S
P
S
DSP Software
P
S
S
Motor Control
Board
S
Greg Stahl
S
P
S
Motor Control
Software
P
S
Mechanical
S
P
Power
User Interface
P = Primary
S
S
P
S
S
S = Secondary
P
EXPENSES
SCHEDULE
MILESTONE 1
• Mechanical System Complete
• Control System Can Move Platform to Desired
Position
• DSP Board Populated and Verified Functional
• Camera Board Populated
• Camera Board Sending Pictures to Computer
• Power Distribution Works with All Boards
MILESTONE 2
• Control System Tuned Correctly
• DSP Interfaced with One Camera
• DSP Running Correct Algorithms
• DSP Sending Targeting Positions to Control
System
DESIGN EXPO
• Full System Operating Correctly with One or
More Cameras
• Technical Manual
• User Manual
Questions?
• Kelly Shuster
• Riley Pack
• Eric Pahlke
• Greg Stahl
Download