⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 seattle robotics society encoder.htm

📁 机器人应用的全套实例寻机小车
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0064)http://www.seattlerobotics.org/encoder/200610/article2/index.php -->
<!-- ######################################################

Sample Article template
Version 1.0

To add an article:

1) Use "Save As" to save a copy of this file...
	a) If the article has no pictures/etc, you can just store it
	   in the issue folder (e.g. 200508), e.g. with the author's name.
	   Be sure to keep the .php suffix.
	b) If there are pictures or other files associated with this
	   article, create a subfolder (e.g. with the author's name)
	   and put this in there as index.php.

2) Add the article to the database. You'll get a notice that the article
   was added, including reporting its (unique) number.

3) Set articleNum (using the value reported in step 2).

4) Set szPath: remove the appropriate szPath assignment below...
	a) If you saved into the issue folder (step 1a), remove the first line.
	   (This will leave the path set to "..")
	b) If you saved into a subfolder (step 1b), remove the second line.
	   (This will leave the path set to "../..")

5) Add the article's text between the "start content" and "end content" comments
   (and remove the bogus stuff).
	- Article title, author, and issue info will be shown automatically.
	- Put the contents of a "regular" HTML file's BODY tag in this location.

6) Remove this comment.

####################################################### --><HTML><HEAD><TITLE>Seattle Robotics Society Encoder</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK 
href="Seattle Robotics Society Encoder.files/encoder.css" type=text/css 
rel=stylesheet>
<SCRIPT language=JavaScript src="Seattle Robotics Society Encoder.files/SRS.js" 
type=text/javascript></SCRIPT>

<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY>
<DIV class=header>
<H1 align=center>Desktop Line Following Robot</H1>
<H2 align=center>By ChaN</H2>
<HR class=hds>

<DIV align=right><IMG height=352 
src="Seattle Robotics Society Encoder.files/track.jpg" width=505 
align=right></DIV></DIV>
<P align=left>Recently many kind of robot contests have being opened and some 
interesting reports of the challenge are found on the web. Line Following is a 
kind of robot contests which measures running speed on the line. I built a tiny 
line following robot which can run on the desk-only moving the key board aside 
will do. It is for only a personal toy as it is reduced in size less than one 
fifth compared to typical line following robots. I believe that it is suitable 
for home use in small houses and apartments.</P>
<DIV></DIV>
<H3>About Line Follower</H3>
<P>The line follower is a self operating robot that follows a line drawn on the 
floor. The basic operations of line following are as follows:</P>
<OL>
  <LI>Capture line position with optical sensors mounted at the front end of the 
  robot. Most competitors are using several photo-reflectors, and some leading 
  contestants are using an image sensor for image processing. The line sensing 
  procss requires high resolution and high robustness. 
  <LI>Steear robot to track the line with any steearing mechanism. This is just 
  a servo operation, any phase compensation will be required to stabilize 
  tracking motion by applying digital PID filter or any other servo argolithm. 
  <LI>Control speed according to the lane condition. Running speed is limited 
  during passing a curve due to friction of the tire and the floor. </LI></OL>
<P>There are two line styles, white line on the black floor and black line on 
the white floor. Most contest are adopting the first one in line width of 
between 15 and 25 millimeters.</P>
<DIV align=right><IMG hspace=10 
src="Seattle Robotics Society Encoder.files/physicallayout.jpg" width=300 
align=right> </DIV>
<H3>Hardware</H3>
<H4>Mechanics</H4>
<DIV class=para>
<P>Right image shows bottom view and side view of the built line following 
robot. All mechanical and electrical parts are mounted on a proto board, and it 
also constitutes the chassis.</P>
<P>The line following robot is upheld in three points of two driving wheels and 
a free wheel. The driving wheels are made with a 7 mm dia ball bearing and a 
rubber tire. The free wheel is a 5 mm dia ball bearing attached loosely. To 
power driving wheels, two tiny vibration motors that are used for a cellular 
phone, pager or any mobile equipment. Each shaft is pressed onto the tire with a 
spring plate, and the output torque is transferred to the wheels.</P>
<P>The steering mechanism is realized in <EM>differential drive</EM> that steers 
the robot by difference in rotation speed between the left wheel and the right 
wheel. It does not require any additional actuator, only controlling the wheel 
speed will do.</P></DIV>
<DIV class=para>
<H4>Electronics</H4>
<TABLE class=lst id=spec align=right border=10>
  <TBODY>
  <TR>
    <TD>Controller</TD>
    <TD>ATmega8 (Atmel)</TD></TR>
  <TR>
    <TD>Line sensor</TD>
    <TD>Six photo-reflectors</TD></TR>
  <TR>
    <TD>
      <DIV align=right>Power supply</DIV></TD>
    <TD>Two CR2032 lithium cells<BR><SMALL>(One is for controller, the other 
      is for motors)</SMALL></TD></TR>
  <TR>
    <TD>Motor</TD>
    <TD>Two micromotors for left wheel and right wheel</TD></TR>
  <TR>
    <TD>Dimensions</TD>
    <TD>45(L), 33(W), 12.5(H) [mm] </TD></TR>
  <TR>
    <TD>Weight</TD>
    <TD>15 grams <SMALL>(Body:8g, Cells:7g)</SMALL></TD></TR>
  <TR>
    <TD>Performance</TD>
    <TD>53 centimeters per second at oval course</TD></TR></TBODY></TABLE>
<P>An Atmel ATmega8 is used for the controller and it is powered by a lithium 
coin cell. The other lithium coin cell is for only motors. Separating the power 
supply into two cells is to avoid accidental reset of the microcontroller due to 
voltage dip by motor start current. Six photo-reflectors are mounted at front 
end of the chasis. They sense reflection rate of the floor under them. Motors 
are driven in PWM to control rotation speed lineary. The latest circuit diagram 
is shown below:</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P><IMG height=750 src="Seattle Robotics Society Encoder.files/ltc.gif" 
width=1000 vspace=20></P></DIV>
<H3>Software</H3>
<H4>Using photo-reflectors</H4><IMG 
src="Seattle Robotics Society Encoder.files/SensorDiagram.png" align=right> 
<P>To detect a line to be followed, most contestants are using two or more 
photo-reflectors. The output current-proportional to reflection rate of the 
floor-is converted to voltage with a resister and tested to determine if the 
line is detected or not. However the threshold voltage cannot be fixed to any 
level because optical current created by ambent light is added to the output 
current like the image shown right.</P>
<P>Most photo-detecting modules for industrial use are using modurated light to 
avoid interference by the ambient light. The detected signal is filtered with a 
band pass filter and disused signals are filtered out. Therefore only the 
modurated signal from the light emitter can be detected. Of course the detector 
must not be saturated by ambient light because it is effective when the detector 
is working in its' linear region.</P>
<P>In this project, pulsed light is used to cancel ambient light. This is 
suitable for arrayed sensors that are scanned in sequence to avoid interference 
from the next sensor. The microcontroller starts to scan the sensor status, 
sample the output voltage, turns on the LED and samples again the output 
voltage. The difference between the two samples is the optical current created 
by the LED, as the output voltage produced by the ambient light is canceled. The 
other sensors are also scanned the same way in sequence.</P>
<P>&nbsp;</P>
<H4>Signal processing of line detection</H4>
<DIV align=right>
<P align=left><IMG hspace=10 
src="Seattle Robotics Society Encoder.files/SensorDetail.gif" align=right>The 
image at right shows the actual line posisiton vs detected line position with a 
center value of 640. The microcontroller scans six sensors and calculates the 
line position by output ratio of two sensors near the line. Thus the line 
position can be detected lineary with only six sensors. All the sensor outputs 
are captured as analog values that are proportionate to each sensors' reflection 
ratio, and the sensitivity varys between each one of them. In this system, to 
remove the variations from the outputs, calibration parameters for each sensor 
can be held in non-volatile memory. This can be done with online mode. The 
microcontroler enters the online mode when an ISP cable is attached, and it can 
be controlled with a terminal program in serial format of N81 38.4kbps. S1 
command monitors sensor values, and S2 command calibrates variation of sensor 
gain on the reference surface (white paper). The ATmega8 must be set to 8MHz 
internal osc. </P>
<H4 align=left>Tracking control</H4><IMG hspace=15 
src="Seattle Robotics Society Encoder.files/steeringDetail.gif" align=right> 
<P align=left>The line position is compared to the center value to be tracked, 
and the position error is processed with Proportional/Integral/Diffential 
filters to generate steering command. The line folloing robot tracks the line in 
PID control that is the most popular argolithm for servo control.</P>
<P align=left>The proportional term is the common process in the servo system. 
It is only a gain amplifier without time dependent process. The differential 
term is applied in order to improve the responce to disturbance, and it also 
compensate phase lag at the controlled object. The D term will be required in 
most case to stabilize tracking motion. The I term is not used in this project 
from following reasons. The I term that boosts DC gain is applied in order to 
remove left offset error, however, it often decrease servo stability due to its 
phase lag. The line following operation can ignore such tracking offset so that 
the I term is not required.</P>
<P align=left>When any line sensing error has occured for a time due to getting 
out of line or end of line, the motors are stopped and the microcontroller 
enters sleep state of zero power consumption.</P>
<H2 align=left>NOTES:</H2><IMG 
src="Seattle Robotics Society Encoder.files/closeup.jpg" align=right> 
<P align=left>The Firmware can be found <A 
href="http://www.seattlerobotics.org/encoder/200610/article2/ltc.txt">here</A> 
and the include file is <A 
href="http://www.seattlerobotics.org/encoder/200610/article2/avr.inc">here</A>.</P>
<P align=left><A 
href="http://www.seattlerobotics.org/encoder/200610/article2/Ponly.mpeg">Line 
following motion with only proportional correction.</A> This is a video of the 
robot following the line with only proportional control. Notice that it leaves 
the line entirely at the end.</P>
<P align=left><A 
href="http://www.seattlerobotics.org/encoder/200610/article2/PandD.mpeg">Line 
following motion with both proportional and differential contro</A>l. This video 
shows the smooth operation attained with both proportional and differential 
control.</P></DIV>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P><!-- ********** (end content) ********** --><BR><B>Warning</B>: 
main(/footer-encoder.inc): failed to open stream: No such file or directory in 
<B>E:\Websites\seattlerobotics.org\encoder\200610\article2\index.php</B> on line 
<B>224</B><BR><BR><B>Warning</B>: main(): Failed opening '/footer-encoder.inc' 
for inclusion (include_path='.;c:\php\includes') in 
<B>E:\Websites\seattlerobotics.org\encoder\200610\article2\index.php</B> on line 
<B>224</B><BR>PHP Warning: main(/footer-encoder.inc): failed to open stream: No 
such file or directory in 
E:\Websites\seattlerobotics.org\encoder\200610\article2\index.php on line 224 
PHP Warning: main(): Failed opening '/footer-encoder.inc' for inclusion 
(include_path='.;c:\php\includes') in 
E:\Websites\seattlerobotics.org\encoder\200610\article2\index.php on line 224 
</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -