Autonomous Robotic Boat Platform
Team: Ryan Burke, Leah Cramer, Noah Dupes, & Darren McDannald
February 24th, 2015
Advisors: Mr. Nick Schmidt, Dr. José Sánchez, & Dr. Gary Dempsey
Department of Electrical and
Computer Engineering
Presentation outline
2
• Background– Objective
– Block diagram
– Division of labor
• R. Burke– GPS/compass finalization and navigation system
• L. Cramer– Detecting buoys with computer vision
• N. Dupes– Motor controller
• D. McDannald– Central processor
Presentation outline
3
• Background– Objective
– Block diagram
– Division of labor
• R. Burke– GPS/compass finalization and navigation system
• L. Cramer– Detecting buoys with computer vision
• N. Dupes– Motor controller
• D. McDannald– Central processor
Objective
• Design and build an autonomous boat platform
– Versatile
– Robust
• 8th annual RoboBoat competition
(Virginia Beach, VA)
• Competition time frame: July
4Images taken from [1].
Catamaran Boat Design
5Image taken from [1].
6
Division of labor
7
Task Person assigned to task
Central processing Darren McDannald
Image processing Leah Cramer
GPS/compass interfacing Ryan Burke
Motor control Noah Dupes
Remote control Darren McDannald
Navigation Ryan Burke, Darren McDannald
Presentation outline
8
• Background– Objective
– Block diagram
– Division of labor
• R. Burke– GPS/compass finalization and navigation system
• L. Cramer– Detecting buoys with computer vision
• N. Dupes– Motor controller
• D. McDannald– Central processor
Gantt chart
9
Gantt chart
10
GPS/compass unit block diagram
11
GPS/compass unit block diagram
12
Acknowledge message GPS initialization
13
MCU GPS
Change baud rate to 115.2 kbaud
Acknowledge message GPS initialization
14
MCU GPSBaud rate changed successfully
GPS and compass data testing
15
GPS dataCompass data
Longitude Latitude
Standard deviation 2.48E-06 1.28E-05 0.2223
Variance 6.15E-12 1.65E-10 0.0494
Number of samples 202 202 226
Average value -89.6185 40.6981 181.4
Actual value -89.6184 40.6979 180
Navigation system operation
16
Navigation system operation
17
Navigation system operation
18
Navigation system operation
19
Navigation system operation
20
Navigation system operation
21
Navigation system operation
22
Navigation system operation
23
Navigation system operation
24
Navigation system operation
25
Navigation system operation
26
Navigation system operation
27
Navigation system operation
28
Navigation system operation
29
Navigation system operation
30
Navigation system operation
31
Progress
32
Progress
33
Presentation outline
34
• Background– Objective
– Block diagram
– Division of labor
• R. Burke– GPS/compass finalization and navigation system
• L. Cramer– Detecting buoys with computer vision
• N. Dupes– Motor controller
• D. McDannald– Central processor
35Amazon.com Bit-tech.net Willowgarage.comImages from:
C++
36
Image from: http://www.auvsifoundation.org
Competition obstacles
Buoy identification flowchart with circle detection
37
Circle detection buoy identification results
38
Hough transform Percentage of frames
True positive (buoy detected) 80%
False positive (incorrect buoy detected) 13.5%
False negative (buoy not detected) 6.5%
Buoy identification flowchart with blob detection
39
Blob detection with buoy identification results
40
Blob detection Percentage of frames
True positive (buoy detected) 33%
False positive (incorrect buoy detected) 62%
False negative (buoy not detected) 5%
Project task progress
41
Presentation outline
42
• Background– Objective
– Block diagram
– Division of labor
• R. Burke– GPS/compass finalization and navigation system
• L. Cramer– Detecting buoys with computer vision
• N. Dupes– Motor controller
• D. McDannald– Central processor
T100 thruster
• Brushless DC (BLDC)
• Provides 2.36 kgf ( 5.2 lbf ) of forward thrust
• Sensorless
T100 thruster size comparison
obtained from[1]
43
A4960 pre-driver configuration
The Allegro pre-driver
A4960 motor controller with
MCU input. Image obtained
and modified from[5]
44
Pre-Driver
A4960 pre-driver configuration
The Allegro pre-driver
A4960 motor controller with
MCU input. Image obtained
and modified from[5]
45
Pre-Driver
Digital commutation for a brushless motor
• Utilize a three phase configuration
Figure 1: Y-configuration of a three phase
motor obtained from[2]
Figure 2: Three phase digital commutation obtained
from[3]
High Side
Off
Low Side
High Side
Off
Low Side
0 60 120 180 240 300 360 0 60
High Side
Off
Low Side
46
Rotor Position(°)
MOSFET driver configuration
Legend
H- High Side Driver
L- Low Side Driver
A- A Phase
B- B Phase
C- C phase
H-A
L-A L-B
H-B H-C
L-C
A
CB
12V
47
Legend
H- High Side Driver
L- Low Side Driver
A- A Phase
B- B Phase
C- C phase
High-Side Current Path
Low-Side Current Path
Current path for the driver configuration
Legend
H- High Side Driver
L- Low Side Driver
A- A Phase
B- B Phase
C- C phase
H-A
L-A L-B
H-B H-C
L-C
A
CB
12V
48
Current path for the driver configuration
H-A
L-A L-B
H-B H-C
L-C
A
CB
12V
Legend
H- High Side Driver
L- Low Side Driver
A- A Phase
B- B Phase
C- C phase
High-Side Current Path
Low-Side Current Path
Legend
H- High Side Driver
L- Low Side Driver
A- A Phase
B- B Phase
C- C phase
49
Current path for the driver configuration
H-A
L-A L-B
H-B H-C
L-C
A
CB
12V
Legend
H- High Side Driver
L- Low Side Driver
A- A Phase
B- B Phase
C- C phase
High-Side Current Path
Low-Side Current Path
Legend
H- High Side Driver
L- Low Side Driver
A- A Phase
B- B Phase
C- C phase
50
Current path for the driver configuration
Legend
H- High Side Driver
L- Low Side Driver
A- A Phase
B- B Phase
C- C phase
High-Side Current Path
Low-Side Current Path
Coil Measuring BEMF
Legend
H- High Side Driver
L- Low Side Driver
A- A Phase
B- B Phase
C- C phase
H-A
L-A L-B
H-B H-C
L-C
A
CB
12V
51
Utilizing back electro-magnetic force (BEMF)
• Measured at common terminal, S, between the high
and low side MOSFETS
• Used to determine the rotor position and speed of
the BLDC motor
• A4960 outputs a frequency varying TACHO signal
proportional to the rotors speed
S
52
Latest progression of Gantt
Schedule Time Completed Milestone
53
ID Task nameDec Jan
2
Motor controller
circuit design and
testing
2014
3
Assembly of motor
configuration on boat
frame
1
Research motor
controller and
configuration
Nov
4 Progress presentation
2015
Feb Mar
1
Slide 53
1 Continue designing and building the A4960 motor controller configuration
Expected delivery of T100: January 2015
Research and design the controls algorithm for the diamond thruster configuration
-ndupes,
Presentation outline
54
• Background– Objective
– Block diagram
– Division of labor
• R. Burke– GPS/compass finalization and navigation system
• L. Cramer– Detecting buoys with computer vision
• N. Dupes– Motor controller
• D. McDannald– Central processor
Serial communication
• A C++ class to access a subsystem
through serial
• Sets attributes and can have
multiple instances of each
connection
• Able to request and receive data
55
Project filing system
• Easy compilation using a make
file
• Saves time by only compiling
when items have been changed
• Related files in single folder
56
Project filing system
• Easy compilation using a make
file
• Saves time by only compiling
when items have been changed
• Related files in single folder
57
Project filing system
• Easy compilation using a make
file
• Saves time by only compiling
when items have been changed
• Related files in single folder
58
• Easy compilation using a make
file
• Saves time by only compiling
when items have been changed
• Related files in single folder
Project filing system
59
Boat trial script
• A C++ class takes care of the
naming of each frame
• Script makes video automatically
at the end of each run
• Compresses the runs folder
• Script asks for a description of
the surroundings to help testing
60
Used TinyXML to configure boat
• Use of xml files to make to boat
easily configurable and on the fly
• Used to keep compilation times
down
61
GPS class
• Request data from GPS and
compass data
• Store the data
• Path planning
• Motor and speed commands
• Data will be used to navigate
between one location to another
62
Motor class
• Takes in a speed, direction, and
amount of pivot
• Outputs a string that
corresponds to the four motors
on the boat
calculate(speed, direction, pivot);
Converts direction and pivot to a
vector for each motor
Outputs string over serial
*m1: 120 m2: 35 m3: 25 m4: 25
63
Schedule
64
Future Work
• Currently working on a
navigation system
• Finish making the motor class
and test its operation
• Implement an accurate time base
• Threading to process the
different systems
65
Autonomous Robotic Boat Platform
Team: Ryan Burke, Leah Cramer, Noah Dupes, & Darren McDannald
February 24th, 2015
Advisors: Mr. Nick Schmidt, Dr. José Sánchez, & Dr. Gary Dempsey
Department of Electrical and
Computer Engineering
Appendix
67
Motor Configuration Selection
• Diamond configuration
• Consists of four motors
• Allows for strafing
• Allows for 360 rotaon
Diamond configuration on a catamaran platform
68
Transistor Configuration For Three Phase Drive
Three phase drive circuit consisting of six transistors, six flyback diodes,
and a y-configuration three phase motor obtained from[4]
69
Power Consumption Of Transistors
Type MOSFET BJT IGBT
Power consumption
calculation
Typical values
Power consumption of a
11.5 A drive using typical
transistor values
70
References
[1] Blue Robotics. (2014). T100 Thruster [Online]. Available: http://www.bluerobotics.com/store/thrusters/t100-thruster/
[2] Global Spec. (2011). Synchronous Motor Grounding [Online]. Available: http://cr4.globalspec.com/thread/67306
[3] Embedded. (2008). Designing a MCU-driver permanent magnet BLDC motor controller: Part 1 [Online]. Available: http://www.embedded.com/print/4007628
[4] Analog Dialogue. (2008). High Current Sensing [Online]. Available: http://www.analog.com/library/analogdialogue/archives/42-01/high_side_current_sensing.html
[5] Allegro MicroSystems. (2014). A4933: Automotive 3-Phase MOSFET Driver [Online]. Available: http://www.allegromicro.com/en/Products/Motor-Driver-And-Interface-ICs/Brushless-DC-Motor-Drivers/A4933.aspx
[6] St. Cyprain’s Greek Orthodox Primary Academy. (2014). 29.9.14 [Online]. Available: http://www.stcypriansprimaryacademy.co.uk/29-9-14/
[7] SparkFun Electronics. (2014). Dual Full-Bridge Driver [Online]. Available: https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf
[8] Vishay. (2011). IRF520 Power MOSFET [Online]. Available: http://www.vishay.com/docs/91017/91017.pdf
71
Image Processing-Rectangle Detection
• Purpose of Research and Testing: Determine How to Detect
Polygons Contained within an Image
• Research
• OpenCV Utilizes Contours For Detection Of Polygons
• Contours: Outline or Enclosed Border of a Shape or Form
• The Contour Detection Algorithm Used By OpenCV:
Topological Structural Analysis of Digitized Binary Images by Border Following by Satoshi Suzuki and Keiichi Abe[]
• MATLAB Testing
• Imcontour() Implementation
• Contour Algorithm Testing72
MATLAB Imcontour()-Original Image
Image obtained from[6]73
MATLAB Imcontour()-Contour Detection
74
H-Bridges
• Purpose of Research and Testing:
Understand the Benefits and Drawbacks of Using H-Bridges
• Features
• Bi-Directional Motor Control
• Four Transistor Configuration
• Provides Dynamic Breaking Capabilities
• Allows For Current Sensing
75
H-Bridge Testing
• L298 H-Bridge
• Contains Two Internal H-Bridge Configurations
• Two Enable Signals
• Allows for a 150w motor(50v, 3A Max Rating)
• Fly Back Diode: 1N4004
• Motor
• 12V
• >2A While In Air
76
L298 H-Bridge Internal Configuration
Image obtained from[7]77
H-Bridge Free Running Motor Stop
78
H-Bridge Dynamic Motor Stop
79
H-Bridge Conclusion
• Benefits:
• Simple Configuration
• Easily Controllable
• Provides Bi-Directional Control
• Drawbacks:
• Large Power Dissipation
• The Internal BJT Configuration Has Constant Power Dissipation
• Limits Design
80
Choosing A Transistor Type
• There Are Two Primary Transistor Types: MOSFET and BJT
MOSFET BJT
Output Is Controlled By Gate Voltage Output Is Controlled By Base Current
Positive Temperature Coefficients Negative Temperature Coefficients
Power Dissipation Depends On Internal
Resistance
Power Dissipation Depends Terminal
Voltage Differentials
High Gate Capacitance Low Gate Capacitance
Higher Switching Frequencies Lower Switching Frequencies
81
Choosing A MOSFET
• IPP040N06N
• RDS max=4 mΩ
• VDS max=60 V
• ID max= 80 A
• QG max= 44nC
• IPP060N06N
• RDS max=6 mΩ
• VDS max=60 V
• ID max= 40 A
• QG max= 32nC
• IRLB8721PbF
• RDS max=8.7 mΩ
• VDS max=30 V
• ID max= 44 A
• QG max= 13nC
• IRLB8748PbF * *
• RDS max=4.8 mΩ
• VDS max=30 V
• ID max= 44 A
• QG max= 23nC
* * Indicates the current choice for the MOSFET configuration 82
PWM Driven Transistor Configuration
• Purpose of Research and Testing :
Design a Transistor Switch Configuration Driven by a Microcontroller Generated PWM Controlled by an Analog Input.
83
Block Diagram For System
84
Design And Testing
• IRF520
• VDS Max = 100V
• RDS(ON) Max = 0.27 Ω
• Max Gate Charge = 16 nC
• Atmega168 Microcontroller
• Minimum Pin Output Voltage = 4.2V
• Maximum Pin Output Current = 40mA
• 2N2222A
• Hfe(Gain) = 75
• Max VCE(Sat) = 1.6V
• Max VBE(Sat) = 2.6V
Output Characteristics of the IRF520 obtained from[8]
85
Observations of the Gate Input for the IRF520
Gate input with Rc equal to 1.2KΩ Gate input with Rc equal to 10KΩ Gate input with Rc equal to 100KΩ
86
A4960 Specs
• Absolute Ratings
• Max Load Supply Voltage: 50 V
• Max Logic Supply Voltage: 6 V
• Max Sink Current: 150 mA
• Max Gate Output Turn on/off: 20 ns
• Max System Clock Period: 57 ns (17.5 MHz)
• Minimum Input Pulse Filter Time: 500 us (2 KHz)
87
Three Phase Back EMF Output
Image obtained from [5]88
IRF520 Circuit Configuration
Circuit 1:Motor Drive IRF520
Configuration
Circuit 2:IRF520 Test
Configuration
89
Circuit Design for the Transistor Switch Configuration
90
91
[source: wikipedia]
http://en.wikipedia.org/wiki/Hough_transform
= −
+
= +
92
[source: wikipedia]
http://en.wikipedia.org/wiki/Hough_transform
93
[source: wikipedia]
http://en.wikipedia.org/wiki/Hough_transform
94
= +
= +
95
96
21HT Hough Transform Method
• Reduces the amount of memory required.
• Uses edge direction
• Two step process
1.) The center of any given circle is the intersection point of all the normal
lines from the circle edge. A 2-dimensional array is used to record the "votes"
along the normal line of each detected edge point.
2.) "To identify the radius of circles, the distance of each point from
a candidate center is calculated and a radius histogram is produced."
PROS: This method is low on storage space. Only a 2-d array is used and a 1-d
histogram.
CONS: If the radius threshold is very low (i.e. The 21HT is being used to detect
very small circles) there is a risk of many false peaks occurring in step 1. This
can increase the amount of computational work necessary in step 2.
Gaussian Filtering
97
, =1
2
98
OpenCV Results using:
• RGB Colorspace
• Gaussian Filtering
• Canny Edge Detection
• Hough Transform