Final Report Project Title: Lunabot
Transcript of Final Report Project Title: Lunabot
EEL 4924 Electrical Engineering Design
(Senior Design)
Final Report
24 April 2012
Project Title: Lunabot
Team Name: LunaRovers
Team Members:
Name: Matt Morgan
Name: Alexis Mesa Avila
Project Abstract:
Our project consists of building a mobile, autonomous robot capable of simulating a lunar mission. It
must be able to handle navigating through an area of obstacles with efficiency and a particular mission
in mind. Missions developed thus far include tracking particular objects designated by color or by size,
as well as pre-planning routes for the most efficient direction of travel. This report, in particular, focuses
on the electronic aspects of the design. Six Faulhaber DC motors along with six independent motor
drivers will be used for movement, as well as two analog servos for turning. Modes of both autonomy as
well as manual (remote) control are supported. Location awareness and obstacle avoidance will be
achieved with IR sensors as well as a Microsoft Kinect integrated with a small PC running Windows.
All other processing will be achieved on an Atmel Xmega microprocessor, which ultimately has enough
capability to support all of the necessary peripherals.
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 2/14 Final Report: Lunabot
Table of Contents
Sections:
Introduction ...............................................................................................................................................4
Project Features .........................................................................................................................................4
Technical Objectives .................................................................................................................................5
Primary Rover Objectives .........................................................................................................................5
Concept / Technology Selection ...............................................................................................................8
Project Architecture ..................................................................................................................................9
Timeline ..................................................................................................................................................10
Bill of Materials ......................................................................................................................................11
Responsibility Matrix..............................................................................................................................13
Appendix .................................................................................................................................................14
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 3/14 Final Report: Lunabot
Figures and Tables:
Figure 1: Microprocessor Software Flow Chart .......................................................................................6
Figure 2: PC Software Flow Chart............................................................................................................7
Figure 3: Microprocessor PCB .................................................................................................................8
Figure 4: Motor Driver PCB .....................................................................................................................9
Figure 5: High Level Behavior and Integration ........................................................................................9
Figure 6: Gantt Chart ..............................................................................................................................10
Table 1: Bill of Materials ........................................................................................................................11
Table 2: Responsibility Matrix ...............................................................................................................13
Figure 7: Rover Side Profile ...................................................................................................................14
Figure 8: Rover Front Profile ..................................................................................................................14
Figure 9: Color / Size Detection Algorithm (Screenshot) ......................................................................14
Figure 10: Blob Depth Algorithm (Screenshot)......................................................................................14
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 4/14 Final Report: Lunabot
Introduction:
The Lunabot project finds application in the domains of robotic vision, image processing, location
awareness, and autonomous decision making. The robot has to use the tools at its disposal to accomplish
a specific task such as route planning and/or color following. If at any time the robot malfunctions and
goes rogue, there is always a remote control option present to which currently utilizes the Gator Remote
Control, designed by Berny and Brenda Pazos.
The purpose of the project is to design a robot capable of performing the necessary tasks for a lunar
mission. Major milestones involved in this undertaking involve the design of the PCB, which will
contain the main processing unit as well as integrate the motor drivers and sensors, design the necessary
multiple power supplies, harness the Kinect's depth and color detecting qualities to ultimately integrate
them into the other path finding and avoidance capabilities of the IR sensors, and develop both hardware
and software support for the Gator Remote Control.
Project Features:
The primary electronic features associated with the Lunabot are as follows:
Six independent, customized motor drivers powering six independent motors via PWM.
Microsoft Kinect with integrated PC for robotic vision algorithms
o Range is between 800 mm and 4000 mm
o Programmed using Visual Studios 2010 and the C# programming language
Six separate analog IR sensors (ranging from 20 cm to 150 cm)
o Primarily for use when objects are too close for the Kinect to detect
Four separate power supplies:
o Lithium-Polymer (LiPo) (two 18 V - 5000 mAh) for motors
o Lithium-ion for PC
o Two Alkaline (8 packs) for both microcontroller and Kinect
Wireless remote control
o Utilizing Xbee communication and the Gator Remote Control
Atmel XMega128A1 microprocessor controlling six motors, two servos, IR sensing, and
communication with the Kinect.
o Programmed using AVR Studios and the C programming language
Speaker with amplifier to warn surrounding environment of reverse movement
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 5/14 Final Report: Lunabot
Technical Objectives:
The main objective of our project is to design a robotic system capable of advanced image processing in
both a depth and color realm using a Microsoft Kinect. Several key technical objectives that led to the
accomplishment of this task are as follows:
The development of a suitable PCB for the Atmel Xmega processor that allowed enough of the
peripherals to be both broken out and utilized as well as a USB connection for serial
communication
The design of a LiPo power supply that can support all six of the motors that is separate from the
one used for the microprocessor and is further protected from an imbalance of charge (using
Schottky diodes)
The design of motor driver PCBs using motor driver integrated circuit chips that allow for a large
enough amount of heat dissipation
The utilization of the Kinect SDK to obtain raw depth and color information that could be further
used for more advanced image processing algorithms
Filtering algorithms
o Color / Size - uses RGB frames to detect a specified color for which the rover can follow
and can further be expanded to only choose objects of a specific size or of a specific color
and size
o Depth - uses depth data to sort of objects of similar depth and converts it to a RGB frame
based off three separate planes from the Kinect. It then filters the image and detects
different blobs at varying distance regions - can be used for intelligent route planning
The integration of the Xbee receiver with the microprocessor for remote operation
Primary Rover Objectives:
The primary objectives of the Lunabot rover are as follows:
Implement a desired image processing algorithm (color/size tracking and/or route planning using
depth data)
Autonomously roam while utilizing both the Kinect vision processing as well as IR sensor
reactions
Function properly with the Gator Remote Control
Allow for switching between autonomous mode and remote control with the Gator Remote
Control
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 6/14 Final Report: Lunabot
Two separate programs will be running simultaneously to accomplish these tasks. The software flow
charts for the microprocessor program can be seen in Figure 1 below while the one for the PC program
(running the Kinect) can be seen in Figure 2 on the following page.
Figure 1: Microprocessor Software Flow Chart
initialize
signal start
joystick
command?
receive XBee byte
joystick mode
yes
yes
no
no
read IRs
read FTDI byte react
to IR? react to IR
react to byte and reply flush FTDI buffer
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 7/14 Final Report: Lunabot
Figure 2: PC Software Flow Chart
initialize vision algorithm
initialize connection
wait for go signal
process Kinect data
send command byte
receive handshake
joystick or
stop
command?
suspend
no
yes
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 8/14 Final Report: Lunabot
Concept / Technology Selection:
The Atmel Xmega microprocessor was chosen due to its high number of accessories and
peripherals as well as a convenient coding environment found in AVR Studios (the PCB can be
seen below in Figure 3).
Figure 3: Microprocessor PCB
The Microsoft Kinect was chosen due to its low cost implementation of both depth perception
(IR range finding capability) and a built in RGB camera
A PC was chosen to run the image processing algorithms due to its compatibility with the
Microsoft Kinect SDK due to its ability to run Windows 7
The 20-150 cm Sharp GP2Y0A02YK0F IR sensors were chosen to reinforce the capabilities of
the Kinect. The Kinect's range only goes down to 800 mm (or 80 cm) so the IR sensors make
sure to catch anything that the Kinect cannot
An FTDI chip was used for communication with the microprocessor due to the fact that the
laptop serial communication is referenced at 5 V while the microprocessor's is at 3.3 V. The
FTDI ultimately acts as a small, convenient level shifter.
The STMicroelectronics motor driver IC's were chosen due to their 24 V capabilities as well as a
reputation of low power consumption -- large heat sinks were added in the board as is seen in
Figure 4 on the next page.
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 9/14 Final Report: Lunabot
Figure 4: Motor Driver PCB
A LiPo power supply was designed for the motors for longevity of use
The frame, accompanied by the servos, was previously designed for a similar purpose, so it was
ultimately utilized for this concept and design
Project Architecture
The high-level block diagram of the overall integration can be seen in Figure 3 below.
Figure 5: High Level Behavior and Integration
*http://www.microsoft.com/en-us/kinectforwindows/*
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 10/14 Final Report: Lunabot
For location awareness, the rover uses the Kinect for color/size detection as well as depth sensing. It
communicates with the onboard PC which uses serial communication and the help of an FTDI chip to
talk to the microprocessor. Six IR sensors are also installed around the robot to aid in further obstacle
avoidance and collision prevention. The microprocessor must timeshare the commands from the PC and
obtaining readings from the IRs. The microprocessor further controls the servos for turning the robot as
well as the motors for driving it. These features along with the data received from the sensors constitutes
the autonomous functionality of the rover. A battery breakout containing Schottky diodes is provided for
the LiPo power supply to prevent reverse charging since the batteries are connected in parallel. The
motor driver PCBs further have a reverse battery protection as well to limit the effect of current spikes
and reverse voltage. An external Digital to Analog converter was added to feed data to an amplifier
allowing a beep to be initiated upon reverse movement of the robot. Finally, a universal remote (or in
particular the Gator Remote Control) can communicate to the microprocessor via an external Xbee
receiver for complete teleoperation.
Timeline:
Figure 6: Gantt Chart
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 11/14 Final Report: Lunabot
Bill of Materials
Part Quantity Cost Total Cost Link Motor Driver
Motor Driver IC 6 10.95 65.7 http://www.pololu.com/catalog/product/1449/resources
MOSFET N-Chanel 6 1.14 6.84
http://www.mouser.com/ProductDetail/International-Rectifier/IRFR3707ZPBF/?qs=am%252bH1kEnjyYBgzBWhd%2fAXg%3d%3d
Resistors 0 0
1k 30 0.04 1.2
http://www.mouser.com/ProductDetail/Bourns/CR0603-FX-1001HLF/?qs=sGAEpiMZZMu61qfTUdNhG6LqqFhkr6pUTHpvs3m%2fzKg%3d
1.5k 6 0.05 0.3
http://www.mouser.com/ProductDetail/Bourns/CR0603-FX-1501ELF/?qs=sGAEpiMZZMu61qfTUdNhG6LqqFhkr6pUWApUCPPG%2fkI%3d
4.7K 12 0.06 0.72
http://www.mouser.com/ProductDetail/Bourns/CR0603-JW-472ELF/?qs=sGAEpiMZZMu61qfTUdNhG2nPoCjtvs%252bRuB5Lwxt%2fCj8%3d
5k Pot LAB 0 0
10k 6 0.05 0.3
http://www.mouser.com/ProductDetail/Bourns/CR0603-FX-1002ELF/?qs=sGAEpiMZZMu61qfTUdNhG6LqqFhkr6pUNCm4S5639HA%3d
100k 6 0.06
http://www.mouser.com/ProductDetail/Bourns/CR0603-JW-104GLF/?qs=sGAEpiMZZMu61qfTUdNhG6LqqFhkr6pUBHqvl3Un3Lw%3d
Capacitors 0 0
33nF 6 0.06 0.36
http://www.mouser.com/ProductDetail/TDK/CGJ5F2C0G1H333J/?qs=sGAEpiMZZMvQvaS66kI3Tg%2foFz%2fLwwgfWCbN%252bKS31%2fw%3d
1500uF (rated 24V) 6 2.68 16.08
http://www.mouser.com/ProductDetail/Cornell-Dubilier/AFK158M35P44T-F/?qs=sGAEpiMZZMtZ1n0r9vR22U6UGRWH4l0P6EVWmPRKHZk%3d
Diode 6 0.06 0.36
http://www.mouser.com/ProductDetail/NXP-Semiconductors/BZX84J-C27135/?qs=sGAEpiMZZMstCHp3EWKGl2O5SrBf5BzYLDIpi2uar%2fI%3d
Connectors 0 0
Female Crimps 4 5.25 21 http://www.pololu.com/catalog/product/1930
Crimp Housing 6 1.79 10.74 http://www.pololu.com/catalog/product/1920
T connectors 12 1.5 18 http://www.pololu.com/catalog/product/925
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 12/14 Final Report: Lunabot
Screw Terminal 12 1.5 18 http://www.pololu.com/catalog/product/2440
Batteries 0
Lipo 6 64.95 389.7
http://www.ebay.com/itm/Thunder-Power-Pro-Lite-V2-4350mAh-5-Cell-5S-18-5V-20C-Lipo-Battery-/300648749768?pt=Radio_Control_Parts_Accessories
Xmega 0
Sharp IR Modules 6 14.95 89.7 http://www.pololu.com/catalog/product/1137
Microsoft Kinect 1 99 139.99
http://www.walmart.com/ip/Kinect-Sensor-w-Kinect-Adventures-Bonus-Game-Value-Bundle/20655933?sourceid=1500000000000003142040&ci_src=14110944&ci_sku=20655933
FTDI chip 2 1.95 3.9
http://www.mouser.com/ProductDetail/FTDI/FT221XS-R/?qs=Gp1Yz1mis3X50YdmZBKPIvG0uxBmgtd9
Capacitors 0
100nF 30 0.06 1.8
http://www.mouser.com/ProductDetail/TDK/CGJ4J2X7R1H104K/?qs=sGAEpiMZZMvQvaS66kI3Tg%2foFz%2fLwwgfaN7S%2fL4x5Ng%3d
10uF 8 0.06 0.48
http://www.mouser.com/ProductDetail/TDK/CGJ5L2X7R1A106K/?qs=sGAEpiMZZMvQvaS66kI3Tg%2foFz%2fLwwgfxwyVfQy6sv4%3d
4.7uf 4 0.06 0.24
http://www.mouser.com/ProductDetail/TDK/CGJ5L2X7R1A475K/?qs=sGAEpiMZZMvQvaS66kI3Tg%2foFz%2fLwwgfeGyPfqMjI1M%3d
Resistors 0 0 0
100 Ohm 4 0.05 0.2
http://www.mouser.com/ProductDetail/Bourns/CR0603-FX-1000ELF/?qs=sGAEpiMZZMu61qfTUdNhG6LqqFhkr6pUY56%252bhmeYKV8%3d
10K 2 0.06 0.12
http://www.mouser.com/ProductDetail/Bourns/CR0603-FX-1002ELF/?qs=sGAEpiMZZMu61qfTUdNhG6LqqFhkr6pUNCm4S5639HA%3d
Regulators 0
3.3 V Regulator 2 2.47 4.94
http://www.mouser.com/ProductDetail/National-Semiconductor-TI/LMS1587CS-33-NOPB/?qs=sGAEpiMZZMug9GoBKXZ759%2fWxdjGb5obExiilBzAsSY%3d
5 V Regulator 2 3.1 6.2
http://www.mouser.com/ProductDetail/National-Semiconductor-TI/LM1085IS-50-NOPB/?qs=sGAEpiMZZMug9GoBKXZ759%2fWxdjGb5ob9TexsLiBDtA%3d
Shipping mouser 15
Shipping pololu 15
Shipping Sparkfun 5
Total 834.43 Table 1: Bill of Materials
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 13/14 Final Report: Lunabot
Responsibility Matrix
Item Matt Morgan Alexis Mesa Avila
Kinect Research / Navigation / Programming 100% 0%
Atmel Programming 90% 10%
FTDI Interface 90% 10%
PCB Motor Driver Design 50% 50%
PCB µP Design 50% 50%
Power Supply Design 50% 50%
Audio Output and PCB Design 100% 0%
IR Sensor Integration 80% 20%
Gator Remote Control Interfacing 80% 20%
Physical Assembly and Integration 80% 20%
Testing 80% 20% Table 2: Responsibility Matrix
University of Florida EEL 4924—Spring 2011 25-Apr-12 Electrical & Computer Engineering
Page 14/14 Final Report: Lunabot
Appendix
Robot Pictures
Figure 7: Rover Side Profile Figure 8: Rover Front Profile
Kinect Image Algorithms
Figure 9: Color / Size Detection Algorithm Figure 10: Blob Depth Algorithm