<?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>Interactive Matter &#187; Tinkering</title>
	<atom:link href="http://interactive-matter.eu/category/tinkering/feed/" rel="self" type="application/rss+xml" />
	<link>http://interactive-matter.eu</link>
	<description>Tinkering with electronics &#38; ambient interaction</description>
	<lastBuildDate>Thu, 08 Dec 2011 15:57:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
			<title>Interactive Matter</title>
			<url>http://interactive-matter.org/wp-content/uploads/2010/03/im-feed.png</url>
			<link>http://interactive-matter.eu</link>
			<width></width>
			<height></height>
			<description>Tinkering with electronics &amp; ambient interaction</description>
		</image>		<item>
		<title>Installing KiCAD on Mac OS X</title>
		<link>http://interactive-matter.eu/2011/12/installing-kicad-on-mac-os-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-kicad-on-mac-os-x</link>
		<comments>http://interactive-matter.eu/2011/12/installing-kicad-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 15:57:28 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[eda tool]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[kicad]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[PCB]]></category>

		<guid isPermaLink="false">http://interactive-matter.eu/?p=1296</guid>
		<description><![CDATA[Recently I got more and more fed up by EAGLE CAD. It is a good EDA tool. But the restrictions are really starting to bother me. I need to do more 4 layer boards. Perhaps bigger boards. And I do not want to invest some thousand Euros just to be able to design bigger boards [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://interactive-matter.eu/2011/12/installing-kicad-on-mac-os-x/" title="Permanent link to Installing KiCAD on Mac OS X"><img class="post_image aligncenter colorbox-1296" src="http://interactive-matter.eu/wp-content/uploads/2011/12/kicad-492x500.png" width="492" height="500" alt="KiCAD logo" /></a>
</p><p>Recently I got more and more fed up by <a href="http://www.cadsoftusa.com/">EAGLE CAD</a>. It is a good <a href="http://en.wikipedia.org/wiki/Electronic_design_automation">EDA</a> tool. But the restrictions are really starting to bother me. I need to do more 4 layer boards. Perhaps bigger boards. And I do not want to invest some thousand Euros just to be able to design bigger boards or more layers on the PCB. And since I am unhappy with my libraries anyway it was a good point to try out a new tool.</p>
<p>As you may remember the Mac OS X support in KiCAD is <em>experimental</em>. And from my first impression: Yes it is.Getting it up and running is a major task by itself. So I am writing down my experiences. Perhaps this helps anybody.</p>
<h2><span id="more-1296"></span>Downloading KiCAD</h2>
<p>This is the easiest part. I went to the <a href="http://kicad.sourceforge.net/wiki/Downloads">KiCAD wiki download section</a> and checked the experimental builds. I settled for the <a href="http://brokentoaster.com/kicad">builds by Brokentoaster</a> since they got some fine installation package for Mac OS X. Just for the records: The version number while doing this was v3052 as the latest stable build. That&#8217;s what I grabbed.</p>
<h2>Installing KiCAD</h2>
<p>After the installation I checked what it installed &#8211; and was not very pleased. It just created an Folder <em>/Applications/kicad/</em> with some demo files in it. No binary, no documentation, no nothing. I tried the second download link on broken toaster for the .tgz of the same build. And there it was. The application folder by the installation routine still belonged to my user. Not as I expected it to be, but very handy to add the files from the .tgz archive. Finally a complete installation. Starting KiCAD was easy and it worked out of the box. I was a bit puzzled that the first project was created in the Application directory. But nothing a new project in another location could fix. Fine!</p>
<p>But running eeschma showed me that I was not nearly there. All necessary libraries where missing. A good sign that the installation was not complete. After some googling I found an file INSTALL.txt. in <em>/Applications/Kicad/share/doc/kicad/INSTALL.txt</em>. It&#8217;s content completely solved the mystery:</p>
<pre>The parts of KiCad
------------------
KiCad consists of 3 packages:

kicad         - KiCad programs and core files.
kicad-doc     - Documentation and interactive help (optional package).
kicad-library - KiCad schematic, pcb &amp; 3D-model libraries (optional package).</pre>
<p>Obviously the package for Mac OS X contains only the KiCAD program and core files. But neither the documentation nor the essential libraries – hence the error messages. Some lines below there was some super secret hint where to put the libraries and documentation:</p>
<pre>Mac OS X KiCad tree
 -------------------</pre>
<pre>System wide files</pre>
<pre> /Library/Application Support/kicad/demos
 /Library/Application Support/kicad/internat
 /Library/Application Support/kicad/library
 /Library/Application Support/kicad/modules
 /Library/Application Support/kicad/modules/packages3d</pre>
<pre>User files can be the same as the system wide files but only inside the users home directory.</pre>
<pre>$HOME/Library/Application Support/kicad</pre>
<pre>Warning:
 These paths are hardcoded into KiCad, if you put them somewhere else KiCad will not find them when a new
 project is created.</pre>
<p>So back to the download page and get a complete Linux package to extract the documentation. I went for the complete Ubuntu installation. It was nearly the same version and had &#8216;complete&#8217; on the cover. Downloading and unzipping it it showed me a beautiful Linux file tree with all the needed files. Since I am the only person on this computer using KiCAD I created <em>~/Library/Application Support/kicad</em> and copied the directories &#8216;<em>demos</em>&#8216;, &#8216;<em>internat</em>&#8216;, &#8216;<em>library</em>&#8216; and &#8216;<em>modules</em>&#8216;.</p>
<h2>The Result</h2>
<p>After copying all the necessary files in all the necessary locations gave me complete and functional KiCAD installation. There are some graphics glitches in the schematic editor. But I hope that those are gone in one of the next versions.</p>
<p>So off to check the <a href="http://kicadlib.org/Fichiers/KiCad_Tutorial.pdf">tutorial</a> to do something useful with my fresh installation!</p>
]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2011/12/installing-kicad-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Blinken Button as a SPI Display</title>
		<link>http://interactive-matter.eu/2011/01/blinken-button-as-spi-display/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=blinken-button-as-spi-display</link>
		<comments>http://interactive-matter.eu/2011/01/blinken-button-as-spi-display/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 14:00:04 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[64 Pixels]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Button]]></category>
		<category><![CDATA[creative customers]]></category>
		<category><![CDATA[Kit]]></category>
		<category><![CDATA[SPI]]></category>

		<guid isPermaLink="false">http://interactive-matter.eu/?p=1137</guid>
		<description><![CDATA[There is nothing better than happy and even creative customers! At 27C3 Johannes and Gabe were one of the first customers for the Blinken Button Kit. After some minor issues they managed to assemble their kit. But that was positively not enough for them.  They wanted to use the Blinken Button as SPI slave, so [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://farm6.static.flickr.com/5246/5368707344_88d28dba38_o.jpg"><img class="alignnone colorbox-1137" title="Blinken Button with SPI breakout" src="http://farm6.static.flickr.com/5246/5368707344_3a7992dfce.jpg" alt="" width="500" height="334" /></a></p>
<p>There is nothing better than happy and even creative customers! At 27C3 <a href="http://blag.pseudoberries.com/">Johannes</a> and <a href="http://blag.squirrelsoup.net/">Gabe</a> were one of the first customers for the <a href="http://interactive-matter.eu/shop/blinken-button-for-beginners/">Blinken Button Kit</a>. After some minor issues they managed to assemble their kit. But that was positively not enough for them.  They wanted to use the Blinken Button as <a href="http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus">SPI slave</a>, so that they can use them as a display. To control the animation and texts from other microcontrollers, e.g. an Arduino. So they sat down, hacked the software and hacked the hardware until they succeeded. The even got their first <a href="http://blag.pseudoberries.com/post/2819408784/blinken-button-meets-spi">SPI Blinken Button</a> ready on the 27c3!</p>
<p>Congratulation!</p>
<p><span id="more-1137"></span></p>
<p>Right now their solution looks as hacked as it is. But you have to blame me for this since I did not break out all the pins for the SPI connector.</p>
<p><a href="http://farm6.static.flickr.com/5122/5368706758_e8c0603c62_o.jpg"><img class="alignnone colorbox-1137" title="Breaking out the CS pin on the Blinken Button" src="http://farm6.static.flickr.com/5122/5368706758_db794af39f.jpg" alt="" width="500" height="334" /></a></p>
<p>I am reviewing the Blinken button design anyway. So I think I will follow their recommendations and find a way to break out the SPI pins as optional connectors. Let&#8217;s see how it will look in the end. But I think it is good to have those pins available.</p>
<p>So check their <a href="https://github.com/joh/Blinken-Button">Blinken Button Code over at Github</a> and see if you can also repurpose your Blinken Button. And if you got other Blinken Button hacks be sure to leave a comment!</p>
<p>Related posts:<ul>
<li><a href='http://interactive-matter.eu/2010/02/blinken-button-%e2%80%93-the-led-matrix-button-kit/' rel='bookmark' title='Blinken Button – The LED Matrix Button Kit'>Blinken Button – The LED Matrix Button Kit</a></li>
<li><a href='http://interactive-matter.eu/2011/06/blinken-button-for-beginners-version-2/' rel='bookmark' title='Blinken Button for Beginners Version 2'>Blinken Button for Beginners Version 2</a></li>
<li><a href='http://interactive-matter.eu/2010/05/blinken-buttons-for-beginners-a-smt-beginners-kit/' rel='bookmark' title='Blinken Buttons for Beginners &#8211; a SMT Beginners Kit'>Blinken Buttons for Beginners &#8211; a SMT Beginners Kit</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2011/01/blinken-button-as-spi-display/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Palo Altonale – Learn Tinkering at the Good School</title>
		<link>http://interactive-matter.eu/2010/07/palo-altonale-learn-tinkering-at-the-good-school/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=palo-altonale-learn-tinkering-at-the-good-school</link>
		<comments>http://interactive-matter.eu/2010/07/palo-altonale-learn-tinkering-at-the-good-school/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 07:20:40 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[#palo_altona]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[good school]]></category>
		<category><![CDATA[Hamburg]]></category>
		<category><![CDATA[physical computing]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://interactive-matter.org/?p=949</guid>
		<description><![CDATA[A short German sumary, English version after the click: Auf zur Palo Altonale! Zusammen mit Tinkerlog, Palo Altona und Interactive Matter bietet die Good School einen Kurs zu Physical Computing &#38; Tinkering in Hamburg an. Ziel des Workshop ist es Kreativen in 2 Tagen die Umsetzung von interaktiven Physical-Computing-Projekten auf Basis von Arduino zu vermitteln.Wer [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://interactive-matter.eu/2010/07/palo-altonale-learn-tinkering-at-the-good-school/" title="Permanent link to Palo Altonale – Learn Tinkering at the Good School"><img class="post_image aligncenter colorbox-949" src="http://interactive-matter.org/wp-content/uploads/2010/07/palo_altonale_stempel-500x440.jpg" width="500" height="440" alt="Post image for Palo Altonale – Learn Tinkering at the Good School" /></a>
</p><p>A short German sumary, English version after the click:</p>
<p><em>Auf zur Palo Altonale!</em> Zusammen mit <a href="http://tinkerlog.com/">Tinkerlog</a>, <a href="http://paloaltona.posterous.com/">Palo Altona</a> und Interactive Matter bietet die <a href="http://www.good-school.de/">Good School</a> einen Kurs zu Physical Computing &amp; Tinkering in Hamburg an. Ziel des Workshop ist es Kreativen in 2 Tagen die Umsetzung von interaktiven Physical-Computing-Projekten auf Basis von Arduino zu vermitteln.Wer immer schon mal interaktive, elektronische Spielereien selber basteln wollte ist bei uns bestens aufgehoben.</p>
<p>Wir geben nicht nur eine Einführung in die Programmierung mit Arduino sondern helfen jedem ein eigenes kleines Projekt umszusetzen! Jeder Teilnehmer erhält einen Arduino mit Netzwerkverbindung, notwendige Bauteile und Sensoren. Grundkentnisse sind eigentlich keine erforderlich (OK, Computer bedienen istsollte drin sein). Wer dann schon mal eine Programmiersprache gesehen hat (ActionScript, JavaScript, oder was auch immer) kann mitmachen. Wer denkt er könne keinen Arduino programmieren wird eines Besseren belehrt.</p>
<p>Der Workshop findet am 29. &amp; 30.10.2010 statt. Weitere Informationen gibt es bei der <a href="http://www.good-school.de/paloaltonale/">Good School</a> oder <a href="http://www.facebook.com/event.php?eid=136636016362929">Facebook</a>. Wer Interesse hat innerhalb des Workshops spezielle Themen umzusetzen will (MIDI, Robotik, …) meldet sich frühzeitig bei der Good School – dann können wir darauf gerne eingehen.</p>
<p>And now for the English description …</p>
<p><span id="more-949"></span></p>
<p><a href="http://tinkerlog.com/">Tinkerlog</a>, <a href="http://paloaltona.posterous.com/">Palo Altona</a> and Interactive Matter will help <a href="http://www.good-school.de/">Good School</a> to offer a Arduino workshop in Hamburg. The idea of the workshop is to bring creative professional in touch with physical computing. Every participant will build a physical project interacting with the internet. The basic concept of the workshop is pretty simple. Every participant gets an Arduino with a network connection and some physical interface sensors.  We will give a short introduction into the Arduino platform and how to program it. Everybody who had a look at ActionScript or any other programming language will be able to programm his Arduino. Don&#8217;t be shy, since you think you cannot program – nobody will be left behind. The most important part of the workshop will be free tinkering. You can design and realize your project. We will help you with any question, programming or sensors that you need! We will bring a plethora of stuff and experience! If you are in Hamburg on the 29. &amp; 30.10.2010 contact the <a href="http://www.good-school.de/paloaltonale/">Good School</a> and register! Uhmm, the course will be held in German.</p>
<p>Related posts:<ul>
<li><a href='http://interactive-matter.eu/2010/04/palo-altona-will-build-hamburgs-first-makerbot/' rel='bookmark' title='Palo Altona will build Hamburg&#8217;s first Makerbot'>Palo Altona will build Hamburg&#8217;s first Makerbot</a></li>
<li><a href='http://interactive-matter.eu/2010/01/palo-altona-%e2%80%93-hamburg-tinker-drinkup/' rel='bookmark' title='Palo Altona – Hamburg Tinker Drinkup'>Palo Altona – Hamburg Tinker Drinkup</a></li>
<li><a href='http://interactive-matter.eu/2008/08/tinkering-with-adjd-s371-q999/' rel='bookmark' title='Tinkering with ADJD-S371-Q999'>Tinkering with ADJD-S371-Q999</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2010/07/palo-altonale-learn-tinkering-at-the-good-school/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developing Software for the Atmel AVR with AVR-Eclipse</title>
		<link>http://interactive-matter.eu/2010/07/developing-software-for-the-atmel-avr-with-avr-eclipse/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=developing-software-for-the-atmel-avr-with-avr-eclipse</link>
		<comments>http://interactive-matter.eu/2010/07/developing-software-for-the-atmel-avr-with-avr-eclipse/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 17:10:13 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[atmel]]></category>
		<category><![CDATA[atmel avr]]></category>
		<category><![CDATA[AVR]]></category>
		<category><![CDATA[avr-gcc]]></category>
		<category><![CDATA[avrdude]]></category>
		<category><![CDATA[developing software]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[eclipse plugin]]></category>
		<category><![CDATA[Firmware]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[Integrated development environment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[open source software]]></category>
		<category><![CDATA[Programmer]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[win-avr]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://interactive-matter.org/?p=944</guid>
		<description><![CDATA[Developing software – or better firmware – for the Atmel AVR can be quite easy or quite complicated. A lot of people like to just use vi, some source files and a make file. Here at Interactive Matter we are a tad lazy and want a fully fledged IDE, with code completion, one click building, [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://interactive-matter.eu/2010/07/developing-software-for-the-atmel-avr-with-avr-eclipse/" title="Permanent link to Developing Software for the Atmel AVR with AVR-Eclipse"><img class="post_image aligncenter colorbox-944" src="http://farm5.static.flickr.com/4140/4818143891_b35331665f.jpg" width="500" height="320" alt="Post image for Developing Software for the Atmel AVR with AVR-Eclipse" /></a>
</p><p>Developing software – or better firmware – for the Atmel AVR can be  quite easy or quite complicated. A lot of people like to just use <a onclick="javascript:_gaq.push(['_trackEvent','outbound-article','en.wikipedia.org']);" href="http://en.wikipedia.org/wiki/Vi">vi</a>,  some <a onclick="javascript:_gaq.push(['_trackEvent','outbound-article','en.wikipedia.org']);" href="http://en.wikipedia.org/wiki/Source_file">source  files</a> and a <a onclick="javascript:_gaq.push(['_trackEvent','outbound-article','en.wikipedia.org']);" href="http://en.wikipedia.org/wiki/Make_%28software%29">make  file.</a> Here at Interactive Matter we are a tad lazy and want a fully  fledged IDE, with code completion, one click building, no make files  and buttons to flash the AVR. The easiest was is to achieve this with  Open Source Software, using <a onclick="javascript:_gaq.push(['_trackEvent','outbound-article','gcc.gnu.org']);" href="http://gcc.gnu.org/">avr-gcc</a>,  <a onclick="javascript:_gaq.push([&#039;_trackEvent&#039;,&#039;outbound-article&#039;,&#039;www.bsdhome.com&#039;]);" href="http://www.nongnu.org/avrdude/">avrdude</a> and <a onclick="javascript:_gaq.push(['_trackEvent','outbound-article','avr-eclipse.sourceforge.net']);" href="http://avr-eclipse.sourceforge.net/wiki/index.php/The_AVR_Eclipse_Plugin">avr-eclipse</a>.</p>
<p>To help anybody who wants to use this very convenient package Interactive Matter offers a <a href="http://interactive-matter.org/how-to/developing-software-for-the-atmel-avr-with-avr-eclipse-avr-gcc-avrdude/">complete guide on how to install and use avr-gcc, avrdude, Eclipse and the avr-eclipse plugin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2010/07/developing-software-for-the-atmel-avr-with-avr-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Palo Altona will build Hamburg&#8217;s first Makerbot</title>
		<link>http://interactive-matter.eu/2010/04/palo-altona-will-build-hamburgs-first-makerbot/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=palo-altona-will-build-hamburgs-first-makerbot</link>
		<comments>http://interactive-matter.eu/2010/04/palo-altona-will-build-hamburgs-first-makerbot/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 14:41:05 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[#palo_altona]]></category>
		<category><![CDATA[Hamburg]]></category>
		<category><![CDATA[MakerBot Cupcake CNC]]></category>
		<category><![CDATA[MakerBot Industries]]></category>

		<guid isPermaLink="false">http://interactive-matter.org/?p=791</guid>
		<description><![CDATA[Palo Altona is happy to announce that we will build the first MakerBot Cupcake CNC in Hamburg (at least according to Google). Good School approached Alex of Tinkerlog, me and Palo Altona in general, if we want to help to build their MakerBot. And yes we are happy to help. The weekend project will be [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://interactive-matter.eu/2010/04/palo-altona-will-build-hamburgs-first-makerbot/" title="Permanent link to Palo Altona will build Hamburg&#8217;s first Makerbot"><img class="post_image aligncenter colorbox-791" src="http://farm4.static.flickr.com/3490/3458247336_bf8b6ec013.jpg" width="333" height="500" alt="MakerBot Cupcake CNC by Bre Petis" /></a>
</p><p><a href="http://paloaltona.posterous.com">Palo Altona</a> is happy to announce that we will build the first <a href="http://www.makerbot.com/">MakerBot Cupcake CNC</a> in Hamburg (at least according to Google). <a href="http://good-school.de/">Good School</a> approached Alex of <a href="http://tinkerlog.com/">Tinkerlog</a>, me and <a href="http://paloaltona.posterous.com">Palo Altona</a> in general, if we want to help to build their <a href="http://www.makerbot.com/">MakerBot</a>. And yes we are happy to help.</p>
<p>The weekend project will be documented over at <a href="http://paloaltona.posterous.com">Palo Altona</a> (mostly in German). Some updates will be posted here too.</p>
<p>If this weekend is successful the good boys and girls at <a href="http://good-school.de/">Good School</a> will have a nice functional <a href="http://www.makerbot.com/">MakerBot Cupcake CNC</a> (probably the first in Hamburg) and I am looking forward to it!</p>
<p>Related posts:<ul>
<li><a href='http://interactive-matter.eu/2010/01/palo-altona-%e2%80%93-hamburg-tinker-drinkup/' rel='bookmark' title='Palo Altona – Hamburg Tinker Drinkup'>Palo Altona – Hamburg Tinker Drinkup</a></li>
<li><a href='http://interactive-matter.eu/2010/07/palo-altonale-learn-tinkering-at-the-good-school/' rel='bookmark' title='Palo Altonale – Learn Tinkering at the Good School'>Palo Altonale – Learn Tinkering at the Good School</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2010/04/palo-altona-will-build-hamburgs-first-makerbot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Palo Altona – Hamburg Tinker Drinkup</title>
		<link>http://interactive-matter.eu/2010/01/palo-altona-%e2%80%93-hamburg-tinker-drinkup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=palo-altona-%25e2%2580%2593-hamburg-tinker-drinkup</link>
		<comments>http://interactive-matter.eu/2010/01/palo-altona-%e2%80%93-hamburg-tinker-drinkup/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 09:11:27 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[#palo_altona]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[drinkup]]></category>
		<category><![CDATA[Hamburg]]></category>
		<category><![CDATA[tinker]]></category>

		<guid isPermaLink="false">http://interactive-matter.org/?p=471</guid>
		<description><![CDATA[Die deutsche Version gibt es nach dem Klick (und dann weiter unten). This time it is all non-technical (technically not – but that starts to get complicated). To further encourage tinkering in Hamburg, Alex and I have established a regularly tinker drinkup every Thursday (nearly) at Saal II. Currently it is a very cosy drinkup, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Die deutsche Version gibt es nach dem Klick (und dann weiter unten).</p>
<p>This time it is all non-technical (technically not – but that starts to get complicated). To further encourage tinkering in Hamburg, <a href="http://tinkerlog.com/">Alex</a> and I have established a regularly tinker drinkup every Thursday (nearly) at <a href="http://www.qype.co.uk/place/5426-Saal-II-Hamburg">Saal II</a>.</p>
<p><img class="slickr-post colorbox-471" src="http://farm3.static.flickr.com/2657/4156498852_6e28b3e04e.jpg" alt="Tinker Drinkup" width="500" height="281" /></p>
<p>Currently it is a very cosy drinkup, just a few guests. Hopefully this will change. We post announcements with very short notice <a href="http://twitter.com/#search?q=%23palo_altona">on Twitter via #palo_altona</a>. If you want to join to discuss some tinker stuff or present your Arduino or tinker projects, just tell <a href="http://twitter.com/9600baud">Alex</a> or <a href="http://twitter.com/interactmatter">me</a> and we will tell when the next <a href="http://twitter.com/#search?q=%23palo_altona">#palo_altona</a> takes place.</p>
<p><em>Update: There is now an <a href="http://paloaltona.posterous.com/">official Palo Altona site</a> for further references.</em></p>
<p>Und nun zur deutschen Version:</p>
<p><span id="more-471"></span>Um auch in Hamburg einen regelmäßige Austauch zu Arduino, Tinkern und Open Source Hardware zu etablieren haben <a href="http://tinkerlog.com/">Alex</a> und ich &#8216;Palo Altona&#8217; gegründet. Ein regelmäßiges, manchmal auch unregelmäßiges, Treffen, jeden Donnerstag, im <a href="http://www.qype.com/place/5426-Saal-II-Hamburg">Saal II</a> in der Schanze. Gäste sind gerne willkommen!</p>
<p>Die Koordination erfolgt recht kurzfristig (leider bisher meist erst am selben Tag) über <a href="http://twitter.com/#search?q=%23palo_altona">Twitter (#palo_atona)</a>. Meldet euch bei <a href="http://twitter.com/9600baud">Alex</a> oder <a href="http://twitter.com/interactmatter">mir</a> und wir geben Bescheid ob und wann das nächste Treffen ist. Wir freuen uns über jeden Gast.</p>
<p><em>Update: Es gibt inzwischen eine <a href="http://paloaltona.posterous.com/">offizielle Palo Altona Site</a> für weitere Informationen &#038; Koordinierung.</em></p>
<p>Related posts:<ul>
<li><a href='http://interactive-matter.eu/2010/04/palo-altona-will-build-hamburgs-first-makerbot/' rel='bookmark' title='Palo Altona will build Hamburg&#8217;s first Makerbot'>Palo Altona will build Hamburg&#8217;s first Makerbot</a></li>
<li><a href='http://interactive-matter.eu/2010/07/palo-altonale-learn-tinkering-at-the-good-school/' rel='bookmark' title='Palo Altonale – Learn Tinkering at the Good School'>Palo Altonale – Learn Tinkering at the Good School</a></li>
<li><a href='http://interactive-matter.eu/2010/09/twitballoon-a-twitter-trend-visualizer/' rel='bookmark' title='Twitballoon – a Twitter Trend Visualizer'>Twitballoon – a Twitter Trend Visualizer</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2010/01/palo-altona-%e2%80%93-hamburg-tinker-drinkup/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Seasonal Greetings</title>
		<link>http://interactive-matter.eu/2009/12/seasonal-greetings/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=seasonal-greetings</link>
		<comments>http://interactive-matter.eu/2009/12/seasonal-greetings/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 18:37:27 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>

		<guid isPermaLink="false">http://interactive-matter.org/?p=506</guid>
		<description><![CDATA[This is definitively the last post for this year. So I wish everybody Merry Christmas or whatever you want to celebrate and a pleasant &#38; successful new year! Even I stopped tinkering and went on to hacking cookies. Have fun &#38; take care! Related posts: Last year in electronics]]></description>
			<content:encoded><![CDATA[<p></p><p>This is definitively the last post for this year. So I wish everybody Merry Christmas or whatever you want to celebrate and a pleasant &amp; successful new year!</p>
<p><a title="Space Invaders Cookies" href="http://farm3.static.flickr.com/2642/4197092247_b1ae89cb50_b.jpg"><img class="slickr-post colorbox-506" src="http://farm3.static.flickr.com/2642/4197092247_b1ae89cb50.jpg" alt="Space Invaders Cookies" width="500" height="375" /></a></p>
<p>Even I stopped tinkering and went on to hacking cookies. Have fun &amp; take care!</p>
<p>Related posts:<ul>
<li><a href='http://interactive-matter.eu/2009/01/last-year-in-electronics/' rel='bookmark' title='Last year in electronics'>Last year in electronics</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2009/12/seasonal-greetings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filtering Sensor Data with a Kalman Filter</title>
		<link>http://interactive-matter.eu/2009/12/filtering-sensor-data-with-a-kalman-filter/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=filtering-sensor-data-with-a-kalman-filter</link>
		<comments>http://interactive-matter.eu/2009/12/filtering-sensor-data-with-a-kalman-filter/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 20:38:25 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[Accelerometer]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[Kalman Filter]]></category>
		<category><![CDATA[LIS302DL]]></category>
		<category><![CDATA[Noise]]></category>
		<category><![CDATA[sensor noise]]></category>

		<guid isPermaLink="false">http://interactive-matter.org/?p=487</guid>
		<description><![CDATA[Some days ago I wrote about noise with a LIS302DL accelerometer. There is obviously something wrong with my hardware. But before I get a new version out I need to implement some software filtering. After some unsuccessful results with low pass filters I choose the Kalman Filter. The Kalman Filter involves an awful lot of [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Some days ago I wrote about <a href="http://interactive-matter.org/2009/12/decoupling-lis302dl-%E2%80%93-there-i-fixed-it/">noise with a LIS302DL accelerometer</a>. There is obviously something wrong with my hardware. But before I get a new version out I need to implement some software filtering.</p>
<p><a title="Process Noise 4.0" href="http://farm3.static.flickr.com/2546/4195425248_99e844c507_o.png"><img src="http://farm3.static.flickr.com/2546/4195425248_d6b3083536.jpg" alt="Process Noise 0.125" width="500" height="250"  class="slickr-post colorbox-487" /></a></p>
<p>After some unsuccessful results with <a href="http://en.wikipedia.org/wiki/Low_pass_filter">low pass filters</a> I choose the <a href="http://en.wikipedia.org/wiki/Kalman_filter">Kalman Filter.</a> The Kalman Filter involves <a href="http://en.wikipedia.org/wiki/Kalman_filter#The_Kalman_filter">an awful lot of complicated mathematics.</a> But fortunately I just needed a simple one dimensional Kalman Filter without any driving information, which makes the filter much easier.<br />
<span id="more-487"></span></p>
<h3>Implementing the Kalman Filter</h3>
<p>If you check the Kalman Filter formulas, you will encounter a lot of complicated matrix and vector math. But after some research on the application domain for an LIS302DL accelerometer I found out that a simple one dimensional filter will do the job. The accelerometer puts out three dimensional acceleration data. But if you just want to get clean acceleration data from it all formulas simply deal with one dimension. So it was easier to use three different one dimensional Kalman filters. It all ended in a small set of formulas:</p>
<p><em>x = x<br />
p = p + q;</em></p>
<p><em>k = p / (p + r);<br />
x = x + k * (measurement &#8211; x);<br />
p = (1 &#8211; k) * p;</em></p>
<p>The first two formulas represent the prediction of the Kalman Filter. And since there is no information about the driving forces it is very simple. The second three formulas calculate the measurement update. The variables are <em>x</em> for the filtered value,  <em>q</em> for the process noise, <em>r</em> for the sensor noise, <em>p</em> for the estimated error and <em>k</em> for the Kalman Gain. The state of the filter is defined by the values of these variables.</p>
<p>The filter is applied with each measurement and initialized with the process noise <em>q</em>, the sensor noise <em>r</em>, the initial estimated error <em>p</em> and the initial value <em>x</em>. The initial values for <em>p</em> is not very important since it is adjusted during the process. It must be just high enough to narrow down. The initial value for the readout is also not very important, since it is updated during the process.</p>
<p>But tweaking the values for the process noise and sensor noise is essential to get clear readouts.</p>
<h3>Tweaking the Kalman Filter</h3>
<p>The first results were less than ideal. So I decided to use processing and my good old <a href="http://interactive-matter.org/2009/02/arduino-lis302dl/">LIS302DL breakout board</a> to get some insight of the optimal values of the different parameters:</p>
<p>First I looked into the importance of the process noise <em>q</em>, starting by a very high value of 128 (which is the maximum output of the accelerometer):</p>
<p><a title="Process Noise 128" href="http://farm3.static.flickr.com/2549/4194672843_0baecec073_o.png"><img class="slickr-post colorbox-487" src="http://farm3.static.flickr.com/2549/4194672843_375fde33c4.jpg" alt="Process Noise 128" width="500" height="250" /></a><br />
You see there is nearly no difference between the filtered data (white) and the original data (grey) – since you just see the white line.<br />
If you turn down the process noise, e.g. to a value of 4 things start to change:</p>
<p><a title="Process Noise 4" href="http://farm3.static.flickr.com/2624/4195428360_9bc06e5802_o.png"><img class="slickr-post colorbox-487" src="http://farm3.static.flickr.com/2624/4195428360_9bc06e5802_o.png" alt="Process Noise 4" width="500" height="250" /></a></p>
<p>If you look closely you see that the sensor data often overshoots the filtered value. The filtered value is pretty close to the real value, but is missing a lot of noise. For my application I needed a more static output, smoothing out nearly all of the noise, giving a clean an steady signal. So lets turn down the process noise value a bit more, e.g. something like 0.125:</p>
<p><a title="Process Noise 0.125" href="http://farm3.static.flickr.com/2727/4195426644_47c6ac3217_o.png"><img class="slickr-post colorbox-487" src="http://farm3.static.flickr.com/2727/4195426644_5f93a20a79.jpg" alt="Process Noise 0.125" width="500" height="250" /></a></p>
<p>Now we got a quite a clean signal from quite a noisy source. It lags a bit behind the real data, but that is not critical for my application. Compared to the amount of noise reduction it is still quite fast.<br />
After this is set let&#8217;s play a bit around with the sensor noise <em>r</em>:<br />
We start back at <em>r</em>=1:</p>
<p><a title="Sensor Noise 1.0" href="http://farm3.static.flickr.com/2541/4194668397_f0f7e55f51_o.png"><img class="slickr-post colorbox-487" src="http://farm3.static.flickr.com/2541/4194668397_fbe4e83636.jpg" alt="Sensor Noise 1.0" width="500" height="250" /></a></p>
<p>As expected if we turn down the assumed noise of the sensor the Kalman filter &#8216;relies&#8217; more on the sensor data and gives more noisy results. If we increase the noise factor of the sensor to 4 we get a more stable result again:</p>
<p><a title="Process Noise 4.0" href="http://farm3.static.flickr.com/2546/4195425248_99e844c507_o.png"><img class="slickr-post colorbox-487" src="http://farm3.static.flickr.com/2546/4195425248_d6b3083536.jpg" alt="Process Noise 0.125" width="500" height="250" /></a></p>
<p>If we go up extreme and assume a noise level of 32 we get the expected steady result:</p>
<p><a title="Process Noise 32.0" href="http://farm3.static.flickr.com/2658/4195424262_a1939bd51f_o.png"><img class="slickr-post colorbox-487" src="http://farm3.static.flickr.com/2658/4195424262_73d3e5d471.jpg" alt="Process Noise 0.125" width="500" height="250" /></a></p>
<p>As expected the filtered value lags significantly behind the real measurement. But it is a much cleaner signal. But  it is questionable if this is still useful.</p>
<h3>Implementing Kalman in C</h3>
<p>Implementing this filter in C code (e.g. for an Arduino) is quite simple. First of all we define a state for a kalman filter:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">typedef</span> <span style="color: #993333;">struct</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">double</span> q<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//process noise covariance</span>
  <span style="color: #993333;">double</span> r<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//measurement noise covariance</span>
  <span style="color: #993333;">double</span> x<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//value</span>
  <span style="color: #993333;">double</span> p<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//estimation error covariance</span>
  <span style="color: #993333;">double</span> k<span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//kalman gain</span>
<span style="color: #009900;">&#125;</span> kalman_state<span style="color: #339933;">;</span></pre></div></div>

<p>Next we need a function to initialize the kalman filter:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">kalman_state
kalman_init<span style="color: #009900;">&#40;</span><span style="color: #993333;">double</span> q<span style="color: #339933;">,</span> <span style="color: #993333;">double</span> r<span style="color: #339933;">,</span> <span style="color: #993333;">double</span> p<span style="color: #339933;">,</span> <span style="color: #993333;">double</span> intial_value<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  kalman_state result<span style="color: #339933;">;</span>
  result.<span style="color: #202020;">q</span> <span style="color: #339933;">=</span> q<span style="color: #339933;">;</span>
  result.<span style="color: #202020;">r</span> <span style="color: #339933;">=</span> r<span style="color: #339933;">;</span>
  result.<span style="color: #202020;">p</span> <span style="color: #339933;">=</span> p<span style="color: #339933;">;</span>
  result.<span style="color: #202020;">x</span> <span style="color: #339933;">=</span> intial_value<span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">return</span> result<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And a function to update the kalman state, by calculating a prediction and verifying that against the real measurement:</p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">void</span>
kalman_update<span style="color: #009900;">&#40;</span>kalman_state<span style="color: #339933;">*</span> state<span style="color: #339933;">,</span> <span style="color: #993333;">double</span> measurement<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">//prediction update</span>
  <span style="color: #666666; font-style: italic;">//omit x = x</span>
  state<span style="color: #339933;">-&gt;</span>p <span style="color: #339933;">=</span> state<span style="color: #339933;">-&gt;</span>p <span style="color: #339933;">+</span> state<span style="color: #339933;">-&gt;</span>q<span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//measurement update</span>
  state<span style="color: #339933;">-&gt;</span>k <span style="color: #339933;">=</span> state<span style="color: #339933;">-&gt;</span>p <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span>state<span style="color: #339933;">-&gt;</span>p <span style="color: #339933;">+</span> state<span style="color: #339933;">-&gt;</span>r<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  state<span style="color: #339933;">-&gt;</span>x <span style="color: #339933;">=</span> state<span style="color: #339933;">-&gt;</span>x <span style="color: #339933;">+</span> state<span style="color: #339933;">-&gt;</span>k <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span>measurement <span style="color: #339933;">-</span> state<span style="color: #339933;">-&gt;</span>x<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  state<span style="color: #339933;">-&gt;</span>p <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span> <span style="color: #339933;">-</span> state<span style="color: #339933;">-&gt;</span>k<span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> state<span style="color: #339933;">-&gt;</span>p<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h3>What did we learn from this?</h3>
<p>First of all the Kalman filter can be much easier to implement if the underlying model is simple. We had not several dimensions, nor different sensor data to combine. The results are pretty good, but it is a challenge to find the right values for the process and sensor noise. Instead of just coming up with some guesses for the values, they can of course be estimated, but than we have to live with the result of the estimation.</p>
<p>In the end it is a good, robust, simple filter (in one dimension).</p>
<p>I think that in lack of several sensors we throw out the most advantage of the filter to combine several sensor data to a combined result. I think going a bit more in this direction can lead to real interesting results.</p>
<p>Or is there a much easier filter to use for my problem, leading to better results?</p>
<p>Related posts:<ul>
<li><a href='http://interactive-matter.eu/2010/02/bmp085-barometric-pressure-sensor-breakout-boards-arrived/' rel='bookmark' title='BMP085 Barometric Pressure Sensor Breakout Boards arrived!'>BMP085 Barometric Pressure Sensor Breakout Boards arrived!</a></li>
<li><a href='http://interactive-matter.eu/2009/12/arduino-barometric-pressure-sensor-bmp085/' rel='bookmark' title='Arduino &amp; Barometric Pressure Sensor BMP085'>Arduino &#038; Barometric Pressure Sensor BMP085</a></li>
<li><a href='http://interactive-matter.eu/2009/12/decoupling-lis302dl-%e2%80%93-there-i-fixed-it/' rel='bookmark' title='Decoupling LIS302DL – There I fixed it!'>Decoupling LIS302DL – There I fixed it!</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2009/12/filtering-sensor-data-with-a-kalman-filter/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Decoupling LIS302DL – There I fixed it!</title>
		<link>http://interactive-matter.eu/2009/12/decoupling-lis302dl-%e2%80%93-there-i-fixed-it/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=decoupling-lis302dl-%25e2%2580%2593-there-i-fixed-it</link>
		<comments>http://interactive-matter.eu/2009/12/decoupling-lis302dl-%e2%80%93-there-i-fixed-it/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 19:20:51 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[Accelerometer]]></category>
		<category><![CDATA[Decoupling]]></category>
		<category><![CDATA[Fail]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[LIS302DL]]></category>
		<category><![CDATA[Noise]]></category>
		<category><![CDATA[PCB]]></category>

		<guid isPermaLink="false">http://interactive-matter.org/?p=482</guid>
		<description><![CDATA[As you probably know, I really like I2C sensors and especially the LIS302DL. But adding this accelerometer to your circuit is not as straight forward as I thought. But in the end I got it quite right. It all started out with a 0.1µF ceramic capacitor. For good measure I put a ferrite bead in [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>As you probably know, I really like <a href="http://interactive-matter.org/tag/i2c/">I2C</a> <a href="http://interactive-matter.org/category/sensors/">sensors</a> and especially the <a href="http://interactive-matter.org/2009/02/arduino-lis302dl/">LIS302DL</a>. But adding this accelerometer to your circuit is not as straight forward as I thought. But in the end I got it quite right.<br />
<a title="Decoupling LIS302DL" href="http://farm3.static.flickr.com/2649/4188400702_bed6d4677c_b.jpg"><img class="slickr-post colorbox-482" src="http://farm3.static.flickr.com/2649/4188400702_bed6d4677c.jpg" alt="Decoupling LIS302DL" width="500" height="375" /></a><br />
It all started out with a 0.1µF ceramic capacitor. For good measure I put a ferrite bead in front. But this lead to terrible readouts. So I threw in a 10µF 0805 ceramic capacitor and a 4.7µF tantalum capacitor. It does not look nice, nor does it look terribly solid, but it works fine.<br />
So read on, what my analysis of the situation is.<br />
<span id="more-482"></span>My original layout had just a small ferrite bead and a way too small capacitor. And this on a board hosting a ATmega168 and four alphanumeric displays, drawing from 0 to 300mA, from a step up voltage controller. Of course I had about 400µF decoupling capacitors on board, but the direct power supply of the LIS302DL had still about 0.1 Volts of noise on the power supply line. And the readouts were extremely noisy (&gt;10%).</p>
<p>Not good.</p>
<p>Throwing in some capacitance was a good idea and reduced the noise by something like factor 2. But still it is very noisy. The <a href="http://www.st.com/stonline/products/literature/ds/12726.pdf" class="broken_link" rel="nofollow">LIS302DL datasheet</a> suggest using at least a 10µF and a 0.1µF capacitor of different types (e.g. ceramic and tantalum) – I think it is just some minimum requirements. Proper voltage supply with as less noise as possible is a must.</p>
<p>So my next try will be:</p>
<ul>
<li>Redoing the complete layout so that the power supply of the LEDs is uses separate VCC and ground paths than the digital circuit.</li>
<li>Redoing the same for both chips, so that I got some <a href="http://www.aikenamps.com/StarGround.html">star like grounding</a> and supply system. Or some carefully laid out power planes.</li>
<li>Adding bigger ferrite beads in the supply line of the LEDs and both chips, so that each component has its own supply line with ferrite beads and capacitors, to reduce cross talk.</li>
<li>Perhaps adding some <a href="http://en.wikipedia.org/wiki/Low_dropout_regulator">LDO regulator</a> to drive the digital circuitry from 3V instead of 3.3V to reduce the noise of the LEDs or power supply.</li>
</ul>
<p>I alwayys thought good power supply design is just for audio stuff or other high quality applications, but I learned (the hard way) that you also need it for just some basic tinkering.</p>
<p>So off to the next design.</p>
<p>Related posts:<ul>
<li><a href='http://interactive-matter.eu/2009/02/arduino-lis302dl/' rel='bookmark' title='Arduino &amp; LIS302DL'>Arduino &#038; LIS302DL</a></li>
<li><a href='http://interactive-matter.eu/2009/12/filtering-sensor-data-with-a-kalman-filter/' rel='bookmark' title='Filtering Sensor Data with a Kalman Filter'>Filtering Sensor Data with a Kalman Filter</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2009/12/decoupling-lis302dl-%e2%80%93-there-i-fixed-it/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Driving Circuits from a CR2032 Lithium Coin Cell</title>
		<link>http://interactive-matter.eu/2009/08/driving-circuits-from-a-cr2032-lithium-coin-cell/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=driving-circuits-from-a-cr2032-lithium-coin-cell</link>
		<comments>http://interactive-matter.eu/2009/08/driving-circuits-from-a-cr2032-lithium-coin-cell/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 15:32:26 +0000</pubDate>
		<dc:creator>Marcus</dc:creator>
				<category><![CDATA[Tinkering]]></category>
		<category><![CDATA[cell batteries]]></category>
		<category><![CDATA[coin cell]]></category>
		<category><![CDATA[CR2032]]></category>
		<category><![CDATA[equivalent series resistance]]></category>
		<category><![CDATA[ESR]]></category>
		<category><![CDATA[internal resistance]]></category>
		<category><![CDATA[Power]]></category>

		<guid isPermaLink="false">http://interactive-matter.org/?p=441</guid>
		<description><![CDATA[Just another good example of &#8216;lesson learned&#8217;. I often use the very common CR2032 coin cell batteries to drive my circuits. Small, cheap, easy to get and there is a quite a range of good and cheap battery holders. But recently I have tested an complete over the top design which pushed the poor little [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Just another good example of &#8216;lesson learned&#8217;. I often use the very common CR2032 coin cell batteries to drive my circuits. Small, cheap, easy to get and there is a quite a range of good and cheap battery holders.</p>
<p><a title="CR2032 Battery" href="http://farm4.static.flickr.com/3517/3734750249_c980a7b27e_o.jpg"><img class="slickr-post colorbox-441" src="http://farm4.static.flickr.com/3517/3734750249_90ddeedbd4.jpg" alt="CR2032 Battery" width="500" height="375" /></a></p>
<p>But recently I have tested an complete over the top design which pushed the poor little CR2032 far beyond its limits. Time to grab a few facts from the datasheet for further reference.</p>
<p><span id="more-441"></span>To get a good example I found a quite elaborate <a href="http://data.energizer.com/PDFs/cr2032.pdf">CR2032 datasheet from Duracell</a>. I think other batteries behave quite similar to this.</p>
<h3>The Issue</h3>
<p>The general key fact of an CR2032 are obvious and quite easy to grab from the datasheet:</p>
<p><em>Voltage: 3V</em></p>
<p><em>Capacity: 240mAh (to 2.0V)</em></p>
<p>If you study the datasheet more closely you will see that the voltages drop sharply after it reaches 2.8V (after it has delivered about 170mAh).</p>
<p><em>ESR (Equivalent Series Resistor):about 18 to 20 Ohms.</em></p>
<p>The ESR (Equivalent Series Resistor) or IR (Internal Resistance) is quite flat up to 150mAh of capacitance &#8211; there it reaches about 20 Ohms. At 170mAh it reaches something like 30 Ohms. This is quite hefty. In comparison good capacitors have a series resistance from some Ohms to a fraction of an Ohm &#8211; so it is always good to put some (even electrolytic) capacitors in parallel to the battery. If you are concerned that switching on or of of your circuits discharges the battery to much by charging up the capacitors – there is a simple trick to prevent it: put the capacitors in front of the &#8216;on&#8217; switch so that are always charged and will not charge after your circuit is switched on. The leakage current will be so small that it will be neglectable in most cases.</p>
<p>But if you want to calculate how much constant current you can draw from these batteries you have to use <a href="http://en.wikipedia.org/wiki/Ohm%27s_law">Ohm&#8217;s law</a>:</p>
<p>V = R * I or I = V /R</p>
<p>If you take the later and say you want no voltage drop higher that 1.2 Volts &#8211; because after that your circuit reaches 1.8 Volts which makes your microcontroller most probably going brown out. Applying these with the ESR of 20 Ohms, you will get something like 60 mA you can draw by them (I = 1.2V/20Ohm). You if calculate more conservative and do not want to go below 2.8V &#8211; which gives you some 0.2 Volts head room  &#8211; you will only be able to draw 10 mA (I = 0.2V/20Ohm) &#8211; just enough for an LED. These calculations do not consider the voltage drop of the battery of its life time.</p>
<p><em>In the bottom line: If you use those batteries you have to consider the 20-30 Ohms series resistance. Especially if you draw some constant current (spikes can be easily removed using capacitors). Yo have to assume 170mAh as maximum capacitance because then the CR2032 reaches 2.8Volts and the ESR goes up to a whopping 30 Ohms – going up from there very steep. Because of the high ESR of the CR2032 you will most probably not be able to draw more than 20-30 mAh safely (as constant current).<br />
</em></p>
<p><em>Perhaps it is even better to get a boost converter to 3 or 3.3V &#8211; to suck out all the juice in the battery. This should should be good for the environment too. Or even better get rechargeable Lithium Cells.<br />
</em></p>
<p>So driving an RGB with an 5V boost op converter is impossible. At white (all three LEDs draw 20mA) it is 60mA current at 5V, considering a efficiency of 80% this will give you more than 120 mAh at 3.3V. Impossible or the CR2032. So my intended design will never work. I wish I had done those calculations before I designed it and not after I saw that the prototype does not work.</p>
<p>You live and learn!</p>
<h3>Some Closer Look</h3>
<p>As we see the higher the current is the more loss we get by the ESR of 20 Ohms. So the question is how much power we can get from an CR2032. If we want to draw the maximum amount of power over a short time we simply take the <a href="http://en.wikipedia.org/wiki/Electric_power">power</a>:</p>
<p>P=V*I</p>
<p>And we know that the voltage is</p>
<p>v=3-20*I</p>
<p>And we get</p>
<p>P=(3-20*I)*I</p>
<p>If we create a little graph from it we get</p>
<p><a title="CR2032 Wattage" href="http://farm4.static.flickr.com/3514/3906676695_f75568a3d6_o.png"><img class="slickr-post colorbox-441" src="http://farm4.static.flickr.com/3514/3906676695_4a25f2f7df.jpg" alt="CR2032 Wattage" width="500" height="282" /></a></p>
<p>So we see that the maximum is somewhere at 75mA and somwhere at 0,1125 Watts. Perhaps the real theoretical value is a bit off – but most real batteries will be a bit off too, so it is a good enough aproximation.</p>
<p>So that is somewhat consistent to our previous calculations to not exceed 80mA to avoid a too big voltage drop.</p>
<p>But how many energy can we draw from an CR2032? For this we simply calculate the watt hour of the battery:</p>
<p>e=P*t and t=0,24A/I</p>
<p>so we get</p>
<p>e=(0,24/I)*P</p>
<p>or</p>
<p><a title="CR2032 Energy" href="http://farm3.static.flickr.com/2551/3906720443_32df955d3a_b.jpg"><img class="slickr-post colorbox-441" src="http://farm3.static.flickr.com/2551/3906720443_32df955d3a.jpg" alt="CR2032 Energy" width="500" height="261" /></a></p>
<p>But this is not very astonishing. The less current you draw the less loss you got at the internal resistor. But I am unsure if there is this resistor, which burns energy to heat. But since the batteries get hot if you draw too much power you will get some loss. But I do not think that the loss is equal to a 20 Ohm resistor. But the main finding is clear – the more current you draw the more loss you have.</p>
<h3>What to do?</h3>
<p>From the comments I got the tip to put the lithium coin cells in series to get a higher coltage at the current draw. But this will enlarge the voltage swing at different current levels (from 6V at 0mA to 3V at 150mA). This can be dangerous for your circuit. A better approach would be to put the batteries in parallel to half the internal ESR – so you would still get 1.5 Volts at 150mA.</p>
<p>Of course to counter current spikes you should allways put sufficiently sized capacitors in parallel. Sufficiently sized depends on the level of current spikes and there time. Just check out how a <a href="http://en.wikipedia.org/wiki/Farad">Farad</a> is defined and you can derrive the needed value (which is the product of voltage change and time).</p>
<p>But in most of my designs space is a rare good. So no parallel batteries and no big capacitor banks.</p>
<p>Something that could work is sucking the power with a boost converter to get a steady output voltage independent of the current draw. This would of course enhance the loss but at least we get the voltage we want at an expense of the efficiency. Right now the calculations are a bit too complicated for this evening. But updates will follow</p>
<p>Lets see how that works.</p>
]]></content:encoded>
			<wfw:commentRss>http://interactive-matter.eu/2009/08/driving-circuits-from-a-cr2032-lithium-coin-cell/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc (User agent is rejected)
Object Caching 2150/2176 objects using apc

Served from: interactive-matter.eu @ 2012-02-04 15:36:24 -->
