📄 introductionhardwaresoftwareresu.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=(0099)http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html -->
<HTML xmlns="http://www.w3.org/1999/xhtml" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" XMLNS:(null)0 =
"http://www.w3.org/TR/REC-html40"><HEAD><TITLE>IntroductionHardwareSoftwareResu</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE type=text/css>BODY {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; FONT-FAMILY: Palatino
}
#title {
HEIGHT: 75px; BACKGROUND-COLOR: #aa0000
}
#menu {
MARGIN: 0px auto; WIDTH: auto; HEIGHT: 25px; BACKGROUND-COLOR: #00aa00
}
#menu UL {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: none
}
#menu LI {
FLOAT: left
}
#menu LI A {
BORDER-RIGHT: #ffffff 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: #ffffff 1px solid; DISPLAY: block; PADDING-LEFT: 10px; PADDING-BOTTOM: 2px; BORDER-LEFT: #ffffff 1px solid; COLOR: #000000; PADDING-TOP: 2px; BORDER-BOTTOM: #ffffff 1px solid; TEXT-ALIGN: center; TEXT-DECORATION: none
}
#menu LI A:hover {
FONT-WEIGHT: bold; TEXT-DECORATION: none
}
#content {
}
</STYLE>
<META http-equiv=Site-Enter content=revealTrans(Duration=1.0,Transition=23)><!--mstheme--><LINK
href="IntroductionHardwareSoftwareResu.files/blen1011-109.css" rel=stylesheet>
<META content="blends 1011" name="Microsoft Theme">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY><A id=top></A>
<DIV id=title>
<P
align=left>
<FONT size=7><FONT face="Arial Black">Line Following Van</FONT>
</FONT></P></DIV>
<DIV id=menu>
<UL>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#intro">Introduction</A></FONT>
</LI>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#hilvdes">High
Level Design</A></FONT> </LI>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#hware">Hardware</A></FONT>
</LI>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#sware">Software</A></FONT>
</LI>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#res">Results</A></FONT>
</LI>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#concl">Conclusion</A></FONT>
</LI>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#cost">Cost</A></FONT>
</LI>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#fig">Schematics</A></FONT>
</LI>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#code">Code</A></FONT>
</LI>
<LI><FONT face="Palatino Linotype" size=4><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#ref">References
and Links</A> </FONT></LI>
<LI></LI></UL></DIV>
<DIV id=content>
<H1 align=left><FONT face="Palatino Linotype"><IMG height=202
src="IntroductionHardwareSoftwareResu.files/index1.jpg" width=298 align=left
border=0><IMG height=201 src="IntroductionHardwareSoftwareResu.files/index2.jpg"
width=297 align=left border=0> <IMG height=196
src="IntroductionHardwareSoftwareResu.files/index3.jpg" width=286
border=0> <IMG height=202
src="IntroductionHardwareSoftwareResu.files/index4.jpg" width=302
border=0> </FONT></H1>
<H1 align=left><FONT face="Palatino Linotype"><A
id=intro></A>Introduction</FONT></H1>
<P align=justify><FONT face="Palatino Linotype"
size=4>
Our project is a battery-powered toy car that is able to follow a path against a
background of contrasting color.</FONT></P>
<BLOCKQUOTE>
<P align=justify><FONT face="Palatino Linotype"
size=4> The
front of the car is fitted with an array of three photosensors, which allows
the car to detect the path as well as any turns in the path. Colors that
reflect light, such as white, produces a high voltage output from the sensors
whereas colors that absorb would output low. By reading the outputs from each
of the three sensors, the Atmel Mega32 MCU is able to discern the orientation
of the car and whether it is over a straight path or over a turn. The MCU then
sends the appropriate logic signals to activate the transistors driving the
car’s motors. We use a four-transistor H-bridge circuit to power the front
steering motor and a two-transistor half-bridge circuit to run the rear power
motors. The H-bridge is able to turn the steering left or right and brake,
depending on what logic signal the MCU sends. The half-bridge only drives the
rear motor forward and is turned on or off by the MCU. </FONT></P>
<P align=justify><FONT face="Palatino Linotype"
size=4> </FONT><A
href="http://instruct1.cit.cornell.edu/courses/ee476/FinalProjects/s2007/bl222_wh84/bl222_wh84/index.html#top">Back
to Top</A> </P></BLOCKQUOTE>
<H1><FONT face="Palatino Linotype"><A id=hilvdes></A>High Level
Design</FONT></H1>
<BLOCKQUOTE>
<P class=MsoNormal><U><SPAN
style="FONT-WEIGHT: 700; LINE-HEIGHT: 115%; FONT-FAMILY: Palatino Linotype"><FONT
size=4>Rationale and Sources of the Project Idea</FONT></SPAN></U></P>
<P class=MsoNormal style="LINE-HEIGHT: 150%" align=justify><SPAN
style="LINE-HEIGHT: 115%; FONT-FAMILY: Palatino Linotype"><FONT size=4>Our
project was inspired by robot kits that can be purchased to build
line-following robot cars. Often, these kits cost well over $100 and we
planned on making one that would cost less than $50. Also, typical
line-following robot cars move quite slowly and are solely controlled by the
car’s rear motors. We wanted our line-following car to move quickly and to use
its front wheels as the turning wheels and its rear wheels solely for driving.
A line-following car can also be used in a much larger scale to move hazardous
or other materials inside factories or storage houses by following designated
paths.</FONT></SPAN></P>
<P class=MsoNormal style="LINE-HEIGHT: 150%" align=justify><U><SPAN
style="FONT-WEIGHT: 700; LINE-HEIGHT: 115%; FONT-FAMILY: Palatino Linotype"><FONT
size=4>Logical Design</FONT></SPAN></U></P>
<P class=MsoNormal style="LINE-HEIGHT: 150%" align=justify><SPAN
style="LINE-HEIGHT: 115%; FONT-FAMILY: Palatino Linotype"><FONT size=4>A block
diagram of high level design is shown below. The three photosensors
communicate to the microcontroller via Ports A.0 – A.2. The half H-Bridge,
which controls the rear drive motor, is controlled by Port B.3, the PWM output
port. The full H-Bridge, which controls the front turning motor, is controlled
by the microcontroller through Ports A.3 – A.6. The PC Board that contains the
microcontroller is powered using a single 9V battery. Two separate 9V
batteries are connected in parallel to power the motors.</FONT></SPAN></P>
<P align=center> <IMG height=483
src="IntroductionHardwareSoftwareResu.files/hi_level.bmp" width=905
border=0>
</P>
<P align=center>Figure 1: High Level Block Diagram</P>
<P class=MsoNormal style="LINE-HEIGHT: 150%" align=justify><U><SPAN
style="FONT-WEIGHT: 700; LINE-HEIGHT: 115%; FONT-FAMILY: Palatino Linotype"><FONT
size=4>Hardware Tradeoffs</FONT></SPAN></U></P>
<P class=MsoNormal style="LINE-HEIGHT: 150%" align=justify><SPAN
style="LINE-HEIGHT: 115%; FONT-FAMILY: Palatino Linotype"><FONT size=4>Due to
spacing constraints, we were not able to mount more photosensors than we had
previously anticipated. Originally, we planned to have an array of six to
eight sensors across the front of the car. More sensors would enable us to
detect how sharp of a turn is ahead with various sensor readings. Instead, we
could only fit three sensors comfortably on the front of our car and this
fortunately was enough to perform the sensing.</FONT></SPAN></P>
<P class=MsoNormal style="LINE-HEIGHT: 150%" align=justify><U><SPAN
style="FONT-WEIGHT: 700; LINE-HEIGHT: 115%; FONT-FAMILY: Palatino Linotype"><FONT
size=4>Software Tradeoffs</FONT></SPAN></U></P>
<P class=MsoNormal style="LINE-HEIGHT: 150%" align=justify><SPAN
style="LINE-HEIGHT: 115%; FONT-FAMILY: Palatino Linotype"><FONT size=4>We
wanted to sample the sensor readings as fast as possible so that the car will
not miss any turns when it is driving fast. However, since we have three
sensors and only one analog to digital converter, we had to take turns
sampling each sensor and converting it. However, the MCU requires a certain
number of cycles to pass before starting each new conversion. Thus we were
forced to slow down the speed at which we sample the ADC. Once we slowed down
the ADC readings, our car had difficulty sensing turns because it was driving
too fast for the sensors to respond. Therefore, we had to slow our car down as
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -