<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Tinkerlog</title>
	
	<link>http://tinkerlog.com</link>
	<description>Alex' blog</description>
	<lastBuildDate>Sun, 13 May 2012 10:54:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/tinkerlog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="tinkerlog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Battery Adapter for Canon Powershot SX200</title>
		<link>http://tinkerlog.com/2012/05/13/battery-adapter-for-canon-powershot-sx200/</link>
		<comments>http://tinkerlog.com/2012/05/13/battery-adapter-for-canon-powershot-sx200/#comments</comments>
		<pubDate>Sun, 13 May 2012 10:54:26 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[3D printing]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1657</guid>
		<description><![CDATA[
Last year I bought a Canon PowerShot SX200 on ebay. I wanted to play a bit with CHDK, the Canon Hack Development Kit to make some timelapse things. Problem was, the battery would hold only up for 2 hours or so. Even worse, the camera has no power jack to attach a power supply. The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/b_img-3253.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/s_img-3253.jpg" alt="" title="Power adapter Canon Powershot SX200" width="480" height="320" class="alignnone size-full wp-image-1669" /></a></p>
<p>Last year I bought a Canon PowerShot SX200 on ebay. I wanted to play a bit with <a target="_blank"  href="http://chdk.wikia.com/wiki/CHDK">CHDK</a>, the Canon Hack Development Kit to make some timelapse things. Problem was, the battery would hold only up for 2 hours or so. Even worse, the camera has no power jack to attach a power supply. The solution is to buy a battery dummy that has a jack on its back. That costs like 30 euros!</p>
<p>3D printing to the rescue!</p>
<p><span id="more-1657"></span></p>
<p>Last christmas I bought myself a <a target="_blank" href="http://reprappro.com/Huxley">RepRapPro Huxley Kit</a>. It took quite a while until I got to the printing. Changed from the melzi board to a Sanguinololu board, because I smoked one of the stepper drivers and failed replacing it. Also I had a lot of problems with the bowden tube popping out of the extruder all the time. I think it was because my  temperature was too low. Anyway, now it seems to work. Still I have to do some tweaking on the parameters.</p>
<h3>The model</h3>
<p><iframe src="http://player.vimeo.com/video/42040114" width="490" height="276" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe></p>
<p>I measured the original battery and used <a target="_blank" href="http://www.openscad.org/">OpenSCAD</a> to design the model. It takes a while to get used to it but I think I like to write some kind of source code to construct a 3d model.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/b_img-3210.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/s_img-3210.jpg" alt="" title="Fresh from the printer" width="480" height="320" class="alignnone size-full wp-image-1667" /></a></p>
<p>This is how it came out of the printer, next to the original battery. Actually this is the second one. The first was a bit too thick to fit into the battery compartment. The weird looking plastic stripes at the slot at the front result from a messed up support structure. A bit of cleaning had to be applied.</p>
<h3>Wiring and Assembling</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/b_img-3262.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/s_img-3262.jpg" alt="" title="Battery adapter completed" width="480" height="320" class="alignnone size-full wp-image-1672" /></a></p>
<p>I used <a target="_blank" href="http://search.digikey.com/scripts/DkSearch/dksus.dll?x=0&#038;y=0&#038;lang=en&#038;site=us&#038;KeyWords=CP-018H-ND">this</a> tiny 4mm jack and glued it into place. For the other connection I used a tiny one sided copper board. I had to file it a bit down, it wont fit otherwise. Then simply made three tiny pads by scraping off some of the copper. Next soldered two wires to the left and the right pad, the middle one is not connected. The solder joints are quite big blobs. That&#8217;s because the tiny PCB didn&#8217;t want to connect to the camera at first.</p>
<h3>Testing</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/b_img-3256.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/s_img-3256.jpg" alt="" title="Insert the battery adatper" width="480" height="320" class="alignnone size-full wp-image-1671" /></a></p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/b_img-3254.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/05/s_img-3254.jpg" alt="" title="Plug it in" width="480" height="320" class="alignnone size-full wp-image-1670" /></a></p>
<p>Guess what, it fits and it even works. I set the power adapter to 4.5V, which is a bit more then a full loaded battery. The power adapter should be rated at least with 2A @ 4.5V. First I tried one with 1A and it starts the camera fine, but the cam shuts down as soon as it tries to drive the lenses. </p>
<h3>Links</h3>
<ul>
<li><a target="_blank" href="http://www.thingiverse.com/thing:22924">OpenSCAD model at Thingiverse</a>. Yay, my first part on thingiverse!
</ul>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/OEw5pFcAQO8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2012/05/13/battery-adapter-for-canon-powershot-sx200/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Indestructible Billboard</title>
		<link>http://tinkerlog.com/2012/04/23/the-indestructible-billboard/</link>
		<comments>http://tinkerlog.com/2012/04/23/the-indestructible-billboard/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 18:20:27 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1641</guid>
		<description><![CDATA[ 
In March Marcus of Interactive Matter and I helped Publicis to build an interactive billboard for Evoc. 
Evoc makes backpacks with protectors, called LITESHIELD. The protector is used to absorb a good portion of an impact in case of an accident. So we were asked to build a billboard with an included backpack and [...]]]></description>
			<content:encoded><![CDATA[<p><!-- This version of the embed code is no longer supported. Learn more: https://vimeo.com/help/faq/embedding --> <object width="490" height="275"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=39831585&amp;force_embed=1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=39831585&amp;force_embed=1&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00adef&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="490" height="275"></embed></object></p>
<p>In March Marcus of <a target="_blank" href="http://interactive-matter.eu/">Interactive Matter</a> and I helped <a target="_blank" href="http://www.publicis.de/2012/04/11/evoc-praesentiert-mit-publicis-erstes-indestructible-billboard/">Publicis</a> to build an interactive billboard for <a target="_blank" href="http://evocsports.com/video/the-indestructible-billboard.html">Evoc</a>. </p>
<p>Evoc makes backpacks with protectors, called LITESHIELD. The protector is used to absorb a good portion of an impact in case of an accident. So we were asked to build a billboard with an included backpack and a sensor, that measures an impact. The impact and the absorbed portion would be displayed on a screen, also integrated into the billboard. A webcam should take a picture of a candidate, while he tries to hit the backpack as hard as he could. The picture would then be uploaded to Facebook, if the candidate agrees.</p>
<p>Our part was all the electronics and programming. Rest of the innards was made by the great guys of <a target="_blank" href="http://www.create-and-more.de/">Create and More</a>. As sensor we used an Arduino and a <a target="_blank" href="http://www.sparkfun.com/products/9332">accelerometer with +/-250g range</a>. Whenever a punch is detected, the maximum value gets sent to an Processing sketch, that takes a picture, updates the display and sends the picture to Facebook. No open source here, it&#8217;s simply too ugly and we are embarrassed.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/04/b_img-3073.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/04/s_img-3073.jpg" alt="" title="Installing the Indestructable Billboard " width="480" height="320" class="alignnone size-full wp-image-1653" /></a></p>
<p>Presentation took place in Berlin at the end of March. Everything worked out really well. Only problem was a slightly flaky internet uplink. Next time we will have at least two 3G USB sticks as fallback. Despite that everyone had a lot of fun, especially the kids and some young guys, giving the billboard and the backpack a hard time. But it withstood. Of course.</p>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/xf8WnpxIPpE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2012/04/23/the-indestructible-billboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The 2 Euros Machine</title>
		<link>http://tinkerlog.com/2012/03/30/the-2-euros-machine/</link>
		<comments>http://tinkerlog.com/2012/03/30/the-2-euros-machine/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 14:58:36 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1618</guid>
		<description><![CDATA[
In January Kolle Rebbe, a german agency, asked if I could help them with their project. The idea was to have an interactive ad poster to collect money for Misereor, a german relief organization. The campaign is named &#8220;Mit 2€ viel bewegen&#8221;, which means something like &#8220;getting things moving with 2€&#8221;. You would donate a [...]]]></description>
			<content:encoded><![CDATA[<p><object width="490" height="279"><param name="movie" value="http://www.youtube.com/v/DsxR4wr9NtY?version=3&amp;hl=de_DE&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/DsxR4wr9NtY?version=3&amp;hl=de_DE&amp;rel=0" type="application/x-shockwave-flash" width="490" height="279" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>In January <a target="_blank" href="http://www.kolle-rebbe.de/en">Kolle Rebbe</a>, a german agency, asked if I could help them with their project. The idea was to have an interactive ad poster to collect money for <a target="_blank" href="http://www.misereor.de/">Misereor</a>, a german relief organization. The campaign is named &#8220;Mit 2€ viel bewegen&#8221;, which means something like &#8220;getting things moving with 2€&#8221;. You would donate a 2 Euro coin and the coin would travel through the poster, a bit like a marble in a marble machine. On the way to the bottom, the coin would trigger all kind of animations to show, what the money would be used for. Very cool idea!</p>
<p><span id="more-1618"></span></p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/03/b_img-2995.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/03/s_img-2995.jpg" alt="" title="Prototype detail" width="480" height="320" class="alignnone size-full wp-image-1625" /></a></p>
<p>At one point a picture should be taken and then displayed on a small display, and if the donor agrees, the picture would be uploaded to a <a target="_blank" href="mit-2-euro-viel-bewegen.de">Facebook page</a>. That would be my task to solve.</p>
<p>We decided to use a Mac Mini as host, a webcam and an external 7&#8243; USB-display. I wrote the software in <a target="_blank" href="http://processing.org/">Processing</a>, mostly because it had built-in video capture capabilities. The upload was done using <a href="http://hc.apache.org/httpcomponents-client-ga/">Apache HTTPClient</a> and a 3G stick. Below the display we had two buttons, one for <em>upload</em>, one for <em>don&#8217;t</em>. The model-maker used a USB-keypad, which he broke up and simply soldered the buttons to two of the keys on the keypad. Clever! </p>
<p>The software is rather simple. It has a <a href="http://en.wikipedia.org/wiki/Finite-state_machine">state machine</a> that gets triggered by photoelectric barriers or button presses. The first barrier would trigger the picture, the second would display the picture on the display. The yes-button would trigger the facebook upload then switch to the initial state again. </p>
<p>As the whole ad poster would stand for a month or longer at the airport here in Hamburg, I used <a href="https://www.dropbox.com/">Dropbox</a> as deployment method. I thought, it would be smart to have something, that would automatically sync a folder, if I had to update something of the software. Also I added a logging mechanism (log4j) to the Processing sketch to be able to tell, if the sketch is still running or not. The log file would be on the dropbox folder as well. As it turned out, after a couple of updates, the syncing just stops. Maybe Dropbox decided to cancel syncing if changes to a file are too rapidly, I haven&#8217;t checked. We had the 3G stick fail a couple of times, so that the internet connection was lost, but despite that, everything else worked pretty well.</p>
<p>Here are some pictures of the first rough prototype, used to test all dimensions and mechanics.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/03/b_img-2991.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/03/s_img-2991.jpg" alt="" title="Prototype" width="480" height="720" class="alignnone size-full wp-image-1623" /></a></p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/03/b_img-2994.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/03/s_img-2994.jpg" alt="" title="Back of the prototype" width="480" height="720" class="alignnone size-full wp-image-1624" /></a></p>
<p>Here is another picture, showing the final result, installed at the airport in Hamburg.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2012/03/b_img-2999.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2012/03/s_img-2999.jpg" alt="" title="Installed at the airport" width="480" height="720" class="alignnone size-full wp-image-1627" /></a></p>
<p>Seeing it live is really cool. It looks much better as on the video. Also the craftsmanship that was used to build this thing is awesome. Hat tip to the great model-maker guys at <a href="http://www.thomasbeecken.de/index.html">Thomas Beecken</a> and to the fantastic illustrators (whose name I forgot, sorry).<br />
Thanks <a target="_blank" href="http://www.kolle-rebbe.de/en">Kolle Rebbe</a> for asking me.</p>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/wT6O0VB3ATQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2012/03/30/the-2-euros-machine/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Der Kritzler</title>
		<link>http://tinkerlog.com/2011/09/02/der-kritzler/</link>
		<comments>http://tinkerlog.com/2011/09/02/der-kritzler/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 15:32:58 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1550</guid>
		<description><![CDATA[
In May I moved into a new office with the great guys of The Future of Everything. The office has really nice big windows and we thought about what we could do with them. I remembered hektor, this super cool 2D drawing machine. What if that thing could draw directly onto the window?
So, here is [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/27950453?portrait=0" width="490" height="276" frameborder="0"></iframe></p>
<p>In May I moved into a new office with the great guys of <a target="_blank" href="http://thefutureofeverything.net/">The Future of Everything</a>. The office has really nice big windows and we thought about what we could do with them. I remembered <a target="_blank"  href="http://hektor.ch/">hektor</a>, this super cool 2D drawing machine. What if that thing could draw directly onto the window?</p>
<p>So, here is <em>Der Kritzler</em> (kritzeln is german for scribble).</p>
<p><span id="more-1550"></span></p>
<h3>Parts</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-1366.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-1366.jpg" alt="" title="Parts for Kritzler" width="480" height="320" class="alignnone size-full wp-image-1582" /></a></p>
<p>Here is a list of parts needed:</p>
<ul>
<li>Motor mount and pen holder, laser cut MDF, 5mm <a href="http://www.formulor.de/" target="_blank">Formulor</a> (german partner of Ponoko)</li>
<li>2 stepper motors, NEMA 17. e.g. <a href="http://www.reichelt.de/Schrittmotoren/QSH4218-35-026/index.html?ACTION=3&#038;GROUPID=3299&#038;ARTICLE=62652&#038;SHOW=1&#038;START=0&#038;OFFSET=16&#038;;PROVID=2402" target="_blank">Reichelt</a></li>
<li>2 suction cups with mount, <a href="http://www.esska.de/esska_de_s/saugereinheit-zum-fixieren-von-endprodukten-55-mm.html" target="_blank">esska</a></li>
<li>Various M5 and M4 bolts, screws and washers, 2 ball bearings <a href="http://www.screwsandmore.de/" target="_blank">Screws and More</a></li>
<li>2 toothed belt pulleys, <a href="http://www.maedler.de/Product/1643/1616/986/987.aspx?result=16052200" target="_blank">Mädler</a></li>
<li>6 m toothed belt, <a href="http://www.maedler.de/Product/1643/1616/945/946.aspx?result=16060000" target="_blank">Mädler</a></li>
<li>Arduino or breadboard compatible Arduino clone</li>
<li>2 stepper drivers, A4983, <a href="http://www.pololu.com/catalog/product/1201" target="_blank">Pololu</a></li>
<li>Standard servo (missing on the photo)</li>
<li>Power supply, 3-12V, 2250 mA, <a href="http://www.conrad.de/ce/de/product/518373/VOLTCRAFT-USPS-2250-STECKER-SCHALTNETZT" target="_blank">conrad.de</a></li>
</ul>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-1371.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-1371.jpg" alt="" title="Suction cups" width="480" height="320" class="alignnone size-full wp-image-1584" /></a></p>
<p>Most sources are german, but I assume that all parts are pretty common. The toothed belt was extremely expensive, almost 20 Euro per meter and I ordered 6. There has to be a cheaper source, especially because I don&#8217;t need the best material available.</p>
<p>The <a target="_blank" href="https://github.com/tinkerlog/Kritzler/blob/master/design/kritzler.svg">SVG</a> to cut the motor mount and the pen holder was my first attempt to have something laser cut. To be honest, it was my second, the first one was a complete fail. This one worked. I designed it in Inkscape because I haven&#8217;t decided yet which 2D CAD tool to use. Inkscape can be really annoying but you can get it done. The design is not optimized so it makes a lot more cuts than actually needed, which makes it more expensive. </p>
<h3>Assembling</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-1382.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-1382.jpg" alt="" title="Assembling the Kritzler" width="480" height="320" class="alignnone size-full wp-image-1590" /></a></p>
<p>The motor is mounted with its axis towards the motor holder. That way the belt is kept as close as possible to the window. I had to use the black tubes as spacing washer, because the thread on the bolt doesn&#8217;t go up all the way. I should look closer next time at what bolts I order. </p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-1383.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-1383.jpg" alt="" title="Assembling the pen holder" width="480" height="320" class="alignnone size-full wp-image-1591" /></a></p>
<p>Assembling the pen holder is quite easy. I just used some wood glue to glue all parts together.</p>
<h3>Electronics</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-2070.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-2070.jpg" alt="" title="Electronic parts for the Kritzler" width="480" height="320" class="alignnone size-full wp-image-1557" /></a></p>
<p>I am using the drivers with quarter stepping, which means 800 steps per revolution of the motor. The pulley has a circumference of 62.8 mm, that gives a resolution of ~0.08 mm per step which is far enough for such a device.</p>
<p>The driver board is connected as follows:</p>
<ul>
<li>2B &#8211; black</li>
<li>2A &#8211; brown</li>
<li>1A &#8211; blue</li>
<li>1B &#8211; red</li>
<li>MS1 &#8211; GND (via 100k resistor)</li>
<li>MS2 &#8211; VCC</li>
<li>MS3 &#8211; unconnected (means low, has internal pull down resistor)</li>
<li>RESET and SLEEP are connected</li>
</ul>
<p>The connections from the Arduino are:</p>
<ul>
<li>pin 6 &#8211; Debug LED</li>
<li>pin 8 &#8211; Servo signal</li>
<li>pin 9 &#8211; Driver 1, DIR</li>
<li>pin 10 &#8211; Driver 1, STEP</li>
<li>pin 11- Driver 2, DIR</li>
<li>pin 12 &#8211; Driver 2, STEP</li>
</ul>
<p>The firmware boots up and expects the  motor mounts to be 1500 mm placed apart from each other. The pen holder is placed in the middle with 1060 mm on the timing belt to each side. That position has to be the same every time the machine is powered on because it has no feedback where the pen holder really is.</p>
<p>The Kritzler is then ready to receive commands from the host machine. Possible commands are:</p>
<ul>
<li><tt>m dx dy</tt> (move relative)</li>
<li><tt>l dx dy</tt> (line relative) </li>
<li><tt>M x y</tt> (move absolute)</li>
<li><tt>L x y</tt> (line absolute)</li>
</ul>
<p>For every new command it is computed how much steps had to be executed to move the pen to the new position. That involves a bit of geometry because we have to transform the position in x,y into a position that depends on the length of the two belts. If the command is a move command, the servo is used to keep the pen away from the window.</p>
<p>For debugging it is also possible to connect to the Kritzler via a simple terminal. Then you can examine the plotting area, for example, by simply typing <tt>M 1000 1000</tt> into the terminal and see where the pen goes to.</p>
<h3>Software</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-1909.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-1909.jpg" alt="" title="TFOE" width="480" height="320" class="alignnone size-full wp-image-1569" /></a></p>
<p>I used <a target="_blank" href="http://www.processing.org/">Processing</a> for implementing the host software. Processing was the first choice because it is primarily targeted for graphics programming and plays well with Arduino. Any other software that could talk to the serial port would work here as well.</p>
<p>The host software falls into two parts. The first part is for reading an SVG file and sending it to the machine. It starts with loading the first SVG file from a directory if there is one. Then you could still scale, mirror and move the shape on your canvas. If everything fits, the drawing is sent to the <em>Kritzler</em>, one instruction after another.</p>
<p>The other part is used to transform bitmaps into more or less pretty SVG files. I have two snippets at the moments. One converts a bitmap into a SVG by using some sort of halftone algorithm. It produces a horizontal line with more or less jitter, dependent on how dark the current pixel is. The second uses <a href="http://www.imagemagick.org/" target="_blank">ImageMagick</a> and <a href="http://potrace.sourceforge.net/" target="_blank">Potrace</a> to convert a bitmap into an b/w SVG file. That black outline is then filled with diagonal lines by another small Processing sketch.</p>
<p>All tools read and write files from special directories. That means tools can be somewhat chained together. One reads files, preprocesses it and stores them in a new directory. Another tool then reads that file and sends them to the Kritzler. To process the SVG files, I first used the built-in functionality of Processing. After some poking around I switched to <a target="_blank" href="http://www.ricardmarxer.com/geomerative/">Geomerative</a> which is a really capable SVG library for Processing.</p>
<h3>Testing</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-1386.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-1386.jpg" alt="" title="First tests" width="480" height="320" class="alignnone size-full wp-image-1596" /></a></p>
<p>This is the very first drawing done by the machine. I used a whiteboard foil on the window which worked pretty well. The pen is a permanent marker. I tried many different pens until now. Whiteboard markers are great for drawing on the window. They could be wiped off easily but are not very intense. My favorites for drawing directly on the window are pens with liquid chalk. Although all I tried have some kind of valve to fill the head. That means you have to monitor the drawing process and when the chalk gets thin, stop the drawing to refill the head. There must be an easier way. Maybe making my own liquid chalk?</p>
<h3>More Scribbling</h3>
<p><iframe src="http://player.vimeo.com/video/28003302?portrait=0" width="490" height="276" frameborder="0"></iframe></p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-1940.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-1940.jpg" alt="" title="Scribbling Yul Brunner" width="480" height="320" class="alignnone size-full wp-image-1561" /></a></p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-1956.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-1956.jpg" alt="" title="Scribbling" width="480" height="320" class="alignnone size-full wp-image-1562" /></a></p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/b_img-1968.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/09/s_img-1968.jpg" alt="" title="Scribbling Yul Brunner" width="480" height="320" class="alignnone size-full wp-image-1555" /></a></p>
<h3>Conclusion</h3>
<p>This is my first project that uses ropes, gears and motors. The hardware could be build prettier and cheaper. Maybe I&#8217;ll build another more optimized one. We&#8217;ll see. Nevertheless I am quite pleased with the outcome. Always great to see people passing the window and then get attracted by the Kritzler, while he paints on the window.</p>
<p>This project is based on great software and inspired by some super cool 2D plotting devices.</p>
<h3>Links and Downloads</h3>
<ul>
<li><a target="_blank" href="http://hektor.ch/">Hektor</a>, first in the list!</li>
<li><a target="_blank" href="http://spritesmods.com/?art=whiteboard">Sprites Mods Online Whiteboard</li>
<li><a target="_blank" href="http://rolocroz.com/wallrus/">Wallrus</a>
<li><a target="_blank" href="http://www.as220.org/labs/blog/drawbot/">Drawbot</a></li>
<li><a target="_blank" href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248670046">Vertical Plotter, Arduino Forum</a></li>
<li><a target="_blank" href="http://www.ricardmarxer.com/geomerative/">Geomerative</a>, SVG lib for Processing</li>
<li><a href="http://www.imagemagick.org/" target="_blank">ImageMagick</a>, THE image processing tool for the command line</li>
<li><a href="http://potrace.sourceforge.net/" target="_blank">Potrace</a> for converting bitmaps to vector graphics</a>
<li>More <a target="_blank" href="http://www.flickr.com/photos/8123185@N02/sets/72157626802270972/">hi-res pictures</a> at Flickr</li>
<li>Sources, Arduino and Processing at <a target="_blank" href="https://github.com/tinkerlog/Kritzler">Github</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/B2SRTvYz20k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2011/09/02/der-kritzler/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>Audi Fan Messenger</title>
		<link>http://tinkerlog.com/2011/07/15/audi-fan-messenger/</link>
		<comments>http://tinkerlog.com/2011/07/15/audi-fan-messenger/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 18:38:25 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1411</guid>
		<description><![CDATA[
Almost a year ago Martin came to me and asked me, if would like to join him on a cool project. His idea was to put a LED POV into a real race car. Of course I wanted!
Concept
Every race event attracts a lot of fans. Martin&#8217;s idea was to integrate the fans into the race. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/b_img-16271.jpg"><img class="alignnone size-full wp-image-1517" title="Testing the Audi Fan Messenger" src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/s_img_1627a.jpg" alt="" width="480" height="286" /></a></p>
<p>Almost a year ago <a href="http://iamnifty.com/">Martin</a> came to me and asked me, if would like to join him on a cool project. His idea was to put a LED POV into a real race car. Of course I wanted!</p>
<h3>Concept</h3>
<p>Every race event attracts a lot of fans. Martin&#8217;s idea was to integrate the fans into the race. The race cars should carry fan messages around the track and print them into the night.<br />
The technique used for that is called <a href="http://en.wikipedia.org/wiki/Persistence_of_vision" target="_blank">POV</a> (Persistence of vision). It is somehow related to <a href="http://en.wikipedia.org/wiki/Light_painting" target="_blank">Light Painting</a>. For that you take a long exposure picture and move the LEDs through it. If the LEDs are switched on and off in the right pattern, it prints a readable message on the picture.</p>
<p><iframe src="http://player.vimeo.com/video/25982635?portrait=0" width="490" height="276" frameborder="0"></iframe></p>
<p><span id="more-1411"></span></p>
<h3>Hardware and Software</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/led_device031.jpg"><img class="alignnone size-full wp-image-1467" title="LED POV second prototype" src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/s_img-031.jpg" alt="" width="480" height="320" /></a></p>
<p>We did some <a href="http://tinkerlog.com/race-car-pov-howto/">prototyping</a> and testing and this is the final version. The module consists of an Arduino compatible microcontroller, LED driver chips and a GPS module. The GPS is used to track the speed of the car. The speed is needed to regulate the speed of switching the LEDs on and off. Otherwise the messages would get stretched or compressed.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/led_device02.jpg"><img class="alignnone size-full wp-image-1466" title="LED POV second prototype" src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/s_img-021.jpg" alt="" width="480" height="320" /></a></p>
<p>The LEDs are blue Piranha 4-pin LEDs (20mA @ 3.2V).</p>
<p>The software was pretty much straight forward as seen in other POV projects. New in this version is the use of the GPS. To have the messages in a pretty font, I developed a small Python script, that converts a bitmap with all characters into a header file, usable with a microcontroller.</p>
<h3>At the 24h of Nürburgring</h3>
<p>It took some time and efforts until we finally showed up at the 24h endurance race at the famous <a href="http://en.wikipedia.org/wiki/N%C3%BCrburgring" target="_blank">Green Hell, Nürburgring</a>. We were invited to install our modules into two Audi R8 LMS race cars of the Audi Race Experience team! Wohoo!</p>
<p>Very impressing to look behind the scenes at such an event. We programmed a couple fan messages in every module and installed the module in its car.</p>
<p>We then switched on the modules and the cars went on the track. We crossed our fingers.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/l_img-1736.jpg"><img class="alignnone size-full wp-image-1503" title="S'Gas ist rechts!!!!" src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/s_img-1736.jpg" alt="" width="480" height="320" /></a></p>
<p>And &#8230; it really worked! We got some very nice shots around the track.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/message02.jpg"><img class="alignnone size-full wp-image-1486" title="The winner takes it all" src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/07/s_message02a.jpg" alt="" width="480" height="321" /></a></p>
<p>To sum up, this was the most intriguing and challenging project I was part of until now. It was so big fun and I learned a lot.</p>
<p>Thanks so much, <a href="http://iamnifty.com/" target="_blank">Martin</a>, for letting me join this great project! Thanks also to <a href="http://kempertrautmann.com/" target="_blank">kempertrautman</a> and <a href="http://www.audi.de/de/brand/de/erlebniswelt/audi_driving_experience/audi_race_experience.html" target="_blank">Audi Race Experience Team</a> for making this possible.</p>
<p>Be sure to check out the <a href="http://tinkerlog.com/race-car-pov-howto">howto</a> and the <a href="http://www.flickr.com/photos/8123185@N02/sets/72157627152933704/" target="_blank">hi-res Flickr set</a> for more POV galore.</p>
<h3>Links</h3>
<ul>
<li><a href="http://tinkerlog.com/race-car-pov-howto/">Race Car POV Howto</a>. This is the detailed write-up of this project. Be sure to check it, if you are interested on how all works.</li>
<li><a href="http://www.facebook.com/media/set/?set=a.10150239906959591.337135.96814974590" target="_blank">Audi&#8217;s Facebook Gallery of the Fan Messenger</a></li>
<li><a href="http://www.audi.de/de/brand/de/erlebniswelt/audi_driving_experience/audi_race_experience.html" target="_blank">Audi Race Experience Team</a></li>
<li><a href="http://kempertrautmann.com/" target="_blank">kempertrautmann</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/DavsQnG9xXk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2011/07/15/audi-fan-messenger/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Soldering is Easy</title>
		<link>http://tinkerlog.com/2011/04/11/soldering-is-easy/</link>
		<comments>http://tinkerlog.com/2011/04/11/soldering-is-easy/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 16:10:00 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1404</guid>
		<description><![CDATA[
Soldering is easy. It realy is. If you are still in doubt, head over to mightyohm.com, where you can find a really nice comic on how to solder, done by my good friends Jeff Keyzer and Mitch Altman. 
Best of all, it&#8217;s totally open source!
Links

Soldering is easy as PDF

]]></description>
			<content:encoded><![CDATA[<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/04/soldering.png" alt="" title="soldering is easy" width="490" height="634" class="alignnone size-full wp-image-1405" /></p>
<p>Soldering is easy. It realy is. If you are still in doubt, head over to <a target="_blank" href="http://mightyohm.com/blog/2011/04/soldering-is-easy-comic-book/">mightyohm.com</a>, where you can find a really nice comic on how to solder, done by my good friends Jeff Keyzer and Mitch Altman. </p>
<p>Best of all, it&#8217;s totally open source!</p>
<h3>Links</h3>
<ul>
<li><a href="http://mightyohm.com/files/soldercomic/FullSolderComic_20110409.pdf">Soldering is easy</a> as PDF</li>
</ul>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/aDZhp932OkM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2011/04/11/soldering-is-easy/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Light Stencils</title>
		<link>http://tinkerlog.com/2011/03/06/light-stencils/</link>
		<comments>http://tinkerlog.com/2011/03/06/light-stencils/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 14:15:27 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[photo]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1364</guid>
		<description><![CDATA[
After reading about light stencils at DIY Photography I was sure I had to try that. In short, you use a flash to illuminate a printout while taking a long exposure picture.

Building
To build a light stencil I used:

a cardboard package (about 25 x 22 x 25 cm)
a sharp knife
aluminium foil
glue
black tape
a cheap flash (Unomat B [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0884.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0884.jpg" alt="" title="Light Stencil" width="480" height="320" class="alignnone size-full wp-image-1376" /></a></p>
<p>After reading about light stencils at <a target="_blank" href="http://www.diyphotography.net/use-light-stencils-to-create-amazing-light-paintings">DIY Photography</a> I was sure I had to try that. In short, you use a flash to illuminate a printout while taking a long exposure picture.</p>
<p><span id="more-1364"></span></p>
<h3>Building</h3>
<p>To build a light stencil I used:</p>
<ul>
<li>a cardboard package (about 25 x 22 x 25 cm)</li>
<li>a sharp knife</li>
<li>aluminium foil</li>
<li>glue</li>
<li>black tape</li>
<li>a cheap flash (<a target="_blank" href="http://www.amazon.de/Unomat-18-DIGI-Slave-Blitzger%C3%A4t/dp/B000CMNKDA">Unomat B 18 DIGI Slave, 9.99€</a>) with a test button</li>
</ul>
<p>Here are some pictures on how to build such a thing. </p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0782.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0782.jpg" alt="" title="Cut the package" width="480" height="321" class="alignnone size-full wp-image-1365" /></a></p>
<p>First cut off the edges so that the remaining will form a funnel.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0787.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0787.jpg" alt="" title="Cut the package" width="480" height="320" class="alignnone size-full wp-image-1366" /></a></p>
<p>Cut a window into one side. I have a frame of about 3 cm on each side but 1 cm at the bottom. You may want to go even lower on the bottom side, because otherwise your stencil will be always floating.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0791.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0791.jpg" alt="" title="Use tape to form a funnel" width="480" height="320" class="alignnone size-full wp-image-1367" /></a></p>
<p>Then use some tape to build the funnel. </p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0809.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0809.jpg" alt="" title="Use aluminium foil to coat the funnel" width="480" height="320" class="alignnone size-full wp-image-1368" /></a></p>
<p>Now glue aluminium foil into it to reflect the flash.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0928.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0928.jpg" alt="" title="A clear folder is used to contain the stencil" width="480" height="320" class="alignnone size-full wp-image-1379" /></a></p>
<p>I tried to build a kind of envelope out of a clear folder to be able to exchange the stencils easily. That kind of works.</p>
<h3>Testing</h3>
<p>Now, take your favorite super hero or what ever and open it in Gimp or Photoshop. Mask the background and fill it with black. Then print it twice. Use the best settings your printer has to offer. The more ink the better. Especially for the black areas. Align both printouts as perfect as possible and fix them with a bit of tape. Then insert the stencil into the envelope. If the stencil is not big enough, use some black cardboard to build a frame.</p>
<p>Next, setup the camera. Here is how I did it, but maybe there is an easier way. Put a well lit replacement at where you want see the stencil afterwards. Measure the distance with the camera auto focus, then switch to manual focus. Darken the room and check the exposure with you camera. Exposure time should be around 20 to 30 seconds. Use a tripod (of course) and a remote control, if available. Otherwise use the self timer. Put the flashlight into the funnel and turn it on. Now hit the shutter, then put the funnel at the right position, hit the flashlight test button and move out of the picture.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0818.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0818.jpg" alt="" title="Light stencil test" width="480" height="321" class="alignnone size-full wp-image-1369" /></a></p>
<p>This is one of my first test shots (ISO100, f5.6, 30s). Slightly lighten up with Lightroom.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0853.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0853.jpg" alt="" title="Light stencil" width="480" height="321" class="alignnone size-full wp-image-1373" /></a></p>
<p>Here is another one (ISO100, f5, 30s).</p>
<p>Yesterday I was out to test the light stencil in the wild. It was still very cold, slightly above 0°C. Setting things up was a bit difficult because it was dark (haha!). I used a flashlight to help me measure the distance. I think it would be much easier to do this in a twosome. Anyway, the first test was disappointing. It turns out that my city (Hamburg) is still really bright, even at night. The stencil was almost invisible on the first shots. I managed to compensate it a bit by using different angles and then over exposing them in Lightroom. </p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0875.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0875.jpg" alt="" title="Light Stencil" width="480" height="320" class="alignnone size-full wp-image-1374" /></a></p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0898.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0898.jpg" alt="" title="Light Stencil" width="480" height="320" class="alignnone size-full wp-image-1378" /></a></p>
<h3>Optimizing</h3>
<p>The problem is the ratio between ambient light and flash light. I could use a stronger flash next time, but that may also reveal the complete stencil because the stronger flash will most likely shine through the black regions of the stencil. Even now with the weak flash you can almost see the light stencil on some pictures. How to overcome that? Three printouts?</p>
<p>Another thing that I noticed is that sometimes the two printouts are not really close together. That may look like they are out of focus on the picture. I should glue them together, even the inside, not only at the edges.</p>
<p>Next time I would try to use standard format, say A4, for the printout and the envelope to make it easier to experiment with different stencils. Now it&#8217;s like print, glue, cut, insert, add a black patch here and so on.</p>
<p>After all it is fun to play with light stencils. The pictures you get are somewhat special.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/b_img-0882.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/03/s_img-0882.jpg" alt="" title="Light Stencil" width="480" height="320" class="alignnone size-full wp-image-1375" /></a></p>
<h3>Links</h3>
<ul>
<li><a target="_blank" href="http://www.flickr.com/photos/8123185@N02/sets/72157626207704964/">More hires pictures at Flickr</a></li>
<li><a href="http://www.diyphotography.net/use-light-stencils-to-create-amazing-light-paintings" target="_blank">Use Light Stencils To Create Amazing Light Paintings</a> at DIY Photography</li>
<li><a href="http://www.flickr.com/photos/trevor303/5349003073/" target="_blank">light stencil tutorial</a> done by Trevor Williams</li>
<li><a target="_blank" href="http://browse.deviantart.com/?qh=&#038;section=&#038;global=1&#038;q=light+stencil#/d1owzzu">Tutorial for light stencils</a> by truemarmelade</li>
</ul>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/pJzWftoot9U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2011/03/06/light-stencils/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Xeyes in Processing</title>
		<link>http://tinkerlog.com/2011/02/25/xeyes-in-processing/</link>
		<comments>http://tinkerlog.com/2011/02/25/xeyes-in-processing/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 11:22:42 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[processing]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1346</guid>
		<description><![CDATA[
 
Do you remember, when you first started your X and stared at Xeyes? Aaaah, those were the days.
I wanted to have Xeyes in Processing to have it as an example of some lines of code that could be easily integrated into an interactive demo or the like. So I thought, ok, that&#8217;s quite easy, [...]]]></description>
			<content:encoded><![CDATA[<p><script src="/wordpress/static/processing-1.0.0.js"></script><br />
<canvas data-processing-sources="/wordpress/static/xeyes.pde"></canvas> </p>
<p>Do you remember, when you first started your <a target="_blank" href="http://en.wikipedia.org/wiki/X386">X</a> and stared at <a target="_blank" href="http://en.wikipedia.org/wiki/Xeyes">Xeyes</a>? Aaaah, those were the days.</p>
<p>I wanted to have Xeyes in Processing to have it as an example of some lines of code that could be easily integrated into an interactive demo or the like. So I thought, ok, that&#8217;s quite easy, just draw a bunch or ellipses and circles. Turns out that it is not <i>that</i> easy.</p>
<p><span id="more-1346"></span></p>
<p>First you draw an eye, then a straight line from the middle of the eye to the current position of the mouse. Then draw a tiny circle at the intersection of the line with the ellipse. But how to find that intersection?</p>
<p>The solution is to equate the formula of the straight line with the formula of the ellipse. </p>
<pre>
  y = mx + c  // straight line
  x<sup>2</sup>/a<sup>2</sup> + y<sup>2</sup>/b<sup>2</sup> = 1 // ellipse
</pre>
<p>Now insert one formula into the other, and solve it for x and y. If you still know how to do that, great! I failed in a few attempts. And felt lazy. <a href="http://mathworld.wolfram.com/Ellipse-LineIntersection.html">Wolfram Alpha</a> to the rescue! </p>
<p>Using the Wolfram Alpha it was easy to get the right solution. See <a target="_blank" href="http://www.wolframalpha.com/input/?i=x^2%2fa^2+%2b+y^2%2fb^2+%3d+1+AND+y+%3d+mx+%2b+c&#038;s=21">here</a> and <a target="_blank" href="http://www.wolframalpha.com/input/?i=+{x^2%2F4^2+%2B+y^2%2F9^2+%3D+1+AND+y+%3D+0.5x}">here</a> for examples. Now just calculate the values for the intersection coordinates and handle some special cases (e.g. prevent division by zero).</p>
<p>Another example how to use math to solve real world problems <img src='http://tinkerlog.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><em>Updated</em> 26.02.2011 to the much easier version as proposed by cjameshuff.</p>
<pre name="code" class="c">
/**
 * xeyes in Processing
 */

int eyeDist = 60;
int eyeWidth = 70;
int eyeHeight = 100;

void setup() {
  size(450, 450);
  smooth();
  background(120, 120, 120);
}

void draw() {
  int eyeX = width / 2 - eyeDist;
  int eyeY = height / 2;
  translate(eyeX, eyeY);
  drawEye(eyeWidth, eyeHeight, mouseX - eyeX, mouseY - eyeY);
  translate(2 * eyeDist, 0);
  drawEye(eyeWidth, eyeHeight, mouseX-(eyeX+2*eyeDist), mouseY - eyeY);
}

void drawEye(int eyeWidth, int eyeHeight, int mx, int my) {
 // draw the eye
 fill(220, 220, 220);
 strokeWeight(10);
 ellipse(0, 0, eyeWidth+35, eyeHeight+35);

 float x2 = mx/((float)eyeWidth/eyeHeight);
 float t = max(1, sqrt(x2*x2 + my*my)/(eyeHeight/2));
 float sx = mx/t, sy = my/t;

 // draw the pupil
 strokeWeight(1);
 fill(0);
 ellipse(sx, sy, 20, 20);
}
</pre>
<h3>Links</h3>
<ul>
<li><a target="_blank" href="http://en.wikipedia.org/wiki/Xeyes">Xeyes</a></li>
<li><a target="_blank" href="http://www.wolframalpha.com/input/?i=+{x^2%2F4^2+%2B+y^2%2F9^2+%3D+1+AND+y+%3D+0.5x}">Wolfram Alpha Ellipse Line intersection</a></li>
<li><a target="_blank" href="http://processingjs.org/">Processing.js</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/BXIJ7WQV-JA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2011/02/25/xeyes-in-processing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Neoprene sleeve for a Galaxy Tab</title>
		<link>http://tinkerlog.com/2011/02/07/neoprene-sleeve-for-a-galaxy-tab/</link>
		<comments>http://tinkerlog.com/2011/02/07/neoprene-sleeve-for-a-galaxy-tab/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 09:40:18 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[craft]]></category>
		<category><![CDATA[neoprene]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1314</guid>
		<description><![CDATA[
Two years ago I posted about how to build a neoprene sleeve for a Macbook. This time it&#8217;s a sleeve for a Samsung Galaxy Tab. As last time, my mom did the work, I did the documenting  


We had some remains from the first project. This piece is a front part of a neoprene [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-.jpg" alt="" title="Sleeve for Galaxy Tab" width="480" height="320" class="alignnone size-full wp-image-1315" /></p>
<p>Two years ago I posted about how to build a <a href="http://tinkerlog.com/2008/02/03/neoprene-macbook-sleeve/">neoprene sleeve for a Macbook</a>. This time it&#8217;s a sleeve for a Samsung Galaxy Tab. As last time, my mom did the work, I did the documenting <img src='http://tinkerlog.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span id="more-1314"></span></p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-06211.jpg" alt="" title="Find a piece of neoprene" width="480" height="320" class="alignnone size-full wp-image-1316" /></p>
<p>We had some remains from the first project. This piece is a front part of a neoprene wetsuit. Cut out the biggest piece you can get. Then use chalk to mark the size. The size is about 15cm x 51.5cm. You may want to cut it a bigger as you think you need it.</p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-06251.jpg" alt="" title="Cut it" width="480" height="320" class="alignnone size-full wp-image-1317" /></p>
<p>Now cut it out.</p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-06281.jpg" alt="" title="Check the size" width="480" height="320" class="alignnone size-full wp-image-1318" /></p>
<p>Check, if the size still fits.</p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-06391.jpg" alt="" title="Sew it" width="480" height="320" class="alignnone size-full wp-image-1319" /></p>
<p>Now sew the envelope inside out. Then cut the overlapping neoprene as close to the seam as possible. Flip the envelope back to have the outside out.</p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-06481.jpg" alt="" title="First test" width="480" height="320" class="alignnone size-full wp-image-1320" /></p>
<p>Check if the tab fits. If its too loose, you can always sew another time to make it a bit tighter. Mine got a tiny bit too tight at the first try, so you have press it a bit.</p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-06501.jpg" alt="" title="Cut rings from the sleeve" width="480" height="320" class="alignnone size-full wp-image-1321" /></p>
<p>To keep the tongue in place, we decided to simply cut stripes from the sleeve.</p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-06521.jpg" alt="" title="Looks pretty good" width="480" height="320" class="alignnone size-full wp-image-1322" /></p>
<p>Ok, that looks great. Now just trim the tongue a bit to make it fit into the strap.</p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-0673.jpg" alt="" title="Sleeve for Samsung Galaxy Tab" width="480" height="320" class="alignnone size-full wp-image-1324" /></p>
<p>Here&#8217;s the finished sleeve.</p>
<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/02/s_img-06821.jpg" alt="" title="Sleeve for Samsung Galaxy Tab" width="480" height="321" class="alignnone size-full wp-image-1325" /></p>
<p>Ready to throw it into my bag. All together the project took only one hour. And for me the result is way cooler than any sleeve you can buy.</p>
<h3>Links</h3>
<ul>
<li><a href="http://www.flickr.com/photos/8123185@N02/sets/72157625995221534/">Flickr set with hires pictures</a></li>
<li><a href="http://tinkerlog.com/2008/02/03/neoprene-macbook-sleeve/">Neoprene Macbook sleeve</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/df5Nbk1V8r4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2011/02/07/neoprene-sleeve-for-a-galaxy-tab/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TweetsOfWaste in Weave</title>
		<link>http://tinkerlog.com/2011/01/23/tweetsofwaste-in-weave/</link>
		<comments>http://tinkerlog.com/2011/01/23/tweetsofwaste-in-weave/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 14:29:38 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[tweetsofwaste]]></category>
		<category><![CDATA[waeve]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1308</guid>
		<description><![CDATA[
A couple of months ago Martin came up with the idea to build a dustbin, that would take pictures of people using it and then send them to Twitter. We tried some different approaches and finally used an Arduino, a WiFly-shield and a c328 serial camera to build it. It worked really well and was [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2011/01/IMG_06091.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2011/01/IMG_0609.jpg" alt="" title="TweetsOfWaste article in Weave" width="480" height="320" class="alignnone size-full wp-image-1309" /></a></p>
<p>A couple of months ago <a href="http://iamnifty.com/">Martin</a> came up with the idea to build a dustbin, that would take pictures of people using it and then send them to Twitter. We tried some different approaches and finally used an Arduino, a WiFly-shield and a c328 serial camera to build it. It worked really well and was a lot of fun.<br />
What you see there on my desk is the current issue (2011/01) of <a href="http://www.weave.de">Weave</a>. Weave is a magazine that covers interactive design and such. We were asked to write an article on &#8220;internet of things&#8221; and now, there it is. It&#8217;s a tutorial on how to use Arduino with twitter and how to take pictures and upload them.</p>
<p>Here is a <a href="http://www.weave.de/code/muelltonne0111">teaser</a> of the article (in german).</p>
<p>I hope to find some time soon to document the project in a separate post. We&#8217;ll see. You can follow <a href="http://twitter.com/tweetsofwaste">@TweetsOfWaste</a> to see any updates of the project and the first couple of pictures.</p>
<img src="http://feeds.feedburner.com/~r/tinkerlog/~4/D57GD-sIFfE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2011/01/23/tweetsofwaste-in-weave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

