<?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>Tinkerlog &#187; Arduino</title>
	<atom:link href="http://tinkerlog.com/category/arduino/feed/" rel="self" type="application/rss+xml" />
	<link>http://tinkerlog.com</link>
	<description>Alex' blog</description>
	<lastBuildDate>Fri, 21 Oct 2011 06:16:54 +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>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>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2011/09/02/der-kritzler/feed/</wfw:commentRss>
		<slash:comments>41</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>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2011/01/23/tweetsofwaste-in-weave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Palo Altonale Workshop</title>
		<link>http://tinkerlog.com/2010/11/20/palo-altonale-workshop/</link>
		<comments>http://tinkerlog.com/2010/11/20/palo-altonale-workshop/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 12:17:11 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[palo altona]]></category>
		<category><![CDATA[palo altonale]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1301</guid>
		<description><![CDATA[
End of October, Marcus and I gave a two day workshop on sensors, Internet of Things and Arduino. It was for people who had small to no knowledge about electronics and programming, so not for the average geek. The aim was to show how easy it is to build things that interact with the physical [...]]]></description>
			<content:encoded><![CDATA[<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/zVT5Lrirypg?fs=1&amp;hl=de_DE"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zVT5Lrirypg?fs=1&amp;hl=de_DE" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>End of October, <a target="_blank" href="http://www.interactive-matter.org/">Marcus</a> and I gave a two day workshop on sensors, Internet of Things and Arduino. It was for people who had small to no knowledge about electronics and programming, so not for the average geek. The aim was to show how easy it is to build things that interact with the physical world. It was hosted at the <a href="http://www.good-school.de/">Good School</a>.</p>
<p>First day was training. With small examples on sensors and outputs we saw how easy it is, to collect real world data and act upon them. After that we connected the Arduino with a WiFly-Shield to the interwebs. At the end of the day all had an Arduino running, that did a search on twitter and if someone tweeted your name, an LED light up. Not bad for the first day.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/mdzkVZBjUXM?fs=1&amp;hl=de_DE"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/mdzkVZBjUXM?fs=1&amp;hl=de_DE" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>Second day was free tinkering. Everyone could come up with ideas for projects. We gave some guidance of would could be achieved until the end of the day and what not. Then all started on developing their projects. Marcus and I had a lot to do in answering questions and giving hints into the right direction. At the end their was a presentation where all proudly presented their project. And they were really great. All teams came up with something that really worked, none failed. What a success.</p>
<p>That was a fantastic experience, having so many people together, tinkering and having fun. All of them were really engaged and fully committed to their projects. I took a couple of pictures, and guess what, all people you see on these pictures are smiling and enjoying what they are doing.</p>
<p><a target="_blank" href="http://www.flickr.com/photos/8123185@N02/sets/72157625304642379/">Pictures at Flickr.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2010/11/20/palo-altonale-workshop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TwitBalloon</title>
		<link>http://tinkerlog.com/2010/09/13/twitballoon/</link>
		<comments>http://tinkerlog.com/2010/09/13/twitballoon/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 16:00:05 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ambient devices]]></category>
		<category><![CDATA[internet of things]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1264</guid>
		<description><![CDATA[
Last weekend, Marcus of interactive-matter and I, gave a small introduction into internet of things and ambient devices at the Good School. The idea was to have two devices that show the current volume of two terms on twitter, e.g. love against hate. The demo should show how easy it is to connect the physical [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://player.vimeo.com/video/14812459?portrait=0" width="490" height="276" frameborder="0"></iframe></p>
<p>Last weekend, Marcus of <a target="_blank" href="http://interactive-matter.org/">interactive-matter</a> and I, gave a small introduction into internet of things and ambient devices at the <a target="_blank" href="http://www.good-school.de/">Good School</a>. The idea was to have two devices that show the current volume of two terms on twitter, e.g. <em>love</em> against <em>hate</em>. The demo should show how easy it is to connect the physical world to the internets. Marcus did the software part, so if you are interested in that, visit <a target="_blank" href="http://interactive-matter.org/2010/09/twitballoon-a-twitter-trend-visualizer">interactive-matter</a>. I did the hardware part, if you want see that, just read on.</p>
<p><span id="more-1264"></span></p>
<h3>Parts</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/l_DSC_0126.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/DSC_0126.jpg" alt="TwitBalloon" title="TwitBalloon" width="480" height="333" class="alignnone size-full wp-image-1277" /></a></p>
<p>So what is needed to build something like that? </p>
<ul>
<li>Arduino Board with ATmega328</li>
<li>Ethernet Shield</li>
<li>Breadboard</li>
<li>RC Servo</li>
<li>Cardboard</li>
<li>Hot glue (a lot)</li>
<li>Photoresistor, LED and two resistors, 10 kOhm and 100 Ohm</li>
<li>Protoboard, small</li>
</ul>
<h3>Build it</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/l_DSC_0089.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/DSC_0089.jpg" alt="Servo with continuous rotation hack" title="Servo with continuous rotation hack" width="480" height="322" class="alignnone size-full wp-image-1273" /></a></p>
<p>First you have to <em>hack</em> your servo for continuous rotation. A standard servo rotates only from 0 to 180 degrees. You have to <em>hack</em> it so that it rotates continuously forward and backwards. There are many different servos out there and as many <a target="_blank" href="http://www.flickr.com/photos/ricardo_ferreira/sets/72157594337418576/">instructions</a> how to do that. Just use google. For me it was enough to separate the potentiometer from the servo arm. Important is, that you can still control it like a servo afterwards. That means you still have the red (+), brown (-) and orange (pulse) cable to control the servo. You should also write a small Arduino sketch to check where the motor stands still.   </p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/l_DSC_0087.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/DSC_0087.jpg" alt="Servo with continuous rotation hack" title="Servo with continuous rotation hack" width="480" height="333" class="alignnone size-full wp-image-1272" /></a></p>
<p>Now cut a servo holder out of the cardboard and glue the servo onto it. </p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/l_DSC_0091.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/DSC_0091.jpg" alt="" title="Mount it on a basement" width="480" height="322" class="alignnone size-full wp-image-1274" /></a></p>
<p>Glue the holder to some cardboard as basement. Then build a barrel out of coasters and cardboard tube. Cut small holes in one of the coaster. These holes are part of the light barrier to count the rotations. I cut only two holes. Less precision and less work.</p>
<p>Then glue the barrel on the servo. </p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/l_DSC_0094.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/DSC_0094.jpg" alt="TwitBalloon Light barrier" title="TwitBalloon Light barrier" width="480" height="332" class="alignnone size-full wp-image-1288" /></a></p>
<p>Next we need the light barrier. It consists of a light dependent resistor (LDR) or photoresistor and a LED. Both need a an additional resistor in series. The one for the LED is for limiting the current. It is around 100-200 Ohm, depending on your LED. The other one is to form a voltage divider with the LDR. My LDR has a resistance between 2 k and 50 kOhm. I chose 10 kOhm. The connect the voltage divider to an analog port of the Arduino. Place the light barrier beneath the barrel, so that the LED shines through the holes onto the LDR. </p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/l_DSC_0102.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/DSC_0102.jpg" alt="Mount the barrel" title="Mount the barrel" width="480" height="322" class="alignnone size-full wp-image-1275" /></a></p>
<p>Next, I wrote a small sketch to test the light barrier. It made the servo turn and tried to detect the light flashes of the light barrier. And it worked! </p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/l_DSC_0111.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/DSC_0111.jpg" alt="TwitBalloon" title="TwitBalloon" width="480" height="333" class="alignnone size-full wp-image-1276" /></a></p>
<p>After integrating the software part with Marcus, this is how it looked at our tiny booth.</p>
<h3>Conclusion</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/l_DSC_0110.jpg"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/09/DSC_0110.jpg" alt="TwitBalloon" title="TwitBalloon" width="480" height="333" class="alignnone size-full wp-image-1278" /></a></p>
<p>After all it worked very well and showed, what we wanted to show. </p>
<p><strong>Connecting things to the internet is easy.</strong> </p>
<p>Although, there is always room for improvements. After a couple of hours, one of the servo motors began to turn, even if it shouldn&#8217;t. And as there is no longer any direct feedback, only through the light barrier, it turned half, noticed that and turned back. I had to re-run the test sketch to find the new settings for it&#8217;s zero point. Next time, I would use a) stepper motors or b) a better light barrier, which could detect rotation direction and more holes.   </p>
<h3>Links</h3>
<ul>
<li>See the TwitBalloon software part at <a target="_blank" href="http://interactive-matter.org/2010/09/twitballoon-a-twitter-trend-visualizer">interactive-matter</a>.</li>
<li><a target="_blank" href="http://www.good-school.de/">Good School</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2010/09/13/twitballoon/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mega328 Header Kit</title>
		<link>http://tinkerlog.com/2010/03/11/mega328-header-kit/</link>
		<comments>http://tinkerlog.com/2010/03/11/mega328-header-kit/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 14:51:40 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[avr]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=1059</guid>
		<description><![CDATA[
It took a while since I first posted about the new ATmega header board but finally, here it is.
The board is great for prototyping on a solderless breadboard. It is compatible with the common 28-pin AVR controllers like ATmega48, ATmega88, ATmega168 and ATmega328. On plus it is Arduino compatible.
Some of the features:

Space efficient, occupies only [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/l_IMGP0033.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/s_IMGP0033.JPG" alt="Blinky Mega328 Header Board" title="Blinky Mega328 Header Board" width="480" height="301" class="alignnone size-full wp-image-1032" /></a></p>
<p>It took a while since I first <a href="http://tinkerlog.com/2009/05/23/atmega-breadboard-header/">posted</a> about the new ATmega header board but finally, here it is.</p>
<p>The board is great for prototyping on a solderless breadboard. It is compatible with the common 28-pin AVR controllers like ATmega48, ATmega88, ATmega168 and ATmega328. On plus it is Arduino compatible.</p>
<p>Some of the features:</p>
<ul>
<li>Space efficient, occupies only on more row than the controller itself</li>
<li>Has no voltage regulator on board, so you choose, at which voltage you want to run it</li>
<li>It has SMD resistors and LEDs (size 1206) to make it a great starting point to learn how to hand solder SMD</li>
<li>Has a sticker to tell which pin is what. <a target="_blank" href="http://todbot.com/blog/2009/05/23/arduino-chip-sticker-label/">Thanks Tod!</a></li>
<li>Blinks blue!</li>
</ul>
<p>Check out the detailed <a href="http://tinkerlog.com/howto/mega328-header/">howto page</a> and grab a <a href="http://store.tinkerlog.com/store/index.php?main_page=product_info&#038;cPath=3&#038;products_id=11">kit at the shop</a>, if you like.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2010/03/11/mega328-header-kit/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Remote Accelerometer</title>
		<link>http://tinkerlog.com/2010/02/07/remote-accelerometer/</link>
		<comments>http://tinkerlog.com/2010/02/07/remote-accelerometer/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 15:44:21 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[ADXL335]]></category>
		<category><![CDATA[RFM12B]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=915</guid>
		<description><![CDATA[
What is a remote accelerometer? It&#8217;s a tiny device that has a three axis accelerometer and transmit the acceleration values to a remote host. And what is it good for? There are various uses for it. One is you attach the sensor to someone and let him jump around. On your remote machine you can [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/l_DSC_0080.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/s_DSC_0080.JPG" alt="ADXL335 + ATmega328 + RFM12B" title="ADXL335 + ATmega328 + RFM12B" width="480" height="300" class="alignnone size-full wp-image-925" /></a></p>
<p>What is a remote accelerometer? It&#8217;s a tiny device that has a three axis accelerometer and transmit the acceleration values to a remote host. And what is it good for? There are various uses for it. One is you attach the sensor to someone and let him jump around. On your remote machine you can use the data to produce sound or modify music. Think of it as a simplified Wiimote.</p>
<p><span id="more-915"></span></p>
<p>Last year Jan of <a href="http://electronicperformers.org/">electronicperformers.org</a> came to me with the idea to make the jumping of people on a trampoline audible. We thought about it and it seemed to be easy. I tinkered with some <a target="_blank" href="http://www.digi.com/products/wireless/point-multipoint/xbee-series1-module.jsp">XBees</a> and <a target="_blank" href="http://www.analog.com/en/sensors/inertial-sensors/adxl335/products/product.html">ADXL</a> acceleration sensors. They worked quite ok, but we had some trouble with the transmission, which sometimes just stopped for a couple of seconds. Maybe some kind of resetting, I really don&#8217;t know. Here is a video of the installation.</p>
<p><object style="height: 344px; width: 425px"><param name="movie" value="http://www.youtube.com/v/jP24ht-JSfw"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/jP24ht-JSfw" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></object></p>
<p>After that I thought, nice, but can&#8217;t we get it smaller and cheaper? So I sat down and designed a tiny custom PCB.</p>
<h3>Features</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/l_adxl_rfm12.png"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/s_adxl_rfm12.png" alt="ADXL335 + ATmega328 + RFM12B (Schematic)" title="ADXL335 + ATmega328 + RFM12B (Schematic)" width="480" height="330" class="alignnone size-full wp-image-937" /></a></p>
<p>I had already two <a target="_blank" href="http://news.jeelabs.org/docs/jn3.html">JeeNodes</a> laying around. These boards are using a RFM12B transceiver board to communicate with each other. So I decided to use the RFM12B as XBee replacement. They are really cheap, around 3 to 4 Euros.<br />
The device should be Arduino compatible. Mostly because of the ease of development and available libraries.</p>
<ul>
<li><a target="_blank" href="http://www.atmel.com/dyn/products/product_card.asp?PN=ATmega328P">ATmega328P</a>, Arduino compatible microcontroller, running at 8 MHz</li>
<li><a target="_blank" href="http://www.analog.com/en/sensors/inertial-sensors/adxl335/products/product.html">ADXL335</a>, 3 axis accelerometer, +/- 3g</li>
<li><a target="_blank" href="http://www.hoperf.com/rf_fsk/rf_transceiver.htm">RFM12B</a> radio transceiver, 868 MHz, range of up to 100 meters</li>
<li><a target="_blank" href="http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&#038;name=MCP1702T-3302E/CBCT-ND">MCP1702</a> linear, low-drop voltage regulator for 3.3 V, 250 mA</li>
<li>powered by a 3.7 V lipo cell, 100-300 mA</li>
<li>6 pin ISP header for programming the bootloader</li>
<li>6 pin serial header to attach an FTDI-cable</li>
<li>voltage sensor to tell when the battery goes low</li>
</ul>
<h3>Assembly</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/l_DSC_0067.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/s_DSC_0067.JPG" alt="ADXL335 + ATmega328 + RFM12B" title="ADXL335 + ATmega328 + RFM12B" width="480" height="301" class="alignnone size-full wp-image-928" /></a></p>
<p>This is my second try on SMD. Resistors and capacitors are sized 0805. The controller is TQFP and the ADXL335 is LFCSP. LFCSP has not even pins you can hand solder. A very tiny package. As I had no stencil to place the solder paste (because I still have no laser cutter) I had to place the paste by hand. Pressing hard on the syringe and trying to work precisely at the same time is not that easy. After placing a tiny bubble of paste on every pad and gently placing all components, I heated up my hot-air rework station. Soldering with the hot-air station was easy. Not all components are well aligned, maybe because I used not enough solder paste. Often mis-aligned parts slide into place as soon as the paste gets liquid.<br />
Next were the headers, battery connector and the RFM12B module. These were soldered traditionally with an iron.   </p>
<p>Here is a picture of the back with the RFM12B module. The red wire is the antenna.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/l_DSC_0070.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/s_DSC_0070.JPG" alt="ADXL335 + ATmega328 + RFM12B (backside)" title="ADXL335 + ATmega328 + RFM12B (backside)" width="480" height="300" class="alignnone size-full wp-image-927" /></a></p>
<h3>Software</h3>
<p>After having the thing assembled it&#8217;s time to test it out. First is to program the Arduino bootloader. For that you need an ISP programmer. I used the <a target="_blank" href="http://www.adafruit.com/index.php?main_page=product_info&#038;products_id=46">USBtinyISP</a> from adafruit. Simply select the target (Arduino Pro Mini @ 8 MHz w/ ATmega328), programmer and the port in the Arduino IDE and select &#8220;burn bootloader&#8221;. Worked on the first try.<br />
Next is a blink sketch to check if the serial connection and the LED works. It turns out that I used too little solder paste on the controller. After resoldering that pin the LED worked.<br />
Next sketch was to check if the ADXL works correctly, which it did. All three axis seem to work great.<br />
After that I had to get the transceiver working. I took the RFM12 lib from <a target="_blank" href="http://news.jeelabs.org/code/">Jee Labs</a>. You have to download the Ports lib as well to get it running. First I uploaded the RF12demo sketch, which allows to setup the RFM12 module and store the configuration in EEPROM. The module was recognized and configured with no problem at all.</p>
<p>Time to develop the actual firmware. Here is the sketch for the sensor.</p>
<pre name="code" class="c">
// RF12B ADXL sensor
// config D i4 g212 @ 868 MHz

#include "Ports.h"
#include "RF12.h"

int xPin = 0;
int yPin = 1;
int zPin = 2;
int ledPin = 5;
byte buf[6];

void setup() {
  rf12_config();
  pinMode(ledPin, OUTPUT);
}

int x, y, z;
unsigned long time;
byte ledOn;

void loop() {
  rf12_recvDone();
  if (rf12_canSend()) {
    x = analogRead(xPin);
    y = analogRead(yPin);
    z = analogRead(zPin);
    buf[0] = x >> 8;
    buf[1] = x;
    buf[2] = y >> 8;
    buf[3] = y;
    buf[4] = z >> 8;
    buf[5] = z;
    rf12_sendStart(0, buf, 6);
  }
  if (time < millis()) {
    time = millis() + 200;
    if (ledOn) {
      digitalWrite(ledPin, HIGH);
    }
    else {
      digitalWrite(ledPin, LOW);
    }
    ledOn = !ledOn;
  }
}
</pre>
<p>It's really easy. You have to call the rfm12_recvDone() to make sure the driver is still working. You have to call it, even if you are not trying to receive anything. If rfm12_canSend() returns true, we can transmit our data. We read the 3 axis acceleration and pack it into a byte array. This byte array is then transmitted. No more, no less. No acknowledge, nothing. </p>
<p>The receiver part looks almost the same, it receives the data and prints it on the serial port. From here on, you can do almost anything: Processing, Pure Data, Python, what ever fits best. You only have to be able to read a serial port.</p>
<h3>Demo</h3>
<p><object width="490" height="276"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=9270103&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=9270103&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="490" height="276"></embed></object></p>
<p>For the demo I used Processing to draw a graph of every acceleration value. The red one is a bit hard to see in the video. Then I used Python with <a target="_blank" href="http://www.pyglet.org/">pyglet</a> to play short wave sounds.</p>
<h3>Outlook</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/l_DSC_0077.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/s_DSC_0077.JPG" alt="3 generations of remote accelerometers" title="3 generations of remote accelerometers" width="480" height="299" class="alignnone size-full wp-image-930" /></a></p>
<p>The picture above shows three generations of this device. On the left is the first implementation, using an XBee and an ADXL335, both on breakout boards, wired on a prototyping board. In the middle is the first custom PCB. As you can see, there are two air wires. That happens, when you get distracted while designing a PCB. On the right is the current version.</p>
<p>For the next design I would include an ON/OFF switch so you don't have to pull off the battery all the time. And maybe add a small tactile button to make more Wii-like projects possible.</p>
<h3>Downloads and Links</h3>
<ul>
<li>Eagle files and Arduino sketches, <a href='http://tinkerlog.com/wordpress/wp-content/uploads/2010/02/remote_accell.zip'>remote_accell.zip</a></li>
<li><a target="_blank" href="http://news.jeelabs.org/code/">RFM12 lib</a> at Jee Labs, great stuff!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2010/02/07/remote-accelerometer/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Palo Altona &#8211; Tinker drinkup in Hamburg</title>
		<link>http://tinkerlog.com/2010/01/15/palo-altona-tinker-drinkup-in-hamburg/</link>
		<comments>http://tinkerlog.com/2010/01/15/palo-altona-tinker-drinkup-in-hamburg/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 10:16:30 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[palo altona]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=905</guid>
		<description><![CDATA[
If you&#8217;ve missed Marcus post, here is another on the same topic.
Nearly every other Thursday Marcus and I are hanging out together for having a beer and chatting about all things geek, especially electronics, CNC, 3D-printing, micrcontroller and Arduino. But there&#8217;s no limit, everyone interested in tinkering and making is welcome. It takes place at [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2010/01/tinker-drinkup.jpg" alt="tinker-drinkup" title="Tinker drinkup - Michael and me - with blinking stuff on the table" width="500" height="281" class="alignnone size-full wp-image-906" /></p>
<p>If you&#8217;ve missed <a target="_blank" href="http://interactive-matter.org/2010/01/palo-altona-%e2%80%93-hamburg-tinker-drinkup/">Marcus post</a>, here is another on the same topic.</p>
<p>Nearly every other Thursday Marcus and I are hanging out together for having a beer and chatting about all things geek, especially electronics, CNC, 3D-printing, micrcontroller and Arduino. But there&#8217;s no limit, everyone interested in tinkering and making is welcome. It takes place at <a target="_blank" href="http://www.qype.co.uk/place/5426-Saal-II-Hamburg">Saal II</a> in Schanze. Try us, we&#8217;re kind <img src='http://tinkerlog.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>You can take a look at <a target="_blank" href="http://twitter.com/interactmatter">Marcus&#8217;</a> or <a target="_blank" href="http://twitter.com/9600baud">mine</a> twitterfeed to checkout when the next <a target="_blank" href="http://twitter.com/#search?q=%23palo_altona">#palo_altona</a> will be.</p>
<p>We already had guests sometimes but yesterday&#8217;s drinkup was great as we had <strong>two</strong> new guests. Feels as if there is something moving in Hamburg. Yeah!</p>
<p><b>Update 2010/02/16:</b> Palo Altona is now scheduled biweekly. Every Thursday was a bit stressing for everybody.</p>
<p><b>Update 2010/03/20:</b> Palo Altona has now a <a href="http://paloaltona.posterous.com/">Posterous page</a> for news and schedule.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2010/01/15/palo-altona-tinker-drinkup-in-hamburg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A retro twitter wall (twypper)</title>
		<link>http://tinkerlog.com/2009/11/20/a-retro-twitter-wall-twypper/</link>
		<comments>http://tinkerlog.com/2009/11/20/a-retro-twitter-wall-twypper/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 18:12:57 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=822</guid>
		<description><![CDATA[
A couple of weeks ago Jan came to me and asked me if I could build a special kind of twitter wall. At our company CoreMedia we do an Open Space every 3 months or so. This time we had a Hacking Day as well, so we needed something special. After throwing some ideas around, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/l_DSC_0420.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/s_DSC_0420.JPG" alt="Arduino with typewriter" title="Arduino with typewriter" width="480" height="343" class="alignnone size-full wp-image-844" /></a></p>
<p>A couple of weeks ago <a target="_blank" href="http://twitter.com/jtietjen">Jan</a> came to me and asked me if I could build a special kind of twitter wall. At our company <a target="_blank" href="http://www.coremedia.com">CoreMedia</a> we do an <a target="_blank" href="http://en.wikipedia.org/wiki/Open_Space_Technology">Open Space</a> every 3 months or so. This time we had a <a target="_blank" href="https://blog.coremedia.com/cm/post/3077033/RE_SocializeCoreMedia_OpenSpace_am_13_November_2009.html#4634397">Hacking Day</a> as well, so we needed something special. After throwing some ideas around, we came up with a twitter client that should print out tweets with an electric typewriter. A short google showed, that that has been done already (of course!). See it at <a target="_blank" href="http://oomlout.co.uk/?p=79">oomlout</a>.</p>
<p>But that couldn&#8217;t stop us. Jan scanned ebay for a nice electric typewriter and found a Commodore SQ 1000. It was in really good condition, probably rarely used. It worked as advertised.</p>
<p><span id="more-822"></span></p>
<h3>Take it apart</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/l_DSC_0320.JPG"><img class="alignnone size-full wp-image-828" title="Take it apart" src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/s_DSC_0320.JPG" alt="Take it apart" width="480" height="322" /></a></p>
<p>First step is to take it apart. That reveals a small PCB and the connections of the keyboard. Later I realized that I hadn&#8217;t to open up the keyboard itself, because there is nothing of interest in there. It is a simple keyboard matrix.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/l_DSC_0319.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/s_DSC_0319.JPG" alt="SQ 1000 Mainboard" title="Commodore SQ 1000 Mainboard" width="480" height="344" class="alignnone size-full wp-image-830" /></a></p>
<p>The big chip on the right is a SEC microcontroller. The smaller chips should be there for driving the barrel etc. but I haven&#8217;t investigated that. The green foil in the middle is the connection to the keyboard. Actually there are two connections, each with 8 lines, one for the rows, one for the columns to form a matrix.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/l_DSC_0325.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/s_DSC_0325.JPG" alt="Solder some hook wires" title="Solder some hook wires" width="480" height="343" class="alignnone size-full wp-image-829" /></a></p>
<p>I decided, that the easiest way to simulate key presses was by shorting the switch of the desired key. I soldered two 8 line cables to the solder joints on the bottom side of the PCB. Actually there were 12 lines on one of the connectors, but 4 of these lines are used to drive LEDs for caps lock and power. </p>
<h3>How does it work</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/l_DSC_0328.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/s_DSC_0328.JPG" alt="Analyze the keyboard" title="Analyze the keyboard" width="480" height="322" class="alignnone size-full wp-image-827" /></a></p>
<p>Putting everything back in to place I tried to understand, how the keyboard matrix works. Very helpful was <a target="_blank" href="http://www.avr-asm-tutorial.net/avr_en/keypad/keyboard.html">this tutorial</a>, that connects a keypad to an AVR. </p>
<p>All 16 lines are directly connected to the controller, no external pull-up or pull-down resistors. As already said, the 16 lines are arranged to form a 8 by 8 matrix, giving 64 possible key codes. 8 lines are supplying 5V (called out) and the other 8 lines are low (called in).  The controller then cycles through all out lines, pulling it down, one at a time. Then it checks if one of the in lines is pulled to low to identify the pressed key.<br />
To simulate the key press I have to wait for low on a specific out line and then pull one of the in lines low. I used my oscilloscope to see what&#8217;s really going on. It turns out that the controller scans for key strokes with 87 Hz. Every line is low for about 150 us. I used the Arduino to record the sequence and calculate how wide the low phase is. When I would find a low on line 1 of the out line, I could use it as trigger and compute when the other lines would be pulled down. That way I would only use a single wire (and Arduino input) to detect the out line.<br />
To set a specific in line to low I am using a 74HC595, a shift register with tristate output. The tristate is nice, because if it is disabled, the keyboard is fully functional as if the Arduino is not connected at all.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/l_DSC_0421.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/s_DSC_0421.JPG" alt="Arduino interfaced with Commodore SQ1000" title="Arduino interfaced with Commodore SQ1000" width="480" height="344" class="alignnone size-full wp-image-838" /></a></p>
<p>Here is everything connected on a breadboard. On the left is a standard Arduino with an Ethernet Shield.</p>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/l_DSC_0423.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/s_DSC_0423.JPG" alt="Arduino, Ethernetshield and a shift register 74HC595" title="Arduino, Ethernetshield and a shift register 74HC595" width="480" height="343" class="alignnone size-full wp-image-836" /></a></p>
<p>On the right is the shift register. In the middle is a pull up resistor connected to line 1 of the out lines. That is used to be able to &#8220;see&#8221;, when the line goes down.</p>
<h3>Reading twitter</h3>
<p>The software part to connect to twitter is straight forward. I used the <a target="_blank" href="http://apiwiki.twitter.com/Twitter-Search-API-Method%3A-search">twitter search API</a> to pull tweets that contained the word #cos09, which was the hashtag used at the CoreMedia Open Space. The query is executed every 60 seconds and the query string looks like this:<br />
<code></p>
<p>http://search.twitter.com/search.json?q=cos09&#038;since_id=0</p>
<p></code><br />
Parsing the json formatted response is a bit ugly, mostly because memory is very limited on the ATmega168. After fetching and parsing a complete response, the max_id is stored and used for the next query. That way only new tweets are printed. </p>
<h3>Demo</h3>
<p><object width="490" height="276"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7645230&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7645230&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="490" height="276"></embed></object></p>
<p>So far everything worked well, except the hash sign (#), the @ and &#8230; umlauts (*sigh*). The hash sign is not available because it only accessible by pressing the code key simultaneously, which is not possible with the current setup. The @ is not available at all, I simulate it by the sequence O-backspace-a. Umlauts are missing because &#8230; I&#8217;m lazy. </p>
<h3>Final twitter wall setup</h3>
<p><a href="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/l_DSC_0013.JPG"><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/s_DSC_0013.JPG" alt="Final setup at CoreMedia Open Space" title="Final setup with camera and projector" width="480" height="343" class="alignnone size-full wp-image-837" /></a></p>
<p>This is the setup as twitter wall. On the right is a video camera, recording incoming tweets and displaying them via a projector on the wall. The notebook is only bridging WiFi to Ethernet.</p>
<p>After all, the retro twitter wall was fairly successful. People stood around with a smile, tweeting with their iPhone, waiting for an intense &#8220;rattatatat rattatat &#8230;&#8221;.</p>
<p><object style="height: 344px; width: 425px"><param name="movie" value="http://www.youtube.com/v/CV9_25N21eM"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/CV9_25N21eM" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></object></p>
<p>Here is another action shot, taken by <a href="http://www.jormason.com/wordpress/?p=409">Jörn</a>.</p>
<h3>Links and Downloads</h3>
<ul>
<li>Source: <a href='http://tinkerlog.com/wordpress/wp-content/uploads/2009/11/twypper.zip'>twypper.zip</a></li>
<li><a href="http://oomlout.co.uk/?p=79">Twitter Monitoring Typewriter at oomlout</a></li>
<li><a target="_blank" href="http://www.avr-asm-tutorial.net/avr_en/keypad/keyboard.html">Connecting a keypad to an AVR</a></li>
<li><a target="_blank" href="http://www.dribin.org/dave/keyboard/one_html/">Keyboard Matrix Help</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2009/11/20/a-retro-twitter-wall-twypper/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Arduino introduction in c&#8217;t</title>
		<link>http://tinkerlog.com/2009/07/21/arduino-introduction-in-ct/</link>
		<comments>http://tinkerlog.com/2009/07/21/arduino-introduction-in-ct/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 22:55:50 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=773</guid>
		<description><![CDATA[
Here is my very first article. It is published in c&#8217;t, one of the best known computer magazines in Germany. wOOt!
It shows some basic Arduino examples and how to build a Wiimote-like controller. The controller consists of an 3-axis accelerometer, a push button and an Arduino nano on a breadboard. This combination is used to [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/07/dsc_0037.jpg" alt="" title="c&#039;t Arduino article " width="480" height="322" class="alignnone size-full wp-image-774" /></p>
<p>Here is my very first article. It is published in <a target="_blank" href="http://www.heise.de/ct/inhalt/2009/16/164/">c&#8217;t</a>, one of the best known computer magazines in Germany. wOOt!</p>
<p>It shows some basic <a target="_blank" href="http://arduino.cc">Arduino</a> examples and how to build a Wiimote-like controller. The controller consists of an 3-axis accelerometer, a push button and an Arduino nano on a breadboard. This combination is used to control a Lunar Lander type of game, programmed in <a target="_blank" href="http://processing.org/">Processing</a>.</p>
<ul>
<li>c&#8217;t article <a target="_blank" href="http://www.heise.de/ct/Mikrocontroller-Programmierung-mit-Arduino--/artikel/142053">Shake, rattle &#8216;n&#8217; roll, as full text</a></li>
<li><a target="_blank" href="http://www.heise.de/ct/projekte/machmit/processing/wiki">wiki</a> with more images, links and downloads</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2009/07/21/arduino-introduction-in-ct/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Microcontroller cheat sheet</title>
		<link>http://tinkerlog.com/2009/06/18/microcontroller-cheat-sheet/</link>
		<comments>http://tinkerlog.com/2009/06/18/microcontroller-cheat-sheet/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 10:54:35 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[avr]]></category>

		<guid isPermaLink="false">http://tinkerlog.com/?p=752</guid>
		<description><![CDATA[
Often, when I am tinkering with a controller on a breadboard, I have to open up the according datasheet, only to look up the pinout. So I designed a simple page with all of of the pinouts that I use most. It has:

8-pin AVRs, ATtiny25/ATtiny45/ATtiny85
20-pin AVR, ATtiny2313
28-pin AVRs, ATmega48/ATmega88/ATmega168/ATmega328
Arduino to ATmega mapping
ISP header, 6-pin and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://tinkerlog.com/wordpress/wp-content/uploads/2009/06/micro-cheat-sheet.png" alt="" title="Microcontroller cheat sheet" width="470" height="578" class="alignnone size-full wp-image-755" /></p>
<p>Often, when I am tinkering with a controller on a breadboard, I have to open up the according datasheet, only to look up the pinout. So I designed a simple page with all of of the pinouts that I use most. It has:</p>
<ul>
<li>8-pin AVRs, ATtiny25/ATtiny45/ATtiny85</li>
<li>20-pin AVR, ATtiny2313</li>
<li>28-pin AVRs, ATmega48/ATmega88/ATmega168/ATmega328</li>
<li>Arduino to ATmega mapping</li>
<li>ISP header, 6-pin and 10-pin</li>
<li>FTDI-cable</li>
</ul>
<p>Maybe it&#8217;s helpful for others as well. You can download it as:</p>
<ul>
<li><a href='http://tinkerlog.com/wordpress/wp-content/uploads/2009/06/micro-cheat-sheet.pdf'>micro-cheat-sheet.pdf</a></li>
<li><a href='http://tinkerlog.com/wordpress/wp-content/uploads/2009/06/micro-cheat-sheet.svg'>micro-cheat-sheet.svg</a></li>
</ul>
<p>If you like it, you will also like the Tod&#8217;s cool <a target="_blank" href="http://todbot.com/blog/2009/05/23/arduino-chip-sticker-label/">Arduino chip sticker</a>.</p>
<h3>Update 2010/01/24</h3>
<p>The new version includes the pinout of the Bus Pirate. Thanks Philipp for the update.</p>
]]></content:encoded>
			<wfw:commentRss>http://tinkerlog.com/2009/06/18/microcontroller-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

