<?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>Puck&#039;s Workbench &#187; Wi-Fi</title>
	<atom:link href="http://www.e-techgarage.com/Puck/category/wireless/wi-fi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.e-techgarage.com/Puck</link>
	<description>Embedded Geek</description>
	<lastBuildDate>Thu, 22 Apr 2010 00:00:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rover with Web Server and AJAX</title>
		<link>http://www.e-techgarage.com/Puck/2010/01/13/rover-with-web-server-and-ajax/</link>
		<comments>http://www.e-techgarage.com/Puck/2010/01/13/rover-with-web-server-and-ajax/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 21:32:39 +0000</pubDate>
		<dc:creator>Puck</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[C Programming]]></category>
		<category><![CDATA[HTML Code]]></category>
		<category><![CDATA[JavaScripting]]></category>
		<category><![CDATA[Rover]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wi-Fi]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.e-techgarage.com/Puck/?p=601</guid>
		<description><![CDATA[In my previous post I showed how fast it was to bring the Rabbit Web Server into the project.  Of course, I could just be a terrible liar so here is video showing the Wi-Fi web server in action.

It&#8217;s a Plain-Jane web page but we can always add a style sheet later to beautify it.
]]></description>
			<content:encoded><![CDATA[<p>In my previous post I showed how fast it was to bring the Rabbit Web Server into the project.  Of course, I could just be a terrible liar so here is video showing the Wi-Fi web server in action.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="445" height="364" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/apkrutnl680&amp;hl=en_US&amp;fs=1&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="445" height="364" src="http://www.youtube.com/v/apkrutnl680&amp;hl=en_US&amp;fs=1&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>It&#8217;s a Plain-Jane web page but we can always add a style sheet later to beautify it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-techgarage.com/Puck/2010/01/13/rover-with-web-server-and-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rover, Scholar, Explorer, Poet, and Web Server</title>
		<link>http://www.e-techgarage.com/Puck/2010/01/13/rover-scholar-explorer-poet-and-web-server/</link>
		<comments>http://www.e-techgarage.com/Puck/2010/01/13/rover-scholar-explorer-poet-and-web-server/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 21:15:52 +0000</pubDate>
		<dc:creator>Puck</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[C Programming]]></category>
		<category><![CDATA[HTML Code]]></category>
		<category><![CDATA[JavaScripting]]></category>
		<category><![CDATA[Rover]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wi-Fi]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.e-techgarage.com/Puck/?p=547</guid>
		<description><![CDATA[
One of the reasons why the Rabbit is so compelling as an embedded computer is that with all the different work we are doing with motors and sensor tuning adding an interactive web server is quick and painless.
Here are the preliminary goals:

Wi-Fi connectivity
Web Server
Use Asynchronous JavaScript and XML (AJAX) to display Rover data in real-time

Here [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Rover_w_plume.bmp"><img class="aligncenter size-full wp-image-548" style="border: 2px solid black;" title="Rover_w_plume" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Rover_w_plume.bmp" alt="A Renaissance Robot with many skills" width="416" height="264" /></a></p>
<p>One of the reasons why the Rabbit is so compelling as an embedded computer is that with all the different work we are doing with motors and sensor tuning adding an interactive web server is quick and painless.</p>
<p>Here are the preliminary goals:</p>
<ul>
<li>Wi-Fi connectivity</li>
<li>Web Server</li>
<li>Use Asynchronous JavaScript and XML (AJAX) to display Rover data in real-time</li>
</ul>
<p>Here is what we need to make this happen:</p>
<ul>
<li>A web page</li>
<li>An XML file</li>
<li>A C program to run on the rover</li>
</ul>
<h2>The Gratuitous Self-Plug</h2>
<p>If you are concerned about the nitty-gritty of how this all works and want to try it yourself, take a look at my<a href="http://www.e-techgarage.com/2009/RabbitGeek_AJAX/RG_AJAX.html"> Rabbit-Geek&#8217;s AJAX Workbook</a>.  It has step-by-step instructions, examples, and code you can use on your own.</p>
<p style="text-align: center;"><a title="Rabbit-Geek Workbook" href="http://www.e-techgarage.com/2009/RabbitGeek_AJAX/RG_AJAX.html"><strong>Rabbit-Geek Workbook for the Web, RabbitWeb, JavaScript, and AJAX</strong></a></p>
<p style="text-align: left;">The rest of the article will be a big picture explanation of how this works.</p>
<h2>Easy Wi-Fi</h2>
<p>You can configure all the Wi-Fi network settings in the compiler or the code.  In this case, I have configured everything in the compiler like this:</p>
<p><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Wi-Fi_Settings.JPG"><img title="Wi-Fi_Settings" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Wi-Fi_Settings.JPG" alt="Wi-Fi_Settings" width="552" height="547" /></a></p>
<p>This configuration looks harder than it actually is.   In the TCP_CONFIG.LIB file that comes with the compiler you will find a series of Wi-FI templates for each type of encryption.  I just copied the configuration from the file into this compiler window and then tweaked it for my specific network.</p>
<p>(For the hackers out there, I have foiled your attempts by obscuring my Wi-Fi network password with the <strong><span style="color: #ff0000;">Red Rectangle of Redaction</span></strong>. <img src='http://www.e-techgarage.com/Puck/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
<p style="text-align: center;"><strong>Time to Configure Wi-Fi = </strong><strong>5 minutes or less</strong></p>
<h2>The Web Server</h2>
<p>Assuming for a moment that we have the web page and XML file ready, let&#8217;s look at how the Rabbit devices implement a web server.  Fortunately, by adding less than 40 lines of code to our program I can add an interactive web server with AJAX.</p>
<p><strong>Here is the C code:</strong></p>
<p><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Web_Server_Basic1.JPG"><img class="alignnone size-full wp-image-574" title="Web_Server_Basic" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/Web_Server_Basic1.JPG" alt="Web_Server_Basic" width="546" height="686" /></a></p>
<p>As you can see it isn&#8217;t too scary looking.  After the web server is initialized you just spin in the loop on the http_handler function which is non-blocking and typically returns in about 1 millisecond or less.</p>
<p style="text-align: center;"><strong>Time Creating a C File =</strong><strong> Approximately 20 minutes<br />
</strong></p>
<h2>The Amazing Mutating XML File</h2>
<p>The XML file is the easiest piece and while my XML might offend a real web developer, I&#8217;m an embedded engineer and it works.</p>
<p><strong>Here is the XML file before it is served:</strong></p>
<p><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/ROVER_XML.JPG"><img class="alignnone size-full wp-image-579" title="ROVER_XML" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/ROVER_XML.JPG" alt="ROVER_XML" width="502" height="81" /></a></p>
<p>The only weird looking part of the XML file is the strange &#8220;<span style="color: #339966;"><strong>&lt;z? echo ($Rover_Data) </strong></span><strong><span style="color: #339966;">?&gt;</span></strong>&#8220;.  When the web server receives a request for the XML file it will strip this RabbitWeb code out and replace it with the value of the <strong>Rover_Data</strong> string variable from my embedded controller.</p>
<p>For example, if the Rover_Data variable held the string &#8220;<strong>Scooby Doo</strong>&#8221; the final served XML file would be updated.</p>
<p><strong>Here is the served XML file when Rover_Data = &#8220;Scooby Doo&#8221;</strong>:</p>
<p><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/ROVER_XML_W_DATA.JPG"><img class="alignnone size-full wp-image-583" title="ROVER_XML_W_DATA" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/ROVER_XML_W_DATA.JPG" alt="ROVER_XML_W_DATA" width="375" height="77" /></a></p>
<p>If the web server gets a new request from the file and the Rover_Data string variable has changed, the XML file will also be updated before it is served to the browser.  That&#8217;s easy dynamic data for your web page.</p>
<p style="text-align: center;"><strong>Time Creating an XML File = Less than 5 minutes<br />
</strong></p>
<h2>The HTML page with special AJAX kung-fu</h2>
<p>The web page may be a bit intimidating but all it really does is:</p>
<p style="padding-left: 30px;">1. Use the JavaScript to figure out which browser you are using</p>
<p style="padding-left: 30px;">2. If your browser supports it, get a copy of the XML file from the server and use it to get the data</p>
<p style="padding-left: 30px;">3. Put that data on the web page every 500 milliseconds.</p>
<p><strong>Here is the HTML file:</strong></p>
<div id="attachment_590" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/rover_hmtl.JPG"><img class="size-medium wp-image-590 " style="border: 1px solid black;" title="rover_hmtl" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2010/01/rover_hmtl-300x200.jpg" alt="rover_hmtl" width="300" height="200" /></a><p class="wp-caption-text">Click to read the code</p></div>
<p>I just copied this from some of my <a href="http://www.e-techgarage.com/2009/RabbitGeek_AJAX/RG_AJAX.html">Workbook</a> samples.</p>
<p style="text-align: center;"><strong>Time Editing the HTML File =</strong><strong> About 5 minutes</strong></p>
<h2>How Long Did That Take?</h2>
<p style="text-align: center;"><strong>Total Time to Add the Web Server = Less than an hour</strong></p>
<p>(It took me longer to write this blog post.  <img src='http://www.e-techgarage.com/Puck/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://www.e-techgarage.com/Puck/2010/01/13/rover-scholar-explorer-poet-and-web-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Laziness as an Embedded Engineering Virtue</title>
		<link>http://www.e-techgarage.com/Puck/2009/12/04/laziness-as-an-embedded-engineering-virtue/</link>
		<comments>http://www.e-techgarage.com/Puck/2009/12/04/laziness-as-an-embedded-engineering-virtue/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 19:11:05 +0000</pubDate>
		<dc:creator>Puck</dc:creator>
				<category><![CDATA[Analog Circuits]]></category>
		<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Digital Circuits]]></category>
		<category><![CDATA[Rover]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Wi-Fi]]></category>
		<category><![CDATA[Wireless]]></category>
		<category><![CDATA[ZigBee]]></category>

		<guid isPermaLink="false">http://www.e-techgarage.com/Puck/?p=215</guid>
		<description><![CDATA[After the Rover&#8217;s successful motor test, we noticed that assembling the device was a bit finicky.  Rather than fit everything onto the RCM5600W&#8217;s prototyping board, it would be easier to layout a printed circuit board.  We could also replace the 8 operational amplifiers with a single 8-pin buffer chip made by Texas Instruments called a [...]]]></description>
			<content:encoded><![CDATA[<p>After the <a href="http://www.e-techgarage.com/Puck/2009/12/03/rovers-first-motor-circuit-test/">Rover&#8217;s successful motor test</a>, we noticed that assembling the device was a bit finicky.  Rather than fit everything onto the <a href="http://www.rabbit.com/products/rcm5600w/">RCM5600W</a>&#8217;s prototyping board, it would be easier to layout a printed circuit board.  We could also replace the 8 operational amplifiers with a single 8-pin buffer <a href="http://focus.ti.com/docs/prod/folders/print/sn74hct541.html">chip made by Texas Instruments called a 74HCT541</a>.</p>
<h2>Jimmy Buffer steps up to the Microphone</h2>
<p>We have 8 digital outputs from the Rabbit&#8217;s parallel port A that we need to shift from 0-3 volts up to 0-5 volts and we have determined experimentally that we are too lazy to solder 8 Op-Amps. <img src='http://www.e-techgarage.com/Puck/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>First, the buffer is a digital device so it will either output 0 volts or 5 volts (Vcc).  According to the buffer chip&#8217;s <a href="http://focus.ti.com/lit/ds/symlink/sn74hct541.pdf">datasheet</a>, it will read anything above 2 volts as a <strong>logical 1</strong>.  The Rabbit&#8217;s output at 3.3 volts will get bumped up to 5 volts by the buffer and that means &#8220;<em>bye-bye</em>&#8221; to the operational amplifiers.</p>
<div id="attachment_221" class="wp-caption aligncenter" style="width: 417px"><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2009/12/Adding-an-8-pin-buffer.bmp"><img class="size-full wp-image-221 " style="border: 1px solid black;" title="Adding an 8 pin buffer" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2009/12/Adding-an-8-pin-buffer.bmp" alt="Swapping out the Op-Amps with an 8-pin buffer" width="407" height="342" /></a><p class="wp-caption-text">Swapping out the Op-Amps with an 8-pin buffer</p></div>
<h2 style="text-align: left;">Adding Features</h2>
<p>With the circuit already drawn up in <a href="http://www.diptrace.com/">DipTrace</a>, it wasn&#8217;t tough to update it and add a few new features.</p>
<ul>
<li>Add some 50-pin headers so we can plug directly into the <a href="http://www.rabbit.com/products/rcm5600w/">RCM5600W</a>&#8217;s demonstration board</li>
<li>Replace the 8 Op-Amps with a single bus driver chip</li>
<li>Add one more voltage regulator so we have access to 12 volt, 5 volt, and 3.3 volt supplies</li>
<li>Add a socket for an <a href="http://www.digi.com/products/wireless/zigbee-mesh/">XBee ZigBee modem</a></li>
</ul>
<p><a href="http://www.e-techgarage.com/Larry/?p=70">Check out Larry&#8217;s blog entry for more details and the files used to create the circuit board.</a></p>
<h2>The New Schematic</h2>
<p style="text-align: center;">
<div class="wp-caption aligncenter" style="width: 435px"><a title="Schematic version 1.1" href="http://www.e-techgarage.com/Larry/Files/Rover%20Files/MotorDriver.jpg"><img class="       " style="border: 1px solid black;" title="MotorDriver.jpg" src="http://www.e-techgarage.com/Larry/Files/Rover%20Files/MotorDriver.jpg" alt="Schematic Version 1.1" width="425" height="289" /></a><p class="wp-caption-text">Schematic Version 1.1</p></div>
<p>The last item is a big feature addition.  The Rabbit already has 802.11g Wi-Fi built into the <a href="http://www.rabbit.com/products/rcm5600w/">RCM5600W</a> and we&#8217;re planning on using the embedded server to deliver web pages for controls and other functionality.  However, Wi-Fi is short range and if we were to hypothetically toss the Rover out of a plane at 30,000 feet his odds of finding a Wi-Fi connection aren&#8217;t great as he plummets to the earth.  It might be useful to have a long range wireless connection for commands like &#8220;<em>deploy parachute</em>&#8220;.</p>
<p>Some of the ZigBee modems like the <a href="http://www.digi.com/products/wireless/zigbee-mesh/">XBee</a> can have much higher range because they operate at lower frequency.   A high gain ZigBee device operating at 900 Mhz with good line of sight can reach a <a href="http://www.digi.com/products/wireless/zigbee-mesh/xbee-digimesh-900.jsp#specs">range of up to 6 miles</a>.  We won&#8217;t be sending data quickly, but remote operation becomes a real possibility.</p>
<h3>The New Fangled Custom Printed Circuit Board (PCB)</h3>
<h3>
<p><div id="attachment_231" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.e-techgarage.com/Puck/wp-content/uploads/2009/12/Rover_PCB.JPG"><img class="size-medium wp-image-231" title="Rover_PCB" src="http://www.e-techgarage.com/Puck/wp-content/uploads/2009/12/Rover_PCB-300x224.jpg" alt="The Rover PCB" width="300" height="224" /></a><p class="wp-caption-text">The Rover PCB</p></div></h3>
<h2>The Joy of Lazy</h2>
<p>While it might seem like a bad thing to be too lazy to solder down 8 Op-Amps, we have actually reduced the complexity of the design and the overall production cost.  In embedded engineering a simpler design is generally better and a little laziness up front will save us plenty of work later if we decide to build an army of Rovers to conquer the earth.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-techgarage.com/Puck/2009/12/04/laziness-as-an-embedded-engineering-virtue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
