Professional Documents
Culture Documents
A Study Into The Application of The Arduino Mirco-Computer For Use As A Navigation System
A Study Into The Application of The Arduino Mirco-Computer For Use As A Navigation System
=
>
OConnor, Ryan Maritime Robotics Project: Small Autonomous Marine Vehicle
= 2esi$n and 2e#elopment
As the Micro-Computer as chosen to be the Arduino Me%a' all components ere chosen to be
compatible ith this board* There ere to aspects to this desi%n' these ereA the system desi%n hich
incorporated the development of the <avi%ation pro%ram to be used on the Me%a and the desi%n and
%eneral arran%ement of the vessel*
=%& System 2esi$n
Arduino is an open-source electronic prototypin% platform hich allos the user to create interactive
electronic ob/ects &Arduino' ("!1)* The Arduino board acts as a computer hich allos for a pro%ram to
be loaded and then run ithout the need of a computer or user inputs*
The Arduino Me%a (>F" is the microcontroller shon in =i%ure > -G* #nlike previous boards that used
the =T@0 #S.-to-serial driver chip' it utilises a (>F kb memory &Arduino' ("!1)* The Me%a re7uires a >
volt poer supply to poer the board and all its peripherals* The Me%a allos for an array of
sensors,motors to be attached and controlled accordin% the users pro%ram*
/i$ure =!>: Arduino System 2ia$ram
The Ardu0M# $1 &shon in =i%ure > -?) includes a ATMe%a 1(F processin% chip alon% ith a M5#-
F""" &hich includes a 1 axis accelerometer and a 1 axis %yro' capable of calculated the roll' pitch and
ya of the device) and the 1 axis ;MC->??1+ ma%netometer &Sparkfun' ("!1) hich is used for
determinin% the compass bearin%*
/i$ure =!?: Arduino Me$a board 3Arduino, (9&+6 /i$ure =!@: Ardu'M< V+ 3Spar8un, (9&+6
F
OConnor, Ryan Maritime Robotics Project: Small Autonomous Marine Vehicle
The boat as poered by a sin%le motor hich as connected into the circuit throu%h an electronic
speed controller &3SC) as shon in circuit dia%ram in =i%ure > -F* The motors chosen ere a hi%h
poered ??" k$ brushless motor' developed for use ith the Arduino 7uad-copters* @C brushless motors
ere chosen as they do not create any sparks durin% the mechanical operation of the motor &.rian' ("!1)*
They ill also decrease the complexity of the Arduino systems by eliminatin% the need of an Arduino
motor shield* The Me%a as attached to a servo motor connected to a rudder' the me%a then used the
compass data from the Ardu0M# to determine the vessels headin%*
As a precaution an ultrasonic sensor as fixed to the front of the vessel' a simple line of code as
ritten into the pro%ram to prevent the vessel from collidin% ith any sensitive e7uipment in the model
test basin' should the vessel move of its uploaded course* The sensitivity of the sensor as set to "*!> m'
should the vessel be ithin that ran%e the motor ould shut don and the servo ould turn the vessel
hard-a-port* The use of an ultrasonic senor alloed for the vessel to become fully autonomous*
The system used an S@ breakout board* This board recorded the acceleration' ya and compass data
that as bein% read from the Ardu0M# $1* The data as saved as a *txt file for post-processin% usin%
Mat+ab and excel* Only ten runs ere conducted ith the S@ breakout board connected to the Arduino*
=or these tests the Arduino as pro%rammed to complete a !?" de%ree turn*
The Arduino Me%a ill act as the central processor in the system as shon in =i%ure > -F' ith the
data from the 0M# bein% used to control the servo motor* The system dia%ram shon in =i%ure > -F is of
the system that as developed throu%h testin%*
The Arduino and its various components re7uire poer to ork* The Arduino is best suited to a > $
poer supply hile the 3SC and motor re7uired a poer supply ith a hi%her volta%e* A > $ battery bank
used to rechar%e mobile phones as chosen to poer the Arduino hich subse7uently poered the
Ardu0M# $1' servo motor' S@ breakout-board' and ultrasonic sensor* The 3SC on the other hand re7uired
at least F-!( $ to supply poer to the motor' the hi%her the volta%e the faster the motor ill turn* A !( $
battery ould have been too bi% and ei%ht too much' therefore a F $ sealed-lead acid battery as chosen
for siCe' ei%ht' and poer re7uirements*
=%( Vessel 2esi$n
The Catamaran hull shon in =i%ure > -9 as supplied by the AMC for use on this pro/ect* This hull
provided a stable platform for the Arduino Me%a and all components* As these hulls ere the AMCs
property' it as stipulated that no irreversible modification could be made to them' therefore anythin% that
re7uired bein% fixed to the hulls as done so throu%h any existin% scre holes*
As this system as operatin% in an environment here the electrical system as exposed to ater' the
system as placed in a container to prevent any ater from interferin% ith the Arduino system' in
addition to protectin% the system the container also provided a platform to mount the 2ualisys motion
balls* @urin% testin%' a substantial amount of ater as bein% carried throu%h the prop shaft and into the
container* This re7uired the shaft to be covered hile operatin%' this as done by fabricatin% a small
shield on the day*
@urin% construction consideration as taken into the position of the components* 6herever possible
the components ere arran%ed to provide a lateral and horiContal symmetrical ei%ht distribution* The
position of the components as hoever limited by the len%th of the ires and the position of the motor
and 3SC* As the motor as fixed in the forard section of the vessel alon% the centerline this re7uired the
sealed-lead battery to be positioned further forard* Additional ei%hts ere re7uired on the day of
testin% to prevent the vessel from trimmin% by the bo* The vessel tested is shon in =i%ure > -!"*
The ori%inal system desi%n involved havin% a set value for the 3SC hich kept the speed of the vessel
constant* @urin% testin% this as impractical as calibratin% the 3SC as time consumin%' this method
ould have drastically reduced the amount of tests* The problem as remedied by the addition of a
potentiometer' hich alloed for the speed of the motor to be altered ithout uploadin% a different code
for each test*
G
OConnor, Ryan Maritime Robotics Project: Small Autonomous Marine Vehicle
/i$ure =!A: Catamaran hull pro#ided by the AMC
/i$ure =!&9: Autonomous Vessel
.efore each test the Arduino re7uired a start-up procedure* This as re7uired to reset and recalibrate
the Ardu0M# and reset the timer on the Arduino* .efore each test the reset button on the both the me%a
and Ardu0M# ere pushed and the model as held still in the ater to prevent a buildup of drift from the
previous test* Once the Ardu0M# as recalibrated the motor as set to the desired R5M and the vessel
as left to run*
> Results
@ue to time constraints only to testin% paths ere testedA one as a simple !?" de%ree turn and the
other involved the vessel makin% to 9" de%ree turns* @ata as attained throu%h the use of the model test
basins 2ualisys motion capture system and by readin% the data bein% produced by the Ardu0M# $1*
>%& &@9 de$ree course
The first set of tests involved pro%rammin% the Arduino me%a to travel for a set amount of time and
then preform a !?" de%ree turn* =i%ure F -!! displays the variation in the Arduino Me%as ability to
complete the set task by plottin% all runs* All runs ere started at approximately -1*? m alon% the x-axis*
The end position is shon to have a lar%e variation' ith the position ran%in% from approximately -> m to
"*> m alon% the x-axis' ith the vessel both over and under turnin%*
The horiContal displacement is calculated by subtractin% the x-displacement of end of the turnin% circle
from the x-displacement of the vessels final position* This value as the error of the individual run*
Therefore if the vessel as to complete its turn at the intended bearin%' the horiContal distance ill be Cero
providin% the vessel does not drift off course hile travellin% in a strai%ht line* The data across all runs can
be found in =i%ure F -!(* The avera%e error amon% the number of runs conducted as found to be !*9> m
ith the measured error estimate ith 9> E confidence calculated as (*!! m*
?
OConnor, Ryan Maritime Robotics Project: Small Autonomous Marine Vehicle
/i$ure >!&&: All runs or a &@9 de$ree trac8 /i$ure >!&(: Accuracy or a sin$le &@9 de$ree turn
=or the vessel to have !"" E accuracy ith no error' it ould re7uire the horiContal displacement
beteen the end of the turn and its final position to be Cero*
>%( 1estin$ multiple turns
The second test re7uired that the vessel complete to turns durin% its operation' these turns ere both
9" de%rees* The vessel as pro%rammed to travel for a specified time before makin% the first turn' after
this initial turn the vessel as re7uired to travel for another set amount of time before makin% its final
turn* =i%ure F -!1 details all the runs made* The vessel as not capable of completin% a successful run
here to consecutive 9" de%ree turns ere made*
The initial turn as found to have a hi%her accuracy than the second turn* This is seen in both =i%ure F
-!D and =i%ure F -!>*
/i$ure >!&+: all run testin$ the Arduinos ability to complete multiple turns
The accuracy of the first turn as found the alternate beteen -(> to !" de%rees as shon in =i%ure F
-!D* The mean error of turn ! as found to be 9*"( de%rees ith the measured error estimate ith a 9> E
confidence interval bein% !F*G( de%rees*
9
OConnor, Ryan Maritime Robotics Project: Small Autonomous Marine Vehicle
=i%ure F -!> details the vessels ability to complete a second turn' the vessel is seen to continue turnin%
for a further (> to 1> de%rees* The mean error for the second turn as (G*>9 de%rees ith the measured
error estimated ith a 9> E confidence interval at ("*GG de%rees*
/i$ure >!&0: Accuracy o 1urn &
/i$ure >!&=: Accuracy o 1urn (
>%+ Accuracy o the Ardu'M< V+
The accuracy of the ma%netometer and onboard calculated ya on the 0M# could be determined
throu%h the use of the e7uipment at the model test basin' particularly the 2ualisys stop motion cameras*
This as done thou%h post-processin% both sets of results and compared*
=i%ure F -!F has the accuracy of the ma%netometer shon as a percenta%e for all runs made ith the
system ritin% the data to the* The error of the ma%netometer is very lo' alternatin% beteen "*> E to
(*GE* @urin% these tests the vessel did not complete the turn once it had reached the specified bearin%'
this hoever ould not affect the data from the Ardu0M# hence hy it can be compared to the 2ualisys
results* The ma%netometer had a mean deviation of !*DD de%rees ith the measured error estimated ith a
9> E confidence interval at !*G1 de%rees
The data received relatin% to the ya had a much lar%er error ran%in% from (E to 1"E* =i%ure F -!G
shos the data for the Ardu0M# $1 calculated ya ith the measured error estimated ith a 9> E
confidence interval at >"*! de%rees
/i$ure >!&>: Accuracy o the ma$netometer on the
Ardu'M< V+
/i$ure >!&?: ,rror calculated or the ya* an$le as
calculated by the Ardu'M< V+
!"
OConnor, Ryan Maritime Robotics Project: Small Autonomous Marine Vehicle
=i%ure F -!? shos a comparison of the 7ualisys ya data' ma%netometer headin%' and Ardu0M# $1
calculated ya* The 7ualisys and ma%netometer data are seen to follo a very close trend' hile the
Ardu0M# ya data be%ins to drift at the start of the test and continues to drift throu%hout the rest of the
run*
0nitially the ya as ori%inally used as the reference data in the pro%ram' hoever the vessel ould
not run the pro%rammed course* @urin% test alterations to the pro%ram ere made' hoever the Ba
ould not %ive results on any merit and vessel continued to not travel the envisioned path* As shon in
=i%ure F -!9' the rudder an%le as bein% altered throu%h the entire run' hence hy it as turnin% ri%ht
initially*
/i$ure >!&@: Comparison o the Ardu'M< V+ *ith data
rom the .ualisys motion capture cameras
/i$ure >!&A: Pro$rammed usin$ the 4a* to control
the #essels bearin$%
? 2iscussion
6ith the use of both the Ardu0M# and ultrasonic sensor an autonomous vessel as achieved' the
vessel as able to avoid obstacles and complete a number of prepro%rammed turns* ;oever the vessel
as not able to complete the intended turns to !"" E accuracy* The confidence of the results can be
increased by increasin% the repeatability of all runs for the individual tests*
The Arduinos accuracy as an autonomous is hi%hly dependent on to of the system componentsA the
Arduino Me%a and the Ardu0M# $1* .oth systems sho a lar%e of error due to the pro%rammed functions
used in the system*
?%& Accuracy o the Ardu'M< V+
The to different sensors on the Ardu0M# caused a difference of results hen compared ith those
attained from the 2ualisys system* The ma%netometer presented the results of hi%h accuracy bein% as lo
as "*F E and the measured estimated error bein% !*G1 de%rees* the ma%netometer has a hi%h accuracy
hen compared to the results from 7ualisys'
The ya data bein%s to drift si%nificantly as soon as the Ardu0M# has been calibrated* This drift is
then translated throu%hout the rest of the test resultin% in the final ya an%le bein% si%nificantly different
from the actual ya an%le* This drift in the ya an%les caused the error estimate to be considerably hi%h
&>"*! m) hen it could reflect a value similar to that of the ma%netometer &!*G1 de%rees)* 0f the ya an%le
as to control the bearin%' it ould cause the vessel to over-turn or under-turn*
.efore the pro%ram as completed' it as found that by chan%in% certain properties in the code itself
ould result in various inaccuracies of both the ya data and the ma%netometer data' the output mode
corrects the ya data* 0f the output mode as selected the ya data ould be presented as normal but the
ma%netometer ould not display any results* 0f output mode as not selected then both the ma%netometer
and ya data ould be displayed as normal*
!!
OConnor, Ryan Maritime Robotics Project: Small Autonomous Marine Vehicle
@urin% the pro%rammin% phase of the Ardu0M# $1' the parameter had to be set so the ra data from
the %yroscope sensor as bein% sent throu%h the @CM matrix and then output as the ya' hile the data
from the ma%netometer as not* The lar%e error of the ya data ould be a result of calculations of the
@CM matrix*
?%( O#erall system accuracy
As the data from the Ardu0M#s ma%netometer as of hi%h accuracy' the vessel inability to complete
the pro%rammed course is due to the navi%ation pro%ram implemented* Therefore the problem ill be
caused by the navi%ation pro%ram that as loaded onto the Arduino and its control of the vessel direction*
Once the vessel had reached its intended course the rudder as reset to allo the vessel to travel in a
strai%ht line' hoever there as no pro%ramin% done to prevent the vessel from overturnin%*
.efore the 7ualisys system as calibrated for the boat' the vessel as tested
6hen the ya an%le as used to dictate the end of the turn' the vessel as seen to have a hi%her error
hen compared to the ma%netometer* The actual path hen usin% the ya an%le did not match the
intended path' ith the vessel not bein% able to be used for traversin% a strai%ht line* therefore on the day
=or both tests the vessel had a hi%h level error' ith the measured error estimate bein% (*!! m for a
sin%le !?" de%ree turn and
@ Recommendations
The recommended pro%ram for the Ardu0M# $1 included code for readin% data from a :5S' the data
as read every ! second re%ardless of the stren%th of the :5S si%nal* As the :5S as disconnected' every
tenth line of data as filled ith incomprehensible data' this re7uired the base code to be altered to
remove all :5S code ithin the 0M# code* The :5S hen connected into the system ill also correct the
ya data' therefore testin% could be conducted here there is an unobstructed vie of the sky*
There are a number of accelerometers' %yros' ma%netometers' and 0M#s currently available on the
market' all of hich can be connected to the Arduino* As the sensors ould have varyin% accuracies'
further testin% could be undertaken to determine hich sensor ould increase the overall accuracy of the
system*
An H-bee module could also be added to the system to enable ireless communication ith a
computer' it ould allo the pro%ram to be uploaded irelessly and for all data bein% read from the
Ardu0M# to be sent directly to the computer*
=urther testin% needs to be done as only sin%le turn &!?" de%ree) path as repeated (D times and the
double turn path as repeated !" times* The Ardu0M# $1 also re7uires further testin% hile bein%
connected to an S@ breakout board as only ten runs ere completed for only one of the tests*
A Conclusions
3ven thou%h this is the initial sta%e of development' the Arduino micro-computer as used to create an
autonomous system that as capable of completin% a pre-pro%rammed course ith the use of an 0M#* .y
mer%in% the ultrasonic sensor into the system' the vessel became a fully autonomous vehicle capable of
makin% decisions based on its surroundin%s and headin%*
The system hoever did sho a considerable amount of error' resultin% in the vessel not bein% able to
successfully complete the pro%rammed course* Thou%h the Ardu0M# still re7uires additional ork to its
code' specifically the calculation of the ya data as ell as the accuracy of the accelerometer is
determined*
The data from the ma%netometer can still be used to control the vessel due to the lo error of the data*
The level of accuracy of the onboard ma%netometer shoed that this system is incredibly accurate'
makin% it a %ood sensor to use hen collectin% data* The ma%netometer ould be ideal to be used as a
stand-alone sensor as the data has a hi%h accuracy ith an avera%e error of approximately !*> E
The vessel did not have any form of controller to dampen the vessels turn' once the vessel had reached
the re7uired bearin% the rudder as reset to Cero an%le of turn* This ould have caused the vessel to
!(
OConnor, Ryan Maritime Robotics Project: Small Autonomous Marine Vehicle
briefly drift beyond the intended bearin%* Some form of 50@ controller ould cause the vessel to correct
its ya an%le until it is travellin% alon% a constant headin%*
@ue to the number of repeated tests' the system could benefit from a %reater number of tests* 0f the
system as to under%o further testin% it ould allo the data beteen the Ardu0M# and 2ualisys to
analysed ith less uncertainty in the error*
As the motor speed as controlled throu%h a potentiometer' the system ould benefit from the Arduino
motor shield as the pro%rammin% for the motor shield ould allo to the vessel speed to be varied from
ithin the pro%ram*
The Ardu0M# $1 ould make an excellent choice as a stand-alone sensor for the determination of the
compass headin% and the direction of <orth* The Ardu0M# ould be able to be connected to a cheap
Arduino board hich could be connected to an S@ breakout board*
As the output mode as turned off due to the need of the ma%netometer' testin% into the difference in
results for the ya data could be carried out* =urther testin% into the accuracy of the accelerometer should
be done*
&9 Ac8no*led$ements
0 ould like to thank my supervisor' Shinsuke Matasubara' for all the aid and direction he %ave me
ith relation to this pro/ect alon% ith the team at the Model test basin for helpin% ith the set-up of the
vessel and the 2ualisys motion capture system* 0 ould also like to thank Alex Clifford and +eon <elin%
for comin% don to model test basin durin% my testin% times to help out here needed*
&& Reerences
.us7uets' 4*' .us7uets' 4* $*' Tudela' @*' 5ereC' =*' .us7uets-Carbonell' 4*' .arbera' A*' *** I :ilabert' 4*
&("!(' September)* +o-cost A#$ based on Arduino open source microcontroller board for
oceano%raphic research applications in a collaborative lon% term deployment missions and suitable for
combinin% ith an #S$ as autonomous automatic rechar%in% platform* 0nAutonomous "nderwater
#ehicles -A"#., /01/ !EEE23E, &pp* !-!")* 0333*
4alvin%' .*' :ade' 8*' ;a%en' O* 8*' I $est%ard' 8* &(""1' September)* A toolbox of aidin% techni7ues
for the ;#:0< A#$ inte%rated inertial navi%ation system* 0n 3CEAN, /00$. 4roceedings &$ol* (' pp*
!!DF-!!>1)* 0333*
=allon' M* =*' 8aess' M*' 4ohannsson' ;*' I +eonard' 4* 4* &("!!' May)* 3fficient A#$ navi%ation
fusin% acoustic ran%in% and side-scan sonar* 0n5obotics and Automation -!C5A., /011 !EEE !nternational
Con%erence on &pp* (19?-(D">)* 0333*
.ahr' A*' +eonard' 4* 4*' I =allon' M* =* &(""9)* Cooperative localiCation for autonomous underater
vehicles* The !nternational 6ournal o% 5obotics 5esearch' /7&F)' G!D-G(?*
Arduino* &("!1)* JArduino*ccK* Retrieved !D,"1' ("!1' Retrieved from http:,,*arduino*cc,
Marport* &("!")* JA#$ Market to Reach L(*1 billion Over the <ext @ecade*K Retrieved !D,"1' ("!1*
Retrieved from http:,,blo%*marport*com,("!","!,"?,!?(?,*
Sparkfun* &("!1)* J@0B@rones Ardu0M#M $1K* Retrieved !","9' ("!1* from
https:,,*sparkfun*com,products,!!">>
.rain' M* &("!1)* How does a brushless electric motor wor+8. Retrieved !","9' ("!1* =rom
http:,,*hostufforks*com,brushless-motor*htm
!1
OConnor, Ryan Maritime Robotics Project: Small Autonomous Marine Vehicle
AMC* &("!1) JModel test basinK* Retrieved (D,"9,("!1* Retrieved from
https:,,*amc*edu*au,maritime-en%ineerin%,model-test-basin*
2ualisys* &("!1)* Robust N hi%h performin% N real time* Retrieved (D,"9,("!1* Retrieved from
http:,,*7ualisys*com,products,*
.rittannica* &("!1)* 0nertial :uidance System* Retrieved !G 4une' ("!1' from
http:,,*britannica*com,3.checked,topic,(?G1>D,inertial-%uidance-systemOref?(11>(*
C;Robotics* &("!1)* #nderstandin% 3uler An%les* Retrieved (D September' ("!1' from
http:,,*chrobotics*com,library,understandin%-euler-an%les
Starlino* &("!!)* @CM Tutorial N An 0ntroduction to Orientation 8inematics' Retrieved (D September'
("!1' from http:,,*starlino*com,dcmPtutorial*html
Ardu-imu' &("!")* Theory of operation &simplified)' Retrieved (D September' ("!1' from
https:,,code*%oo%le*com,p,ardu-imu,iki,Theory*
6ikipedia' &("!1)* 3uler an%les' retrieved (D September' ("!1' from
http:,,en*ikipedia*or%,iki,3ulerPan%les
!D