<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4289452895058070746</id><updated>2012-02-16T17:51:57.698+02:00</updated><category term='i/o'/><category term='arduino'/><category term='pic18f4553'/><category term='pic18'/><category term='diy'/><category term='usb'/><category term='pic18lf4553'/><category term='eagle'/><category term='etching'/><category term='hacking'/><category term='schematic'/><category term='ioio'/><category term='pcb'/><category term='microchip'/><category term='bluetooth'/><category term='pic24'/><category term='picman'/><category term='android'/><category term='sparkfun'/><category term='prototyping'/><category term='prototyping board'/><category term='toner transfer'/><category term='pic'/><category term='dongle'/><category term='google'/><title type='text'>Microcontrollers, Electronics &amp; Robotics</title><subtitle type='html'>Projects, techniques and thoughts involving microcontrollers, electronics &amp;amp; robotics for the hobbyist.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-7503597089719049861</id><published>2011-10-28T10:35:00.000+02:00</published><updated>2011-10-28T10:35:38.083+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='sparkfun'/><category scheme='http://www.blogger.com/atom/ns#' term='microchip'/><category scheme='http://www.blogger.com/atom/ns#' term='pic'/><category scheme='http://www.blogger.com/atom/ns#' term='bluetooth'/><category scheme='http://www.blogger.com/atom/ns#' term='dongle'/><category scheme='http://www.blogger.com/atom/ns#' term='pic24'/><category scheme='http://www.blogger.com/atom/ns#' term='prototyping'/><category scheme='http://www.blogger.com/atom/ns#' term='ioio'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><category scheme='http://www.blogger.com/atom/ns#' term='hacking'/><title type='text'>IOIO Over Bluetooth (or: Who Needs Cables Anyway?)</title><content type='html'>&lt;div style="text-align: justify;"&gt;Pheeeew.... a few long weeks of crunch-mode right about when I moved to California and then to a new house. However, I felt I had to get this done and the Android Open conference in San-Francisco seemed like a good target date. I made it. Barely, but definitely made it.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/cFlJm86Qtuk/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/cFlJm86Qtuk&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/cFlJm86Qtuk&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;OK, now that I got it off my chest, I can tell you what it's all about.&lt;br /&gt;&lt;h1&gt;The Short Story&lt;/h1&gt;With a firmware upgrade on the IOIO, it now supports connecting a standard Bluetooth dongle into its USB jack and is able to establish its connection to the Android phone wirelessly! This actually makes IOIO one of the cheapest, simplest and most powerful Bluetooth-enabled prototyping platforms out there. And some more good news: your application code stays exactly the same. That's the way it should be as far as I'm concerned. End-users should care about what they want to do with their hardware for their project, not about how the heck (or how the hack) to communicate with it. So you only need to write the application-specific code (the &lt;a href="https://github.com/ytai/ioio/blob/App-IOIO0310/software/applications/IOIOSimpleApp/src/ioio/examples/simple/IOIOSimpleApp.java"&gt;source code for the application demonstrated above&lt;/a&gt; takes less than 30 lines of Java for the IOIO-related stuff), and it seamlessly works on any kind of connection and can even switch from one to another while running. I don't know of any existing platforms that will let you do that so easily and cheaply. The closest one probably being Amarino.&amp;nbsp;Keep in mind that IOIO is also capable of USB connectivity to Android of course (ADB or OpenAccessory), giving superior reliability latency and bandwidth compared to Bluetooth.&amp;nbsp;You do the comparison.&lt;br /&gt;&lt;h1&gt;The Long Story&lt;/h1&gt;Although I think there is some real kick-ass little revolution here, this post is going to be more of a story than my usual bunch of technical specs. I'm just in this kind of mood more than the check-out-this-awesome-stuff mood.&lt;br /&gt;Back when I published my &lt;a href="http://ytai-mer.blogspot.com/2011/04/meet-ioio-io-for-android.html"&gt;original announcement on IOIO&lt;/a&gt;, one of the commenters (Inopia, thanks, man!) cleverly noted that since IOIO is a USB host, using a standard Bluetooth dongle in order to make the connection wireless is just a matter of writing the right firmware. He was right! And I immediately fell in love with the idea and with the challenge it presented. I felt that from all the million features I could develop next, this one will be the real killer. Just imagine: a couple of bucks (cheapest dongle I found is $1.80 including shipping from DealExtreme) and you have yourself a whole new range of possibilities: home automation, R/C toys, and much more.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Slowly I began to realize some really cool side-effects that this will have. First, the current inability (or more precisely, complexity) to use IOIO and debug your Android at the same time would go away. Second, we're no longer limited to an Android - control IOIO from any Bluetooth-enabled device: IOIOLib is just a bunch of Java code that can easily be ported to other platforms (or rewritten if need be). Third, we're no longer limited to just one IOIO controlled by a single host application.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;a href="http://4.bp.blogspot.com/-1qXL3m8DpWk/Tqpo95xCcjI/AAAAAAAAXOs/sXv2yR2UZnY/s1600/ioio-btstack.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-1qXL3m8DpWk/Tqpo95xCcjI/AAAAAAAAXOs/sXv2yR2UZnY/s1600/ioio-btstack.png" /&gt;&lt;/a&gt;You get the point. I just had to do it. One problem: I don't know Jack about Bluetooth. Only know enough to know that it's definitely doable. That's where the second key actor in this story comes in. I'm digging the Web for open-source Bluetooth stack implementations. Pretty soon I come across &lt;a href="http://code.google.com/p/btstack/"&gt;btstack&lt;/a&gt;, developed by Matthias Ringwald. I also found other options, and at that point, I was not completely sure which one to choose. So I contact Matthias and I start checking out the code of several projects, and throw some of them away for lack of&amp;nbsp;maintenance and others for having Spaghetti code. But btstack turns out to be just &lt;b&gt;perfect&lt;/b&gt;. Easy to port, very clean code, doesn't use the memory heap (embedded heaven), active maintenance and great discussion and support forum. Matthias really got it right (at least my idea of getting this sort of things right). Two nights later (mostly struggling with implementing the USB driver for the dongle), and I'm able to open an end-to-end connection from my phone to the IOIO. Then a few weeks of finding these tiny, cruel bugs and getting everything nicely packaged and documented, etc.&lt;/div&gt;&lt;div style="text-align: justify;"&gt;And as I said, not a moment too soon! I got to Android Open two days after having a working demo. There I met Aaron Weiss from SparkFun face-to-face for the first time. Aaron is the engineer from SparkFun's side that worked on IOIO from day one. Meeting him and having him stand next to me while presenting was really great!&lt;br /&gt;At the conference, I attended a keynote by Massimo Banzi, one of the two founders of Arduino. I really admire his work, especially after having taught a course on Arduino that enabled non-techie designers build the most awesome stuff. Quite a great keynote he gave, and a little later I've had the honor of presenting myself and inviting him to see my demo. And he came, and was so kind and positive and that really meant a lot to me.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/VTm5N41tnBE/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/VTm5N41tnBE&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/VTm5N41tnBE&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Next exciting event was an interview by Make magazine folks. Needless to say I admire their work too. I think they honestly liked my Bluetooth demo and agreed that this is a little breakthrough in the field.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/DKJshalr_DE/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/DKJshalr_DE&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/DKJshalr_DE&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;The moment I came home after the conference I fell ill for a few days. Totally exhausted. Haven't had a decent sleep in a few weeks. I took a few days off, and then back to work: a demo is nice, but I gotta get this thing released. Fortunately, when preparing the demo I wasn't playing quick 'n' dirty. So I just needed some polish, but no throw-away code. And finally, I'm happy with it and feel confident enough releasing it. It's not perfect-perfect, as multi-device support still needs some care. But it's reliable and definitely useful as-is. I made a video explaining users how to upgrade their IOIO to the new feature, building on top of the &lt;a href="http://ytai-mer.blogspot.com/2011/07/ioio-manager-unleashes-power-of.html"&gt;firmware upgrade capabilities that I previously enabled&lt;/a&gt;. Some have already reported success.&lt;/div&gt;&lt;h1&gt;Links&lt;/h1&gt;&lt;div&gt;More information (and the instructional video) can be found&amp;nbsp;&lt;a href="https://github.com/ytai/ioio/wiki/IOIO-Over-Bluetooth"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;IOIO can be purchased from SparkFun (about $50)&amp;nbsp;&lt;a href="http://www.sparkfun.com/products/10748"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;The cheapest ($1.80 incl. shipping) Bluetooth dongle I found and tested is &lt;a href="http://www.dealextreme.com/p/super-mini-bluetooth-2-0-adapter-dongle-vista-compatible-11866"&gt;here&lt;/a&gt;.&lt;br /&gt;Questions are happily answered on &lt;a href="https://groups.google.com/forum/#!forum/ioio-users"&gt;the ioio-users discussion group&lt;/a&gt;.&lt;/div&gt;&lt;h1&gt;What's next?&lt;/h1&gt;&lt;div&gt;There are several possible directions I'm considering (your comments welcome):&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Supporting the multi-IOIO use-case properly.&lt;/li&gt;&lt;li&gt;Supporting WiFi dongle (imagine that!).&lt;/li&gt;&lt;li&gt;Releasing OpenAccessory support in non-Beta mode (now the ground is properly laid, with new bootloader and connection abstraction layers).&lt;/li&gt;&lt;li&gt;Adding long overdue features that users requested such as infrared remote control protocol, synchronous parallel I/O, quadrature encoder, PPM output, etc.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Tough choice. All seem to add great value. We shall see...&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-7503597089719049861?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/7503597089719049861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2011/10/ioio-over-bluetooth-or-who-needs-cables.html#comment-form' title='40 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/7503597089719049861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/7503597089719049861'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2011/10/ioio-over-bluetooth-or-who-needs-cables.html' title='IOIO Over Bluetooth (or: Who Needs Cables Anyway?)'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-1qXL3m8DpWk/Tqpo95xCcjI/AAAAAAAAXOs/sXv2yR2UZnY/s72-c/ioio-btstack.png' height='72' width='72'/><thr:total>40</thr:total><georss:featurename>Sunnyvale, CA, USA</georss:featurename><georss:point>37.3492097 -122.0326019</georss:point><georss:box>37.323964200000006 -122.07208390000001 37.3744552 -121.9931199</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-4942406759655563271</id><published>2011-07-13T01:05:00.005+03:00</published><updated>2011-09-11T21:01:47.183+03:00</updated><title type='text'>IOIO Manager Unleashes the Power of Firmware Upgrades</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-IBMWinH_pJs/ThyyrfnjBaI/AAAAAAAAUIM/34iQUf5pxSc/s1600/ic_launcher-512.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-IBMWinH_pJs/ThyyrfnjBaI/AAAAAAAAUIM/34iQUf5pxSc/s200/ic_launcher-512.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;Exciting news once again, folks!&lt;br /&gt;Since the original design of IOIO, it was planned to make it capable of upgrading its own software, by pulling updates from the Android device it is connected to. This gives a lot of flexibility for where the upgrades come from, be it the Web, a file containing custom firmware that a user has built or even embedded inside an Android application that needs the IOIO to behave in some non-standard way.&lt;br /&gt;To achieve that, the IOIO firmware included a bootloader, which kicks in on every IOIO restart and checks for new firmware. For security purposes, it has been decided that the bootloader will only get its upgrades from a single application, called the IOIO Manager, and check that this application is authentic by enforcing it to be signed be the official IOIO key (i.e. by me). Alas, this IOIO Manager had not yet been born when IOIO was first released, and this cool feature, although available on every IOIO firmware, remained dormant. Until yesterday, that is!&lt;br /&gt;The IOIO Manager application is now available on the Android Market. Install it by scanning the QR code below or by clicking it:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://market.android.com/details?id=ioio.manager"&gt;&lt;img border="0" src="http://chart.apis.google.com/chart?cht=qr&amp;amp;chs=150x150&amp;amp;chl=http%3A%2F%2Fmarket.android.com%2Fdetails%3Fid%3Dioio.manager" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h1&gt;Installing New Application Firmware Using the Bootloader&lt;/h1&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;This is the most common use case: the IOIO Manager application lets you maintain a library of application images, and then choose the one you want installed on the IOIO at any point in time. Once selected, the IOIO will pull this image after its next restart. This takes less than two seconds and does not require any additional hardware (such as a programmer).&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;To remove all doubt&lt;/b&gt;: this upgrade mode works great with the existing bootloader version, which all current IOIO owners have. At least in the near future, the bootloader is not expected to change, and those users are able to use IOIO manager to receive upgrades!&lt;/div&gt;&lt;h1&gt;Upgrading the Bootloader&lt;/h1&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The bootloader cannot upgrade itself by design. This is in order to protect the user from accidentally bricking the board by installing a faulty image that renders the bootloader invalid. My original thought was that the bootloader will never have to be modified anyway. Errrrr, wrong! When designing the bootloader I figured that since the bootloader already contains all the code for establishing an ADB connection to the phone, it might as well provide this service to the application and save the code duplication. While this seemed reasonable enough back then, I overlooked something important - what if the application wants to use some other protocol over USB? One example is of course Open Accessory. Moreover, what if I found a bug in the bootloader, or want to introduce an optimization? Bottom line - we need a way to upgrade the bootloader from time to time and for that we must have a programmer.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Wait, what?&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;But the SparkFun page specifically used to say "you'll never need a programmer", until we figured out this is true only 99% of the time. And yes, we could just fix the bootloader design bug and have the new units shipped with a better bootloader, but what about the users that already bought it and don't have a programmer? I wanted to be as fair as possible to these people who were first to believe in my product, so I decided to go the extra mile...&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;So you need a programmer, no doubt about that, but who said you need an &lt;i&gt;off-the-shelf&lt;/i&gt;&amp;nbsp;programmer? Let's make one out of a IOIO! And so I did. And it works! So right now, if you want to reprogram your IOIO's bootloader, all you need is another IOIO, be it your friend's or your fellow hacker. Well, people can still argue this is not a free solution in all cases, but I hope they will appreciate I really did anything I could to make things better for them.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Here's what it looks like when one IOIO programs another:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Simply connect 5 wires (two of which are supply and ground) between them, select the image and go!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-xpploS8zsVs/Thy_DrpV_pI/AAAAAAAAUIQ/CmWb9wygLkU/s1600/DSC_0098.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="310" src="http://4.bp.blogspot.com/-xpploS8zsVs/Thy_DrpV_pI/AAAAAAAAUIQ/CmWb9wygLkU/s400/DSC_0098.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h1&gt;New Possibilities&lt;/h1&gt;First, this new feature opened the gate for me to start pushing new features to IOIO on a regular basis. Some of which have been itching me to release for quite some time.&lt;br /&gt;Next, this allows people interested in modifying the code running on the IOIO to do so very easily as well as to distribute the firmware they are producing for others to install with no trouble. I'm really curious to see what will come out of this.&lt;br /&gt;For more information, read &lt;a href="https://github.com/ytai/ioio/wiki/The-IOIO-Manager-Application"&gt;the detailed guide to the IOIO Manager on the IOIO Wiki&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;P.S. in retrospect I realized this is a homage to an older project of mine: &lt;a href="http://ytai-mer.blogspot.com/2010/05/avr-programmer-using-picman.html"&gt;AVR programmer using the PICMAN&lt;/a&gt; (the great-grandfather of the IOIO)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-4942406759655563271?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/4942406759655563271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2011/07/ioio-manager-unleashes-power-of.html#comment-form' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/4942406759655563271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/4942406759655563271'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2011/07/ioio-manager-unleashes-power-of.html' title='IOIO Manager Unleashes the Power of Firmware Upgrades'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-IBMWinH_pJs/ThyyrfnjBaI/AAAAAAAAUIM/34iQUf5pxSc/s72-c/ic_launcher-512.png' height='72' width='72'/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-3432350598787962121</id><published>2011-06-05T10:37:00.004+03:00</published><updated>2011-09-11T21:00:17.583+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='sparkfun'/><category scheme='http://www.blogger.com/atom/ns#' term='microchip'/><category scheme='http://www.blogger.com/atom/ns#' term='pic'/><category scheme='http://www.blogger.com/atom/ns#' term='prototyping'/><category scheme='http://www.blogger.com/atom/ns#' term='ioio'/><category scheme='http://www.blogger.com/atom/ns#' term='i/o'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='usb'/><category scheme='http://www.blogger.com/atom/ns#' term='diy'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>IOIO over OpenAccessory (ADK) Available</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-lqNb9lshfW4/TZd6FSjxcmI/AAAAAAAATkY/O_kGj9VySN4/s1600/ioio-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="86" src="http://1.bp.blogspot.com/-lqNb9lshfW4/TZd6FSjxcmI/AAAAAAAATkY/O_kGj9VySN4/s400/ioio-logo.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;About two months ago, I've announced IOIO on this blog. About a month later, in Google I/O, Google announced the OpenAccessory and the Accessory Developer's Kit (ADK), which enables connecting your Android device (version 2.3.4 and higher) to external peripherals. Today, I'm announcing &lt;b&gt;IOIO's support of the OpenAccessory protocol!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This new feature is currently released in Beta mode. Technical information available &lt;a href="https://github.com/ytai/ioio/wiki/IOIO-Over-OpenAccessory-Beta"&gt;on the IOIO wiki&lt;/a&gt;. The way this works is that IOIO will attempt to communicate with the Android device with the OpenAccessory protocol. When this is not supported, it will seamlessly fall back to ADB. This enables you to connect the same IOIO board to both new and old devices. Your applications can be very easily be ported to the new mode, requiring only a few non-intrusive modifications to your application's metadata.&lt;br /&gt;&lt;br /&gt;What is this all about? What is the relation between this new technology, IOIO and the other boards out there? I will try to provide some answers and clear some of the confusion that was caused as result of the proximity of all these announcements.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;What is OpenAccessory?&lt;/h3&gt;OpenAccessory is a new Android feature, which enables connecting external peripherals to an Android device over a USB connection. This feature exposes a standardized interface on the USB bus, as well as a Java API that enables an Android application to communicate with the accessory on the other end. This feature is supported on Android 2.3.4 and higher. The OpenAccessory protocol allows the Android device to act as either a host or a device on the USB bus (the host mode is only supported on Android 3.x and higher and only on certain devices).&lt;br /&gt;OpenAccessory is a low-level protocol: it features a single full-duplex communication channel between the Android device and the accessory, over which arbitrary bytes can be sent back and forth - much like a UART connection. It leaves to the accessory designer to design the higher-level protocol, i.e. what messages to send and what their meaning is to the Android application and to the accessory.&lt;br /&gt;Read more about OpenAccessory &lt;a href="http://developer.android.com/guide/topics/usb/index.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;What is ADK?&lt;/h3&gt;&lt;div&gt;The Accessory Developer's Kit (ADK) is a reference implementation of an OpenAccessory-enabled board, developed by Google and announced together with OpenAccessory. This board is essentially an Arduino Mega with an on-board USB host shield. It comes with an Arduino-side C++ library, which implements the protocol. Following Google, several vendors have released compatible boards.&lt;/div&gt;&lt;div&gt;The term "ADK" is often used&amp;nbsp;synonymously&amp;nbsp;with "OpenAccessory", i.e. one might say "this new board supports ADK" when they actually mean it supports the OpenAccessory protocol.&lt;/div&gt;&lt;div&gt;In my personal opinion, the ADK has been released mostly for promoting the OpenAccessory protocol and providing a quick-start and demo board, rather than intended to be a consumer product.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;How Does OpenAccessory Compare to ADB?&lt;/h3&gt;&lt;div&gt;The Android Debug Bridge (ADB) is a debug protocol which existed on every Android device since the early days of Android. Technically, this protocol allows a host connected over USB to open various kinds of communication channels to the Android device. On the Android-side of these communication channels are different services, such as debug, file-system access, Linux shell access. Another note-worthy service (on which IOIO has been based) allows forwarding of the data sent over the channel to a TCP socket. This allows an Android application to listen on a certain port and accept connections coming from the outside world, and do so without the need to modify the OS.&lt;/div&gt;&lt;div&gt;ADB's main advantages over OpenAccessory are:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Available on any Android device.&lt;/li&gt;&lt;li&gt;Provides useful features, such as file-system access (IOIO uses this for firmware upgrades).&lt;/li&gt;&lt;li&gt;More mature, does not suffer from some problems currently existing in OpenAccessory.&lt;/li&gt;&lt;li&gt;Simpler to work with on the Android application side - just listen on a TCP socket.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;OpenAccessory's main advantages over ADB are:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Better throughput and latency.&lt;/li&gt;&lt;li&gt;Does not require the user to enable USB debugging.&lt;/li&gt;&lt;li&gt;More secure (IOIO takes its own measures to guarantee that the power of ADB cannot be exploited by a malicious firmware).&lt;/li&gt;&lt;li&gt;Allows applications to be notified upon connection of the accessory. The user can choose which application to launch when the accessory connects. This might be doable with ADB too, but IOIO doesn't do that.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;See Inopia's excellent in-depth comparison &lt;a href="http://romfont.com/2011/05/11/a-closer-look-at-googles-open-accessory-development-kit/"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;How Does IOIO Compare to Other OpenAccessory-Enabled Boards?&lt;/h3&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Supports All Android Versions&lt;/b&gt;&amp;nbsp;- since IOIO works with both OpenAccessory and ADB it can communicate with a very large variety of existing Android devices, leveraging&amp;nbsp;OpenAccessory when it exists and leveraging the additional features of ADB when they exist. Other boards, which do not support ADB, are limited to all but the newest Android devices out there.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Functionality&lt;/b&gt;&amp;nbsp;- IOIO is almost exactly identical to the Arduino Mega in terms of pin counts and functions. The only difference I could spot is in the number of PWM channels (IOIO-9, Mega-16) and TWI channels (IOIO-3, Mega-1).&lt;/li&gt;&lt;li&gt;&lt;b&gt;Cost&lt;/b&gt;&amp;nbsp;- at $50, IOIO currently seems to be the cheapest available commercial board out there. A close alternative is a DIY version offered&amp;nbsp;&lt;a href="http://romfont.com/2011/05/12/google%E2%80%99s-open-accessory-development-kit-on-standard-arduino-hardware/"&gt;here&lt;/a&gt;, costing $55 and requires some work.&lt;/li&gt;&lt;li&gt;&lt;b&gt;High-Level Software&lt;/b&gt;&amp;nbsp;- the other boards out there expect you to write both an Android application and embedded-C code for the board, designing your own communication protocol. IOIO does all that for you, leaving you to write only the Android-side code, while using a high-level Java API for controlling the board's functions.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Support Forum and Wiki&lt;/b&gt;&amp;nbsp;- IOIO has &lt;a href="https://groups.google.com/forum/#!forum/ioio-users"&gt;an active discussion group&lt;/a&gt; and &lt;a href="https://github.com/ytai/ioio/wiki"&gt;an extensive documentation wiki&lt;/a&gt;, which continues to grow quickly. The IOIO project is committed to the hobbyist community, and to the hobbyist community only!&lt;/li&gt;&lt;li&gt;&lt;b&gt;Size&lt;/b&gt;&amp;nbsp;- IOIO is probably the smallest board out there - almost as small as you could get with 48 I/O pins, numerous supply pins and a USB connector. It is &lt;b&gt;much&lt;/b&gt;&amp;nbsp;smaller than the ADK board.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Bootloader&lt;/b&gt;&amp;nbsp;- IOIO's firmware includes a secure bootloader, which enables firmware upgrades to be performed through the Android device.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Power Supply&lt;/b&gt;&amp;nbsp;- IOIO has an on-board 5V switch-mode regulator capable of delivering up to 1.5A. This allows for simultaneous charging of the Android and powering two standard servos without problem. Some of the other boards will require an external 5V supply to support this use-case. In addition, IOIO has an on-board trimmer which allows limiting the Android's charging current. This is very useful for battery-operated setups, when you don't want the Android device to drain your battery.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Open-Source&lt;/b&gt;&amp;nbsp;- Unlike some of the other alternatives - the IOIO's hardware, firmware and software are completely open-source with a FreeBSD license (very permissive). This approach has been chosen because I believe this is what works best for the hobbyist community, and allows people to customize the product for their needs, contribute to it, understand it best, compete on its pricing.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;In conclusion, despite my obvious bias, I believe IOIO is very competitive with other OpenAccessory-enabled platforms. To be fair, &lt;a href="http://blog.makezine.com/archive/2011/05/why-google-choosing-arduino-matters-and-the-end-of-made-for-ipod-tm.html"&gt;here is another view&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-3432350598787962121?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/3432350598787962121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2011/06/ioio-over-openaccessory-adk-available.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/3432350598787962121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/3432350598787962121'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2011/06/ioio-over-openaccessory-adk-available.html' title='IOIO over OpenAccessory (ADK) Available'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-lqNb9lshfW4/TZd6FSjxcmI/AAAAAAAATkY/O_kGj9VySN4/s72-c/ioio-logo.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-1301319526517925165</id><published>2011-04-30T23:06:00.002+03:00</published><updated>2011-09-01T10:57:52.137+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='sparkfun'/><category scheme='http://www.blogger.com/atom/ns#' term='pic'/><category scheme='http://www.blogger.com/atom/ns#' term='ioio'/><category scheme='http://www.blogger.com/atom/ns#' term='i/o'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>IOIO Open-Sourced</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-6m-8Lt5uvmw/TaDL16u6_JI/AAAAAAAATmk/QWZH-59frjc/s1600/ioio-logo.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/-6m-8Lt5uvmw/TaDL16u6_JI/AAAAAAAATmk/QWZH-59frjc/s1600/ioio-logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="70" src="http://3.bp.blogspot.com/-6m-8Lt5uvmw/TaDL16u6_JI/AAAAAAAATmk/QWZH-59frjc/s320/ioio-logo.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;The first batch of IOIO's has started shipping these days! I'd like to thank the patience and support of those who bought it in back-order. &amp;nbsp;I can't wait to see what users are going to make of it.&lt;br /&gt;If you make a cool project with IOIO, please let me know about it in the comments, on email or in the discussion group. If there's enough volume, I'll open a page on this blog dedicated to such projects.&lt;br /&gt;&lt;br /&gt;As promised, I'm opening the source-code, under FreeBSD license.&lt;br /&gt;The project's documentation, including a partially complete user guide is here:&lt;br /&gt;&lt;a href="https://github.com/ytai/ioio/wiki"&gt;https://github.com/ytai/ioio/wiki&lt;/a&gt;&lt;br /&gt;I'm now working on filling the missing parts, but there should be enough Javadocs to get those of you who can't wait going. The project's source code is there too, available for download as a tarball or using git.&lt;br /&gt;&lt;br /&gt;SparkFun have recently release a beginner's guide to IOIO here:&lt;br /&gt;&lt;a href="http://www.sparkfun.com/tutorials/280"&gt;http://www.sparkfun.com/tutorials/280&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I opened a discussion group for IOIO users, where I'll try to answer questions and get feedback. Feel free to subscribe there if you want to know what's going on:&lt;br /&gt;&lt;a href="http://groups.google.com/group/ioio-users"&gt;http://groups.google.com/group/ioio-users&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you want to take part in IOIO development, please introduce yourself and submit a request for membership in:&lt;br /&gt;&lt;a href="http://groups.google.com/group/ioio-dev"&gt;http://groups.google.com/group/ioio-dev&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-1301319526517925165?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/1301319526517925165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2011/04/ioio-open-sourced.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/1301319526517925165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/1301319526517925165'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2011/04/ioio-open-sourced.html' title='IOIO Open-Sourced'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-6m-8Lt5uvmw/TaDL16u6_JI/AAAAAAAATmk/QWZH-59frjc/s72-c/ioio-logo.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-7045673825535499631</id><published>2011-04-08T00:32:00.001+03:00</published><updated>2011-11-15T06:38:44.647+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='sparkfun'/><category scheme='http://www.blogger.com/atom/ns#' term='pic'/><category scheme='http://www.blogger.com/atom/ns#' term='ioio'/><category scheme='http://www.blogger.com/atom/ns#' term='i/o'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='android'/><title type='text'>Meet IOIO - I/O for Android</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-lqNb9lshfW4/TZd6FSjxcmI/AAAAAAAATkY/O_kGj9VySN4/s1600/ioio-logo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="139" src="http://4.bp.blogspot.com/-lqNb9lshfW4/TZd6FSjxcmI/AAAAAAAATkY/O_kGj9VySN4/s640/ioio-logo.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-Os2SWb-mDeQ/TZgYHj7YhiI/AAAAAAAATlY/Sw0V2FOHmEw/s1600/2011-02-08+15.43.13.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="135" src="http://4.bp.blogspot.com/-Os2SWb-mDeQ/TZgYHj7YhiI/AAAAAAAATlY/Sw0V2FOHmEw/s320/2011-02-08+15.43.13.png" width="320" /&gt;&lt;/a&gt;I'm very excited to announce the launch of a new product I've been working on for the past months!&lt;br /&gt;IOIO (pronounced: &lt;i&gt;yo-yo&lt;/i&gt;) is a product which lets you connect electronic circuits to an Android device and control them from an Android application.&lt;br /&gt;It is comprised of a small (2.7x1.2" = 7x3cm) PCB that connects to an Android device with a USB cable and a software library (Java .jar file) that you use in your Android app which handles all communications with the board.&lt;br /&gt;&lt;b&gt;No firmware programming is required&lt;/b&gt; - only Android application authoring with a very simple API (see examples below) for controlling the pins on the board. &lt;b&gt;No modification of the Android device is required&lt;/b&gt; - you avoid the complication of modification and the voiding of warranty.&lt;br /&gt;&lt;a href="http://www.sparkfun.com/products/10748" style="font-weight: bold;" target="_blank"&gt;IOIO is available for purchase online from SparkFun on this page&lt;/a&gt;.&lt;br /&gt;The first few boards will ship within a couple of weeks. Around that time, the entire software and hardware are going to be 100% open-source with a permissive license.&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Main features:&lt;/h1&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-K-a9fbaO_i8/TZgQ_bh2zwI/AAAAAAAATkw/MHEh7ad6-uc/s1600/IMG_20110403_083125.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-K-a9fbaO_i8/TZgQ_bh2zwI/AAAAAAAATkw/MHEh7ad6-uc/s320/IMG_20110403_083125.jpg" width="259" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;48 total I/O pins - all of which can function as digital inputs and outputs.&lt;/li&gt;&lt;li&gt;Up to 16 analog inputs (10-bit).&lt;/li&gt;&lt;li&gt;Up to 9 PWM outputs.&lt;/li&gt;&lt;li&gt;Up to 4 UART channels.&lt;/li&gt;&lt;li&gt;Up to 3 SPI channels.&lt;/li&gt;&lt;li&gt;Up to 3 TWI (I²C-compatible) channels.&lt;/li&gt;&lt;li&gt;On-board switch-mode regulator providing up to 1.5A of 5V supply. Can charge the Android device as well as power a couple of small motors.&lt;/li&gt;&lt;li&gt;Bootloader on the board pulls firmware off phone, enabling OTA firmware upgrades and application-specific firmware.&lt;/li&gt;&lt;li&gt;Pulse-width measurement, capacitance sensing and more (will be pushed with first OTA firmware upgrade).&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;Example Code&lt;/h1&gt;Just to give you a hint of how simple it would be to write apps using IOIO, here is a small snippet from an app, which controls a single servo motor (on pin 12) and reads a single potentiometer (on pin 40). Exception handling and proper closing have been omitted for clarity.&lt;br /&gt;&lt;pre&gt;ioio.waitForConnect();&lt;br /&gt;AnalogInput input = ioio.openAnalogInput(40);&lt;br /&gt;PwmOutput pwmOutput = ioio.openPwmOutput(12, 100);  // 100Hz&lt;br /&gt;while (true) {&lt;br /&gt;  float reading = input.read();&lt;br /&gt;  pwmOutput.setPulseWidth(1000 + Math.round(1000 * reading));&lt;br /&gt;  sleep(10);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h1&gt;Example Projects&lt;/h1&gt;&lt;h2&gt;The Retroid&lt;/h2&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/vSnuzTUuobE/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/vSnuzTUuobE&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266" src="http://www.youtube.com/v/8sAvXCfEj3s&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;The Retroid is a retro-designed alarm clock hacked to be controlled by an Android phone.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Once connected, the phone's alarm, incoming call and incoming text message notifications appear as different ring and LED patterns on the clock.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Thanks to the amazing &lt;b&gt;The Gifts Project folks&lt;/b&gt; for hacking this wonderful project over one weekend!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;h2&gt;The Visual Charger&lt;/h2&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-738NjMLCoBE/TWTK8f0SFdI/AAAAAAAATXs/yn_j3ngak3E/s1600/IMG_5246.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-738NjMLCoBE/TWTK8f0SFdI/AAAAAAAATXs/yn_j3ngak3E/s320/IMG_5246.JPG" width="213" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The Visual Charger is another take on a cool docking station for your phone. It charges your phone while presenting charge level percentage (0-9 or "F" for full) on a large 7-segment LED display. It also uses the dot on the display to signal for pending notifications (e.g. missed calls, unread text messages, etc.).&lt;br /&gt;This project has been done by &lt;b&gt;Misha Seltzer&lt;/b&gt; who is also taking a crucial part in IOIO development.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;h2&gt;Wall Printer&lt;/h2&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/aYUMYyXBaF0/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/aYUMYyXBaF0?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266" src="http://www.youtube.com/v/aYUMYyXBaF0?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;The Wall Printer is inspired by old-school pin printers. It has 7 markers in a row, each individually controlled by a servo such that it can go up (not paint) or down (paint). When you manually slide it over a wall, the servo motions are carefully timed to produce text messages. These can include manually entered text, SMS messages, GPS coordinates and more.&lt;br /&gt;The project is not yet complete, and the video above just demonstrates a simple pattern from an early experiment. I'll post an update once there is progress.&lt;br /&gt;This project has been done by my wonderful friend &lt;b&gt;Liat Segal&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;h1&gt;Why?&lt;/h1&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Android phones are powerful mobile computers having internet connectivity and a rich variety of built-in sensors (camera, GPS, IMU, touch screen). They are also very easy to write applications for, thanks to the great work done by the Android SDK developers. For many applications, all they are really missing is connectivity to external peripherals. This is exactly where IOIO fits in: it enriches the inherent capabilities of the Android device with the ability to communicate with external circuits.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;From a study of existing solutions, they all suffered from one or more of the below:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;High cost.&lt;/li&gt;&lt;li&gt;Complicated. Especially so for complete beginners.&lt;/li&gt;&lt;li&gt;High latency.&lt;/li&gt;&lt;li&gt;Low bandwidth.&lt;/li&gt;&lt;li&gt;Required replacement of the Android device OS.&lt;/li&gt;&lt;li&gt;Large physical size.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;IOIO does not suffer from any of the above. Its cost (~$50 from SparkFun) is competitive with existing solutions, dead-simple to use, ~3ms one-way latency, ~300KB/sec throughput, works with stock OS, small in size.&lt;br /&gt;&lt;h1&gt;Credits&lt;/h1&gt;I would like to thank &lt;b&gt;Google&lt;/b&gt; for supporting this project with people's 20%-time. This project would never have come to life without their help.&lt;br /&gt;Mostly I would like to thank &lt;b&gt;Ryan Hickman&lt;/b&gt;, &lt;b&gt;Arshan Poursohi&lt;/b&gt; and &lt;b&gt;Misha Seltzer&lt;/b&gt;.&lt;br /&gt;All the rest of the guys from Google that contributed to this project with coding, organization of the hackathon event, and providing critical feedback early in the process. You all know who you are :)&lt;br /&gt;&lt;b&gt;Aaron Weiss from SparkFun&lt;/b&gt;&amp;nbsp;helped a lot with the hardware and taught me how PCB design is done in the real world.&lt;br /&gt;My dear friends who took on the task of being the first adopters and built fantastic first IOIO projects.&lt;br /&gt;And last but not least, my beloved wife and kids who were patient and supportive of their tired dad.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-7045673825535499631?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/7045673825535499631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2011/04/meet-ioio-io-for-android.html#comment-form' title='143 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/7045673825535499631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/7045673825535499631'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2011/04/meet-ioio-io-for-android.html' title='Meet IOIO - I/O for Android'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-lqNb9lshfW4/TZd6FSjxcmI/AAAAAAAATkY/O_kGj9VySN4/s72-c/ioio-logo.png' height='72' width='72'/><thr:total>143</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-4473923424123522249</id><published>2010-08-09T09:15:00.001+03:00</published><updated>2010-08-09T09:16:08.950+03:00</updated><title type='text'>POV Globe - Part IV - Software &amp; Data</title><content type='html'>This is in continuation to: &lt;a href="http://ytai-mer.blogspot.com/2010/08/pov-global-part-iii-electronics.html"&gt;POV Globe - Part III - Electronics&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The data layout on the SD card and the software are rather technical and trivial, but still worth a mention.&lt;br /&gt;&lt;h1&gt;Data Layout&lt;/h1&gt;I'm using the SD as a raw block device (i.e. no file-system). This is in order to reduce read overhead, as well as to make sure that all image data is in consecutive blocks (as mentioned in the previous post, jumping between non-consecutive blocks takes an eternity of 380us). Since reads are always in blocks, the format is block aligned. Some numbers:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;One block of data = 512B = 4096bit = 16 columns.&lt;/li&gt;&lt;li&gt;One revolution (or "frame") = 512 columns = 32 blocks = 16KB.&lt;/li&gt;&lt;li&gt;One second of animation = 50 frames = 800KB.&lt;/li&gt;&lt;/ul&gt;A quick calculation shows that 1GB of data can hold a little over 20 minutes of 50FPS animation. My card has 2GB, and it is easy to find cards with more.&lt;br /&gt;The format is as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;First 4 bytes are the total number of blocks in the image, followed by 508B of padding.&lt;/li&gt;&lt;li&gt;Then the image itself follows, column-by-column, where the bytes in each column are ordered from top 8 LEDs to bottom 8 LEDs, and the bits in each byte are ordered so that the MSB is the top LED and LSB is the bottom LED.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;In order to write the raw data to the SD card, I'm using a USB card reader and the Linux &lt;i&gt;dd&lt;/i&gt; command, directly to the device.&lt;br /&gt;&lt;h1&gt;Software&lt;/h1&gt;I will not get into all the details - most of them are just technicalities.&lt;br /&gt;The only part worth mentioning is how the main loop synchronizes the drawing of the columns to the physical location of the LED row, designated by a pulse from the IR sensor, once per revolution. It also needs to take into account possible out-of-sync situations, and "catch-up" if we're late.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A timer keeps the time elapsed since the beginning of the column.&lt;/li&gt;&lt;li&gt;The variable col_dur holds the duration of a single column (1/512 the duration of a revolution) - it is updated every time we get an IR pulse.&lt;/li&gt;&lt;li&gt;The variable pos keeps the current (estimated) physical position of the LEDs, between 0..511.&lt;/li&gt;&lt;li&gt;The variable cur_col keeps the last column that has been drawn, between 0..511.&lt;/li&gt;&lt;/ul&gt;And the main loop looks something like this:&lt;br /&gt;&lt;pre&gt;while (true) {&lt;br /&gt;  // draw all the columns until the current position&lt;br /&gt;  while (cur_col != pos) {&lt;br /&gt;    draw_column();&lt;br /&gt;    if (++cur_col == 512) col = 0;&lt;br /&gt;  }&lt;br /&gt;  while (TIMER &lt; col_dur);  // wait until the end-of row time&lt;br /&gt;  // advance position according to how much time elapsed&lt;br /&gt;  do {&lt;br /&gt;    TIMER -= col_dur;&lt;br /&gt;    if (++pos == 512) pos = 0;&lt;br /&gt;  } while (TIMER &gt;= col_dur);&lt;br /&gt;  // check position sensor and make adjustments&lt;br /&gt;  if (pos == 0) {&lt;br /&gt;    ... wait for rising edge of the sensor ...&lt;br /&gt;    ... recalculate col_dur (make it longer or equal), and reset TIMER ...&lt;br /&gt;  } else if (sensor_rising_edge()) {&lt;br /&gt;    // got a premature signal - we're falling behind&lt;br /&gt;    ... force pos = 0, recalculate col_dur (make it shorter), and reset TIMER ...&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;The draw_column() function just streams 32B of data from the SD to the LED board, pulses the latch line, and then prepares the next column (i.e. issues a SD command to get the next block and waits for it to become ready, if needed).&lt;br /&gt;In practice, because of the SD latency-related problems described in my previous post, this function currently takes care of skipping the first block, while the second is fetched, and in the future it will also take care of streaming the first block from flash.&lt;br /&gt;The last video in the previous post demonstrates this algorithm in action, taking button presses in lieu of IR switch signals.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-4473923424123522249?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/4473923424123522249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2010/08/globe-pov-part-iv-software-data.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/4473923424123522249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/4473923424123522249'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2010/08/globe-pov-part-iv-software-data.html' title='POV Globe - Part IV - Software &amp; Data'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-3775948755611202183</id><published>2010-08-09T08:19:00.004+03:00</published><updated>2010-08-09T09:15:24.963+03:00</updated><title type='text'>POV Globe - Part III - Electronics</title><content type='html'>This is in continuation to: &lt;a href="http://ytai-mer.blogspot.com/2010/08/pov-globe-part-ii-mechanics.html"&gt;POV Globe - Part II - Mechanics&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first concepts I had were:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Keep the hardware modular in order to be able to design &amp;amp; test small components separately.&lt;/li&gt;&lt;li&gt;Stream the image or animation to the LED display from a micro-SD card, so that: there's plenty of storage for rich animations, I will not need to worry too much about complicated compression schemes, and it would be really easy for anyone to deploy new animations.&lt;/li&gt;&lt;/ul&gt;I started designing the electronics by drafting the following specs:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;256 LEDs per column, 512 columns per revolution, 50 revolutions per second = 6.55 Mbit/second = 39us per column.&lt;/li&gt;&lt;li&gt;Serial communication between the motherboard and the LEDs to avoid having to run lots of wires and use a lot of IO on the microcontroller.&lt;/li&gt;&lt;li&gt;Daisy-chain several LED boards, so that I can create an (almost) arc-shaped row of LEDs.&lt;/li&gt;&lt;li&gt;Synchronize LEDs with rotation angle by using an IR LED on the base of the globe and an IR sensor on the motherboard.&lt;/li&gt;&lt;li&gt;In circuit programming and UART connections on the motherboard for development &amp; debug.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h1&gt;LED Boards&lt;/h1&gt;I started by designing the LED boards. I needed 16 boards of 16 LEDs each, which can be daisy-chained. My idea was one 16-bit serial-in parallel-and-serial-out shift register, one 16-bit latch and 16 LED drivers (transistors) per board. Apparently, this wasn't only &lt;i&gt;my&lt;/i&gt; idea, and I soon found that there are off-the-shelf ICs that do just that, leaving me mostly with designing a very simple board that does little more than routing. A simple survey found that the &lt;a href="http://focus.ti.com/docs/prod/folders/print/tlc5927.html"&gt;TLC5927&lt;/a&gt; of TI is a perfect match. I'll take this opportunity to really thank TI for being very generous with free samples - 20 pieces of this IC got to my home with a courier within 3 days!&lt;br /&gt;Here is the circuit schematic and (double sided) layout for the LED boards:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_LxebaUxx8xw/TF9d-mBBYlI/AAAAAAAATG0/sLd5eViFXz0/s1600/led_schmatic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/_LxebaUxx8xw/TF9d-mBBYlI/AAAAAAAATG0/sLd5eViFXz0/s200/led_schmatic.png" width="128" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_LxebaUxx8xw/TF9d_0_xtkI/AAAAAAAATG8/Qu_pUJUmzZU/s1600/led_layout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="100" src="http://2.bp.blogspot.com/_LxebaUxx8xw/TF9d_0_xtkI/AAAAAAAATG8/Qu_pUJUmzZU/s200/led_layout.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And a picture of the home-etched board (these are actually two pieces connected):&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_LxebaUxx8xw/TF7wvv0_QUI/AAAAAAAATGc/TJ1zyHwnFFg/s1600/IMG_20100806_131510.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="70" src="http://2.bp.blogspot.com/_LxebaUxx8xw/TF7wvv0_QUI/AAAAAAAATGc/TJ1zyHwnFFg/s320/IMG_20100806_131510.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;BTW, this board has a shiny silver finish, as I finally managed to get my hands on &lt;a href="http://www.mgchemicals.com/products/421.html"&gt;Liquid Tin&lt;/a&gt;, after a trip to the US. No more rusty copper look... &lt;br /&gt;&lt;br /&gt;Once built, I quickly hooked it to my loyal &lt;a href="http://ytai-mer.blogspot.com/2010/04/picman.html"&gt;PICMAN&lt;/a&gt; for testing. I'm really starting to like this guy...&lt;br /&gt;As it turns out, the best way to output a stream of bits out of a microcontroller is by using the SPI hardware. With the PICMAN's PIC18F4553, you can reach an effective rate of 12MHz.&lt;br /&gt;Here's a video of the first experiment I did, a simple blinking pattern on 5 LEDs:&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/oKIKVCgJw_k&amp;amp;hl=en_US&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/oKIKVCgJw_k&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Then it was time to have some fun with POV effects, so I wrote a simple program that would display a Smiley pattern when the board is wiggled from side to side. It worked! Unfortunately the camera doesn't capture the effect as nicely as the human eye, but in this video you could still see the idea:&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/JVZOMZTnLq8&amp;amp;hl=en_US&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/JVZOMZTnLq8&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;h1&gt;Motherboard&lt;/h1&gt;First issue to tackle was communication with the SD card. After searching the Web for information, it turns out these devices support an SPI-based interface of up to 25MHz. I took a micro-SD to SD adapter to use as a socket, and soldered pin headers to it. Than I stuck it on the breadboard, connected it to the PICMAN and started playing around with it. Careful! SD-cards are 3.3V devices, so when working with a 5V microcontroller a simple voltage divider on the output pins is needed. After some messing around with the software, I was able to read data blocks from the device.&lt;br /&gt;&lt;br /&gt;Now, how do you stream data from a micro-SD card to the LED boards at 8MHz (cheaply)?&lt;br /&gt;A simple cycle of read-from-card -&amp;gt; write to LEDs would naively take at least a few cycles per-bit, which would require a rather fast microcontroller to support 8Mbit/sec. Fortunately, both the SD card and the LEDs speak SPI, so I had an idea to connect the serial input of the LED board directly to the serial out of the SD card, have the microcontroller initiate a read and then send a latch signal to the LEDs at the right time. This way, the microcontroller doesn't have to bother looking at the incoming data. It turned out to be a really neat trick, and I was able to easily stream data directly from the SD card @8HZ, using a cheap ATmega8A clocked at 16MHz!&lt;br /&gt;From this point the design was rather simple: I added a reset button, UART and programming connections and a connector to the IR sensor. I also used a couple of fast MOSFET gate drivers (TC4427) to function as line drivers for the long lines driving the LEDs.&lt;br /&gt;Here is the schematic and the (double sided) layout of the motherboard. Ignore some 0 resistors in the schematic, used solely as "bridges" above traces for solving layout constraints:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_LxebaUxx8xw/TF9d9femaQI/AAAAAAAATGs/FV9NkGAw6XM/s1600/mobo_schematic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/_LxebaUxx8xw/TF9d9femaQI/AAAAAAAATGs/FV9NkGAw6XM/s200/mobo_schematic.png" width="165" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_LxebaUxx8xw/TF9d7v4eM8I/AAAAAAAATGk/ZcvaMTlc-UY/s1600/mobo_layout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/_LxebaUxx8xw/TF9d7v4eM8I/AAAAAAAATGk/ZcvaMTlc-UY/s200/mobo_layout.png" width="168" /&gt;&lt;/a&gt;&lt;/div&gt;A micro-SD to SD adapter is soldered "standing" to the side of the board and reinforced with some hot melt glue.&lt;br /&gt;&lt;br /&gt;I used the PICMAN as an AVR programmer to program the ATMega, as described in &lt;a href="http://ytai-mer.blogspot.com/2010/05/avr-programmer-using-picman.html"&gt;my earlier post&lt;/a&gt;.&lt;br /&gt;Hurray! A few long nights later, and I had a working system, able to stream data from the SD to the LEDs while synchronizing the rate to the input from the position sensor. In the video below, I'm using a push-button to simulate the IR sensor input. I generated a simple image file which generates a 32 LED scan pattern. You can see that the scan rate adapts to the rate of button pushes:&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/BdhlFYEAY1I&amp;amp;hl=en_US&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/BdhlFYEAY1I&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Caveats&lt;/h2&gt;The motherboard has several problems that I'm intending to fix in the next version. The first problem is related to SD card latencies. After performing some timing measurements here's what I found:&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Operation&lt;/th&gt;&lt;th&gt;Duration [us]&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;From issuing read command and until the first block is ready&lt;/td&gt;&lt;td&gt;1340&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;End of block until the immediately following block is ready&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;End of block until non-following block is ready&lt;/td&gt;&lt;td&gt;380&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;i&gt;Note: A block is 512 bytes. All read operations are always done in full blocks.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The first value is not very interesting, since it only happens once when the program starts running.&lt;br /&gt;The second value is interesting, because it happens every time we move from one block to the next - every 512 bytes = 4096 bits = 16 columns. This means that when we display a column that is in the beginning of a block, it will take us 6us (latency) + 32us (256 bit @8Hz) = 38us. Just below our spec of 39us/column!&lt;br /&gt;The third value is problematic, because it means that every time we reach the end of the image, if we want to jump back to the beginning of the image we'll be late by about 10 columns. So my idea for solving this was to copy the first (or last) block of the image to the microcontroller flash when the program starts, and then stream this block from flash while the next one is fetched. Alas, I suddenly realized that the way my hardware is built, the LED serial-in is hard-wired to the MISO line, i.e. the SPI &lt;i&gt;input&lt;/i&gt; of the microcontroller, and thus I can't stream data out of the microcontroller to the LEDs, only from the SD! As a temporary workaround, I'm just skipping the first block altogether and in order to make sure that those missing 16 columns don't happen too often, I'm just replicating the image many times on the SD.&lt;br /&gt;&lt;br /&gt;Some other problems with the current design are not as bad, but I might as well address them on the next version. Those include: the translation from the microcontroller's 5V to the SD's 3.3V creates a really messy layout; the ability to stream data directly from the microcontroller is nice-to-have regardless of SD latency; ATmega8's are no longer cheaply (under $2.5) available; I really regretted not putting a general purpose button and LED on the board for some basic user interface and debug.&lt;br /&gt;&lt;br /&gt;To address the first problem, the next version will include a mux to select between MOSI (microcontroller output) and MISO (SD output) as LED inputs.&lt;br /&gt;To address the second problem, I'm moving to PIC18F23K20, which is $1.70 from Digikey, works on 3.3V, 16MIPS and 16MHz SPI, does not need an external crystal/resonator to operate at full-speed. In addition, the PICs don't suffer from some of AVR's annoyances, such as the ability to brick the chip by setting wrong fuse values and the sharing of the serial programming lines with the SPI. So much goodness that I just had to buy 10 of those...&lt;br /&gt;I intend to first run a full system (with the said workaround) before designing the new motherboard, since I might encounter a few more problems down the road.&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Power&lt;/h1&gt;&lt;b&gt;Q&lt;/b&gt;: How do you transfer power to a circuit that's turning?&lt;br /&gt;&lt;b&gt;A&lt;/b&gt;: A slip ring.&lt;br /&gt;A slip ring is simply a conductive ring attached to the rotating shaft and a stationary conductive "brush" the keeps in contact with the ring, but slips on it with minimal friction. For transferring power, you would need at least two of these.&lt;br /&gt;Due to the nature of this connection, it is very noisy, and thus not generally suitable for data transfer. This is, by the way, why I put the motherboard on the rotating side. To filter out any noise, or short discontinuities in power, I used a big capacitor (2200uF) on the motherboard, in addition to 0.1uF decoupling capacitors close to each IC. Hopefully, it will do (haven't tried yet).&lt;br /&gt;I made the slip ring myself: turned 2 aluminum rings and a plastic isolating sleeve on the lathe. Then I found that soldering to aluminum is really hard, so I used a conductive glue instead, and buried everything under a lump of hot melt glue.&lt;br /&gt;Here's what the finished module looks like:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_LxebaUxx8xw/TF9p_GPRwrI/AAAAAAAATHE/tKskc9WBTD0/s1600/IMG_20100806_125415.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://3.bp.blogspot.com/_LxebaUxx8xw/TF9p_GPRwrI/AAAAAAAATHE/tKskc9WBTD0/s200/IMG_20100806_125415.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;And this is me, making this ring, in a really beautiful panoramic photo taken by &lt;a href="http://www.omercalev.com/"&gt;Omer Calev&lt;/a&gt;:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_LxebaUxx8xw/TF9qsGhXl8I/AAAAAAAATHM/dYB7eV3KCgc/s1600/2972.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/_LxebaUxx8xw/TF9qsGhXl8I/AAAAAAAATHM/dYB7eV3KCgc/s320/2972.jpg" width="242" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next: &lt;a href="http://ytai-mer.blogspot.com/2010/08/globe-pov-part-iv-software-data.html"&gt;POV Globe - Part IV - Software &amp; Data&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-3775948755611202183?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/3775948755611202183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2010/08/pov-global-part-iii-electronics.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/3775948755611202183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/3775948755611202183'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2010/08/pov-global-part-iii-electronics.html' title='POV Globe - Part III - Electronics'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_LxebaUxx8xw/TF9d-mBBYlI/AAAAAAAATG0/sLd5eViFXz0/s72-c/led_schmatic.png' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-3356560987074316989</id><published>2010-08-09T08:18:00.000+03:00</published><updated>2010-08-09T08:18:51.565+03:00</updated><title type='text'>POV Globe - Part II - Mechanics</title><content type='html'>This is in continuation to: &lt;a href="http://ytai-mer.blogspot.com/2010/08/pov-globe-part-i-introduction.html"&gt;POV Globe - Part I - Introduction&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Initially, I completely underestimated the complexity of the mechanics. "Yeah, let's take a 60cm hoop with LEDs and turn it at 50 RPM..." Then, one night I did the simple kinematic calculations, only to find that this means about 3000G(!). Yes, that's right: 3000 times gravity, or simply put, each gram of mass (on the widest part of the hoop) is going to pull the hoop outwards with a force of 3 kilograms. Now that takes a rather rigid structure to support. I started thinking bicycle wheels and the like, but I reckoned that building a machine that is beautiful enough to justify potential killing of a few people is rather challenging. So I started re-thinking the structure, trying to find a way to make is both light and suitable for the kinds of forces that operate here. I also figured that drag is going to be rather substantial, so I'll need a rather sturdy motor to support that.&lt;br /&gt;&lt;br /&gt;Eventually, I came up with this structure:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_LxebaUxx8xw/TF7Sc137ILI/AAAAAAAATGE/dDT1N5pkR7o/s1600/Globe.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/_LxebaUxx8xw/TF7Sc137ILI/AAAAAAAATGE/dDT1N5pkR7o/s320/Globe.png" width="230" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;There isn't really any hoop - just "wings" with lengths and spaces chosen carefully that comprise a frame for mounting boards with white LEDs on one side (16 boards, 16 LEDs each) and a single board with the RGB LEDs on the other. Those wings will be made of a strong and light material, preferably transparent, probably poly-carbonate or similar. This part has not yet been built (waiting for a friend with a laser cutter to rescue me).&lt;br /&gt;&lt;br /&gt;Turning a shaft fast enough with the ability to resist friction and vibrations is also not a simple matter. The solution that has been chosen is to mount the shaft on a washing machine bearing and drive it with a washing machine motor. This part has been really fun, since I have never worked with motors of this size or with AC. The controller has also been taken from the same washing machine (it even included a pot for speed control!), so I was only left with some wiring and mounting. I also needed to build a pulley and belt system to achieve the desired transmission ratio and a case to keep everything in place. My friend Shachar contributed his golden hands for this task.&lt;br /&gt;Here are some photos of the build process:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_LxebaUxx8xw/TF637KqbjPI/AAAAAAAATE0/OWHUTvcnR0g/s1600/IMG_20100602_091734.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="150" src="http://4.bp.blogspot.com/_LxebaUxx8xw/TF637KqbjPI/AAAAAAAATE0/OWHUTvcnR0g/s200/IMG_20100602_091734.jpg" title="The motor and contoller" width="200" /&gt;&lt;/a&gt; &lt;a href="http://4.bp.blogspot.com/_LxebaUxx8xw/TF64SFe3eJI/AAAAAAAATE8/aw5_V7p8blk/s1600/IMG_20100609_131001.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/_LxebaUxx8xw/TF64SFe3eJI/AAAAAAAATE8/aw5_V7p8blk/s200/IMG_20100609_131001.jpg" title="Cutting the shaft to length" width="150" /&gt;&lt;/a&gt; &lt;a href="http://4.bp.blogspot.com/_LxebaUxx8xw/TF64pQKSSTI/AAAAAAAATFE/pw1IzIjf3VM/s1600/IMG_20100609_140537.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/_LxebaUxx8xw/TF64pQKSSTI/AAAAAAAATFE/pw1IzIjf3VM/s200/IMG_20100609_140537.jpg" title="Machining the shaft to fit the bearinaltg" width="150" /&gt;&lt;/a&gt; &lt;a href="http://2.bp.blogspot.com/_LxebaUxx8xw/TF65d5c6pBI/AAAAAAAATFU/PARCkyjsqKE/s1600/IMG_20100616_143756.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/_LxebaUxx8xw/TF65d5c6pBI/AAAAAAAATFU/PARCkyjsqKE/s200/IMG_20100616_143756.jpg" title="The motor &amp;amp; bearing" width="150" /&gt;&lt;/a&gt; &lt;a href="http://2.bp.blogspot.com/_LxebaUxx8xw/TF66nIbRcpI/AAAAAAAATFc/mRfACVqq3gU/s1600/IMG_20100616_164500.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/_LxebaUxx8xw/TF66nIbRcpI/AAAAAAAATFc/mRfACVqq3gU/s200/IMG_20100616_164500.jpg" title="Shachar building the case" width="150" /&gt;&lt;/a&gt; &lt;a href="http://3.bp.blogspot.com/_LxebaUxx8xw/TF67AJN-6BI/AAAAAAAATFk/TQR-k6IA80Y/s1600/IMG_20100617_171617.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/_LxebaUxx8xw/TF67AJN-6BI/AAAAAAAATFk/TQR-k6IA80Y/s200/IMG_20100617_171617.jpg" title="First assembly" width="150" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Currently, it is very noisy. I'm still considering my options: possibly I'll fill the case with some acoustic isolating material.&lt;br /&gt;&lt;br /&gt;Here's a video showing the turning mechanism working slowly:&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/6IOCHxcky7g&amp;amp;hl=en_US&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/6IOCHxcky7g&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;And this video shows some fast spinning and variation of the speed:&lt;br /&gt;&lt;object height="385" width="480"&gt;&lt;param name="movie" value="http://www.youtube.com/v/rj389swl6yE&amp;amp;hl=en_US&amp;amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/rj389swl6yE&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Next: &lt;a href="http://ytai-mer.blogspot.com/2010/08/pov-global-part-iii-electronics.html"&gt;POV Globe - Part III - Electronics&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-3356560987074316989?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/3356560987074316989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2010/08/pov-globe-part-ii-mechanics.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/3356560987074316989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/3356560987074316989'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2010/08/pov-globe-part-ii-mechanics.html' title='POV Globe - Part II - Mechanics'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_LxebaUxx8xw/TF7Sc137ILI/AAAAAAAATGE/dDT1N5pkR7o/s72-c/Globe.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-570344713398572831</id><published>2010-08-09T08:13:00.002+03:00</published><updated>2010-08-10T03:43:45.961+03:00</updated><title type='text'>POV Globe - Part I - Introduction</title><content type='html'>&lt;h4&gt;PO-WHAT??&lt;/h4&gt;For those who don't know, POV stands for Persistence of Vision, and in this context it describes a technique that people developed for creating LED-based displays of various forms that appear to be floating in the air.&lt;br /&gt;&lt;br /&gt;The basic principle is rather simple: you take a row of LEDs, spin it very fast while switching the LEDs on and off at very precise timings, carefully synchronized with the location of the LED row. The motion is quick enough that our eyes cannot detect it, and the illusion that is created is of a 2D image composed of the circular paths created by the LEDs.&lt;br /&gt;&lt;br /&gt;Many people have mounted such LED rows on HDD spindles, mostly for creating clocks, such as &lt;a href="http://www.youtube.com/watch?v=gXvZPRu6YUM"&gt;this one&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In other variations of this basic idea, the rotation axis can be parallel to the row of LEDs to create a cylindrical display, and going from cylindrical to spherical is a simple matter of using an arc rather than a straight row of LEDs. People have used the spherical version mostly for displaying of globes.&lt;br /&gt;Yes. Everybody seems to be building those recently. I got my inspiration from &lt;a href="http://www.youtube.com/watch?v=oLygWkHo9nw"&gt;this YouTube clip&lt;/a&gt;. So why build another one, and what's so different about mine?&lt;br /&gt;First, I wanted my globe to be rather big (60cm in diameter), spin fast for a smooth image (up to 50 revolutions per second), have high resolution (256 LEDs) and be very versatile in terms of what it can display - one could easily load complex animations for it, and change them frequently (more on that later). Second, while taking no credit whatsoever for the idea, the build is still really fun, and coming up with elegant solutions to the various problems that arise still needs a good amount of innovation.&lt;br /&gt;&lt;br /&gt;To make it more interesting, the display is actually comprised of two layers - a sphere made of white LEDs, and a cylinder, of slightly bigger diameter made of RGB LEDs surrounding it. That would enable displaying an animated black and white globe with a colorful text or animation around it.&lt;br /&gt;&lt;br /&gt;In the next series of posts, I intend to document the process of building this installation. At the time of writing this, it is still a work in progress, and I intend to update the posts every once in a while when I'm having some interesting progress. Don't hold your breaths, I'm investing only a few hours a week on this project, so it takes a lot of time and patience.&lt;br /&gt;&lt;br /&gt;Next: &lt;a href="http://ytai-mer.blogspot.com/2010/08/pov-globe-part-ii-mechanics.html"&gt;POV Globe - Part II - Mechanics&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-570344713398572831?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/570344713398572831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2010/08/pov-globe-part-i-introduction.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/570344713398572831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/570344713398572831'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2010/08/pov-globe-part-i-introduction.html' title='POV Globe - Part I - Introduction'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-3076155264919110703</id><published>2010-05-18T14:00:00.001+03:00</published><updated>2010-05-18T14:15:44.815+03:00</updated><title type='text'>AVR Programmer Using PICMAN</title><content type='html'>For a new project I'm working on I needed to program an ATmega-8. Alas, I didn't have an AVR programmer, nor the will to build one.&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_LxebaUxx8xw/S_JyH7zBriI/AAAAAAAASms/6d-s557lcX8/s1600/2010-05-18+13.24.39.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="175" src="http://1.bp.blogspot.com/_LxebaUxx8xw/S_JyH7zBriI/AAAAAAAASms/6d-s557lcX8/s320/2010-05-18+13.24.39.jpg" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;I decided to make one using the &lt;a href="http://ytai-mer.blogspot.com/2010/04/picman.html"&gt;PICMAN&lt;/a&gt;. After searching on the internet for a while, I found out about &lt;a href="http://tuxgraphics.org/electronics/200510/article05101.shtml"&gt;AVRUSB500&lt;/a&gt;&amp;nbsp;from&amp;nbsp;Guido Socher. The software is well-written and open-source, so I decided to port it to PICMAN. A few hours later I had a working USB programmer, STK500v2-compatible, which enables it to work from AVRStudio.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_LxebaUxx8xw/S_JyIUakXtI/AAAAAAAASm0/Hi7laKsN0YU/s1600/Fullscreen+capture+1852010+133457.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/_LxebaUxx8xw/S_JyIUakXtI/AAAAAAAASm0/Hi7laKsN0YU/s200/Fullscreen+capture+1852010+133457.jpg" width="188" /&gt;&lt;/a&gt;&lt;br /&gt;I used the Microchip CDC device code from the &lt;a href="http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;amp;nodeId=2680&amp;amp;dDocName=en547784"&gt;Microchip USB framework&lt;/a&gt; in order for the PICMAN to appear as a COM port on the PC.&lt;br /&gt;Source code and hex available &lt;a href="https://docs.google.com/leaf?id=0B4WsgbOl9eLMNGZiMDkwOGMtNDE1MC00ZmFiLTk4MDktZDg1NDY1NDgxN2E2&amp;amp;hl=en"&gt;here&lt;/a&gt;, under GPL.&lt;br /&gt;Now I can get on with my life...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-3076155264919110703?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/3076155264919110703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2010/05/avr-programmer-using-picman.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/3076155264919110703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/3076155264919110703'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2010/05/avr-programmer-using-picman.html' title='AVR Programmer Using PICMAN'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_LxebaUxx8xw/S_JyH7zBriI/AAAAAAAASms/6d-s557lcX8/s72-c/2010-05-18+13.24.39.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4289452895058070746.post-4771945923066785705</id><published>2010-04-13T00:09:00.011+03:00</published><updated>2010-04-13T21:29:26.757+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='microchip'/><category scheme='http://www.blogger.com/atom/ns#' term='etching'/><category scheme='http://www.blogger.com/atom/ns#' term='usb'/><category scheme='http://www.blogger.com/atom/ns#' term='pic18lf4553'/><category scheme='http://www.blogger.com/atom/ns#' term='toner transfer'/><category scheme='http://www.blogger.com/atom/ns#' term='pcb'/><category scheme='http://www.blogger.com/atom/ns#' term='pic18f4553'/><category scheme='http://www.blogger.com/atom/ns#' term='schematic'/><category scheme='http://www.blogger.com/atom/ns#' term='pic'/><category scheme='http://www.blogger.com/atom/ns#' term='pic18'/><category scheme='http://www.blogger.com/atom/ns#' term='eagle'/><category scheme='http://www.blogger.com/atom/ns#' term='picman'/><category scheme='http://www.blogger.com/atom/ns#' term='prototyping'/><category scheme='http://www.blogger.com/atom/ns#' term='prototyping board'/><category scheme='http://www.blogger.com/atom/ns#' term='diy'/><category scheme='http://www.blogger.com/atom/ns#' term='hacking'/><title type='text'>PICMAN</title><content type='html'>For a long time now I've been wanting to make my own microcontroller-based prototyping board. My original motivation was the unjustified high costs for even the simplest boards (a basic Arduino for $30 - why???) and the challenge of designing something that anyone can make at home within a few hours, with parts that can be cheaply obtained on eBay.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_LxebaUxx8xw/S8N8mRs7wBI/AAAAAAAASfs/L895_j0QEJ4/s1600/2010-04-12+22.18.17.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/_LxebaUxx8xw/S8N8mRs7wBI/AAAAAAAASfs/L895_j0QEJ4/s320/2010-04-12+22.18.17.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Eventually, I came up with the PICMAN. It is:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Based on Microchip's PIC18LF4553 - a 12MIPS microcontroller with 12-bit A/D, plenty of I/O, built in USB&amp;nbsp;transceiver&amp;nbsp;and tons of other coolness.&lt;/li&gt;&lt;li&gt;A single-layer PCB design - ideal for DIY toner-transfer etching fabrication.&lt;/li&gt;&lt;li&gt;Small form-factor that nicely fits on a solderless breadboard.&lt;/li&gt;&lt;li&gt;Can be powered by USB/external 5V/external 8V-35V using on-board 1.5A regulator.&lt;/li&gt;&lt;li&gt;Has a reset button, a user button a power LED (blue) and 3 user LEDs (red, yellow, green).&lt;/li&gt;&lt;li&gt;Needs &lt;b&gt;zero&lt;/b&gt;&amp;nbsp;external components to work.&lt;/li&gt;&lt;li&gt;Programmed with a bootloader, making it possible to download a program via USB.&lt;/li&gt;&lt;li&gt;Can implement any USB device using Microchip's USB stack.&lt;/li&gt;&lt;li&gt;Less than $7 total with easily obtainable parts (not including shipping costs, which are usually low if not free, and assuming that some of the small parts are bought in quantities).&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I made two pieces so far, each took a couple of hours' work, requiring some SMD soldering experience. I did the initial programming (bootloader image) with a PICKit2 programmer, after having to struggle a little with the Microchip provided bootloader firmware code. It really works nicely - I like it much better than most Arduinos that cost 5+ times as much and it was really fun to build.&lt;br /&gt;Some ideas that I used in the design:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Mount the PIC at the bottom of the board, between the header pins.&lt;/li&gt;&lt;li&gt;Use the copper layer for text to make it easier to locate individual pins.&lt;/li&gt;&lt;li&gt;Use a mini-B USB connector for smaller form factor (than B) and availability of cables.&lt;/li&gt;&lt;/ul&gt;Some assorted design/fabrication tips:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Edit the final PostScript file generated by Eagle with a text editor, replacing the last number in every line ending with "h" with 2000. This effectively resizes all holes to 0.2mm making them perfect for centering the drill bit.&lt;/li&gt;&lt;li&gt;Add a cool logo on the final PDF with Illustrator.&lt;/li&gt;&lt;li&gt;Print in 1200DPI on a transparency with a laser printer.&lt;/li&gt;&lt;li&gt;Cut board with a large paper Guillotine.&lt;/li&gt;&lt;li&gt;Use lamination machine for toner transfer. Let fully cool in air before gently removing transparency. Verify &lt;b&gt;before&lt;/b&gt; etching, or otherwise scrape off toner and retry.&lt;/li&gt;&lt;li&gt;1 part HCl, 2 parts 3% H2O2 for etching.&lt;/li&gt;&lt;li&gt;Final cutting of the board to shape with tin snips.&lt;/li&gt;&lt;li&gt;0.6mm holes for PIC and ceramic capacitor, 1mm holes for L7805 and all mounting holes (switch and USB jack), 0.8mm holes for the rest.&lt;/li&gt;&lt;li&gt;1k resistor for the green LED makes it just as bright as the other ones with 330 resistors.&lt;/li&gt;&lt;li&gt;Solder USB jack first. Have a lot of patience ready.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;a href="http://4.bp.blogspot.com/_LxebaUxx8xw/S8N8lono-cI/AAAAAAAASfk/-Shl1xSofvU/s1600/2010-04-08+22.02.32.jpg" imageanchor="1" style="margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/_LxebaUxx8xw/S8N8lono-cI/AAAAAAAASfk/-Shl1xSofvU/s200/2010-04-08+22.02.32.jpg" width="150" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_LxebaUxx8xw/S8N8nCvDPPI/AAAAAAAASf0/EoVRpy30uHY/s1600/2010-04-12+22.19.35.jpg" imageanchor="1" style="margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://1.bp.blogspot.com/_LxebaUxx8xw/S8N8nCvDPPI/AAAAAAAASf0/EoVRpy30uHY/s200/2010-04-12+22.19.35.jpg" width="200" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_LxebaUxx8xw/S8N8oA5sYoI/AAAAAAAASf8/PMDWe29a8PA/s1600/2010-04-12+22.30.23.jpg" imageanchor="1" style="margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://2.bp.blogspot.com/_LxebaUxx8xw/S8N8oA5sYoI/AAAAAAAASf8/PMDWe29a8PA/s200/2010-04-12+22.30.23.jpg" width="200" /&gt;&lt;/a&gt;&lt;br /&gt;Here is the schematic, the layout and the final artwork (mirrored). The Eagle files, firmware images and programming software can be downloaded from &lt;a href="https://docs.google.com/leaf?id=0B4WsgbOl9eLMOGExMTRhYWYtNmM2Zi00Yjk3LTk3MzEtNWEyZWQ0M2FhNDgx&amp;amp;hl=en"&gt;here&lt;/a&gt;.&amp;nbsp;I'll happily share eBay links, where all these components can be bought cheaply, just ask if you can't find any of them.&lt;br /&gt;If anyone has any constructive comments, or has built one and wants to share it, feel free to comment below.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_LxebaUxx8xw/S8OEqO6tvAI/AAAAAAAASgM/xq5WI9U-Psw/s1600/schematic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/_LxebaUxx8xw/S8OEqO6tvAI/AAAAAAAASgM/xq5WI9U-Psw/s200/schematic.png" width="171" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_LxebaUxx8xw/S8OEqO6tvAI/AAAAAAAASgM/xq5WI9U-Psw/s1600/schematic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_LxebaUxx8xw/S8OE9dkiWGI/AAAAAAAASgU/Po7mNDYYZX0/s1600/layout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_LxebaUxx8xw/S8OE9dkiWGI/AAAAAAAASgU/Po7mNDYYZX0/s200/layout.png" width="150" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_LxebaUxx8xw/S8QZDSVd2hI/AAAAAAAAShI/axYeCHPMsxA/s1600/artwork.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_LxebaUxx8xw/S8QZDSVd2hI/AAAAAAAAShI/axYeCHPMsxA/s200/artwork.png" width="150" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4289452895058070746-4771945923066785705?l=ytai-mer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ytai-mer.blogspot.com/feeds/4771945923066785705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ytai-mer.blogspot.com/2010/04/picman.html#comment-form' title='22 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/4771945923066785705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4289452895058070746/posts/default/4771945923066785705'/><link rel='alternate' type='text/html' href='http://ytai-mer.blogspot.com/2010/04/picman.html' title='PICMAN'/><author><name>Ytai</name><uri>http://www.blogger.com/profile/05373159288627167940</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://3.bp.blogspot.com/_LxebaUxx8xw/S8OU_Pyl5dI/AAAAAAAASgo/IXQpXZJyjyc/S220/DSC_0175.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_LxebaUxx8xw/S8N8mRs7wBI/AAAAAAAASfs/L895_j0QEJ4/s72-c/2010-04-12+22.18.17.jpg' height='72' width='72'/><thr:total>22</thr:total></entry></feed>
