Final Year Project

gorgeousvassalΛογισμικό & κατασκευή λογ/κού

7 Νοε 2013 (πριν από 3 χρόνια και 9 μήνες)

62 εμφανίσεις

Final Year Project
Presentation

The Design and Implementation

of an

Intelligent, Wireless Robot


By


Mark Heneghan

Why a Robot??

Reasons as to why I choose to do my Final

Year Project in the field of robotics:





Have been intrigued by robotics always.




Have a major interest in automotive electronics and
a robotics project allowed me to gain some
experience with current research areas.




A robotics project is useful to the Department, as it
could be demonstrated to visitors and create an
interest in the course, due to its exciting nature.


Project Aims

A project spec was drawn up by consulting with my
appointed Project Supervisor, Mr. Fergal O’Malley.

Here are the basic requirements set out for the project:




Design and build a battery powered robot.




Microprocessor operated.




Wirelessly controlled via Wifi Internet Connection
with webpage control interface.




To implement extra functionality using sensors i.e.
Line Following and Obstacle Detection.




Mobile phone control.



Live Camera Feed.

Basic Spec Overview

World Wide Web
Data/Instructions
Commands from
user
802.11 Wifi
Connection
Robot Features
- Powerful Microprocessor
- Sensors
- 2 x Servo Motors
- Battery Power Supplies
- Additional Circuitry
Research

The Gumstix Connex 400 mother board was chosen as
the “brains” behind the robot.

Reasons:


400 MHz Intel PXA255 core processor, allowing quick execution
of programs.


Allows Wifi connectivity using the Wifistix expansion board.


Several GPIO for sensors accessed using Breakout GS
expansion board.


Pre
-
installed web server which allows control of the robot via a
webpage.


An embedded version of Linux is installed on the processor,
allowing easy use once a good knowledge of the OS is gained.

Research


A simple robot kit, the TankBot, was decided on as the
robot chassis. It contains 2 pre
-
modified servo motors,
controlled using Pulse Width Modulation.


In order to program the robot, C was to be used initially.
However C would have been very complex and time
consuming. Therefore the higher level language; Python,
was chosen as the language to be used.


Python allows programming of the registers which
control the GPIO, to be carried out easily. This is done
by importing the ‘pxaregs’ kernel module, which was pre
-
installed on the motherboard by the Department. A few
simple commands is all that is required to manipulate the
required registers only, cutting down on the amount of
code to be written by approximately a factor of 10 in
comparison to C.

Research


Power was initially to be supplied to the robot
using 2 power supplies; a 5V (later 6V) for the
Gumstix system and a 6V for motors and other
hardware.


However during testing I decided to add a 3
rd

supply, 6V, to supply the demand of all external
circuitry


Networking with the robot was made easy by the
Wifistix which is basically a network card and is
configured to connect to any desired Wireless
LAN using the embedded Linux OS.

Research


Line Following and Obstacle Detection were
researched and sensors were chosen to
implement these functions.


The Sharp GP2D12 Distance Detector was used
for Obstacle Detection


Maplin photo
-
reflectors were used for Line
Following.

Research


Also research was carried out for extra desired
add
-
ons such as Mobile Phone control and Live
Camera Streaming.


Mobile Phone control could be achieved using a
WAP browser or a J2ME application


The most accessible way to gain live Camera
feed from the robot was to use an IP camera,
one of which is being used in a fellow student’s
project and may also easily be incorporated into
my project control webpage.

Final Design Overview

Laptop computer
Cell phone
Wifi Link
PXA255 Processor
Sensors/ GPIO
Circuitry
Boa Web Server
2 x Modified Servo
Motors
Robotic Vehicle
The World Wide Web
GPRS
Connection
Design Implementation


Gaining experience with using Linux and
Gumstix was a time consuming part of the
project. Once basic knowledge of Linux was
achieved using the Gumstix was not that difficult.


Initially a USB connection was used to access
the Gumstix, using USBNet.


Through USB, Wifi settings were configured to
connect to the “NUIGALWAY” wireless network.


However most programming and testing was
carried out using a USB connection.

Design Implementation


When the Tankbot was constructed, some
mechanical adjustments were required.


Motors were tested to find required voltage
levels and PWM signals to control them.


Motors needed to be isolated from the Gumstix,
in order to protect the hardware. Opto
-
couplers
were used for this purpose.


The registers were programmed to configure the
2 PWM outputs on the Gumstix, in order to
implement basic control. GPIO16 and GPIO17
are the respective GPIO outputs for PWM0 and
PWM1.

Design Implementation

Using Python, programs were written to allow full
control of the robot i.e. Forward, Reverse, Left,
Right and Stop.

Design Implementation


Setting up the web
-
server was relatively simple. A simple
web page was designed and stored in the /var/www
folder of the Gumstix, which is the home folder of the
Boa web
-
server.


This site contains links, which execute programs to allow
full control of the robot using a web browser.


CGI programming is used to execute a program from the
web. To convert the existing python files to CGI, a basic
‘content
-
type’ determination is placed in the code, which
tells the browser how to handle any text printed in the
program. When the program is executed, the browser
outputs any text printed in the CGI files as HTML.

Design Implementation

Design Implementation


In implementing Obstacle Detection, an ADC was used
in order to convert the output of the Distance Detector
into a digital number, which may be read by the Gumstix.


The 3 most significant bits are read from the 8
-
bit output
ADC. This is to allow the desired sensitivity of the
Sensor.


Using a python program the 3 outputs are constantly
polled and ANDed together. If the output is ‘high’ then an
obstacle is within 10


15 cm. The robot is programmed
to reverse a certain distance and then turn right and
continue with forward motion.

Design Implementation

1 2 3 4 5 6 7 8 9 10
20 19 18 17 16 15 14 13 12 11
10k
150uF
ADC0804
10k
10k
To Gumstix
Vcc
Sensor In
Design Implementation


In implementing line following, a circuit was
constructed consisting of 3 photo
-
reflectors.
Each sensor has an output which is read by the
Gumstix.


The 3 outputs are polled using a python
program. A sensor outputs a ‘high’ when over
black and a ‘low’ when over white.


The program interprets the GPIO and makes a
decision as to the motion of the robot.

Design Implementation

+6V
+6V
Sensor
Out 1
Sensor
Out 2
Sensor
Out 3
330
330
330
47k
47k
47k
Design Implementation


In creating CGI files to execute line following and
obstacle detection, problems were encountered
with python as regards internal memory
allocation.


Shell programming was used to solve the
problem.


Shell programming, executes Linux shell
commands in the form of a program, and allow
your Linux OS to carry out a set of instructions
all at once.

Power Consumption


A major design issue with the robot is the power
consumption of the Gumstix system.


It is powered by a 6V supply, which is obtained using a
7806 6V Regulator with 2 x PP3 (9V) batteries.


With all 3 boards connected the system consumes about
1.2W at 6V.


The batteries tend to drain very fast. This is also due to
the power consumed by the Regulator itself.


Max use time of 2 PP3 Energizer Ultra batteries is
approximately 2 hours, which proved costly when testing
the robot.

Results


Currently the Project has produced a reliable robot which
may be fully controlled using any web browser.


It may also operate in Obstacle Detect mode and Line
Following mode, also executable from the web.


The robot may also be controlled using a WAP browser
on a mobile phone. This may be only simulated using
Openwave Phone Simulator, due to the IP address of
the Wifistix not being available outside the NUIGALWAY
network. This is Computer Services’ policy.


It is possible to stream live video, using a fellow
classmates project, which incorporates live streaming
from an IP camera based in the Lab.


Unfortunately control using a J2ME application was not
achieved.

Results

Results


The Gumstix system, was a good choice in
hardware for this project, although it is not
without its faults.


One fault is that it does not securely connect
together, and all boards are vulnerable to being
separated easily and hence causing them to
short and blow.


However it is a very powerful piece of hardware,
which has ease of use once minimal experience
is gained.

Conclusion


Overall the project was very beneficial to my
Degree, as I gained experience in areas which
are generally not part of the curriculum.


Also I hope that this project may enhance my
chances of working in the field of automotive
electronics, due having gained knowledge in
some fields which are currently being used or
researched.


I also think that this project may be a good
sample project which can be demonstrated to
visitors, which may increase interest in
Electronic Engineering.

Thank You


Thanks to my supervisor, Mr. Fergal
O’Malley for his guidance throughout the
project.


Thanks to Mr. Liam Kilmartin for assessing
my progress in this project.


Also thanks to the Martin, Myles and
Shaun and also to Frank Callaly for their
assistance with any issues encountered
during the project.

Questions???