<?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>Stokes' ProjBlog</title>
	<atom:link href="http://www.logicalzero.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.logicalzero.com/blog</link>
	<description>A journal documenting innumerable, mostly terminally in-progress undertakings. Nerdiness abounds.</description>
	<lastBuildDate>Tue, 08 Dec 2009 22:01:39 +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>A display of character(s)</title>
		<link>http://www.logicalzero.com/blog/?p=169</link>
		<comments>http://www.logicalzero.com/blog/?p=169#comments</comments>
		<pubDate>Tue, 08 Dec 2009 21:57:41 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[Miscelaneous Projects]]></category>
		<category><![CDATA[New project!]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[LCD]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=169</guid>
		<description><![CDATA[
As the W&#038;B soda machine has been unplugged for the winter, I am putting the soda machine hack project on hold for a couple of months. In the meantime, I&#8217;m returning to some past projects, several of which I never wrote up in the blog. One such project is a system for handling and displaying [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.logicalzero.com/blog/images/CharEdit.png" target="_blank"><img style="border: solid 2px #000000;" src="http://www.logicalzero.com/blog/images/CharEdit_thumb.jpg" alt="Screenshot of my CharEdit tool." /></a></div>
<p>As the <a href="http://www.willoughbybaltic.com/" target="_blank">W&#038;B</a> soda machine has been unplugged for the winter, I am putting the <a href="http://www.logicalzero.com/blog/?cat=34" target="_blank">soda machine hack project</a> on hold for a couple of months. In the meantime, I&#8217;m returning to some past projects, several of which I never wrote up in the blog. One such project is a system for handling and displaying an ultra-tiny bitmap font on a little graphic LCD, the sort that were on nearly every 90s cell phone and are currently popular with hobbyists.</p>
<p><span id="more-169"></span>There are several examples of little font code on the Internet, but those that I saw were all non-proportional (they have fixed dimensions, e.g. a <tt>W</tt> is the same width as an <tt>I</tt>) and/or have legibility problems. The characters were also typically 4&#215;7 or 5&#215;7 pixels, neither of which easily fit a power of two without wasting memory &#8212; a vital resource when working on a microcontroller with only a couple thousand bytes of program memory. The system I came up with uses a 5&#215;5 bitmap for the character itself, plus four bits containing the character&#8217;s width and three bits containing the character&#8217;s vertical offset. These sum to 32 bits, a convenient power of two and a the size of a <tt>long</tt> number on an Arduino. A 5&#215;5 bitmap was chosen because it is the minimum size to accurately display characters like <em>M</em> or <em>E</em>. The vertical offset allows &#8216;descending&#8217; characters (like <em>j</em> or <em>y</em>) to actually drop below the other character&#8217;s baseline without requiring all non-descending characters to have wasted space below them. The character width allows the text to be crammed in more tightly; in the future, it will also allow for &#8216;alternate&#8217; characters (like <em>ö</em> and <em>ü</em>) to be created by displaying an accent (an umlaut in this case) with a width of zero pixels followed by an &#8216;ordinary&#8217; letter; the accent mark will appear over the other letter.<br />
<br clear="both"/>To experiment with this idea, I wrote a tool for creating, editing and displaying such a font: CharEdit. The image above links to a screenshot of CharEdit in action. Written in <a href="http://www.processing.org/" target="_blank">Processing</a>, the program (or &#8217;sketch,&#8217; in Processing terminology) provides a reasonably nice environment for drawing the characters and adjusting the with and offset data, as well as &#8216;exporting&#8217; the font as Arduino-compatible C code. I intend to release CharEdit once it has been cleaned up a bit. This probably won&#8217;t happen for a month or two.<br />
<br clear="both"/>
<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/4128099679/" target="_blank"><img style="border: solid 2px #000000;" src="http://www.logicalzero.com/blog/images/BBB+LCD_thumb.jpg" alt="A Bare Bones Board (Arduino clone) with a small LCD." /></a></div>
<p>My intention was to implement the font on an Arduino driving a common PCD8544-based display salvaged from an old Nokia cell phone. Since then, I got a small <a href="http://tim.cexx.org/?page_id=342" target="_blank">LCD breakout board</a> from my fellow Dorkbot Boston member, Tim. The LCD itself is very similar to the one from the Nokia, but as the breakout board is already breadboard compatible and the LCD is operable on 5V (as opposed to 3.3V), it is much easier to work with. So far, I have basic text display with scrolling; line-wrapping is coming soon. The code is currently in the form of an Arduino sketch; I intend to rewrite it as a library and release it to the public. This is also likely to be several months off.</p>
<p>This work is also setting the stage for another project of mine, which I am keeping under wraps for the moment. More information as it comes closer to reality.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=169</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two steps forward, one (exploding) step back.</title>
		<link>http://www.logicalzero.com/blog/?p=163</link>
		<comments>http://www.logicalzero.com/blog/?p=163#comments</comments>
		<pubDate>Sun, 25 Oct 2009 18:26:41 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[The Soda Machine Hack Project]]></category>
		<category><![CDATA[AC]]></category>
		<category><![CDATA[failure]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[soda machine]]></category>
		<category><![CDATA[w&b]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=163</guid>
		<description><![CDATA[
In the past couple of weeks, I managed to do a little more work on the soda machine hack. With the hardware to interface 110VAC relays to 5VDC logic done, the next step is to create a means of connecting it to the TINI390 board. This has turned out to be a little more complex [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/4027026662/" target="_blank"><img style="border: solid 2px #000000;" src="http://www.logicalzero.com/blog/images/SodaMachine_SelectionDecoder_Schematic_thumb.jpg" alt="The soda selection encoder schematic." /></a></div>
<p>In the past couple of weeks, I managed to do a little more work on the soda machine hack. With the hardware to interface 110VAC relays to 5VDC logic done, the next step is to create a means of connecting it to the TINI390 board. This has turned out to be a little more complex than I&#8217;d anticipated, specifically because I don&#8217;t have direct access to the various I/O pins (at least not through its Java VM). The TINI is set up more like a microprocessor than a microcontroller; all the I/O is done by reading from and writing to specific memory locations, divided into several pages. The board has only eight general-purpose I/O pins, but it has a twenty-bit address bus and five usable &#8220;Chip Enable&#8221; pins. All communication with the on-board peripherals (such as the flash memory and probably the Ethernet) is carried over the same data pins, so anything I attach needs some capability to decode addresses in order to avoid reading or stomping on unrelated stuff.<br />
<br clear="both"/><span id="more-163"></span>Since there&#8217;s only a limited amount of stuff I need to connect to the TINI, I went with a moderately simple solution: I ignore the actual address pins and pay attention only to the Chip Enables. For example, accessing any memory location in the range 0&#215;800000 to 0&#215;8FFFFFF activates Peripheral Chip Enable 0 (PCE0); since I only need eight bits, I can write anywhere in that range and watch only the enable pin, ignoring the address completely. While this effectively wastes 16,777,207 possible bits, it greatly reducing the complexity of the electronics.<br />
<br clear="both"/></p>
<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/4026273385/" target="_blank"><img style="border: solid 2px #000000;" src="http://www.logicalzero.com/blog/images/SodaMachine_SelectionDecoder_Board_thumb.jpg" alt="The soda selection encoder board layout." /></a></div>
<p>With everything needing to access the same set of pins, however, the board layout started to get a bit hairy. I&#8217;m planning to build the system as a set of stacking modules, each with a specific function. This way, I can build the thing piecemeal and add features as I go. The first module is for reading the soda selection. It is fairly simple: when a soda is selected, one of the seven input pins goes &#8216;high&#8217; for about a quarter of a second. An eight-input OR gate triggers the clock of a flip-flop which grabs and keeps the input. The TINI can then read the selection at its leisure. The DRST (external device reset) pin also triggers the flip-flop&#8217;s clock; with no input from the selection detector, this effectively clears the flip-flop. A standard two-input OR is all that&#8217;s needed to handle the address decoding.</p>
<p>The soda selection encoder has been built on a breadboard and undergone some testing on the benchtop; it seems to work perfectly. In attempting to test it with the actual selection detector connected to the soda machine, however, I experienced a minor disaster. Apparently, I attached the interface board&#8217;s AC neutral to the soda machine&#8217;s AC &#8216;hot&#8217; &#8212; I&#8217;m attaching this to the lighting circuit, the wires of which are all the same color. When I pressed a soda button, all of the inputs were powered simultaneously, drawing much more current than expected. All of the board&#8217;s indicator LEDs lit at the same time with alarming brightness, followed by an alarming darkness. One of the LEDs was actually slightly blackened after the experience; it is just luck that it didn&#8217;t actually explode. I suppose either the external LED or the diode inside the optocoupler blew first, then the reverse current killed the surviving diode. Luckily, after some tests, it looks like only that LED/optocoupler pair was destroyed. It should be moderately easy to replace.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=163</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Materialization: successful!</title>
		<link>http://www.logicalzero.com/blog/?p=134</link>
		<comments>http://www.logicalzero.com/blog/?p=134#comments</comments>
		<pubDate>Wed, 07 Oct 2009 14:23:00 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[Miscelaneous Projects]]></category>
		<category><![CDATA[fabrication]]></category>
		<category><![CDATA[makerbot]]></category>
		<category><![CDATA[success]]></category>
		<category><![CDATA[w&b]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=134</guid>
		<description><![CDATA[
After some modifications to the design and some tweaking to the print settings, pan/tilt rig version 2.0 is a success. At a marginally lower extrusion rate and temperature, the accuracy was greatly improved &#8212; this version was much less &#8220;lumpy.&#8221; This improvement turned out to be somewhat of a mixed blessing, however. The first draft [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3987791357/" target="_blank"><img style="border: solid 2px #000000;" src="http://logicalzero.com/blog/images/ServoHolders2_Assembled_thumb.jpg" alt="The revised servo motor mounts, assembled." /></a></div>
<p>After some modifications to the design and some tweaking to the print settings, pan/tilt rig version 2.0 is a success. At a marginally lower extrusion rate and temperature, the accuracy was greatly improved &#8212; this version was much less &#8220;lumpy.&#8221; This improvement turned out to be somewhat of a mixed blessing, however. The first draft ended up being slightly too small to fit the servos, so this version was scaled up by 10% prior to printing. Combined with the improved precision engendered by the print setting tweaks, the final result ended up being a bit too loose to grip the servos with friction alone. A small rubber band around each holder keeps the motor nicely in place, however.<br />
<br clear="both"/><span id="more-134"></span><br />
Here are the virtual and material versions of the servo holders for comparison. All in all, a good likeness.<br />
<center><a href="http://www.flickr.com/photos/27076997@N00/3987791779/" target="_blank"><img style="border: solid 2px #000000; margin-right:10px;" src="http://logicalzero.com/blog/images/ServoHolders2_SketchUp_thumb.jpg" alt="The revised servo motor mounts in SketchUp." /></a><a href="http://www.flickr.com/photos/27076997@N00/3987791685/" target="_blank"><img style="border: solid 2px #000000; margin-left:10px;" src="http://logicalzero.com/blog/images/ServoHolders2_thumb.jpg" alt="The revised servo motor mounts, fabricated." /></a></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=134</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blatant Fabrication</title>
		<link>http://www.logicalzero.com/blog/?p=124</link>
		<comments>http://www.logicalzero.com/blog/?p=124#comments</comments>
		<pubDate>Fri, 02 Oct 2009 18:50:28 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[Miscelaneous Projects]]></category>
		<category><![CDATA[New project!]]></category>
		<category><![CDATA[fabrication]]></category>
		<category><![CDATA[failure]]></category>
		<category><![CDATA[makerbot]]></category>
		<category><![CDATA[w&b]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=124</guid>
		<description><![CDATA[
I made my first tentative steps into the world of desktop manufacturing last night. Having a couple of small servo motors, I thought it would be cool to make a tiny pan/tilt rig with them. I also thought this would be a good first 3D printing project. A couple months ago, several of us at [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3974913812/"><img style="border: solid 2px #000000;" src="http://logicalzero.com/blog/images/ServoHolder_thumb.jpg" alt="Servo motor holders in SketchUp." /></a></div>
<p>I made my first tentative steps into the world of desktop manufacturing last night. Having a couple of small servo motors, I thought it would be cool to make a tiny pan/tilt rig with them. I also thought this would be a good first 3D printing project. A couple months ago, several of us at <a href="http://www.willoughbybaltic.com" target="_blank">W&amp;B</a> got together and built a <a href="http://makerbot.com" target="_blank">Makerbot</a>*, a small hobbyist&#8217;s 3D printer based on the <a href="http://reprap.org" target="_blank">RepRap</a> project. Like RepRap, the Makerbot fabricates objects out of extruded ABS plastic, the same stuff of which LEGO blocks are made.</p>
<p>The Makerbot fabricates things by laying down a thin bead of molten plastic onto a small platform. The platform moves in two dimensions beneath the extruder, creating a cross-section of the model being built. After one cross-section is complete, the extruder rises and the next cross-section begins. It is a little like creating something from cake icing &#8212; I wonder if that&#8217;s the origin of the Cupcake name.<br />
<br clear="both"/><span id="more-124"></span>The end results aren&#8217;t always very pretty; the machine&#8217;s accuracy is somewhat limited (there&#8217;s only so much control one can have over semi-liquid plastic) and fabbed objects have a somewhat fibrous texture. The open air construction also makes it difficult to create objects with closed vertical openings or overhangs, but it can be done reasonably well by building chamfers or arches to support the overhanging parts.</p>
<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3974913600/"><img style="border: solid 2px #000000;" src="http://logicalzero.com/blog/images/ServoHolder_fabbed_thumb.jpg" alt="Servo motor holders in SketchUp." /></a></div>
<p>My own first try was only marginally successful. I designed holders for the vertical (top) and horizontal (base) servo motors in <a href="http://sketchup.google.com" target="_blank">SketchUp</a>, a nice program for sketching out geometric/architectural shapes in 3D. SketchUp has been around a while, but Google bought it a while back and released a free edition. From SketchUp, the model was exported as STL (stereolithograph) files and then converted to GCode (the standard language for driving CNC devices) via <a href="http://www.skeinforge.com/" target="_blank">Skeinforge</a>. This was then fed to the machine. In about twenty minutes, I had a pair of slightly lumpy plastic objects.</p>
<p>On the one hand, I actually turned a set of data into a physical object, which is pretty incredible when you think of it. On the other hand, the servos don&#8217;t fit the holders, so this first draft is useless. I think I made the model too precise, not properly accounting for either the eccentricities of the gooey plastic thread or the slight shrinkage of the object as it cooled. Some cleanup is to be expected &#8212; some trimming with a razor blade here, a bit of sanding/filing there &#8212; but as tight as these models are, it would be nearly as much work to carve new ones by hand from scratch.  </p>
<p>I&#8217;m headed back to W&#038;B this afternoon to build some more workbenches for the new members, so I think I&#8217;ll set the machine printing version 2.0 while I work. Hopefully, with these lessons learned, the next ones will turn out better. </p>
<p><em>(* Technically, the machine is called Cupcake CNC and the company that makes it is Makerbot, but the two names appear to be used interchangeably, like &#8216;Apple&#8217; and &#8216;Mac.&#8217;)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=124</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random idea: unique IDs on the Arduino</title>
		<link>http://www.logicalzero.com/blog/?p=118</link>
		<comments>http://www.logicalzero.com/blog/?p=118#comments</comments>
		<pubDate>Wed, 23 Sep 2009 20:08:09 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[Miscelaneous Projects]]></category>
		<category><![CDATA[New project!]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=118</guid>
		<description><![CDATA[I was thinking about ways to create multiplayer games/toys using the Arduino platform and realized a key difficulty: telling different Arduinos apart when there are more than two. Optimally, the system should not depend on one Arduino being the &#8216;boss&#8217; and should be as simple as possible for the programmer. I think I have a [...]]]></description>
			<content:encoded><![CDATA[<p>I was thinking about ways to create multiplayer games/toys using the Arduino platform and realized a key difficulty: telling different Arduinos apart when there are more than two. Optimally, the system should not depend on one Arduino being the &#8216;boss&#8217; and should be as simple as possible for the programmer. I think I have a solution.</p>
<p>This is the idea: modify the pre-compiler (or, more specifically, the IDE code that calls the precompiler) to automatically include a <tt>#define</tt> statement, defining <tt>MY_UNIQUE_ID</tt> as the last sixteen bits of the build time in milliseconds. The chances of two Arduino builds being done in the same thousandth of a second are extraordinarily low, effectively making the ID unique for all practical reasons. In the code, all the programmer needs to do is use <tt>MY_UNIQUE_ID</tt> as a variable.</p>
<p>I&#8217;ll have to take a look at the Arduino IDE source.</p>
<p><em>Update (9/24): </em>A couple of people have commented on this on Facebook (where this appears via RSS), suggesting some dynamic, real-time solutions. These are good ideas, but the situation I was imagining isn&#8217;t one in which all the points would have access to each other simultaneously; instead, temporary connections are being made between units, probably by physical contact.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=118</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Further work on the Soda Machine Hack</title>
		<link>http://www.logicalzero.com/blog/?p=105</link>
		<comments>http://www.logicalzero.com/blog/?p=105#comments</comments>
		<pubDate>Fri, 18 Sep 2009 20:31:46 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[The Soda Machine Hack Project]]></category>
		<category><![CDATA[AC]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[soda machine]]></category>
		<category><![CDATA[success]]></category>
		<category><![CDATA[w&b]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=105</guid>
		<description><![CDATA[
The W&#038;B soda machine continues its march towards the Internet. Yesterday, Sam Gerstein (another W&#038;B member) and I spent a couple of hours investigating its treacherous inner workings, figuring out specifically where the credit-emulating relay needs to go and testing the selection detection board.
Despite a couple of brief setbacks, the afternoon was a success. Virtually [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3929166572/in/set-72157603808275537/"><img src="http://logicalzero.com/blog/images/SodaMachine_Exterior_thumb.jpg" alt="COLD DRINK." style="border: solid 2px #000000;"/></a></div>
<p>The W&#038;B soda machine continues its march towards the Internet. Yesterday, Sam Gerstein (another W&#038;B member) and I spent a couple of hours investigating its treacherous inner workings, figuring out specifically where the credit-emulating relay needs to go and testing the selection detection board.</p>
<p>Despite a couple of brief setbacks, the afternoon was a success. Virtually everything in the machine worked more-or-less as predicted. The CONTROL BOX did contain a couple of mysteries: a switch fixed in one position in by a steel plate and a couple of screws, a relay not connected to anything whatsoever, and color-coded wires that didn&#8217;t seem to match the schematic. Apart from those, however, it was fairly spacious and tidy inside. The machine had apparently been modified modified so that every item is the same price, so only one of the four circuits that denote credit is actually in use, and shorting this with the &#8216;hot&#8217; connection registered as money having been deposited. The relay board will be easy to integrate.<br />
<br clear="all"/><br />
<span id="more-105"></span></p>
<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3928383241/in/set-72157603808275537/"><img src="http://logicalzero.com/blog/images/SodaMachine_interior_thumb.jpg" alt="Inside the machine." style="border: solid 2px #000000;"/></a></div>
<p>The selection detection board also went through its first full test. Nervous that it might explode or catch fire, I asked Sam to plug it into the wall. My fears were unfounded, however: no explosion, no fire, and not even a wisp of smoke. One of the seven optocoupler circuits didn&#8217;t work correctly, however; it almost seemed to be working in reverse, outputting a &#8216;high&#8217; signal when AC power wasn&#8217;t applied and a slightly lower voltage when it was. Eventually, Sam noticed that one optocoupler&#8217;s transistor&#8217;s base and collector were shorted; I never spotted it, probably because the transistor&#8217;s base isn&#8217;t used in the circuit.</p>
<p>Now, I need to reinstall my TINI/1-Wire development environment and start trying to get the software side started.<br />
<br clear="all"/><br />
Back to <a href="http://projects.logicalzero.com/">Stokes&#8217; Project Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=105</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wroughtbench</title>
		<link>http://www.logicalzero.com/blog/?p=99</link>
		<comments>http://www.logicalzero.com/blog/?p=99#comments</comments>
		<pubDate>Fri, 11 Sep 2009 17:07:06 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[Miscelaneous Projects]]></category>
		<category><![CDATA[w&b]]></category>
		<category><![CDATA[wood]]></category>
		<category><![CDATA[workbench]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=99</guid>
		<description><![CDATA[
 Since I&#8217;m trying to update my project blog to reflect what I&#8217;m actually doing, I thought it worth mentioning the workbenches (and now shelves) I&#8217;ve been building for Willoughby &#038; Baltic, previously posted only to Facebook.

I&#8217;ve built three nearly identical benches and one large table of similar construction using primarily scrap and recycled wood [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.facebook.com/photo.php?pid=2414985&#038;l=ee57c1e35c&#038;id=525101378"><img src="http://www.logicalzero.com/blog/images/Bench1_thumb.jpg" alt="The first of several workbenches I built." style="border: solid 2px #000000;"/></a></div>
<p> Since I&#8217;m trying to update my project blog to reflect what I&#8217;m actually doing, I thought it worth mentioning the workbenches (and now shelves) I&#8217;ve been building for <a href="http://www.willoughbybaltic.com/">Willoughby &#038; Baltic</a>, previously posted only to Facebook.<br />
<span id="more-99"></span><br />
I&#8217;ve built three nearly identical benches and one large table of similar construction using primarily scrap and recycled wood 2&#215;4s from some demolished partitions. They were designed so that there are few pieces that meet end-on, reducing the required accuracy of the lengths of their pieces and allowing for a lot of tweaking room; since some of the 2&#215;4s are a bit warped and the floor isn&#8217;t 100% level, anyway, a decent &#8216;fudge factor&#8217; was needed. Three of the benches use doors (also once part of the demolished partitions) for work surfaces; the table uses two pieces of heavy, linoleum-covered countertop-type material from some other source.</p>
<p>The shelves are fairly similar in design, if only because they, too, are made primarily of 2&#215;4s. These were built to slightly different proportions: 6&#8242;x6&#8242;x2&#8242;. Having used most of the small scrap in the benches, the shelves were designed to get the most out of whole 2&#215;4 beams, which are typically 8&#8242; long. Plywood paneling (again from the former partitions) serves as shelf surfaces. The paneling is just standard structural plywood with some &#8216;decorative&#8217; grooves cut into it so it is actually quite sturdy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=99</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8216;The Soda Machine Hack Project&#8217;</title>
		<link>http://www.logicalzero.com/blog/?p=49</link>
		<comments>http://www.logicalzero.com/blog/?p=49#comments</comments>
		<pubDate>Fri, 04 Sep 2009 21:19:27 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[New project!]]></category>
		<category><![CDATA[The Soda Machine Hack Project]]></category>
		<category><![CDATA[AC]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[iButton]]></category>
		<category><![CDATA[soda machine]]></category>
		<category><![CDATA[w&b]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=49</guid>
		<description><![CDATA[
Willoughby &#038; Baltic has acquired a vintage soda machine; if I were to guess, it dates back to the late 1950s or early 1960s. It&#8217;s a massive steel box with a wood veneer front, its sides an industrial non-color. In contrast to more modern machines, its only text is the words Cold Drink in small, [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3881793730/in/set-72157603808275537/"><img src="http://www.logicalzero.com/blog/images/SodaMachineSchematic_thumb.jpg" alt="Schematic of W&#038;B's vintage beverage dispenser." style="border: solid 2px #000000;"/></a></div>
<p><a href="http://www.willoughbybaltic.com/">Willoughby &#038; Baltic</a> has acquired a vintage soda machine; if I were to guess, it dates back to the late 1950s or early 1960s. It&#8217;s a massive steel box with a wood veneer front, its sides an industrial non-color. In contrast to more modern machines, its only text is the words <i><b style="font-variant:small-caps;">Cold Drink</b></i> in small, white-on-black, sans-serif lettering above a narrow, horizontal window displaying a representative can of each beverage within. I should have thought to photograph it, but I was distracted by the interior. Inside, the machine is a wonder of space-age technology: as you can see from the <a href="http://www.flickr.com/photos/27076997@N00/3881793730/">schematic</a>, everything operates on 110V AC line current, and its works are almost entirely electromechanical relays and solenoids. Frankly, it&#8217;s pretty cool. </p>
<p>Of course, the first thing that needs to be done to the machine is connect it to the Internet.  Why? I don&#8217;t know. I&#8217;m only interested in the &#8216;how&#8217; at the moment.<br />
<br clear="all"/><br />
<span id="more-49"></span>
<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3881761576/in/set-72157603808275537/"><img src="http://www.logicalzero.com/blog/images/SodaMachine_SelectionDetection_thumb.jpg" alt="Optocoupler interface for detecting selections." style="border: solid 2px #000000;"/></a></div>
<p>The first step of that first step is building microcontroller-compatible interfaces for the machine&#8217;s 110VAC inner workings. Since most microcontrollers operate on DC between 3 and 5 volts, this will take some doing. </p>
<p>There are two basic functions that need to be exposed; the first is detecting the beverage selection. For this, I&#8217;ve <a href="http://www.flickr.com/photos/27076997@N00/3881761576/in/set-72157603808275537/">built a board</a> (here&#8217;s the <a href="http://www.flickr.com/photos/27076997@N00/3882178154/in/set-72157603808275537/">schematic</a>) that uses optocouplers to pass the signal but keep the two voltages electrically isolated. It&#8217;s really pretty simple. Every button is a SPDT switch, wired so that the first button pressed cuts the power to all the rest; only one button can be active at a time. The output from each of the seven buttons is split; one side goes where it was intended, the other to the board&#8217;s inputs. When a button is pressed, one of the seven low-voltage outputs on the other side of the board goes &#8216;high&#8217; (i.e. changing from ground to just below +5VDC). The signal will come through as a rapid series of pulses (half of the AC sine wave), but I&#8217;ll account for this in the software.<br />
<br clear="all"/>
<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3880963167/in/set-72157603808275537/"><img src="http://www.logicalzero.com/blog/images/SodaMachine_RelayBoard_thumb.jpg" alt="Simple 12V relay board." style="border: solid 2px #000000;"/></a></div>
<p>The other thing that a computer-enabled soda machine must be able to do is operate cashlessly. We use uniquely-identifiable <a href="http://www.maxim-ic.com/products/ibutton/ibuttons/">iButton</a> keys for other purposes at W&#038;B, so I plan on using those to allow members to put a drink on their tab. Looking at the machine&#8217;s schematic, it appears that the coin box abstracts the credits put into it; it just closes one of four circuits when &#8216;enough&#8217; money has been put in. The four separate circuits apparently allow for four separate prices, although the W&#038;B machine has everything cost the same. The <a href="http://www.flickr.com/photos/27076997@N00/3880963167/in/set-72157603808275537/">board</a> I put together for this (<a href="http://www.flickr.com/photos/27076997@N00/3881379949/in/set-72157603808275537/">schematic</a>) is a fairly generic relay controller. When powered, the relay switches the credit circuit&#8217;s source away from the coin box. This circuit uses an optocoupler in a way opposite of the first board; it sends a signal <em>from</em> the low-voltage portion. There&#8217;s actually an extra step in this: the relay is what connects to the machine&#8217;s native 110VAC, and it operates on 12VDC. The optocoupler controls that 12V signal which in turn controls the 110VAC.</p>
<p>The selection detection board is fairly straight forward to hook up; all the buttons are connected with standard &#8217;spade&#8217; connectors, all of which are accessible when the machine is open, so putting in a splitter is just a matter of plugging it in. The credit faker&#8217;s attachment is not so obvious. The coin box is a separate module, connected via a strange plug that looks like four standard grounded plugs stacked vertically. I&#8217;m going to have to open up what the schematic refers to as the <em>control box</em>, which is literally an ominously featureless steel box located next to the coin module. While I&#8217;ve tried to plan all my modifications to avoid making permanent changes to the machine, this will almost certainly need some &#8216;higher impact&#8217; hacking.</p>
<p>If I don&#8217;t get a job in the meantime, I hope to do some additional work next week. I should really take some photos of the machine itself as well.</p>
<p><a href="http://projects.logicalzero.com/">Stokes&#8217; Project Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=49</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8216;The Control Panel Project&#8217;</title>
		<link>http://www.logicalzero.com/blog/?p=44</link>
		<comments>http://www.logicalzero.com/blog/?p=44#comments</comments>
		<pubDate>Wed, 02 Sep 2009 20:48:44 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[New project!]]></category>
		<category><![CDATA[The Control Panel Project]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[retro tech]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=44</guid>
		<description><![CDATA[

I&#8217;ve long been interested in UI and usability; I took some courses back in school and I&#8217;ve pursued it on my own since then. A couple of months back, I performed a thought experiment: what would be the worst (plausible) user interface hardware? It occurred to me that bad interfaces keep the user from performing [...]]]></description>
			<content:encoded><![CDATA[<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3881761860/in/set-72157603808275537/"><img style="border: solid 2px #000000;" src="http://www.logicalzero.com/blog/images/ControlPanel_thumb.jpg" alt="A retro-style control panel module." /></a></div>
<p/>
I&#8217;ve long been interested in UI and usability; I took some courses back in school and I&#8217;ve pursued it on my own since then. A couple of months back, I performed a thought experiment: what would be the worst (plausible) user interface hardware? It occurred to me that bad interfaces keep the user from performing an activity, but what if the interface itself was the activity? In such a case, the regular rules no longer apply.</p>
<p>From that came my idea for a modular, expandable control panel composed of banks of toggle switches.<br />
<br clear="both"/><span id="more-44"></span>
<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3881761732/in/set-72157603808275537/"><img style="border: solid 2px #000000;" src="http://www.logicalzero.com/blog/images/ControlPanel_2xVertical_thumb.jpg" alt="A retro-style control panel module." /></a></div>
<p>The prototypes I built consist of sets of eight vintage toggle switches equally spaced on brushed aluminum panels. The panels have a nice bevel on one side and are open on the other; the back has mounting holes and a set of leaf springs for maintaining tension but is otherwise open as well. Placed open-end-to-open-end or top-to-bottom, the switches are distributed evenly across the resulting surface.</p>
<p>The end result has a nice, Altair/PDP-8 feel to it.<br />
<br clear="both"/>
<div style="float: left; margin-right: 16px; margin-bottom: 10px; margin-left:24px;"><a href="http://www.flickr.com/photos/27076997@N00/3880963335/in/set-72157603808275537/"><img style="border: solid 2px #000000;" src="http://www.logicalzero.com/blog/images/ControlPanel_2xHorizontal_thumb.jpg" alt="A retro-style control panel module." /></a></div>
<p>The system is really just a bunch of switches connected to 74LS166 parallel-to-serial shift registers. The one vaguely clever electronic feature is that each panel&#8217;s orientation changes both the order in which the switches are scanned and which direction is &#8216;on.&#8217; This is accomplished by a header wired to reverse all of the switches and swap power and ground when plugged in upside down. This way, the control panel can be reconfigured without the need to adjust the software that reads it &#8212; it only needs to be told the number of panels attached. Even this could be made automatic in a future version.<br />
<br clear="both"/><br />
I had additional plans for including other vintage-style controls (e.g. knobs, thumbwheels, et cetera), but this project has sort of stagnated. If I return to the project, I may implement this.</p>
<p>Then I just have to think of something to control with the panel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=44</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A non-apropos video game graphics/UI idea</title>
		<link>http://www.logicalzero.com/blog/?p=36</link>
		<comments>http://www.logicalzero.com/blog/?p=36#comments</comments>
		<pubDate>Sat, 01 Aug 2009 23:11:54 +0000</pubDate>
		<dc:creator>Stokes</dc:creator>
				<category><![CDATA[Miscelaneous Projects]]></category>
		<category><![CDATA[3d graphics]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[idea]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.logicalzero.com/blog/?p=36</guid>
		<description><![CDATA[A random train of thought lead me to considering the way some first-person video games represent wearing a gas mask or a space suit with a goofy drawing of the mask or helmet's eye holes, the same way images through binoculars used to be shown on old TV shows. Limiting the player's field of view may have a practical purpose (e.g building suspense), but the depiction is so unrealistic that it breaks the suspension of disbelief. To see the individual eyeholes in a helmet, they'd have to be several inches in front of your face.]]></description>
			<content:encoded><![CDATA[<p>A random train of thought lead me to considering the way some first-person video games represent wearing a gas mask or a space suit with a goofy drawing of the mask or helmet&#8217;s eye holes, the same way images through binoculars used to be shown on old TV shows. Limiting the player&#8217;s field of view may have a practical purpose (e.g building suspense), but the depiction is so unrealistic that it breaks the suspension of disbelief. To see the individual eyeholes in a helmet, they&#8217;d have to be several inches in front of your face.</p>
<p>An alternative: border the sides and/or bottom of the screen with a translucent white gradient, representing the wearer&#8217;s breath condensing on the glass surface inside of the mask. Wearing a gas mask/space suit in a video game is usually accompanied by the requisite <em>2001</em>-style breathing sounds; the gradient could contract with each breath and slowly dilate afterward. For added realism, the rate at which the fog clears could remain constant while the rate of breathing (and thus fogging) is based on the character&#8217;s exertion, so panicked running around could leave the player momentarily blind. That would work well in a game of the &#8220;survival/horror&#8221; genre.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.logicalzero.com/blog/?feed=rss2&amp;p=36</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
