J. Blanch, S. Tosunoglu, ASME Southeastern Regi<strong>on</strong> XI Technical Journal, Volume 2, Number 1, April 2003; also presented atthe ASME Southeastern Regi<strong>on</strong> XI Technical C<strong>on</strong>ference, Miami, Florida, April 4-5, 2003.Table 1. Data extracted from range of interest.Left Rightbit rps rps90 0.880282 -0.8787394 0.857633 -0.85106104 0.802568 -0.78125112 0.673401 -0.64516120 0.423729 -0.36058140 -0.4 0.454545146 -0.59032 0.648508152 -0.72464 0.761035164 -0.82781 0.859107168 -0.8489 0.874126Two observati<strong>on</strong>s that persuade against searchingfor more accurate approximati<strong>on</strong>s are: 1, theexperimental measurements are subject to error;depending <strong>on</strong> the accuracy of the reading or even <strong>on</strong>the battery charge, values will vary slightly from <strong>on</strong>erun to the next. And 2, bit comm<str<strong>on</strong>g>and</str<strong>on</strong>g>s are integers;therefore there will be gaps in the velocity curves forvalues that could never be reached because theycorresp<strong>on</strong>d to a bit value between two integers. Onthe other h<str<strong>on</strong>g>and</str<strong>on</strong>g>, the closeness of the splineapproximati<strong>on</strong> to the actual data showed thatselecting a few finite points can offer sufficient<str<strong>on</strong>g>c<strong>on</strong>trol</str<strong>on</strong>g> over the velocity. Not using an equati<strong>on</strong> (orseveral) to find the bit value corresp<strong>on</strong>ding to adesired velocity, results in a crude <str<strong>on</strong>g>c<strong>on</strong>trol</str<strong>on</strong>g> over speedvalues; but, by finding the bit values that corresp<strong>on</strong>dto specific velocities (0.8, 0.6, 0.4, 0.2, 0.0, -0.2, -0.4,-0.6 <str<strong>on</strong>g>and</str<strong>on</strong>g> –0.8 rps, per se), the velocity of the platformcan be properly <str<strong>on</strong>g>c<strong>on</strong>trol</str<strong>on</strong>g>led for its full range of values.Figure 6. Distance <str<strong>on</strong>g>and</str<strong>on</strong>g> angle calculati<strong>on</strong>.SENSORSThe main <str<strong>on</strong>g>sensor</str<strong>on</strong>g> used by the HANCOR is theSharp GP2D12 analog infrared ranger [10]. Sharp IRrangers use triangulati<strong>on</strong> <str<strong>on</strong>g>and</str<strong>on</strong>g> a <strong>small</strong> linear CCDarray to compute the distance or presence of objectsin the field of view (Figure 6), which results ingreater reliability <str<strong>on</strong>g>and</str<strong>on</strong>g> accuracy than many IR <str<strong>on</strong>g>sensor</str<strong>on</strong>g>sthat use time-of-flight techniques. Also, these newrangers offer much better immunity to ambientlighting c<strong>on</strong>diti<strong>on</strong>s <str<strong>on</strong>g>and</str<strong>on</strong>g> to the color of the reflectedsurface than other IR <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s [11]. These <str<strong>on</strong>g>sensor</str<strong>on</strong>g>shave a minimum range of 10 cm (~ 4in) <str<strong>on</strong>g>and</str<strong>on</strong>g> amaximum range of 80 cm. The beam is very tight,just about 3 cm wide <str<strong>on</strong>g>and</str<strong>on</strong>g> less than 3 cm in height at40 cm. Such characteristics make the <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s quitesuitable for unidirecti<strong>on</strong>al measurements, but not sogreat for general obstacle detecti<strong>on</strong>. Someadvantages over ultrasound ranger <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s,traditi<strong>on</strong>ally used for obstacle detecti<strong>on</strong>, are: IR<str<strong>on</strong>g>sensor</str<strong>on</strong>g>s do not suffer from ghost images; furthermore,the angle at which they face an obstacle can be ashigh as 60 o without affecting distance reading [11].IR <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s also have much lower power requirementcompared to the battery-hungry ultrasound <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s.Finally, price becomes an issue when ultrasound<str<strong>on</strong>g>sensor</str<strong>on</strong>g>s are over five times more expensive than IR<str<strong>on</strong>g>sensor</str<strong>on</strong>g>s. Of course, sornars will always be greatdetecti<strong>on</strong> <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s thanks to their range (2 to 120 cm)<str<strong>on</strong>g>and</str<strong>on</strong>g> their wider detecti<strong>on</strong> area.Table 2: IR range values for given distancesDistance (cm)10Sensor1239Sensor223512 210 20414 185 17716 169 16118 152 1412022139129132120242612011311310528 108 9930 101 9132349587877836 81 7938 79 7140 74 6742 69 6344 65 5946 61 5548 57 5250 54 48525450484341The analog output of the infrared does not changelinearly with the distance being measured; table 2shows the readings taken from the <str<strong>on</strong>g>servo</str<strong>on</strong>g>s from 10 to
J. Blanch, S. Tosunoglu, ASME Southeastern Regi<strong>on</strong> XI Technical Journal, Volume 2, Number 1, April 2003; also presented atthe ASME Southeastern Regi<strong>on</strong> XI Technical C<strong>on</strong>ference, Miami, Florida, April 4-5, 2003.50 cm. To find a numerical approximati<strong>on</strong> that canyield a governing equati<strong>on</strong>, the average of <str<strong>on</strong>g>sensor</str<strong>on</strong>g> 1<str<strong>on</strong>g>and</str<strong>on</strong>g> <str<strong>on</strong>g>sensor</str<strong>on</strong>g> 2 was found <str<strong>on</strong>g>and</str<strong>on</strong>g> then analyzed.value (bit)250200150100500IR readingsHoerl Pow Avg10 18 26 34 42 50 58Distance (cm)Figure 7. IR distance approximati<strong>on</strong>s.The average values can be approximated by thefollowing power equati<strong>on</strong>:V(d) = 1917.709*d^(-0.8941)which is very similar to that of [11]V(d) = 2141.72055*d^(-1.078867)A better approximati<strong>on</strong> can be found using aHoerl Model, which is a modified power equati<strong>on</strong>:V(d) = 997.82*0.985^d*d^(-0.563), but it is notreally necessary to perform the extra power functi<strong>on</strong>for a marginal increase in accuracy.To turn IR range <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s into effective obstacledetectors, the <str<strong>on</strong>g>servo</str<strong>on</strong>g>s must repositi<strong>on</strong> the <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s toget several readings of the terrain ahead of the robot.If the <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s have to be reoriented, timing becomesan issue. Several factors have to be taken intoaccount to determine the frequency at which readingscan be taken. First of all, the refresh rate of the IR<str<strong>on</strong>g>sensor</str<strong>on</strong>g>s determines the maximum frequency at whichreadings can be taken. The velocity of the <str<strong>on</strong>g>servo</str<strong>on</strong>g>sdictate how l<strong>on</strong>g it will take to reach the desiredorientati<strong>on</strong>. The resp<strong>on</strong>se of the <str<strong>on</strong>g>c<strong>on</strong>trol</str<strong>on</strong>g>ler boardindicates how l<strong>on</strong>g it takes for the board to poll theAD header for a new reading <str<strong>on</strong>g>and</str<strong>on</strong>g> return it to theh<str<strong>on</strong>g>and</str<strong>on</strong>g>held. The h<str<strong>on</strong>g>and</str<strong>on</strong>g>held c<strong>on</strong>nects to the <str<strong>on</strong>g>c<strong>on</strong>trol</str<strong>on</strong>g>lerboard at a certain speed. Finally, the Palm has toperform many computati<strong>on</strong>s, <str<strong>on</strong>g>and</str<strong>on</strong>g> can <strong>on</strong>ly read fromthe serial port every so often.The IR <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s c<strong>on</strong>tinuously takes distancereadings every 38 ms, for a total of about 25 readingsevery sec<strong>on</strong>d (25Hz)[10]. The Hitec ht-85 <str<strong>on</strong>g>servo</str<strong>on</strong>g>shave a nominal operating speed of 0.11sec/60° at4.8V. Even though the speed of the <str<strong>on</strong>g>servo</str<strong>on</strong>g> isproporti<strong>on</strong>al to the displacement covered, thenominal speed can be used to approximate the time ittakes the <str<strong>on</strong>g>servo</str<strong>on</strong>g> to move a certain arc. At 9600 baud,which is the st<str<strong>on</strong>g>and</str<strong>on</strong>g>ard c<strong>on</strong>necti<strong>on</strong> speed for the<str<strong>on</strong>g>c<strong>on</strong>trol</str<strong>on</strong>g>ler board, it takes 4ms to transmit a simpleoutput comm<str<strong>on</strong>g>and</str<strong>on</strong>g> of 4 bytes. For more complexcomm<str<strong>on</strong>g>and</str<strong>on</strong>g>s it takes the Palm 25ms to transmit thecomm<str<strong>on</strong>g>and</str<strong>on</strong>g> <str<strong>on</strong>g>and</str<strong>on</strong>g> receive the result as ASCII data. Afterthe data is received, it must then be c<strong>on</strong>verted to aninteger for it to be useful. In practice, is rare to get<str<strong>on</strong>g>sensor</str<strong>on</strong>g> readings faster than 50ms. It is possible toc<strong>on</strong>nect the <str<strong>on</strong>g>c<strong>on</strong>trol</str<strong>on</strong>g>ler board to transmit at up to38400 baud, which should reduce c<strong>on</strong>siderably thecommunicati<strong>on</strong> delays, but since the <str<strong>on</strong>g>servo</str<strong>on</strong>g> resp<strong>on</strong>seis the main cause for delays in the architecture, it isnot necessary.-30 o-8 o 8 o 30 oFigure 8. Obstacle detecti<strong>on</strong>.The GP2D12 takes c<strong>on</strong>tinuous readings, but thePalm takes discrete readings individually. In order toeffectively cover the fr<strong>on</strong>t area of the rover, each<str<strong>on</strong>g>sensor</str<strong>on</strong>g> takes three readings as seen in figure 8. Giventhe Hitec’s nominal velocity, the different times ittakes a <str<strong>on</strong>g>servo</str<strong>on</strong>g> to go from <strong>on</strong>e positi<strong>on</strong> to the next are:Positi<strong>on</strong> 1 to Positi<strong>on</strong> 2: 46 o ~ 0.084sec; Positi<strong>on</strong> 2 toPositi<strong>on</strong> 3: 24 o ~ 0.044sec; Positi<strong>on</strong> 3 to Positi<strong>on</strong> 1:22 o ~ 0.04sec. Since the IR ranger takes 38ms torefresh, the robot should wait that much l<strong>on</strong>ger beforereading from the <str<strong>on</strong>g>sensor</str<strong>on</strong>g>. Therefore, the time delaybefore a reliable reading can be taken is at least:To positi<strong>on</strong> 1: 0.040 + 0.038 = 0.079secTo positi<strong>on</strong> 2: 0.084 + 0.038 = 0.122secTo positi<strong>on</strong> 3: 0.044 + 0.038 = 0.082secPositi<strong>on</strong> 1Positi<strong>on</strong> 30 o 0 o-54 o 54 o24 o 22 oPositi<strong>on</strong> 246 oUnfortunatelly, PalmOS does not have a wait( )or delay( ) functi<strong>on</strong>, to wait l<strong>on</strong>g enough beforetaking the reading. Fortunately, Palm does have a