<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technology of Robotics &#187; Microcontroller</title>
	<atom:link href="http://robotechno.us/category/robotics-tutorial/electronics/microcontroller/feed" rel="self" type="application/rss+xml" />
	<link>http://robotechno.us</link>
	<description>Robotics Technology &#124; Robotics News, Articles and Tutorial</description>
	<lastBuildDate>Thu, 29 Jul 2010 05:50:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=2752</generator>
		<item>
		<title>Super Tiny Line Follower Robot</title>
		<link>http://robotechno.us/super-tiny-line-follower-robot.html</link>
		<comments>http://robotechno.us/super-tiny-line-follower-robot.html#comments</comments>
		<pubDate>Thu, 02 Jul 2009 04:22:17 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Mechanics]]></category>
		<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[analog line follower]]></category>
		<category><![CDATA[line follower]]></category>
		<category><![CDATA[line follower tutorial]]></category>
		<category><![CDATA[line tracker]]></category>
		<category><![CDATA[smal line follower]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=213</guid>
		<description><![CDATA[Original post, visit this site: elm-chan.org Before read the rest article/tutorial, please watch the video first.. . See the robot&#8217;s movement and i&#8217;t speed. This is very great&#8230;! You may see the video here. This line follower robot is very small and simple. This robot is running fast and follow the line very smoothly. Mechanics [...]]]></description>
			<content:encoded><![CDATA[<p>Original post, visit this site: <a target="_blank" rel="nofollow" href="http://elm-chan.org">elm-chan.org</a><br />
Before read the rest article/tutorial, please watch the video first.. <img src='http://robotechno.us/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="Super Tiny Line Follower Robot" /> . See the robot&#8217;s movement and i&#8217;t speed. This is very great&#8230;!</p>
<p align="center"><object type="application/x-shockwave-flash" style="width: 320px; height: 265px;" data="http://www.youtube.com/v/-WJpwh9k_p0"><param name="movie" value="http://www.youtube.com/v/-WJpwh9k_p0" /></object><br />
You may <a target="_blank" href="http://www.youtube.com/watch?v=-WJpwh9k_p0">see the video here</a>.</p>
<p>This line follower <a target="_blank" title="robotics" href="http://robotics.penyet.net/">robot</a> is very small and simple. This <a target="_blank" title="all about robotics" href="../">robot</a> is running fast and follow the line very smoothly.</p>
<p><strong>Mechanics</strong><br />
<span id="more-213"></span>
<p style="text-align: center;"><a target="_blank" title="free schematic diagram" href="http://schematics.circuitdiagram.net/viewer.php?id=bwy1244433045d.jpeg"><img title="Tiny Line Follower Robot" src="http://schematics.circuitdiagram.net/thumbs/bwy1244433045d.jpeg" border="0" alt="Tiny Line Follower Robot mecanism" /></a></p>
<p>All mechanical and <a target="_blank" title="electronics" href="http://electropart.info/">electrical</a> parts are mounted on a proto board, and it also constitutes the chasis.</p>
<p>The <a target="_blank" title="line follower robot" href="http://robotics.penyet.net/tag/line-follower">line following robot</a> 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 drive driving wheels, two tiny vibration motors that used for cellular <a target="_blank" title="cell phone reviews" href="http://phonecell.penyet.net/">phone</a>, pager or any mobile equipment are used. Its shaft is pressed onto the tire with a spring plate, the output torque is transferred to the wheels.</p>
<p>The steearing mechanism is realized in differential drive that steear the robot by difference in rotation speed between the left wheel and the right wheel. It does not require any additional actuator, only controling the wheel speed will do.</p>
<div>
<h4>Electronics</h4>
<table id="spec" border="0">
<tbody>
<tr>
<td>Controller</td>
<td>ATmega8 (Atmel)</td>
</tr>
<tr>
<td>Line sensor</td>
<td>Six photo-reflectors</td>
</tr>
<tr>
<td>Power supply</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 centimeter 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 <a target="_blank" title="power supply adapter" href="http://powersupplyadapter.blogspot.com/">power supply</a> 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.</div>
<p><strong><br />
Line detector and Photo reflector</strong></p>
<p style="text-align: left;"><a target="_blank" title="free schematic diagram" href="http://schematics.circuitdiagram.net/viewer.php?id=cqs1244433127i.png"><img title="Tiny Line Follower Robot" src="http://schematics.circuitdiagram.net/thumbs/cqs1244433127i.png" border="0" alt="Line detector and Photo reflector" /></a><br />
To detect a line to be followed, most contestants are using two or more number of poto-reflectors. Its output current that proportional to reflection rate of the floor is converted to voltage with a resister and tested it if the line is detected or not. However the threshold voltage cannot be fixed to any level because optical current 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, this is effective when the detector is working in linear region.</p>
<p>In this project, pulsed light is used to cancel ambient light. This is suitable for arraied sensors that scanned in sequence to avoid interference from next sensor. The microcontroller starts to scan the sensor status, sample an output voltage, turn on LED and sample again the output voltage. The difference between the two samples is the optical current by LED, output voltage by the ambient light is canceled. The other sensors are also scanned the same avobe in sequence.</p>
<p><strong>Line Detection Signal Processing</strong></p>
<p style="text-align: center;"><a target="_blank" title="free schematic diagram" href="http://schematics.circuitdiagram.net/viewer.php?id=arx1244433062s.png"><img title="Tiny Line Follower Robot" src="http://schematics.circuitdiagram.net/thumbs/arx1244433062s.png" border="0" alt="line detection signal" /></a></p>
<p>Right image shows the actual line posisiton vs detected line position in center value of 640. The microcontroller scans six sensors and calcurates 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 value that proportioning to reflection ratio, and the sensitivity have variety between each one of them. In this system, to remove the variations from the outputs, calibration parameters for each sensor can be held into 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>
<p><strong>Tracking Control</strong></p>
<p style="text-align: center;"><a target="_blank" title="free schematic diagram" href="http://schematics.circuitdiagram.net/viewer.php?id=arx1244433159i.png"><img title="Tiny Line Follower Robot" src="http://schematics.circuitdiagram.net/thumbs/arx1244433159i.png" border="0" alt="line tracker robot" /></a></p>
<p>The line position is compeared to the center value to be tracked, the position error is processed with Proportional/Integral/Diffence filters to generate steering command. The line folloing robot tracks the line in PID control that the most popular argolithm for servo control.</p>
<p>The proportional term is the commom process in the servo system. It is only a gain amplifire without time dependent process. The differencial term is applied in order to improve the responce to disturbance, and it also compensate phase lag at the controled 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 resons. 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>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.<br />
<strong>Notes:</strong><br />
<a target="_blank" title="free schematic diagram" href="http://schematics.circuitdiagram.net/viewer.php?id=arx1244433171t.jpeg"><img title="Tiny Line Follower Robot" src="http://schematics.circuitdiagram.net/thumbs/arx1244433171t.jpeg" border="0" alt="Tiny Line Follower Robot" align="right" /></a></p>
<ul>
<li><a target="_blank" href="http://elm-chan.org/works/ltc/dev.html">Development diary [Ja]</a></li>
<li><a target="_blank" href="http://elm-chan.org/works/ltc/ltc.png">Circuit diagram</a></li>
<li><a target="_blank" href="http://elm-chan.org/works/ltc/ltcsrc.zip">Firmware</a> <small>May 23, 2004</small></li>
<li><a target="_blank" href="http://members.jcom.home.ne.jp/felm/ltc_p.mpg">Following motion with only P control</a><br />
This is a video file of line following motion with only P control. The servo system oscllated.</li>
<li><a target="_blank" href="http://members.jcom.home.ne.jp/felm/ltc_pd.mpg">Following motion with P and D controls</a><br />
Adding D control could improve the servo stability. The robot follows the line correctly. Therefore the servo parameter must be optimized for mechanical characterristics to improve the tracking stability.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/super-tiny-line-follower-robot.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://members.jcom.home.ne.jp/felm/ltc_p.mpg" length="593924" type="video/mpeg" />
<enclosure url="http://members.jcom.home.ne.jp/felm/ltc_pd.mpg" length="653316" type="video/mpeg" />
		</item>
		<item>
		<title>Microcontroller Ebook: C Programming for Microcontrollers</title>
		<link>http://robotechno.us/microcontroller-ebook-c-programming-for-microcontrollers.html</link>
		<comments>http://robotechno.us/microcontroller-ebook-c-programming-for-microcontrollers.html#comments</comments>
		<pubDate>Wed, 24 Dec 2008 11:08:16 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C Programming for Microcontrollers]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=174</guid>
		<description><![CDATA[C Programming for Microcontrollers &#8211; Featuring ATMEL&#8217;s AVR Butterfly and the free WinAVR Compiler Introduction C Programming and microcontrollers are two big topics, practically continental in size, and like continents, are easy to get lost in. Combining the two is a little like traipsing from Alaska to Tierra del Fuego. Chances are you&#8217;ll get totally [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ecx.images-amazon.com/images/I/513B78BMB7L._SL500_AA240_.jpg" alt="c programming" hspace="5" width="182" height="182" align="left" title="Microcontroller Ebook: C Programming for Microcontrollers" /><strong>C Programming for Microcontrollers &#8211; Featuring ATMEL&#8217;s AVR Butterfly and the free WinAVR Compiler</strong></p>
<p><strong>Introduction</strong></p>
<p>C <a href="http://robotechno.us/category/robotics-tutorial/programming" title="robot programming">Programming</a> and <a href="http://robotechno.us/category/robotics-tutorial/electronics/microcontroller" title="microcontroller tutorial"><strong>microcontrollers</strong></a> are two big topics, practically continental in size, and like continents, are easy to get lost in. Combining the two is a little like traipsing from Alaska to <strong>Tierra del Fuego</strong>. Chances are you&#8217;ll get totally lost and if the natives don&#8217;t eat you, your infected blisters will make you want to sit and pout. I&#8217;ve been down this road so much that I probably have my own personal rut etched in the metaphorical soil, and I can point to all the sharp rocks I&#8217;ve stepped on, all the branches that have whacked me in the face, and the bushes from which the predators leapt. If you get the image of a raggedy bum stumbling through the jungle, you&#8217;ve got me right. Consider this book a combination roadmap, guidebook, and emergency first aid kit for your journey into this fascinating, but sometimes dangerous world.</p>
<p>I highly recommend that you get the book, &#8216;<strong>The C Programming Language</strong> â€“ second edition&#8217; by Kernighan and Ritchie, here after referred to as K&amp;R. <strong>Dennis Ritchie</strong>, Figure 1, wrote C, and his book is the definitive source on all things C.</p>
<p><span id="more-174"></span></p>
<p style="text-align: center;"><a target="_blank" title="Dennis Ritchie and Ken Thompson" href="http://images.myfilehost.us/viewer.php?id=jdv1230116425r.jpg"><img src="http://images.myfilehost.us/images/jdv1230116425r.jpg" border="0" alt="Dennis Ritchie and Ken Thompson" width="369" height="216" title="Microcontroller Ebook: C Programming for Microcontrollers" /></a></p>
<p style="text-align: center;"><em>Figure 1: <strong>Dennis Ritchie</strong>, inventor of the <strong>C programming language</strong> stands next to <strong>Ken Thompson</strong>, original inventor of Unix, designing the original <strong>Unix operating system</strong> at <strong>Bell Labs</strong> on a PDP-11</em></p>
<p>I have chosen to follow that book&#8217;s organization in this book&#8217;s structure. The main difference is that their book is machine independent and gives lots of examples based on manipulating text, while this book is machine dependent, specifically based on the <strong>AVR microcontroller</strong>, and the examples are as microcontroller oriented as I can make them.</p>
<p><strong>Why C?</strong></p>
<p>Back in the dark ages of microprocessors, software development was done exclusively in the specific assembly language of the specific device. These assembly languages were character based &#8216;mnemonic&#8217; substitutions for the numerical machine language codes. Instead of writing something like: 0&#215;12 0&#215;07 0xA4 0x8F to get the device to load a value into a memory location, you could write something like: MOV 22 MYBUFFER+7. The assembler would translate that statement into the machine language for you. I&#8217;ve written code in machine language (as a learning experiment) and believe me when I tell you that assembly language is a major step up in productivity. But a device&#8217;s assembly language is tied to the device and the way the device works. They are hard to master, and become obsolete for you the moment you change microcontroller families. They are specific purpose languages that work only on specific microprocessors. C is a general-purpose programming language that can work on any microprocessor that has a C compiler written for it. C abstracts the concepts of what a <strong><a target="_blank" href="http://electropart.info/index.php/category/computer-introduction/" title="computer introduction">computer</a></strong> does and provides a text based logical and readable way to get computers to do what computers do. Once you learn C, you can move easily between microcontroller families, write software much faster, and create code that is much easier to understand and maintain.</p>
<p><strong>Why AVR?</strong></p>
<p>As microprocessors evolved, devices increased in complexity with new hardware and new instructions to accomplish new tasks. These microprocessors became known as<strong> CISC</strong> or <strong>Complex Instruction Set Computers</strong>. Complex is often an understatement; some of the CISCs that I&#8217;ve worked with have mind-numbingly complex instruction sets. Some of the devices have so many instructions that it becomes difficult to figure out the most efficient way to do anything that isn&#8217;t built into the hardware.</p>
<p>Then somebody figured that if they designed a very simple core processor that only did a few things but did them very fast and efficiently, they could make a much cheaper and easier to program computer. Thus was born the RISC, <strong>Reduced Instruction Set Computers</strong>. The downside was that you had to write additional assembly language software to do all the things that the CISC computer had built in. For instance, instead of calling a divide instruction in a CISC device, you would have to do a series of subtractions to accomplish a division using a RISC device. This &#8216;disadvantage&#8217; was offset by price and speed, and is completely irrelevant when you program with C since the complier generates the assembly code for you.</p>
<p>Although I&#8217;ll admit that &#8216;CISC versus RISC&#8217; and &#8216;C versus assembly language&#8217; arguments often seem more like religious warfare than logical discourse, I have come to believe that the AVR, a RISC device, programmed in C is the best way to microcontroller salvation (halleluiah brother).</p>
<p>The folks that designed the <strong>AVR</strong> as a RISC architecture and instruction set while keeping C programming language in mind. In fact they worked with C compiler designers from IAR to help them with the hardware design to help optimize it for C programming.</p>
<p>Since this is an introductory text I won&#8217;t go into all the detailed reasons I&#8217;ve chosen the AVR, I&#8217;ll just state that I have a lot of experience with other microcontrollers such as Intel&#8217;s 8051, Motorola&#8217;s 68xxxes, Zilog&#8217;s Z&#8217;s, and Microchip&#8217;s PIC&#8217;s and I&#8217;m done with them (unless adequately paid â€“ hey, I&#8217;m no zealot). These devices are all good, but they require expensive development boards, expensive programming boards, and expensive software development tools (don&#8217;t believe them about the &#8216;free&#8217; software, in most cases the &#8216;free&#8217; is for code size or time limited versions).</p>
<p>The AVR is fast, cheap, in-circuit programmable, and development software can be had for FREE (really free, not crippled or limited in any way). I&#8217;ve paid thousands of dollars for development boards, programming boards, and C compilers for the other devices, but never again &#8212; I like free. The hardware used in this text, the ATMEL Butterfly Evaluation Board can be modified with a few components to turn it into a decent development system and the Butterfly and needed components can be had for less than $40.00 (See Appendix 1 Project Kits). You can&#8217;t get a better development system for 10 times this price and you can pay 100 times this and not get as good.</p>
<p>Download ebook <strong><a target="_blank" title="C Programming for Microcontrollers" href="http://www.4shared.com/file/38971570/88837560/C_Programming_for_Microcontrollers_AVR.html?s=1">C Programming for Microcontrollers</a></strong></p>
<p>or</p>
<p>Buy <a target="_blank" title="C Programming for Microcontrollers" href="http://www.amazon.com/gp/product/0976682206?ie=UTF8&amp;tag=digcamnewandr-20&amp;linkCode=xm2&amp;camp=1789&amp;creativeASIN=0976682206"><strong>C Programming for Microcontrollers</strong> book from amazon.com</a> for US$ 49.95</p>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/microcontroller-ebook-c-programming-for-microcontrollers.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Build a Robot in 2 Hours</title>
		<link>http://robotechno.us/build-a-robot-in-2-hours.html</link>
		<comments>http://robotechno.us/build-a-robot-in-2-hours.html#comments</comments>
		<pubDate>Thu, 06 Nov 2008 04:23:20 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Mechanics]]></category>
		<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[build a robot]]></category>
		<category><![CDATA[robot tutorial]]></category>

		<guid isPermaLink="false">http://robotechno.us/?p=142</guid>
		<description><![CDATA[Build a robot is not difficult as you think&#8230; With no experience in electronics, you can make a robot easily in 2 hours Ho it can be..? There are many robot tutorial has been written and published through blog or web. I found interesting robot tutorial from this web. The author said that he build [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" title="Easy Image Hosting" href="http://images.myfilehost.us/viewer.php?id=cqs1225944615f.jpg"><img class="aligncenter" src="http://images.myfilehost.us/images/cqs1225944615f.jpg" border="0" alt="build robot in 2 hours" width="232" height="173" title="Build a Robot in 2 Hours" /></a><br />
<strong><a target="_blank" title="robot tutorial" href="http://robotics.penyet.net/category/robot-tutorial">Build a robot</a></strong> is not difficult as you think&#8230; With no experience in<strong> <a target="_blank" title="electronics" href="http://electropart.info">electronics</a></strong>, you can make a robot easily in 2 hours <img src='http://robotechno.us/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' title="Build a Robot in 2 Hours" /> </p>
<p>Ho it can be..?<br />
<span id="more-142"></span>There are many<a target="_blank" title="robotics tutorial" href="http://robotechno.us/category/robotics-tutorial"> <strong>robot tutorial</strong></a> has been written and published through blog or web. I found interesting robot <strong><a href="http://letsmakerobots.com/start">tutorial from this web</a></strong>.  The author said that he build the robot just in 2 hours, you also can see the video there&#8230; just visit the web&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/build-a-robot-in-2-hours.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Line Follower Robot Tutorial (ATMega8535)</title>
		<link>http://robotechno.us/line-follower-robot-tutorial-atmega8535.html</link>
		<comments>http://robotechno.us/line-follower-robot-tutorial-atmega8535.html#comments</comments>
		<pubDate>Tue, 15 Jul 2008 04:55:26 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[ATMega8535]]></category>
		<category><![CDATA[atmega8535 tutorial]]></category>
		<category><![CDATA[line follower]]></category>
		<category><![CDATA[line follower robot]]></category>
		<category><![CDATA[line follower tutorial]]></category>
		<category><![CDATA[robot tutorial]]></category>

		<guid isPermaLink="false">http://robotechno.us/index.php/robotics-tutorial/line-follower-robot-tutorial-atmega8535/</guid>
		<description><![CDATA[Build your own line follower / line tracker robotâ€¦! Microcontroller : Atmel ATMega8535 Sensor: 6 photodioda sensor Motor driver : L298 dual driver (up to 1A of electric current) Download the full tutorial include schematic diagram and program code ( C language ): Download link]]></description>
			<content:encoded><![CDATA[<p>Build your own line follower / line tracker robotâ€¦!</p>
<p style="text-align: center"><a target="_blank" title="Easy Image Hosting" href="http://images.myfilehost.us/viewer.php?id=rgh1215652219t.jpg"><img src="http://images.myfilehost.us/thumbs/rgh1215652219t.jpg" border="0" alt="Free Image Hosting" title="Line Follower Robot Tutorial (ATMega8535)" /></a></p>
<p>Microcontroller : Atmel ATMega8535<br />
Sensor: 6 photodioda sensor<br />
Motor driver : L298 dual driver (up to 1A of electric current)<br />
<span id="more-95"></span><br />
Download the full tutorial include schematic diagram and program code ( C language ):<br />
<a target="_blank" title="line follower robot tutorial" href="http://robotics.penyet.net/line%20tracker%20robot%20avr%20atmega8535.html">Download link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/line-follower-robot-tutorial-atmega8535.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Parallax Ping 28015 Ultrasonic Distance Sensor Datasheet and Application Sample</title>
		<link>http://robotechno.us/parallax-ping-28015-ultrasonic-distance-sensor-datasheet-and-application-sample.html</link>
		<comments>http://robotechno.us/parallax-ping-28015-ultrasonic-distance-sensor-datasheet-and-application-sample.html#comments</comments>
		<pubDate>Mon, 14 Jul 2008 04:07:36 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Application Sample]]></category>
		<category><![CDATA[Datasheet]]></category>
		<category><![CDATA[Distance Sensor]]></category>
		<category><![CDATA[parallax]]></category>
		<category><![CDATA[parallax PING schematic]]></category>
		<category><![CDATA[Ping 28015]]></category>
		<category><![CDATA[ping ultrasonic sensor datasheet]]></category>
		<category><![CDATA[Ultrasonic]]></category>

		<guid isPermaLink="false">http://robotechno.us/index.php/robotics-tutorial/electronics/sensors/parallax-ping-28015-ultrasonic-distance-sensor-datasheet-and-application-sample/</guid>
		<description><![CDATA[Download ping parallax ultrasonic distance sensor datasheet, schematic and program code sample: Â» Download Link]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a target="_blank" title="Easy Image Hosting" href="http://images.myfilehost.us/viewer.php?id=arx1215656413y.jpg"><img src="http://images.myfilehost.us/thumbs/arx1215656413y.jpg" border="0" alt="Free Image Hosting" title="Parallax Ping 28015 Ultrasonic Distance Sensor Datasheet and Application Sample" /></a></p>
<p>Download ping parallax ultrasonic distance sensor datasheet, schematic and program code sample:<br />
Â» <a target="_blank" title="ping parallax ultrasonic distance sensor" href="http://robotics.penyet.net/Parallax%2028015%20datasheet%20and%20application.html">Download Link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/parallax-ping-28015-ultrasonic-distance-sensor-datasheet-and-application-sample.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic AVR Microcontroller Tutorial</title>
		<link>http://robotechno.us/basic-avr-microcontroller-tutorial.html</link>
		<comments>http://robotechno.us/basic-avr-microcontroller-tutorial.html#comments</comments>
		<pubDate>Fri, 11 Jul 2008 03:42:08 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[AVR Microcontroller]]></category>
		<category><![CDATA[avr microcontroller tutorial]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://robotechno.us/index.php/robotics-tutorial/basic-avr-microcontroller-tutorial/</guid>
		<description><![CDATA[Most of robotics hobbies use AVR microcontroller for their robot&#8217;s chip. This microcontroller is cheap and easy to used. Download the file here: getting started with the AVR.pdf]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a target="_blank" href="http://images.myfilehost.us/viewer.php?id=klz1215226449d.jpg"><img src="http://images.myfilehost.us/thumbs/klz1215226449d.jpg" border="0" alt="Free Image Hosting" title="Basic AVR Microcontroller Tutorial" /></a></p>
<p>Most of robotics hobbies use AVR microcontroller for their robot&#8217;s chip. This microcontroller is cheap and easy to used.</p>
<p>Download the file here:<br />
<a target="_blank" title="avr microcontroller tutorial" href="http://robotics.penyet.net/getting%20started%20with%20the%20AVR.html">getting started with the AVR.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/basic-avr-microcontroller-tutorial.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build Your Own Fire Fighting Robot</title>
		<link>http://robotechno.us/build-your-own-fire-fighting-robot.html</link>
		<comments>http://robotechno.us/build-your-own-fire-fighting-robot.html#comments</comments>
		<pubDate>Thu, 10 Jul 2008 03:41:21 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Mechanics]]></category>
		<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[Build Your Own]]></category>
		<category><![CDATA[Fire Fighting Robot]]></category>
		<category><![CDATA[fire fighting robot using microcontroller]]></category>
		<category><![CDATA[robot tutorial]]></category>

		<guid isPermaLink="false">http://robotechno.us/index.php/robotics-tutorial/build-your-own-fire-fighting-robot/</guid>
		<description><![CDATA[Many fire fighting robot competition in the world with diffrerent mission but have similiar field&#8230; Here some useful reports of fire fighting robot project.: Â» fire_fighting_robot_project1.pdf Â» Zephyr_Final_Report_Fire_Fighting_Robot.pdf Â» Multiple_Robot_Path_Planning_Strategies_for_Bush_Fire_Fighting.pdf Â» navigation_robot_tutorial.pdf Â» Firebot.pdf Â» FireFightingRobot.pdf Â» Fire_Fighting_Neural_Robot.pdf Â» MQP_Fire_Fighting_Robot_Report.pdf Â» Fire_Fighting_Robot_Tutorial.rar]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><img src="http://www.trincoll.edu/events/robot/RHS/RHS1.jpg" alt="fire fighting robot contest" width="417" height="288" title="Build Your Own Fire Fighting Robot" /></p>
<p>Many fire fighting robot competition in the world with diffrerent mission but have similiar field&#8230;<br />
Here some useful reports of fire fighting robot project.:</p>
<p><span id="more-90"></span>Â»  <a target="_blank" title="fire fighting robot tutorial" href="http://robotics.penyet.net/fire%20fighting%20robot%20project.html">fire_fighting_robot_project1.pdf</a><br />
Â»  <a target="_blank" title="fire fighting robot tutorial" href="http://robotics.penyet.net/Zephyr%20Final%20Report%20Fire%20Fighting%20Robot.html">Zephyr_Final_Report_Fire_Fighting_Robot.pdf</a><br />
Â»  <a target="_blank" title="fire fighting robot tutorial" href="http://robotics.penyet.net/Multiple%20Robot%20Path%20Planning%20Strategies%20for%20Bush%20Fire%20Fighting.html">Multiple_Robot_Path_Planning_Strategies_for_Bush_Fire_Fighting.pdf</a><br />
Â»  <a target="_blank" title="fire fighting robot tutorial" href="http://robotics.penyet.net/navigation%20robot%20tutorial.html">navigation_robot_tutorial.pdf</a><br />
Â»  <a target="_blank" title="fire fighting robot tutorial" href="http://robotics.penyet.net/Firebot.html">Firebot.pdf</a><br />
Â»  <a target="_blank" title="fire fighting robot tutorial" href="http://robotics.penyet.net/Fire%20Fighting%20Robot.html">FireFightingRobot.pdf</a><br />
Â»  <a target="_blank" title="fire fighting robot tutorial" href="http://robotics.penyet.net/Fire%20Fighting%20Neural%20Robot.html">Fire_Fighting_Neural_Robot.pdf</a><br />
Â»  <a target="_blank" title="fire fighting robot tutorial" href="http://robotics.penyet.net/MQP%20Fire%20Fighting%20Robot%20Report.html">MQP_Fire_Fighting_Robot_Report.pdf</a><br />
Â»  <a target="_blank" title="fire fighting robot tutorial" href="http://robotics.penyet.net/fire%20fighting%20robot%20tutorial.html">Fire_Fighting_Robot_Tutorial.rar</a></p>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/build-your-own-fire-fighting-robot.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digital Clock with LCD Display Character (HH:MM:SS)</title>
		<link>http://robotechno.us/digital-clock-with-lcd-display-character-hhmmss.html</link>
		<comments>http://robotechno.us/digital-clock-with-lcd-display-character-hhmmss.html#comments</comments>
		<pubDate>Tue, 25 Mar 2008 12:27:50 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[digital clock]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://robotechno.us/index.php/robotics-tutorial/electronics/microcontroller/digital-clock-with-lcd-display-character-hhmmss/</guid>
		<description><![CDATA[This article will show you how to control the LCD Display become a digital clock.Â  This experiment use LCD Character 2 x 16 module for showing the analog characters. ============================================== Step 1st Build the circuit as shown in figure 5.2.3. Remember, that all we want to do with this lesson displays digital clock with display [...]]]></description>
			<content:encoded><![CDATA[<p>This article will show you how to control the LCD Display become a digital clock.Â  This experiment use LCD Character            2 x 16 module for showing the analog characters.</p>
<p>==============================================</p>
<p><strong><font size="4">Step 1st</font></strong><br />
Build the circuit as shown in figure 5.2.3. Remember, that all we want            to do with this lesson displays digital clock with display on LCD Character            2 x 16.</p>
<p align="center"> <strong><img src="http://robotechno.us/wp-content/uploads/2008/03/lcdc3.gif" alt="Microcontroller Application LCD Character" border="0" height="208" width="349" title="Digital Clock with LCD Display Character (HH:MM:SS)" /></strong></p>
<p align="center">Figure 5.2.3. Digital clock with timer 0 interrupt</p>
<p align="justify"><strong><font size="4">Step 2nd</font></strong><br />
In this step, you must tipe the assembly program to make your Timer            get action, we assume that you have already known the editor, we used            MIDE-51 to edit the program.<strong> </strong><span id="more-78"></span><strong><font size="3"> ( Download File            : <a href="http://robotechno.us/wp-content/uploads/2008/03/exp523.zip" title="digital clock program">exp523.zip</a> ) </font></strong></p>
<p align="justify">Note that in this mode, with a 12 MHz crystal frequency,          the timer overflows every 65,536 microseconds.<br />
In this experiment, to generate interruption every 1000 micro second,          then :<br />
65536 &#8211; 50000 = 15536 d or 3CB0h ( TL0 = B0h dan TH0 = 3Ch )<br />
Interruption will come out every 50000 x 1 microsecond = 0.05 second.<br />
R0 is implemented as a software counter, Register R0 is incremented every          Timer 0 overflows. If Register R7 detected with value 20 then data will          be incremented</p>
<pre>Counter20  equ 70hsecond     equ 71h

minute     equ 72h

hour       equ 73h

secondOnes equ 74h

secondTens equ 75h

minuteOnes equ 76h

minuteTens equ 77h

hourOnes   equ 78h

hourTens   equ 79h

;

org 0h

ljmp start

;=============================

;vektor interrupt TF0 location

;=============================

org 0bh

Ljmp timerinterrupt

;

Start: mov counter20,#20

mov second,#0

mov minute,#0

mov hour,#0

call UpdateDisplay

mov TMOD,#00000001b

mov tl0,#0b0h

mov th0,#03ch

setb ET0

setb EA

setb TR0

call init_lcd

;

;========================================================

;This subroutine will display Digital Clock as HH:MM:SS

;as you have seen, this subroutine execute every time

;========================================================

scandisplay:

mov r1,#8ch

acall write_inst

mov r1,secondones

acall write_data

;

mov r1,#8bh

acall write_inst

mov r1,secondtens

acall write_data

;

mov r1,#89h

acall write_inst

mov r1,minuteones

acall write_data

;

mov r1,#88h

acall write_inst

mov r1,minutetens

acall write_data

;

mov r1,#86h

acall write_inst

mov r1,hourones

acall write_data

;

mov r1,#85h

acall write_inst

mov r1,hourtens

acall write_data

sjmp scandisplay

;

Init_lcd:

mov r1,#00000001b ;Display clear

acall write_inst  ;

mov r1,#00111000b ;Function set,

;Data 8 bit,2 line font 5x7

acall write_inst  ;

mov r1,#00001100b ;Display on,

;cursor off,cursor blink off

acall write_inst

mov r1,#00000110b ;Entry mode, Set increment

acall write_inst

ret

;

Write_inst:

clr P2.0  ; RS = P2.0 = 0, write mode instruction

mov P0,R1 ; D7 s/d D0 = P0 = R1

setb P2.1 ; EN = 1 = P2.1

call delay; call delay time

clr P2.1  ; EN = 0 = P2.1

ret

;

Write_data:

setb P2.0 ; RS = P2.0 = 1, write mode data

mov P0,R1 ; D7 s/d D0 = P0 = R1

setb P2.1 ; EN = 1 = P2.1

call delay; call delay time

clr p2.1  ; EN = 0 = P2.1

ret

;

delay: mov R0,#0

delay1:mov R7,#0fh

djnz R7,$

djnz R0,delay1

ret

;

;===================================================

;this subroutine will execute every 0,05 second

;after 20 interruption, Digital clock will be updated

;===================================================

timerinterrupt:

mov tl0,#0B0h

mov th0,#03Ch

djnz counter20,EndInterrupt

mov counter20,#20

call DigitalClock

EndInterrupt:

reti

;

;===================================================

;This subroutine below, will process digital clock

;and updates value for second, minute, hour

;===================================================

DigitalClock:

OneSecond:

inc second

mov a,#60

cjne a,second,UpdateDisplay

mov second,#0

;

OneMinute:

inc minute

mov A,#60

cjne A,minute,UpdateDisplay

mov minute,#0

;

OneHour:

inc hour

mov A,#24

cjne A,hour,UpdateDisplay

mov hour,#0

mov minute,#0

mov second,#0

;

UpdateDisplay:

mov a,second

mov b,#10

div ab

mov secondOnes,b

mov secondTens,a

;

mov a,minute

mov b,#10

div ab

mov minuteOnes,b

mov minuteTens,a

;

mov a,hour

mov b,#10

div ab

mov hourOnes,b

mov hourTens,a

;

mov a,#30h

add a,secondOnes

mov secondOnes,a

;

mov a,#30h

add a,secondTens

mov secondTens,a

;

mov a,#30h

add a,minuteOnes

mov minuteOnes,a

;

mov a,#30h

add a,minuteTens

mov minuteTens,a

;

mov a,#30h

add a,hourOnes

mov hourOnes,a

;

mov a,#30h

add a,hourTens

mov hourTens,a

;

ret</pre>
<p>End</p>
<p align="justify"><strong><font size="4">Step 3rd</font></strong><br />
Safe your assembly program above, and name it with int3.asm (for example)          Compile the program that you have been save by using MIDE-51, see the          software instruction.</p>
<p><strong><font size="4">Step 4th</font><br />
</strong>Download your hex file ( int3.hex ) into the microcontroller          by using Microcontroller ATMEL ISP software, see the instruction.After          download this hex file you&#8217;ll see the action of Interruption( of course          if your cable connection and your program are corrected ).</p>
<p>source: <a target="_blank" href="http://mytutorialcafe.com" title="microcontroller tutorial">mytutorialcafe.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/digital-clock-with-lcd-display-character-hhmmss.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DC Motor Speed Regulation with A PWM Feed Back System</title>
		<link>http://robotechno.us/dc-motor-speed-regulation-with-a-pwm-feed-back-system.html</link>
		<comments>http://robotechno.us/dc-motor-speed-regulation-with-a-pwm-feed-back-system.html#comments</comments>
		<pubDate>Mon, 24 Mar 2008 12:06:49 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Mechanics]]></category>
		<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[dc motor control]]></category>
		<category><![CDATA[motor controller]]></category>
		<category><![CDATA[pwm]]></category>
		<category><![CDATA[robotics]]></category>

		<guid isPermaLink="false">http://robotechno.us/index.php/robotics-tutorial/dc-motor-speed-regulation-with-a-pwm-feed-back-system/</guid>
		<description><![CDATA[This tutorial will helps you how the PWM works. You will learn what is PWM, the usage of PWM also how to program a DC Motor with PWM. Some Robots need to control the motor speed for its to work. Just use PWM system and you will get your motor&#8217;s speed adjustable&#8230; Basic PWM One [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will helps you how the PWM works. You will learn what is PWM, the usage of PWM also how to program a DC Motor with PWM. Some Robots need to control the motor speed for its to work. Just use PWM system and you will get your motor&#8217;s speed adjustable&#8230;</p>
<p><strong>Basic PWM</strong></p>
<p align="justify"> One of the easiest ways of generating an analog voltage from a digital            value is by pulse-width modulation ( PWM ). I PWM a high frequency square            wave is generated as a digital output. For example, a port bit continuously            swiched on and off at a reltive high frequency. The signal is fed to            a low pass filter. The voltage at the otuput of filter is equal to ther            Roo Mean Squeare ( RMS ) of the squeare wave signal. The RMS of the            square wave signal may then be varied by changing the duty cycle of            the signal. A cycle is initiated by a low to high transition of the            signal and terminates at the next such transition. During one cycle            if the time the signal stays high is equal to the time the signal stays            low, then the duty cycle is said to be 50 percent.</p>
<p align="center"><img src="http://robotechno.us/wp-content/uploads/2008/03/cycle.gif" height="146" width="234" title="DC Motor Speed Regulation with A PWM Feed Back System" alt="cycle DC Motor Speed Regulation with A PWM Feed Back System" /></p>
<p align="center">Figure 1. Duty Cycle 30 %</p>
<p align="justify">The following circuit shows a DAC constructed with PWM.          The Program controls the speed of a DC motor by pulse width modulation          ( PWM ). Bit P3.0 Drives a switching transistor as shown in the circuit          diagram. Motor is swiched on for a period of time, and then off. The fraction          of time the motor is on is call the duty cycle.<span id="more-77"></span></p>
<p align="center"><img src="http://robotechno.us/wp-content/uploads/2008/03/project1.gif" alt="Microcontroller Motor Speed Control" border="0" height="248" width="402" title="DC Motor Speed Regulation with A PWM Feed Back System" /></p>
<p align="center">Figure 2. Pulse width modulation to Control Motor Speed</p>
<p align="justify">This program uses a byte to store the time the motor            is on, that is the number of cycles out of 256 cycles while the motor            is on. a value of 10 means that the motor is on 10 cycles and off 246            cycles.The duty cycle value is stored in the internal register labeled            dCycle. The complement of the duty cycle is similarly stored in register            labeled dCycleC. <font size="3"> ( Download File : <a href="http://robotechno.us/wp-content/uploads/2008/03/motor.zip">motor.zip</a>            ) </font></p>
<pre align="justify">dCycle   equ 30hdCycleC  equ 31h
count    equ 32h
Analog0  equ 33h
Analog1  equ 34h
PWM      bit P3.0
Channel  bit P3.1
PortADC  equ P0
DCLB     equ 000h
DCUB     equ 0F0h
MotorCondition bit 20h
;
org 0h
ljmp start
org 0bh
ljmp Timer_Interrupt0
start:   call Init_Interrupt_Timer0
clr PWM ; Turn off motor
;==================
; Main Routine
;==================
Forever: call ADC
call Update
sjmp Forever
;
;======================
;Subrutine Timer Interruption
;======================
Timer_Interrupt0:
JB MotorCondition,MotoroFF
Setb PWM
Mov TH0,dCycle
Setb MotorCondition
reti
;
Motoroff:clr PWM
mov TH0,dcycleC
clr MotorCondition
reti
;
;=========================
;Subrutine Initialize Timer Interrupt
;timer 0 as counter 8 bit mode 2
;========================
Init_interrupt_Timer0:
mov TH0,#dCycle
Mov TMOD,#00000010b ;
setb ET0 ; Enable Timer 0 Interrupt
Setb EA ; Master Interrupt Enable
setb TR0 ; start rock and roll timer 0
Setb MotorCondition
mov count,#50

mov dCycle,#0
mov dCycleC,#0FFh
ret
;
;========================
;Subrutine Update - Update duty cycle
;=========================
Update:  djnz count,upDone
mov A,analog1; reference voltage
mov b,analog0; tachometer voltage
clr c
subb a,b
jnz update1
ret
Update1: jc decrease
call higherDC
ret
Decrease:
call lowerDC
UpDone:
ret
;
;====================
;Subrutine lowerDC
;====================
LowerDC: mov a,dCycle
cjne a,#DCLB,DecDC
ret
DecDC: dec dCycle
inc dCycleC
ret
;
;===================
;Subrutine HigherDC
;===================
HigherDC:
mov a,dCycle
cjne a,#DCUB,IncDC
ret
IncDC: Inc dCycle
dec dCycleC
ret
;
;=============
;Subrutine ADC
;=============
ADC: Clr channel ; Pick channel X0 from multiplexer 4051
mov Analog0,PortADC
Setb channel ;Pick channel X1 from multiplexer 4051
mov Analog1,PortADC
ret
;
end</pre>
<p>source: <a target="_blank" href="http://mytutorialcafe.com" title="microcontroller tutorial">mytutorialcafe.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/dc-motor-speed-regulation-with-a-pwm-feed-back-system.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C-52EVB Robot Controller</title>
		<link>http://robotechno.us/c-52evb-robot-controller.html</link>
		<comments>http://robotechno.us/c-52evb-robot-controller.html#comments</comments>
		<pubDate>Mon, 24 Mar 2008 11:14:37 +0000</pubDate>
		<dc:creator>Robotics Technology</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Microcontroller]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Robotics Tutorial]]></category>
		<category><![CDATA[Sensors]]></category>
		<category><![CDATA[avr]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[line follower]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://robotechno.us/index.php/robotics-tutorial/c-52evb-robot-controller/</guid>
		<description><![CDATA[C-52 EVB is simple robot experiment. Just need to build a 2 wheels robot with L293D H-Bridge driver and IR sensors. Write down your program with c language. Introduction One of my student has made a disgraceful robot that used two stepper motors and with a simple IR sensor. Yes, above picture is what I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p><strong>C-52 EVB is simple robot experiment. Just need to build a 2 wheels robot with L293D H-Bridge driver and IR sensors. Write down your program with c language.</strong></p>
<p><img src="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/robot3.gif" align="right" border="0" height="203" width="320" title="C 52EVB Robot Controller" alt="robot3 C 52EVB Robot Controller" /><br />
<strong>Introduction</strong></p>
<p>One of my student has made a disgraceful robot that used two stepper motors and with a simple IR sensor. Yes, above picture is what I&#8217;m talking. Without battery carrying, a little bit torque of the stepper and misalignment of driving shaft, makes it crawling not walking, but first demo, showed quite impressive to me. He said he wrote a couple of program lines using C, his robot can track the black tape. I feel delighted his intention and endeavor. I thought, &#8221; he borrowed me DS5000, expensive one, a soft uController with internal bootloader, why shouldn&#8217;t try with our learning board C-52 Evaluation Board instead&#8221;. Another one, told me the same day &#8220;I found the L293 Push/Pull Four Channel Driver at Ban-Moah, it costs 1.5 US$ &#8220;. I&#8217;ve been searching this chip for a year.</p>
<p>The<strong> MiniBoard</strong>, a Motorola 68HC11 Robot Controller board designed by <strong>Fred G. Martin</strong>, also uses this driver. The day after, I then decided to prepare the page describing how to use C-52 EVB as a robot controller board. I asked my student for competition, build yourselves robot that can track the black tape. Prize for the winner is 100 US$, with a bit condition that the winner must pay for a big party at Soi Jinda&#8217;s Somtum (Papaya Salad) shop. And one of the competitor is me. I thought the rule should be conceived roughly by students and technically by me. The picture on that day will put here soon.<span id="more-73"></span><strong>C-52 EVB resources</strong></p>
<p>Beforehand, let look at available resources of C-52 EVB for robot experiments.</p>
<table border="1" cols="4" width="83%">
<tr>
<td align="center"><center><strong>Actuators</strong></center></td>
<td><center><strong>DC motor</strong></center></td>
<td><center><strong>PWM with timer2 helps </strong></center></td>
<td><center><strong>P1.4,P1.5,P1.6,P1.7</strong></center></td>
</tr>
<tr>
<td><center><strong>Sensors</strong></center></td>
<td><center><strong>digital/analog</strong></center></td>
<td><center><strong>IR detector with comparator chip/ for analog input, see use of PIC16C711</strong></center></td>
<td><center><strong>digital input/T0,T1 for pulse input</strong></center></td>
</tr>
<tr>
<td><center><strong>Brain </strong></center></td>
<td><center><strong>C program </strong></center></td>
<td><center><strong>available code and data space approx. 32kB</strong></center></td>
<td><center><strong>8000H-FFFFH</strong></center></td>
</tr>
<tr>
<td><center><strong>Program Downloader Running without monitor</strong></center></td>
<td><center><strong>PAULMON2 with PAUL&#8217;s startup header</strong></center></td>
<td><center><strong>9600, 8n1</strong></center></td>
<td><center><strong>P3.0 (RxD) and P3.1 (TxD)</strong></center></td>
</tr>
</table>
<p><strong><br />
<font size="+1">DC Motor Driver</font></strong></p>
<p>Basic circuit of using L293 forms an H-Bridge Driver is shown in Figure 1. As shown for such inductive load as DC motor, external diodes for suppressing back EMF must be connected. The MiniBoard uses L293D instead, the L293D has internal diodes, however providing a bit less driving capacity, i.e., 600mA @4.5V-36V. From the truth table, we see that direction of the motor can control by pin C and D. VINH enable/disable power to the motor, thus for speed regulation, we then use this pin for PWM signaling. See details, <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/L293.pdf">L293.pdf</a></strong> data sheet.</p>
<p align="center"><img src="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/basic293.gif" height="284" width="691" title="C 52EVB Robot Controller" alt="basic293 C 52EVB Robot Controller" /><br />
<font size="-1">Figure 1: Basic circuit of L293 forms H-Bridge Driver</font></p>
<p>A circuit connecting C-52 P1 to L293 driver chip is shown in Figure 2. As shown Enable pin 1 connected to P1.0 is for PWM signaling. We use additional inverter at pin7 and pin 15 to provide proper logic for easy directional control. Please note that pin 4,5,12,13 are tied to ground and if heat sinking needed, one method is to make a large area of PCB or soldering it with a metal sheet, say.</p>
<p align="center"><img src="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/circuit3.gif" height="257" width="680" title="C 52EVB Robot Controller" alt="circuit3 C 52EVB Robot Controller" /><br />
<font size="-1">Figure 2: Connecting C-52 EVB P1.4-P1.7 to L293. External diodes must be connected for L293(not shown in circuit diagram).</font></p>
<p>My latest design put additional inverter for PWM signal at pin 1 and pin 9 to prevent full power delivering to DC motors when resetting the 89C52(i.e., all bits of P1 is logic high). Check the logic of PWM pins for another microcontrollers.<br />
<strong><br />
Line Tracking Sensor (I have to KUK)</strong><br />
Since there&#8217;s no ADC for 89C52 chip, each competitor may build their own Line Tracking Sensor, some may use LM339 QUAD comparator with IR transmitter and receiver, some may use LDR as described in <strong><a target="_blank" href="http://pws.prserv.net/wa4dsy/robot/">Line Follower Robot</a></strong> . With an external comparator, it may not necessary to have ADC, but with LDR, we need external ADC. &#8221; Having additional ADC for 89C52 would be better&#8221;, I thought. How can we provide ADC for 89C52 with a cheap method? I chose PIC16C711 with 4-channel ADC, and 7-pin input port. Interfacing to 89C52 is done with simple PISO protocol by using RB0 for SCLK and RA4 for SDA.The code for such purpose was written in C, here is the source file, <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/c52adc.c">C52ADC.C</a></strong> and the HEX code, <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/c52adc.hex">C52ADC.HEX</a></strong>. After some initialization, the 711 chip wait for trigger read signal at pin RB0, i.e., high-to-low transition, then it responses by sending 40-bit through RA4(SDA) with low-to-high transition. 40-bit data stream begins with LSB of ADC0 to MSB of PORT B. Example of program fro testing ADC is <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/adc.c">ADC.C</a></strong> and the hex file is <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/adc.hex">ADC.HEX</a></strong>.</p>
<p align="center"> <img src="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/711.gif" height="371" width="718" title="C 52EVB Robot Controller" alt="711 C 52EVB Robot Controller" /><br />
<font size="-1">Figure 3: Using PIC16C711 to be a 4-channel ADC and 7-bit input port for C-52 EVB.</font></p>
<p><strong><br />
Simple Power Supply and Charger Circuits</strong><br />
Figure 4 shows a simple power supply circuit. I have tested with KABO, it works fine. For those who have a big capacity rechargeable battery, the resistance value of R can be selected for approx. 10% output charging current. DC in can be higher if your battery voltage higher than 8.4V, say. To ensure the output current is within the value calculated by R, measure DC current before. The maximum supply for LM317 is ~35V.</p>
<p align="center"><img src="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/charger.gif" height="322" width="617" title="C 52EVB Robot Controller" alt="charger C 52EVB Robot Controller" /><br />
<font size="-1">Figure 4: Circuit Diagram of battery supply +12V Alkaline and +8.4V NiMH with a constant current recharger circuit. For ~20mA, use R~60 Ohms. S1 is main switch for CPU and L293 circuits.</font></p>
<p><strong><br />
Using PAUL&#8217;s Startup Header file with Micro-C</strong></p>
<p>Before writing PWM generation for testing above circuit, let study how to use Paul&#8217;s header. With a PAUL&#8217;s startup header at the beginning of the application C program, after successfully downloading the hex code, just press RESET, the 89C52 then will run the application instead of PAULMON2 monitor program. As long as the program remain in SRAM, running the program can only be done with pressing RESET. To return to PAULMON2 prompt, turn the board power off for a while, then back the power on again. This concept of startup header allows us to use C-52 EVB as a dedicated controller beside as a learning board. Originally Paul has made with entirely in Assembly code. However, I have adapted for Micro-C Compiler. I have put the header for startup code in  the startup and runtime library for small memory model. The file <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/c52robot.asm">C52ROBOT.ASM</a></strong>, will compile and link to the main( ) function with S=c52robot.asm when invoking command coordinator. Example of command line is;<strong><font face="Courier New,Courier"><font color="#663366"><font size="+1">c:\mc\cc51 %1 -ilp h=c:\mc m=s s=c52robot.asm</font></font></font></strong><strong><font face="Courier New,Courier"><font color="#663366"><font size="+1">%1 is hello(.c), say</font></font></font></strong>Let try <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/hello.c">hello.c</a> </strong>and compile with above command line, download the <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/hello.hex">hello.hex</a></strong> into the C-52 board, then press RESET, see what happen?</p>
<p><strong><font size="+1">Control Program demonstrates PWM generation with KABO</font></strong><img src="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/kabo2.jpg" align="right" height="208" width="320" title="C 52EVB Robot Controller" alt="kabo2 C 52EVB Robot Controller" /></p>
<p>`One method of delivering DC power to motors is to use PWM. The PWM method supplys DC pulse with fixed frequency but with adjustable duty cycle. I used TIMER2 in AUTO reload producing 1000Hz PWM frequency. Each time executing has entering into service routine, a 16-bit PWM1 was shifted out to P1.7 and PWM2 to P1.6. Main program has a task that set the power for motor1 and motor2 by writing 16-bit PWM pattern into PWM1 and PWM2 for motor1 and mortor2 respectively. The service routine for timer2 is put in startup code.</p>
<p>See example program, <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/kabo1.c">KABO1.C</a></strong> and <strong><a target="_blank" href="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/c52robot.asm">C52ROBOT.ASM</a></strong>, for PWM demonstration with manual control. I have designed and built my own robot for the competition also. It names KABO having differential drive method. As shown in right-hand side, is the rare part powered by C52-EVB. The motor driver chip L293D and a 74LS04 are put at the soldering pad.</p>
<p><strong>Ving-Peaw Competition</strong></p>
<p>I suppose there should have ten robots to be competed. Details Rule and Scoring will be launched soon, day by day changed. But first of all, competitors must know how difficult of the circuit and programming are. Hear is the actual course layout.</p>
<p align="center"><img src="http://www.kmitl.ac.th/%7Ekswichit%20/c52robot/course1.gif" height="351" width="598" title="C 52EVB Robot Controller" alt="course1 C 52EVB Robot Controller" /><br />
<font size="-1">Figure 5: Actual Course Layout for Ving-Peaw Robot Competition</font></p>
<p>The original idea of what kind of the competition would be, came from Zongwit. Each round has two robots. Each robot must run along black tape and try to touch the the other&#8217;s target. Who touch first will be the winner. The slower is allowed to detect the faster, shifted out of the line for 20 seconds, then back again. No limit for the robot size and uControllers, you may use ranging from a PIC16F84, 16F873/877, 89C2051/4051, 89C51/52/55, or 68HC11, say.</p>
<p>source: <a target="_blank" href="http://mytutorialcafe.com" title="robotics tutorial">mytutorialcafe.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://robotechno.us/c-52evb-robot-controller.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
