<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Paul's Electronics</title>
    <description>Adventures in building, hacking, tinkering...</description>
    <link>http://www.sqlskills.com/blogs/paulselec/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.4.5.0</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://www.sqlskills.com/blogs/paulselec/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>This weblog is sponsored by &lt;a href="http://www.SQLskills.com"&gt;SQLskills&lt;/a&gt;. </blogChannel:blink>
    <dc:creator>Paul Randal</dc:creator>
    <dc:title>Paul's Electronics</dc:title>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/PaulsElectronics" /><feedburner:info uri="paulselectronics" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Kit building: vacuum fluorescent display clock</title>
      <description>&lt;p&gt;
I&amp;#39;ve always been intrigued by &lt;a href="http://en.wikipedia.org/wiki/Vacuum_fluorescent_display"&gt;vacuum fluorescent displays&lt;/a&gt; (VFDs) so I picked up the &lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;cPath=39&amp;amp;products_id=194"&gt;Ice Tube Clock Kit&lt;/a&gt; from &lt;a href="http://www.adafruit.com/"&gt;AdaFruit Industries&lt;/a&gt; that uses a Russian VFD tube. 
&lt;/p&gt;
&lt;p&gt;
(Click any photo for a 1024x768 image.) 
&lt;/p&gt;
&lt;p&gt;
Here&amp;#39;s what came in the kit: 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000421.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000421.JPG" alt="" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
And here are a couple of shots of the VFD tube. It has 8 x 7-segment digits, with decimal points and a minus sign. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000424.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000424.JPG" alt="" /&gt;&lt;/a&gt; &lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000425.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000425.JPG" alt="" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
There&amp;#39;s a great page on AdaFruit&amp;#39;s website that describes the circuit and the calculations that went into designing it - &lt;a href="http://www.ladyada.net/make/icetube/design.html"&gt;check it out&lt;/a&gt;! 
&lt;/p&gt;
&lt;p&gt;
The &lt;a href="http://www.ladyada.net/make/icetube/solder.html"&gt;building instructions&lt;/a&gt; are very thorough, as always, and this time includes test points as building progresses.&amp;nbsp;On the left is&amp;nbsp;a shot of testing the 7805 regulator, and on the right is testing the voltage booster circuit for the VFD. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000426.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000426.JPG" alt="" /&gt;&lt;/a&gt; &lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000428.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000428.JPG" alt="" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Once I had the main board made, it was time to thread the VFD into it&amp;#39;s PCB. This was a finnicky task but with patience it only took 15 minutes. The leads from the VFD bend very easily, which is a blessing and a curse. On the left you can see what I mean, and on the right I&amp;#39;ve got it ready to solder. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000429.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000429.JPG" alt="" /&gt;&lt;/a&gt; &lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000430.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000430.JPG" alt="" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
And here&amp;#39;s it soldered and nicely clipped. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000432.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000432.JPG" alt="" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Did a quick test and it worked! Then I put in the final few components on the main board and assembled the laser-cut perspex case. 
&lt;/p&gt;
&lt;p&gt;
Here are a couple of shots of the completed main PCB: 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000434.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000434.JPG" alt="" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000435.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000435.JPG" alt="" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
And the clock itself... and in it&amp;#39;s final resting place. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000437.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000437.JPG" alt="" /&gt;&lt;/a&gt; &lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/IceTube/P1000438.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fSmallP1000438.JPG" alt="" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Hope you enjoyed the photos - let me know if these kinds of posts are interesting! 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/j6ILdFCqXxM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/j6ILdFCqXxM/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/Kit-building-vacuum-fluorescent-display-clock.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=58f1ee4a-7299-49c5-a815-3c46ac87009d</guid>
      <pubDate>Sat, 18 Dec 2010 14:51:00 -0700</pubDate>
      <category>Kit Building</category>
      <category>VFD</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=58f1ee4a-7299-49c5-a815-3c46ac87009d</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=58f1ee4a-7299-49c5-a815-3c46ac87009d</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/Kit-building-vacuum-fluorescent-display-clock.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=58f1ee4a-7299-49c5-a815-3c46ac87009d</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=58f1ee4a-7299-49c5-a815-3c46ac87009d</feedburner:origLink></item>
    <item>
      <title>More Arduino shields to play with...</title>
      <description>&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;It&amp;#39;s been quite a while since I&amp;#39;ve had bandwidth to sit down and get stuck into electronics again, but now I&amp;#39;m home for almost two months, so I&amp;#39;ll be blogging more on here. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Over the last few months I&amp;#39;ve discovered some new Arduino shields to play with and ordered them up. Here&amp;#39;s what I got: &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;1) The &lt;/font&gt;&lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;cPath=17_21&amp;amp;products_id=196"&gt;&lt;font face="verdana,geneva" size="2"&gt;Wingshield Screwshield&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; kit from &lt;/font&gt;&lt;a href="http://www.adafruit.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;Adafruit Industries&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. Took me about 5 minutes to solder together. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fwingshield_MED.jpg" alt="" /&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;2) The &lt;/font&gt;&lt;a href="http://www.adafruit.com/index.php?main_page=product_info&amp;amp;cPath=17_21&amp;amp;products_id=81"&gt;&lt;font face="verdana,geneva" size="2"&gt;Motor/Stepper/Servo Shield kit&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; from &lt;/font&gt;&lt;a href="http://www.adafruit.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;Adafruit Industries&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. Took me about 1/2 hour to solder together. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fmshieldclose_MED.jpg" alt="" /&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;3) The &lt;/font&gt;&lt;a href="http://www.sparkfun.com/products/9026"&gt;&lt;font face="verdana,geneva" size="2"&gt;Arduino Ethernet Shield with micro SD connector&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. This comes assembled and I got it from &lt;/font&gt;&lt;a href="http://www.sparkfun.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;SparkFun Electronics&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2farduinoeshield_MED.jpg" alt="" /&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;4) The &lt;/font&gt;&lt;a href="http://asynclabs.com/store?page=shop.product_details&amp;amp;flypage=flypage.tpl&amp;amp;product_id=26&amp;amp;category_id=6"&gt;&lt;font face="verdana,geneva" size="2"&gt;WiShield&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; from &lt;/font&gt;&lt;a href="http://asynclabs.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;async_labs&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; that provides 802.11b wireless. This also comes assembled. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2fwishield2.jpg" alt="" /&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;5) The &lt;/font&gt;&lt;a href="http://www.sparkfun.com/products/9760"&gt;&lt;font face="verdana,geneva" size="2"&gt;Joystick Shield Kit&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; from &lt;/font&gt;&lt;a href="http://www.sparkfun.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;SparkFun Electronics&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. Took about 15 minutes to solder together. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2f09895-02.jpg" alt="" /&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;6) The &lt;/font&gt;&lt;a href="http://www.sparkfun.com/products/9363"&gt;&lt;font face="verdana,geneva" size="2"&gt;Color LCD Shield&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; from &lt;/font&gt;&lt;a href="http://www.sparkfun.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;SparkFun Electronics&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. This just needed the headers soldered on. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f12%2f09363-01b.jpg" alt="" /&gt;&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Lots of potential for tinkering and cool stuff here!&lt;/font&gt; 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/1YkrF6vgfL4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/1YkrF6vgfL4/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/More-Arduino-shields-to-play-with.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=b950c9dd-008e-4a8c-b3a4-131176aab05f</guid>
      <pubDate>Sat, 18 Dec 2010 12:14:00 -0700</pubDate>
      <category>Arduino</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=b950c9dd-008e-4a8c-b3a4-131176aab05f</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=b950c9dd-008e-4a8c-b3a4-131176aab05f</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/More-Arduino-shields-to-play-with.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=b950c9dd-008e-4a8c-b3a4-131176aab05f</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=b950c9dd-008e-4a8c-b3a4-131176aab05f</feedburner:origLink></item>
    <item>
      <title>Kit building: Four interactive light panels connected together</title>
      <description>&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Well, summer&amp;#39;s over and that means I can justify being indoors playing with (and blogging about) electronics again. Expect this blog to get busy again! &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Back in March&amp;nbsp;I &lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/post/Kit-building-Evil-Mad-Science-interactive-light-board.aspx"&gt;&lt;font face="verdana,geneva" size="2"&gt;blogged&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; about building an &lt;/font&gt;&lt;a href="http://evilmadscience.com/majors/150-panelkits"&gt;&lt;font face="verdana,geneva" size="2"&gt;interactive light panel&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; from &lt;/font&gt;&lt;a href="http://evilmadscience.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;Evil Mad Science Laboratories&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. Over the summer I built the other three light panel kits I&amp;#39;d ordered and finally got around to hooking them together and testing them out. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;They fit together using 8-pin connectors in any configuration imaginable. Below are two photos of the connectors (borrowed from their website): &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f10%2fconn1.JPG" alt="" width="240" height="180" /&gt; &lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f10%2fconn2.JPG" alt="" width="240" height="180" /&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Below are three photos showing my four panels in a variety of configurations (click for larger versions): &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/EvilMadScience/BigP1050056.jpg"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f10%2fSmallP1050056.JPG" alt="" width="223" height="314" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; &lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/EvilMadScience/BigP1050064.jpg"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f10%2fSmallP1050064.JPG" alt="" width="166" height="314" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/EvilMadScience/BigP1050062.jpg"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f10%2fSmallP1050062.JPG" alt="" width="314" height="208" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Finally, I shot some short videos showing the 1 x 4 configuration in action:&lt;/font&gt; 
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=28PRAPQeaes"&gt;&lt;font face="verdana,geneva" size="2"&gt;http://www.youtube.com/watch?v=28PRAPQeaes&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;(in daylight)&lt;/font&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=iOIx_0jYDlE"&gt;&lt;font face="verdana,geneva" size="2"&gt;http://www.youtube.com/watch?v=iOIx_0jYDlE&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;(in darkness - very cool!)&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Next up will be some more Arduino stuff...&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&lt;/font&gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/fmaJa-kywH8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/fmaJa-kywH8/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/Kit-building-Four-interactive-light-panels-connected-together.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=476e8afb-6b20-45e3-9717-3b6538bb1c7d</guid>
      <pubDate>Sat, 02 Oct 2010 07:24:00 -0700</pubDate>
      <category>Kit Building</category>
      <category>LED Projects</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=476e8afb-6b20-45e3-9717-3b6538bb1c7d</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=476e8afb-6b20-45e3-9717-3b6538bb1c7d</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/Kit-building-Four-interactive-light-panels-connected-together.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=476e8afb-6b20-45e3-9717-3b6538bb1c7d</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=476e8afb-6b20-45e3-9717-3b6538bb1c7d</feedburner:origLink></item>
    <item>
      <title>Kit building: Evil Mad Science interactive light board</title>
      <description>&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;It&amp;#39;s been another few weeks of traveling and client work so I haven&amp;#39;t had any chance to tinker. Apologies to those subscribers expecting the frenetic pace of my &lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paul/"&gt;&lt;font face="verdana,geneva" size="2"&gt;SQL blog&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; - ain&amp;#39;t gonna happen. I&amp;#39;m at home for a few weeks now though, so should have spare cycles to get back to the Arduino. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;This week I decided to build a kit, as I didn&amp;#39;t have time to get stuck into something more intellectually challenging. A while ago I&amp;#39;d ordered a set of 4 &lt;/font&gt;&lt;a href="http://evilmadscience.com/majors/150-panelkits"&gt;&lt;font face="verdana,geneva" size="2"&gt;interactive light panel kits&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; from &lt;/font&gt;&lt;a href="http://evilmadscience.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;Evil Mad Science&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; so I chose to make one of those (I&amp;#39;ve also got an &lt;/font&gt;&lt;a href="http://evilmadscience.com/tinykitlist/75-peggy2"&gt;&lt;font face="verdana,geneva" size="2"&gt;RGB Peggy 2 board&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; that I&amp;#39;m itching to make!). &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;I&amp;#39;m very impressed with the kit - the instructions are *excellent* - totally suitable for a novice, but easily digestable by someone more advanced without being annoyingly simple. The packaging is great too - with all components packed and labeled separately - not something I expect, but a nice time saver. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;The kit took me about 4&amp;nbsp;hours of soldering and neat lead-snipping to put together. I powered it on and it worked first time. However, it&amp;#39;s supposed to work in the dark and I couldn&amp;#39;t get anything out of it. The board looked perfectly put together so I contacted Evil Mad Science. Windell replied within 90 minutes with some suggestions. I replied that I&amp;#39;ve got a degree in electronics so talk techie - smileys ensued and we troubleshooted (troubleshot?). I&amp;#39;d hooked up a spare IR LED and shown that the phototransistors were working, but obviously the IR LEDs on the board weren&amp;#39;t - with only about 10mV foward voltage across each. The whole IR LED circuit has 24V through it, so something was sucking down the power. I traced it to a broken IR LED with very high resistance both ways, and taking 18V - no wonder it wasn&amp;#39;t working. I swapped out the broken LED and put in another, and hey presto! Great technical support!&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Great kit to put together and I&amp;#39;m going to build a wall tile to hang in the house somewhere! &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Here&amp;#39;s a link to a 25sec video I shot on YouTube: &lt;/font&gt;&lt;a href="http://www.youtube.com/watch?v=51dUYjEgTi8"&gt;&lt;font face="verdana,geneva" size="2"&gt;http://www.youtube.com/watch?v=51dUYjEgTi8&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Here are some photos (click for larger images): &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Left: kit contents for one board. Right: PCB (*really* well produced). &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/EvilMadScience/P1020805.JPG"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f3%2fSmallP1020805.JPG" alt="" width="283" height="212" /&gt; &lt;/a&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/EvilMadScience/P1020806.JPG"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f3%2fSmallP1020806.JPG" alt="" width="283" height="212" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;Left: ready to start soldering. Right: Completed board ready for testing. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/EvilMadScience/P1020807.JPG"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f3%2fSmallP1020807.JPG" alt="" width="283" height="212" /&gt;&lt;/a&gt; &lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/EvilMadScience/P1020885.JPG"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f3%2fSmallP1020885.JPG" alt="" width="283" height="212" /&gt;&lt;/a&gt; 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/la58f366jr4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/la58f366jr4/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/Kit-building-Evil-Mad-Science-interactive-light-board.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=52e1aecd-eb1b-4481-a397-300b1d6449c1</guid>
      <pubDate>Fri, 12 Mar 2010 12:53:00 -0700</pubDate>
      <category>Kit Building</category>
      <category>LED Projects</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=52e1aecd-eb1b-4481-a397-300b1d6449c1</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=52e1aecd-eb1b-4481-a397-300b1d6449c1</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/Kit-building-Evil-Mad-Science-interactive-light-board.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=52e1aecd-eb1b-4481-a397-300b1d6449c1</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=52e1aecd-eb1b-4481-a397-300b1d6449c1</feedburner:origLink></item>
    <item>
      <title>Arduino: Windows simulator of driving matrices of 8x8 LED arrays</title>
      <description>&lt;p&gt;
It&amp;#39;s been a couple of weeks since I&amp;#39;ve been able to play hands-on with electronics because I&amp;#39;ve been busy with client work and out-of-town traveling. 
&lt;/p&gt;
&lt;p&gt;
To continue satisfying my must-be-tinkering-with-something urges, I hit upon the idea of using some old Windows code I had lying around to allow me to program LED matrices, without the LED matrices or an Arduino. This means I can effectively be developing code for the Arduino while on the road (we travel around 50% of the year seeing our clients around the world). The old code was for a life simulator (creatures running around fighting, breeding, etc) but it had all the code to display a bitmap on screen and update it already worked out. I figured that I could use it to simulate an 8x8 LED matrix - so off I went. 
&lt;/p&gt;
&lt;p&gt;
What it turned into is a couple of classes that simulate a maze and an 8x8, 16x16, or 32x32 LED display. I thought the code would be useful to a bunch of you so I&amp;#39;ve zipped it up for you to download and play with. The cool thing is that I can work on the maze processing code while on the road and then come home and drop it into the Arduino environment to compile and use. As long as I have LED matrix driving code on the Arduino, it should work like a charm. 
&lt;/p&gt;
&lt;p&gt;
Here&amp;#39;s a screenshot of the simulator running: 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f2%2fScreenshot.JPG" alt="" width="448" height="299" /&gt; 
&lt;/p&gt;
&lt;p&gt;
Black &amp;#39;dots&amp;#39; are on LEDs, spaces are off LEDs, the lighter colored dot is supposed to be a different color LED to represent a person. The simulator can switch between 8x8, 16x16, and 32x32 displays by pressing the Page Up and Page Down keys. Movement is through the arrow keys. The display mode can either be static with screen changes when the person crosses a window border (i.e. the person moves around on the screen) or scrolling, where the person stays still and the maze moves around. Pressing S switches between the two modes. 
&lt;/p&gt;
&lt;p&gt;
The code is in a zip file: &lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/MazeSimulator/Maze021710.zip"&gt;Maze021710.zip&lt;/a&gt;&amp;nbsp;(12.1k) and I&amp;#39;ve been using VS 2005 Professional to develop and debug. 
&lt;/p&gt;
&lt;p&gt;
There are plenty of comments in the code and I&amp;#39;m happy to answer questions about it. 
&lt;/p&gt;
&lt;p&gt;
Enjoy! 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/H9d9XyRN7Kw" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/H9d9XyRN7Kw/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/Arduino-Windows-simulator-of-driving-matrices-of-8x8-LED-arrays.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=0fa1747a-8c41-46e1-bfc6-39cd7fbb6eae</guid>
      <pubDate>Wed, 17 Feb 2010 08:32:00 -0700</pubDate>
      <category>Arduino</category>
      <category>Example Code</category>
      <category>LED matrix</category>
      <category>LED Projects</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=0fa1747a-8c41-46e1-bfc6-39cd7fbb6eae</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=0fa1747a-8c41-46e1-bfc6-39cd7fbb6eae</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/Arduino-Windows-simulator-of-driving-matrices-of-8x8-LED-arrays.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=0fa1747a-8c41-46e1-bfc6-39cd7fbb6eae</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=0fa1747a-8c41-46e1-bfc6-39cd7fbb6eae</feedburner:origLink></item>
    <item>
      <title>Arduino: cascading shift registers to drive 7-segment displays with PC input</title>
      <description>&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;In the &lt;a href="http://www.sqlskills.com/blogs/paulselec/post/Arduino-figuring-out-shift-registers.aspx"&gt;last post&lt;/a&gt; I figured out how to drive a 74HC595 shift register to control 8 LEDs from only 3 digital outputs of the Arduino. Now I&amp;#39;ve taken that a step further and cascaded (sometimes called daisy-chained) four 595s together to drive 7-segment displays and also&amp;nbsp;added code to accept&amp;nbsp;input from the PC.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Instead of using 10-LED bar graphs like I did last time, I&amp;#39;ve moved on to 7-segment displays - which are more challenging and provide a more meaningful output. The 7-segment displays I have are common-cathode, wired as shown below: &lt;/font&gt;
&lt;/p&gt;
&lt;blockquote&gt;
	&lt;p&gt;
	&lt;font face="verdana,geneva" size="2"&gt;&lt;font face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a - pin 14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dp (decimal point) - pin 9&lt;br /&gt;
	&amp;nbsp;&amp;nbsp; ---&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b - pin 13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; common cathode - pins 12 and 4&lt;br /&gt;
	f |&amp;nbsp;&amp;nbsp; | b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c - pin&amp;nbsp;8&lt;br /&gt;
	&amp;nbsp;&amp;nbsp; --- g&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d - pin 7&lt;br /&gt;
	e |&amp;nbsp; &amp;nbsp;| c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e - pin 6&lt;br /&gt;
	&amp;nbsp;&amp;nbsp; --- . dp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f - pin 2&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; g - pin 1&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;
	&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;The code to illuminate decimal digits on a 7-segment display is pretty straightforward. I assigned each of the 7 segment-pins on the display to an output on the 595, from QA through QG (see the circuit diagram below). Each pin from QA to QG is assigned a binary value&amp;nbsp;of 2 ^ pin#, so figuring out which pins to make high to produce each decimal digit is just a matter of adding together the binary values representing each pin necessary to light up the right segments. You can see this array being initialized in the &lt;font face="courier new,courier"&gt;setup()&lt;/font&gt; function.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;I&amp;#39;ve also moved to a proper coding style, with &lt;font face="courier new,courier"&gt;g_&lt;/font&gt; prefixing each global variable to distinguish them from local variables inside functions and methods. It&amp;#39;s a good practice to define unchanging variables as &lt;font face="courier new,courier"&gt;const&lt;/font&gt; to allow the compiler to optimize the code around them - this also prevents mistakes where the code accidentally tries to change the value - the compiler won&amp;#39;t allow it as the variable is effectively read-only and a difficult-to-debug bug is avoided.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;To daisy-chain 595s together is really simple - connect the serial output (pin 9) of the &amp;#39;lowest&amp;#39; 595 to the serial input (pin 14) of the next one in the chain, and connect all the latch (pin 12) and clock (pin 11) inputs together. When the first 595 accepts a new bit, the highest bit in the register will be pushed out of it&amp;#39;s serial line as input to the next 595 in the chain. Enough bits must be pushed to fill all the 595s with new data correctly. In the previous post I only had a single 595 so I only had to push 8 bits of data from the Arduino. With two 595s I need to push 16 bits, with the first 8 bits effectively flowing through the first 595 and into the second. And so on with more 595s in the chain.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;Care must be taken to push the 8-bit values in the correct order - the 8 bits for the 595 furthest from the Arduino must be pushed first, and the 8 bits for the 595 nearest the Arduino in the chain must be pushed last. I do this in the code in the &lt;font face="courier new,courier"&gt;sendSerialData()&lt;/font&gt; function by passing in the number of registers in use, plus a pointer to an array of bytes. Each element in the array has the byte to be pushed to the corresponding register - with the highest register number the furthest away from the Arduino. The code then iterates backwards through the away, pushing each byte in succession.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;Rather than doing the obvious count-from-0-to-9999 code, I decided to figure out how to read input from the PC. This is done in the &lt;font face="courier new,courier"&gt;readNumberFromPC()&lt;/font&gt; function. If it detects that something has been sent from the PC, it reads each character, with a 10ms delay between each character read to ensure that all characters are received from the PC. Without the delay, the Arduino executes so fast that it may read the first character from the input stream, try again, and the next character hasn&amp;#39;t made it over the slow (compared to the Arduino!) link from the PC - resulting in the input being chopped into two parts. This delay doesn&amp;#39;t cause a problem with the 595s as their outputs are latched, and so stay the way they were set until the next update - preventing any display flickering.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;In the &lt;font face="courier new,courier"&gt;loop()&lt;/font&gt; function, the logic to put the correct digit-byte in the register array is hard-coded. In the next rev I&amp;#39;ll make this register-count agnostic.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;As far as the circuit is concerned, I&amp;#39;ve got one 220ohm resistor on each 7-segment common cathode going to ground, which produces a bright enough display. I&amp;#39;ve also added a 100nF decoupling capacitor on the Vcc pin of each 595 to forestall any noise problems.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;The complete circuit diagram is as below (click for a larger version):&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/ShiftRegisters/7SegShiftRegisters2.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmall7SegShiftRegisters2.jpg" alt="" width="445" height="336" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Here&amp;#39;s the breadboard layout, with a close up of IC2 (click for larger versions):&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/ShiftRegisters/P1020798.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmallP1020798.JPG" alt="" width="314" height="208" /&gt;&lt;/a&gt;&amp;nbsp; &lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/ShiftRegisters/P1020799.jpg"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmallP1020799.JPG" alt="" width="235" height="250" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Once I&amp;#39;d figured out the wiring for one of the displays, adding the other three was pretty easy. At this point I ran out of 595s so I couldn&amp;#39;t take the experiment any further, but I do have a bunch more on the way from &lt;/font&gt;&lt;a href="http://www.jameco.com"&gt;&lt;font face="verdana,geneva" size="2"&gt;Jameco&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;I took a short (40s) video of the board in action - check it out &lt;/font&gt;&lt;a href="http://www.youtube.com/watch?v=5dvIgG5hWiI"&gt;&lt;font face="verdana,geneva" size="2"&gt;here on YouTube&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;And all the code is below(to download as a text file click &lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/ShiftRegisters/4x7SegHC595.txt"&gt;&lt;font face="verdana,geneva" size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;). Drop me a comment if you find this stuff useful!&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;[Edit: 12/19/10 - &lt;/font&gt;&lt;a href="http://arduino-for-beginners.blogspot.com/2010/12/digital-clock-with-7-segments-led-and.html"&gt;&lt;font face="verdana,geneva" size="2"&gt;here&amp;#39;s a link&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; to someone who built a clock based on my code below.]&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;Next up - replacing some of the shift registers with transistors to allow a bigger fan-out from the Arduino.&lt;/font&gt; 
&lt;/p&gt;
&lt;blockquote&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;/*&lt;br /&gt;
	&amp;nbsp; Driving multiple 7-seg displays with 74HC595 shift registers.&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; Feel free to re-use.&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp; 01/30/2010&lt;br /&gt;
	*/&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// This pin gets sets low when I want the 595s to listen&lt;br /&gt;
	const int&amp;nbsp; g_pinCommLatch = 6;&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// This pin is used by ShiftOut to toggle to say there&amp;#39;s another bit to shift&lt;br /&gt;
	const int&amp;nbsp; g_pinClock&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 7;&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// This pin is used to pass the next bit&lt;br /&gt;
	const int&amp;nbsp; g_pinData&amp;nbsp;&amp;nbsp;&amp;nbsp; = 4;&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// Definitions of the 7-bit values for displaying digits&lt;br /&gt;
	byte g_digits [10];&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// Current number being displayed&lt;br /&gt;
	int g_numberToDisplay = 0;&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// Number of shift registers in use&lt;br /&gt;
	const int g_registers = 4;&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// Array of numbers to pass to shift registers&lt;br /&gt;
	byte g_registerArray [g_registers];&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;void setup()&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp; pinMode (g_pinCommLatch, OUTPUT);&lt;br /&gt;
	&amp;nbsp; pinMode (g_pinClock, OUTPUT);&lt;br /&gt;
	&amp;nbsp; pinMode (g_pinData, OUTPUT);&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; Serial.begin (56600);&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; // Setup the digits array&lt;br /&gt;
	&amp;nbsp; // a = 8 b = 4 c = 2 d = 64 e = 32 f = 1 g = 16&lt;br /&gt;
	&amp;nbsp; g_digits [0] = 8 + 4 + 2 + 64 + 32 + 1;&lt;br /&gt;
	&amp;nbsp; g_digits [1] = 4 + 2;&lt;br /&gt;
	&amp;nbsp; g_digits [2] = 8 + 4 + 16 + 32 + 64;&lt;br /&gt;
	&amp;nbsp; g_digits [3] = 8 + 4 + 16 + 2 + 64;&lt;br /&gt;
	&amp;nbsp; g_digits [4] = 1 + 16 + 4 + 2;&lt;br /&gt;
	&amp;nbsp; g_digits [5] = 8 + 1 + 16 + 2 + 64;&lt;br /&gt;
	&amp;nbsp; g_digits [6] = 8 + 1 + 16 + 2 + 64 + 32;&lt;br /&gt;
	&amp;nbsp; g_digits [7] = 8 + 4 + 2;&lt;br /&gt;
	&amp;nbsp; g_digits [8] = 8 + 4 + 2 + 64 + 32 + 1 + 16;&lt;br /&gt;
	&amp;nbsp; g_digits [9] = 8 + 4 + 2 + 1 + 16 + 64;&lt;br /&gt;
	} // setup&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// Simple function to send serial data to one or more shift registers by iterating backwards through an array.&lt;br /&gt;
	// Although g_registers exists, they may not all be being used, hence the input parameter.&lt;br /&gt;
	void sendSerialData (&lt;br /&gt;
	&amp;nbsp; byte registerCount,&amp;nbsp; // How many shift registers?&lt;br /&gt;
	&amp;nbsp; byte *pValueArray)&amp;nbsp;&amp;nbsp; // Array of bytes with LSByte in array [0]&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp; // Signal to the 595s to listen for data&lt;br /&gt;
	&amp;nbsp; digitalWrite (g_pinCommLatch, LOW);&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; for (byte reg = registerCount; reg &amp;gt; 0; reg--)&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; byte value = pValueArray [reg - 1];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; for (byte bitMask = 128; bitMask &amp;gt; 0; bitMask &amp;gt;&amp;gt;= 1)&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite (g_pinClock, LOW);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite (g_pinData, value &amp;amp; bitMask ? HIGH : LOW);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite (g_pinClock, HIGH);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
	&amp;nbsp; }&lt;br /&gt;
	&amp;nbsp; // Signal to the 595s that I&amp;#39;m done sending&lt;br /&gt;
	&amp;nbsp; digitalWrite (g_pinCommLatch, HIGH);&lt;br /&gt;
	}&amp;nbsp; // sendSerialData&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// Print a message specifying valid inputs, given the number of registers defined and then consume all current input.&lt;br /&gt;
	void badNumber ()&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp; int dummy;&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; Serial.print (&amp;quot;Please enter a number from 0 to &amp;quot;);&lt;br /&gt;
	&amp;nbsp; for (int loop = 0; loop &amp;lt; g_registers; loop++)&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.print (&amp;quot;9&amp;quot;);&lt;br /&gt;
	&amp;nbsp; }&lt;br /&gt;
	&amp;nbsp; Serial.println (&amp;quot; inclusive.&amp;quot;);&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; while (Serial.available () &amp;gt; 0)&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; dummy = Serial.read ();&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; // Necessary to get all input in one go.&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; delay (10);&lt;br /&gt;
	&amp;nbsp; }&lt;br /&gt;
	} //badNumber&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;// Read a number from the PC with no more digits than the defined number of registers.&lt;br /&gt;
	// Returns: number to display. If an invalid number was read, the number returned is the current number being displayed&lt;br /&gt;
	//&lt;br /&gt;
	int readNumberFromPC ()&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp; byte incomingByte;&lt;br /&gt;
	&amp;nbsp; int&amp;nbsp; numberRead;&lt;br /&gt;
	&amp;nbsp; byte incomingCount;&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; if (Serial.available () &amp;gt; 0)&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; numberRead = 0;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; incomingCount = 0;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; while (Serial.available () &amp;gt; 0)&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; incomingByte = Serial.read () - 48;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; incomingCount++;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (incomingByte &amp;lt; 0 || incomingByte &amp;gt; 9 || incomingCount &amp;gt; g_registers)&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; badNumber ();&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return g_numberToDisplay;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; numberRead = 10 * numberRead + incomingByte;&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Necessary to get all input in one go.&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay (10);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.print (&amp;quot;Now displaying: &amp;quot;);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.println (numberRead, DEC);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; return numberRead;&lt;br /&gt;
	&amp;nbsp; }&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; return g_numberToDisplay;&lt;br /&gt;
	} // readNumberFromPC&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;br /&gt;
	&lt;font face="courier new,courier"&gt;void loop()&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp; g_numberToDisplay = readNumberFromPC ();&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; if (g_numberToDisplay &amp;lt; 10)&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [3] = g_digits [0];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [2] = g_digits [0];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [1] = g_digits [0];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [0] = g_digits [g_numberToDisplay];&lt;br /&gt;
	&amp;nbsp; }&lt;br /&gt;
	&amp;nbsp; else if (g_numberToDisplay &amp;lt; 100)&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [3] = g_digits [0];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [2] = g_digits [0];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [1] = g_digits [g_numberToDisplay / 10];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [0] = g_digits [g_numberToDisplay % 10];&lt;br /&gt;
	&amp;nbsp; }&lt;br /&gt;
	&amp;nbsp; else if (g_numberToDisplay &amp;lt; 1000)&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [3] = g_digits [0];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [2] = g_digits [g_numberToDisplay / 100];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [1] = g_digits [(g_numberToDisplay % 100) / 10];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [0] = g_digits [g_numberToDisplay % 10];&lt;br /&gt;
	&amp;nbsp; }&lt;br /&gt;
	&amp;nbsp; else&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [3] = g_digits [g_numberToDisplay / 1000];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [2] = g_digits [(g_numberToDisplay % 1000) / 100];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [1] = g_digits [(g_numberToDisplay % 100) / 10];&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; g_registerArray [0] = g_digits [g_numberToDisplay % 10];&lt;br /&gt;
	&amp;nbsp; }&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier"&gt;&amp;nbsp; sendSerialData (g_registers, g_registerArray);&lt;br /&gt;
	} // loop&lt;/font&gt; 
	&lt;/p&gt;
&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/O92gdf3qNjk" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/O92gdf3qNjk/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/Arduino-cascading-shift-registers-to-drive-7-segment-displays.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=60f64003-347b-43d2-876d-d1dc731f175f</guid>
      <pubDate>Sun, 31 Jan 2010 15:33:00 -0700</pubDate>
      <category>Arduino</category>
      <category>Example Code</category>
      <category>Example Movies</category>
      <category>LED Projects</category>
      <category>Shift Registers</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=60f64003-347b-43d2-876d-d1dc731f175f</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=60f64003-347b-43d2-876d-d1dc731f175f</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/Arduino-cascading-shift-registers-to-drive-7-segment-displays.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=60f64003-347b-43d2-876d-d1dc731f175f</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=60f64003-347b-43d2-876d-d1dc731f175f</feedburner:origLink></item>
    <item>
      <title>Arduino: figuring out shift registers</title>
      <description>&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;One of the parts that makes possible the scrolling message kit I built over the weekend (see &lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/post/Kit-building-Hansen-Hobbies-mini-scrolling-LED-sign-kit.aspx"&gt;&lt;font face="verdana,geneva" size="2"&gt;Kit building: Hansen Hobbies mini-scrolling LED sign kit&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;) is a shift register. This is a very neat device that uses at least 2 inputs to load 8 parallel outputs. The idea is to pulse a clock input for each bit of data in the 8-bit register, loading each bit in succession until all 8 bits have been loaded. The shift registers in the kit I made are 74HC164s, which means that the outputs immediately&amp;nbsp;go high or low to relfect&amp;nbsp;the bits as they&amp;#39;re loaded into the shift register and shifted along into their desired positions. Many people prefer a latched shift register, where the outputs reflect a steady-state of the register until all 8 new bits have been loaded, and then the outputs change to the new bits in the register (i.e the latched register has two registers - a true shift register and a storage register). &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;The simple algorithm to load a latched shift-register is: &lt;/font&gt;
&lt;/p&gt;
&lt;blockquote&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;pull the latch pin low &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;pull the clock pin low &lt;br /&gt;
	pull the data pin high or low to reflect bit 1 &lt;br /&gt;
	pull the clock pin high &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;&amp;lt;repeat for bits 2 through 8&amp;gt; &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="verdana,geneva" size="2"&gt;&lt;font face="courier new,courier"&gt;pull the latch pin high&lt;/font&gt; &lt;/font&gt;
	&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;It&amp;#39;s up to you whether you load the 8-bit value as MSB (most-significant-bit) first or LSB (least-significant-bit) first - you&amp;#39;ll soon work out if you&amp;#39;ve got it the wrong way around! &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;I&amp;#39;m going to use a 74HC595 shift register that can source 35mA per output - perfect for driving the LEDs in my 10-bar LED arrays. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;There are two ways to implement the logic above - using the Arduino shiftOut function or writing one yourself. I played around with&amp;nbsp;both to make sure I fully understood what&amp;#39;s going on - and I like bit-twiddling in C/C++. The Arduino site has a good language reference on shiftOut (see &lt;/font&gt;&lt;a href="http://www.arduino.cc/en/Reference/ShiftOut"&gt;&lt;font face="verdana,geneva" size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;) and also a tutorial on using the 74HC595 (see &lt;/font&gt;&lt;a href="http://www.arduino.cc/en/Tutorial/ShiftOut"&gt;&lt;font face="verdana,geneva" size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;). I decided to figure out how to use the chip myself so I internalized how to do it in future&amp;nbsp;- but I&amp;#39;m not trying to be a purist and re-inventing the wheel. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;The circuit is pretty simple - remember to pull the OutputEnable (active low) pin low and the MemoryClear (active low) pin high. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fShiftRegister.jpg" alt="" width="448" height="285" /&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;And a photo (click for larger image): &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/ShiftRegisters/P1020791.jpg"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmallP1020791.JPG" alt="" width="235" height="286" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;The code I used is below, with the two different functions to push data out to the shift register. I had a problem with the code where I originally had the &lt;font face="courier new,courier"&gt;counter&lt;/font&gt; variable in the &lt;font face="courier new,courier"&gt;loop()&lt;/font&gt; function as a &lt;font face="courier new,courier"&gt;byte&lt;/font&gt; and the LEDs&amp;nbsp;counted to the end and then stopped. I put in the serial output to do some testing and connected up with Windows HyperTerminal - so much easier to do&amp;nbsp;it with this than when trying to debug code I&amp;#39;d written in the storage engine of SQL Server :-)&amp;nbsp;Of course as soon as the counter value reached 256, it overflowed and was stored as 0, so no more&amp;nbsp;LEDs being lit up. If you do this, don&amp;#39;t forget to hangup before trying to upload a sketch to the Arduino otherwise it won&amp;#39;t be able to grab the COM port.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Here&amp;#39;s the code:&lt;/font&gt; 
&lt;/p&gt;
&lt;blockquote&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;/*&lt;br /&gt;
	&amp;nbsp; Driving a 74HC595 shift register&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp; 01/27/2010&lt;br /&gt;
	*/ &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;// This pin gets sets low when I want the 595 to listen&lt;br /&gt;
	const int&amp;nbsp; pinCommLatch = 2; &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;// This pin is used by ShiftOut to toggle to say there&amp;#39;s another bit to shift&lt;br /&gt;
	const int&amp;nbsp; pinClock&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 3; &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;// This pin is used to pass the next bit&lt;br /&gt;
	const int&amp;nbsp; pinData&amp;nbsp;&amp;nbsp;&amp;nbsp; = 4; &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;void setup()&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp; pinMode (pinCommLatch, OUTPUT);&lt;br /&gt;
	&amp;nbsp; pinMode (pinClock, OUTPUT);&lt;br /&gt;
	&amp;nbsp; pinMode (pinData, OUTPUT);&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; //Serial.begin (56600);&lt;br /&gt;
	} // setup &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;// Using the builtin shiftOut function&lt;br /&gt;
	void sendSerialData1 (&lt;br /&gt;
	&amp;nbsp; byte&amp;nbsp; value)&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp; // Signal to the 595 to listen for data&lt;br /&gt;
	&amp;nbsp; digitalWrite (pinCommLatch, LOW);&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; shiftOut (pinData, pinClock, MSBFIRST, value);&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; // Signal to the 595 that I&amp;#39;m done sending&lt;br /&gt;
	&amp;nbsp; digitalWrite (pinCommLatch, HIGH);&lt;br /&gt;
	}&amp;nbsp; // sendSerialData1 &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;// Using my own method with as few instructions as possible&lt;br /&gt;
	// Gotta love C/C++ for bit-twiddling!&lt;br /&gt;
	void sendSerialData2 (&lt;br /&gt;
	&amp;nbsp; byte&amp;nbsp; value)&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp; // Signal to the 595 to listen for data&lt;br /&gt;
	&amp;nbsp; digitalWrite (pinCommLatch, LOW); &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;&amp;nbsp; for (byte bitMask = 128; bitMask &amp;gt; 0; bitMask &amp;gt;&amp;gt;= 1)&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite (pinClock, LOW);&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite (pinData, value &amp;amp; bitMask ? HIGH : LOW);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite (pinClock, HIGH);&lt;br /&gt;
	&amp;nbsp; }&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; // Signal to the 595 that I&amp;#39;m done sending&lt;br /&gt;
	&amp;nbsp; digitalWrite (pinCommLatch, HIGH);&lt;br /&gt;
	}&amp;nbsp; // sendSerialData2&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	void loop()&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp; for (int counter = 1; counter &amp;lt; 256; counter++)&lt;br /&gt;
	&amp;nbsp; {&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; sendSerialData2 (counter); &lt;/font&gt;
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delay (75);&lt;br /&gt;
	&amp;nbsp; }&lt;br /&gt;
	} // loop &lt;/font&gt;
	&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;I recorded a quick video of the code above&amp;nbsp;driving the 595 to get the LEDs to count from 1 to 255 in binary - checkout it on YouTube &lt;/font&gt;&lt;a href="http://www.youtube.com/watch?v=oeJAATX0vek"&gt;&lt;font face="verdana,geneva" size="2"&gt;here&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Next up - daisy-chaining multiple shift-registers. &lt;/font&gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/3y1hV9MF4MY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/3y1hV9MF4MY/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/Arduino-figuring-out-shift-registers.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=934bb9f1-14b4-470b-b23a-61115f49f34f</guid>
      <pubDate>Thu, 28 Jan 2010 10:35:00 -0700</pubDate>
      <category>Arduino</category>
      <category>LED Projects</category>
      <category>Shift Registers</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=934bb9f1-14b4-470b-b23a-61115f49f34f</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=934bb9f1-14b4-470b-b23a-61115f49f34f</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/Arduino-figuring-out-shift-registers.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=934bb9f1-14b4-470b-b23a-61115f49f34f</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=934bb9f1-14b4-470b-b23a-61115f49f34f</feedburner:origLink></item>
    <item>
      <title>Arduino: figuring out transistors and associated resistors</title>
      <description>&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;My aim&amp;nbsp;while building all these cool circuits is to re-learn all the electronics theory I knew when I got my electronics degree, but have forgotten in the intervening 15 years! &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;The kinds of circuits I&amp;#39;m most interested in right now are those that drive large arrays of LEDs from an Arduino. To do that, I&amp;#39;m going to have to create multiplexer circuits using transistors and shift registers, as the Arduino doesn&amp;#39;t have enough IO pins to drive, say, 64 LEDs. The trouble is, I&amp;#39;ve forgotten how to do things like calculate the value of a base resistor and the algorithm for loading bits into a shift register.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;First things first - refresh memory on Ohm&amp;#39;s Law - Voltage = Current x Resistance. Now I can properly calculate the resistor required to put in series with an LED. The 10-bar red LED arrays I&amp;#39;m playing with have a 2.0V drop across the LED at 20mA current - so I need a resistor to take up the other 3.0V of my 5.0V supply and give me 20mA. R = V/I = 3V / 0.02A = 150ohms. This resistor is said to be limiting the current through the LED - without it the LED would burn out.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Now on to selecting a transistor that can switch the current. My electronics textbooks explain what to do, and I found&amp;nbsp;various web pages that explained things in different ways, some of them contradictory!&lt;/font&gt;&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;Kind of hard to find the right thing though - Googling for &amp;#39;Arduino transistor LED&amp;#39; or &amp;#39;transistor LED driver&amp;#39; and the like didn&amp;#39;t turn up anything simple and useful - hence this post.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;I want to switch on the current through the LED when the Arduino&amp;#39;s output pin is high, so I&amp;#39;m going to use an NPN transistor in common-emitter mode. If I wanted to switch it on when the output from the Arduino is low, I&amp;#39;d use a PNP transistor. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;I need a transistor that has: &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;1) a maximum collector current (I&lt;sub&gt;C&lt;/sub&gt;) greater than my desired load current of 20mA&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font size="2"&gt;2) &lt;font face="verdana,geneva"&gt;a minimum current gain (h&lt;sub&gt;FE&lt;/sub&gt;) that allows me to comfortably source a base current I&lt;sub&gt;B&lt;/sub&gt; from the Arduino pin that will give me the collector current I need. When the Arduino pin goes high, current flows into the transistor base, turning it on and allowing current to flow through the collector to the emitter - lighting up the LED. I don&amp;#39;t want too much current flowing into the transistor base otherwise it will damage it.&lt;/font&gt;&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;I want an I&lt;sub&gt;C&lt;/sub&gt; of 20mA, and the&amp;nbsp;maximum output current from the Arduino pin&amp;nbsp;is 40mA. The h&lt;sub&gt;FE&lt;/sub&gt; should be at least I&lt;sub&gt;C&lt;/sub&gt;/I&lt;sub&gt;B&lt;/sub&gt; * a safety factor (e.g. 10). In this case, that works out to be (20mA/40mA)*10 = 5. This isn&amp;#39;t really a concern here. If I was trying to drive 600mA from an IC that could only source 5mA through a transistor with a gain of 100, that would be a problem. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;On hand I have some BC337 transistors with a minimum current gain of 100&amp;nbsp;@ 150mA - perfect! &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Now I need to calculate the right base resistor value so the transistor will be fully on (saturated) and act as a switch&amp;nbsp;rather than acting as an amplifier (where collector current is proportional to base current). The required base current&amp;nbsp;&amp;nbsp;I&lt;sub&gt;B&lt;/sub&gt; =&amp;nbsp;I&lt;sub&gt;C&lt;/sub&gt;/h&lt;sub&gt;FE&lt;/sub&gt; = 20mA/100 = 0.2mA. This is way lower than I need to be careful of. If I go for a 4.7K resistor, this will give me I&lt;sub&gt;B&lt;/sub&gt; = (5V-0.7V)/4.7K = ~1mA - plenty to make sure I get the load current I want. The 0.7V is the voltage drop across the base-emitter junction when the transistor is on. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Amazing how all the theory comes flooding back - now I don&amp;#39;t feel like I&amp;#39;m groping in the dark picking resistor values! &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Now I&amp;#39;ve figured out the circuit to use, I&amp;#39;m going to draw a circuit diagram. I found a freeware tool from &lt;/font&gt;&lt;a href="http://www.expresspcb.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;ExpressPCB&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; that allows you to draw circuit diagrams really simply (and if I ever want to get PCBs made, I won&amp;#39;t need to learn another tool). I&amp;#39;d like to start making a habit of this so it&amp;#39;s easier for others to understand my circuit, and for my future reference. The circuit is below, with a photo (click for larger image): &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSimpleTransistor.jpg" alt="" width="326" height="305" /&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/SingleTransistor/P1020790.jpg"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmallP1020790.JPG" alt="" width="290" height="235" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;The Arduino code to test the circuit is very simple, using pin 5 to drive the transistor switch: &lt;/font&gt;
&lt;/p&gt;
&lt;blockquote&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;/*&lt;br /&gt;
	&amp;nbsp; Driving a simple transistor-LED circuit&lt;br /&gt;
	&amp;nbsp; &lt;br /&gt;
	&amp;nbsp; 01/26/2010&lt;br /&gt;
	*/&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;const&amp;nbsp;int driverPin = 5;&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;void setup()&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; pinMode (driverPin, OUTPUT);&lt;br /&gt;
	}&lt;/font&gt; 
	&lt;/p&gt;
	&lt;p&gt;
	&lt;font face="courier new,courier" size="2"&gt;void loop()&lt;br /&gt;
	{&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite (driverPin, HIGH);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; delay (1000);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; digitalWrite (driverPin, LOW);&lt;br /&gt;
	&amp;nbsp;&amp;nbsp;&amp;nbsp; delay (1000);&lt;br /&gt;
	}&lt;/font&gt; 
	&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;And there we have it. Now I have the basis for switching currents through multiple LEDs - which will be very useful for driving LED arrays. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Next up - using a shift register.&lt;/font&gt; 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/vFfAlI8XIOQ" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/vFfAlI8XIOQ/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/Arduino-figuring-out-transistors-and-associated-resistors.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=6ff640d7-d721-43f2-bbab-87757d0ee2a7</guid>
      <pubDate>Tue, 26 Jan 2010 20:36:00 -0700</pubDate>
      <category>Arduino</category>
      <category>Example Code</category>
      <category>LED Projects</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=6ff640d7-d721-43f2-bbab-87757d0ee2a7</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=6ff640d7-d721-43f2-bbab-87757d0ee2a7</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/Arduino-figuring-out-transistors-and-associated-resistors.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=6ff640d7-d721-43f2-bbab-87757d0ee2a7</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=6ff640d7-d721-43f2-bbab-87757d0ee2a7</feedburner:origLink></item>
    <item>
      <title>Kit building: Hansen Hobbies mini-scrolling LED sign kit</title>
      <description>&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Over the weekend I found some time to solder together a kit that I&amp;#39;d picked up before getting stuck into the Arduino. It&amp;#39;s the &lt;/font&gt;&lt;a href="http://www.hansenhobbies.com/products/elkits/mls/"&gt;&lt;font face="verdana,geneva" size="2"&gt;mini-scrolling LED sign kit&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; from &lt;/font&gt;&lt;a href="http://www.hansenhobbies.com/"&gt;&lt;font face="verdana,geneva" size="2"&gt;Hansen Hobbies&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; and seems to be the only non-RC kit they make. It&amp;#39;s a really nice kit that&amp;#39;s fun to put together and at $40 it&amp;#39;s not too expensive. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;The finished kit produces an 24x8 red-LED display, using&amp;nbsp;three 8x8 LED matrices. The LEDs are driven from the PIC16F628A microcontroller through three 74AC164 shift registers and eight PN2222A NPN transistors, with the transistors switching power to the rows of the matrices and the shift registers controlling the columns. The kit comes with comprehensive instructions and explanations of the circuit operation. Nicely done overall. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Here are some photos of the build process (click the image for a larger version): &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;1) The kit contents (I&amp;#39;d already started soldering when I realized I&amp;#39;d forgotten to take the initial photo) &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/MiniSignKit/P1020735.JPG"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmallP1020735.JPG" alt="" width="283" height="146" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;2) Finished with passive components. One of the resistors broke so I substituted one I had lying around - can you guess which one? :-) &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/MiniSignKit/P1020776.JPG"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmallP1020776.JPG" alt="" width="212" height="258" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;3) Finished with everything except the LED matrices. The components are packed in tight and the solder pads are very small - making for a few tricky soldering moments. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/MiniSignKit/P1020779.JPG"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmallP1020779.JPG" alt="" width="283" height="151" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;4) Everything in place. The LED matrices required some jiggling to get in - quite a few tiny movements to the pins with needle-nose pliers to get them to slot into the tiny through-holes. The PCB is very well put together with the shift register ICs on the underside from everything else to save space. &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/MiniSignKit/P1020780.JPG"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmallP1020780.JPG" alt="" width="283" height="199" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Everything worked on the first test! The four micro-tact switches control the editing of the message (all ASCII characters are there) and the message scrolling speed (8 speeds from stopped to blur). You can also connect the board up to a PC using RS232 or directly to another microcontroller - pretty neat.&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;The PIC is programmed with a &amp;#39;well done&amp;#39; message that displays until you put in your own. Below is a video of the first one I entered (click to play). &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.youtube.com/watch?v=rBBwdZaBA9E"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fP1020789.JPG" alt="" width="320" height="240" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Next up - using transistors with the Arduino to multiplex LED 10-bar arrays - eventually working up to designing and building my own scrolling sign using the Arduino, and beyond!&lt;/font&gt; 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/K7z21gL6Wi0" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/K7z21gL6Wi0/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/Kit-building-Hansen-Hobbies-mini-scrolling-LED-sign-kit.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=9134ecd9-b2c7-496a-a21a-26e127df35cb</guid>
      <pubDate>Mon, 25 Jan 2010 14:30:00 -0700</pubDate>
      <category>Kit Building</category>
      <category>LED matrix</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=9134ecd9-b2c7-496a-a21a-26e127df35cb</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=9134ecd9-b2c7-496a-a21a-26e127df35cb</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/Kit-building-Hansen-Hobbies-mini-scrolling-LED-sign-kit.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=9134ecd9-b2c7-496a-a21a-26e127df35cb</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=9134ecd9-b2c7-496a-a21a-26e127df35cb</feedburner:origLink></item>
    <item>
      <title>More Arduino stuff from SparkFun arrived</title>
      <description>&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Oh man - more of the Arduino gear I ordered has arrived but I&amp;#39;m up to my ears in real work so can&amp;#39;t play with this stuff yet. Here&amp;#39;s a photo of what came (click for larger image): &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;a href="http://www.sqlskills.com/blogs/paulselec/content/binary/SparkFun/P1020738.jpg"&gt;&lt;font face="verdana,geneva" size="2"&gt;&lt;img src="http://www.sqlskills.com/blogs/paulselec/image.axd?picture=2010%2f1%2fSmallP1020738.JPG" alt="" width="448" height="336" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; &lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;In the box today:&lt;/font&gt; 
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
	&lt;div&gt;
	&lt;font face="verdana,geneva" size="2"&gt;An &lt;/font&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9152"&gt;&lt;font face="verdana,geneva" size="2"&gt;Arduino Mega&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; + &lt;/font&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=9346"&gt;&lt;font face="verdana,geneva" size="2"&gt;MegaShield kit&lt;/font&gt;&lt;/a&gt; 
	&lt;/div&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;div&gt;
	&lt;font face="verdana,geneva" size="2"&gt;Another &lt;/font&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=666"&gt;&lt;font face="verdana,geneva" size="2"&gt;Arduino USB board&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; + &lt;/font&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=7914"&gt;&lt;font face="verdana,geneva" size="2"&gt;ProtoShield kit&lt;/font&gt;&lt;/a&gt; 
	&lt;/div&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;div&gt;
	&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=637"&gt;&lt;font face="verdana,geneva" size="2"&gt;640x480 CMOS camera module&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; + &lt;/font&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=7904"&gt;&lt;font face="verdana,geneva" size="2"&gt;breakout board&lt;/font&gt;&lt;/a&gt; 
	&lt;/div&gt;
	&lt;/li&gt;
	&lt;li&gt;
	&lt;div&gt;
	&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=8798"&gt;&lt;font face="verdana,geneva" size="2"&gt;Laptop decoration stickers&lt;/font&gt;&lt;/a&gt;&lt;font face="verdana,geneva" size="2"&gt; :-)&lt;/font&gt; 
	&lt;/div&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Looking forward to playing with the camera. My dissertation at college was Rasterizing Scanned Maps - automatically picking out contour lines from digitized topology maps to feed into a flight-simulator, so we could fly around anywhere in the world. I got quite a lot of the way there, but I think it&amp;#39;s really applicable to automatic object recognition and navigation for robotics. I&amp;#39;ve got a &lt;a href="http://www.lynxmotion.com/Product.aspx?productID=592&amp;amp;CategoryID="&gt;Johnny-5 kit from LynxMotion&lt;/a&gt; I&amp;#39;m going to hook this up to - should be fun!&lt;/font&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;font face="verdana,geneva" size="2"&gt;Back to work...&lt;/font&gt; 
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsElectronics/~4/80YlkqEP_rc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/PaulsElectronics/~3/80YlkqEP_rc/post.aspx</link>
      <author>paul.nospam@nospam.sqlskills.com (paul)</author>
      <comments>http://www.sqlskills.com/blogs/paulselec/post/More-Arduino-stuff-from-SparkFun-arrived.aspx#comment</comments>
      <guid isPermaLink="false">http://www.sqlskills.com/blogs/paulselec/post.aspx?id=60c13065-8342-4905-86fd-d9ff800b8567</guid>
      <pubDate>Wed, 20 Jan 2010 13:43:00 -0700</pubDate>
      <category>Arduino</category>
      <category>Johnny-5</category>
      <category>CMOS camera</category>
      <category>Arduino Mega</category>
      <dc:publisher>paul</dc:publisher>
      <pingback:server>http://www.sqlskills.com/blogs/paulselec/pingback.axd</pingback:server>
      <pingback:target>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=60c13065-8342-4905-86fd-d9ff800b8567</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.sqlskills.com/blogs/paulselec/trackback.axd?id=60c13065-8342-4905-86fd-d9ff800b8567</trackback:ping>
      <wfw:comment>http://www.sqlskills.com/blogs/paulselec/post/More-Arduino-stuff-from-SparkFun-arrived.aspx#comment</wfw:comment>
      <wfw:commentRss>http://www.sqlskills.com/blogs/paulselec/syndication.axd?post=60c13065-8342-4905-86fd-d9ff800b8567</wfw:commentRss>
    <feedburner:origLink>http://www.sqlskills.com/blogs/paulselec/post.aspx?id=60c13065-8342-4905-86fd-d9ff800b8567</feedburner:origLink></item>
  </channel>
</rss>

