<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Keith&#039;s Electronics Blog &#187; TechArt</title>
	<atom:link href="http://www.neufeld.newton.ks.us/electronics/?cat=4&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.neufeld.newton.ks.us/electronics</link>
	<description></description>
	<lastBuildDate>Fri, 18 Apr 2025 00:10:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Solar Charging and Switching Circuit for Outdoor Sculpture Installation</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1365</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1365#comments</comments>
		<pubDate>Sun, 29 May 2011 19:28:46 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Inside]]></category>
		<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1365</guid>
		<description><![CDATA[Over the winter, my friend Steve Atwood got a commission for a sculpture to be installed in the Wichita Falls, TX Kemp Center for the Arts &#8220;Art on the Green&#8221; sculpture garden from May 2011 &#8211; 2012. He had in mind to continue a series of his sculptures based on the form of a fishing [...]]]></description>
			<content:encoded><![CDATA[<p>Over the winter, my friend <a href="http://www.atwoodstudio.com/">Steve Atwood</a> got a commission for a sculpture to be installed in the Wichita Falls, TX <a href="http://www.kempcenter.org/SculptureGarden.php">Kemp Center for the Arts &#8220;Art on the Green&#8221; sculpture garden</a> from May 2011 &#8211; 2012.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/255032_2017478126138_1519426531_32194551_489004_n.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/255032_2017478126138_1519426531_32194551_489004_n_mid.jpg" alt="Lure 22 V2.0 by Stephen Atwood at Kemp Center for the Arts, Wichita Falls, TX" /></a></p>
<p>He had in mind to continue a series of his sculptures based on the form of a fishing lure but wanted to enhance this sculpture with one or more LEDs, preferably that would come on only at night.  We discussed a wide variety of options that we hope to develop for another installation in the future; but in the end, in the interest of time for this project, Steve found control modules that flash up to five LEDs at random and installed them behind a set of cones protruding from a recessed panel.</p>
<p>He asked how to make the LEDs turn on at night and also wondered whether he could power them for a year from a primary battery or whether he should use rechargeables.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/255487_2017475646076_1519426531_32194549_3873647_n.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/255487_2017475646076_1519426531_32194549_3873647_n_mid.jpg" alt="Lure 22 V2.0 by Stephen Atwood at Kemp Center for the Arts, Wichita Falls, TX" /></a></p>
<p>About seven years ago, I had come into possession of some discarded solar yard lights, and out of curiosity had reverse-engineered their charging and control circuits.  Since yard lights accomplish both functions &#8212; charging and switching &#8212; I figured the circuit would be perfect for the sculpture.  I was able to find one and instruct Steve how to modify it for his needs.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/solar-yard-light-sch.png"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/solar-yard-light-sch.png" alt="Solar yard light schematic" /></a></p>
<p>The circuit is very simple and I find it rather elegant.  During the day, the solar panel assembly (left &#8212; for want of a proper schematic symbol, I just drew another battery) charges two AA cells through a diode that prevents the battery from damaging the panel with reverse voltage at night.  Additionally, through the R<sub>1</sub> &#8211; R<sub>2</sub> voltage divider, the solar panel pulls up the base of Q<sub>1</sub>, switching it off and allowing R<sub>3</sub> to pull up the base of Q<sub>2</sub>, switching it off and switching off the load LED<sub>1</sub>.</p>
<p>At night, the panel&#8217;s output approaches 0V and R<sub>2</sub> pulls down Q<sub>1</sub>&#8216;s base, causing Q<sub>1</sub> to conduct and pull down Q<sub>2</sub>&#8216;s base (in a Darlington-like arrangement &#8212; I don&#8217;t know whether it&#8217;s still considered a proper Darlington with R<sub>3</sub> pulling up the Q<sub>1</sub> emitter &#8211; Q<sub>2</sub> base connection), switching on Q<sub>2</sub> and LED<sub>1</sub>.  In fact, depending on the panel&#8217;s exact voltage, the load may switch on even before full darkness, and R<sub>1</sub> &#8211; R<sub>2</sub> can be tweaked to tune the turn-on point.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/solar-module.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/solar-module_mid.jpg" alt="Control board from solar yard light, modified" /></a></p>
<p>Steve removed the LED from the control board and replaced it and the fly wires for the solar panel and battery with screw-terminal connectors for ease of installation inside the sculpture.  He bought a new solar panel with a higher output voltage to charge the higher-voltage battery for the white LEDs he wanted to use (the yellow LEDs in my yard lights didn&#8217;t require as high a forward voltage) and milled a Lexan cover for it to protect the panel from hail, with an O-ring groove to protect it from rain as well.</p>
<p>With higher battery and solar panel voltages, Steve indicated the load was turning on before the ambient light got as dark as he wanted, so I told him how to locate R<sub>1</sub> and replace it with fly wires to a 100K pot.  After the swap, he said he was able to tune it perfectly and he was delighted.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/253079_2017479646176_1519426531_32194552_3162450_n.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/05/20/253079_2017479646176_1519426531_32194552_3162450_n_mid.jpg" alt="Lure 22 V2.0 by Stephen Atwood at Kemp Center for the Arts, Wichita Falls, TX, night view" /></a></p>
<p>I&#8217;ve not had a chance to visit the sculpture garden and probably won&#8217;t while Lure 22 is installed.  If anyone&#8217;s in the area, I&#8217;d love to hear from you how well it&#8217;s working and how well the electronics hold up over the course of a year outdoors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1365</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Does Used Tinnit Ever Work?</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=1212</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=1212#comments</comments>
		<pubDate>Fri, 21 Jan 2011 06:28:00 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=1212</guid>
		<description><![CDATA[The board being too long for my Pyrex dish and the overlap in the middle notwithstanding, this dull, mottled finish is typical of what I get every time I use TInnit other than the day I mix it. The precipitate never re-dissolves; and I&#8217;m guessing that the salts sitting directly on the board are what [...]]]></description>
			<content:encoded><![CDATA[<p>The board being too long for my Pyrex dish and the overlap in the middle notwithstanding, this dull, mottled finish is typical of what I get every time I use TInnit other than the day I mix it.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/01/21/DSCN7645.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/01/21/DSCN7645_mid.jpg" alt="PC board after tinning in used Tinnit" /></a></p>
<p>The precipitate never re-dissolves; and I&#8217;m guessing that the salts sitting directly on the board are what cause the mottling.</p>
<p>I find this curious, as I mixed this batch only two weeks ago, when it worked noticeably better than this &hellip; although now that I mention it, I think even then it produced duller results than it has in the past.  Perhaps I exceeded the shelf life of the unopened package, so perhaps I&#8217;m being unduly hard on the Tinnit; but I&#8217;ve had the same problem before.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2011/01/21/DSCN7652.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2011/01/21/DSCN7652_mid.jpg" alt="PC board after tinning in Tinnit and wet-sanding" /></a></p>
<p>I&#8217;ve been having good luck lately with scouring pads to shine up the boards; but tonight I had to resort to wet-sanding.  Turned out fairly well.</p>
<p>No, that&#8217;s not how I typically lay out circuit boards.</p>
<p>Yes, I&#8217;ll be posting a <em>lot</em> more about what I&#8217;ve been doing for the last month as soon as Steve and I get his sculpture delivered to the gallery before 17:00 tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=1212</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wired IV</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=571</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=571#comments</comments>
		<pubDate>Fri, 22 May 2009 13:28:06 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=571</guid>
		<description><![CDATA[The video from this year&#8217;s Technology: Art and Sound by Design final show is now posted: Wired IV from MRC Video Services on Vimeo. And I&#8217;m very impressed with our students&#8217; write-ups of their projects on the class blog, including pictures, video, circuit diagrams, and Arduino and Pd code. Go students!!!]]></description>
			<content:encoded><![CDATA[<p>The video from this year&#8217;s <a href="http://cratel.wichita.edu/cratel/TASD2009">Technology: Art and Sound by Design</a> final show is now posted:</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=4629343&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=4629343&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object>
<p><a href="http://vimeo.com/4629343">Wired IV</a> from <a href="http://vimeo.com/videoservices">MRC Video Services</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>And I&#8217;m very impressed with our students&#8217; <a href="http://cratel.wichita.edu/blogs/TASD2009/category/final-project/">write-ups of their projects on the class blog</a>, including pictures, video, circuit diagrams, and Arduino and Pd code.</p>
<p>Go students!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=571</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LM34DZ Fahrenheit Temperature Sensor</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=131</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=131#comments</comments>
		<pubDate>Mon, 02 Feb 2009 17:49:05 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Circuits]]></category>
		<category><![CDATA[LogoChip]]></category>
		<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=131</guid>
		<description><![CDATA[This started as notes I made to myself long ago for the LogoChip, but they apply equally to the Arduino A/D converters. The LM34DZ is a temperature sensor in a TO-92 case available from All Electronics for $2.50. It has the handy characteristic of reading an output voltage that directly corresponds to Fahrenheit temperature in [...]]]></description>
			<content:encoded><![CDATA[<p>This started as notes I made to myself long ago for the LogoChip, but they apply equally to the Arduino A/D converters.</p>
<p>The LM34DZ is a temperature sensor in a TO-92 case available from <a href="http://www.allelectronics.com/make-a-store/item/LM34DZ/FAHRENHEIT-TEMPERATURE-SENSOR/-/1.html">All Electronics</a> for $2.50.  It has the handy characteristic of reading an output voltage that directly corresponds to Fahrenheit temperature in a ratio of 10mV per &deg;F.  That is, at 70&deg;F it reads 70 * 10mV = 700mV.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2009/02/01/DSCN2781.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2009/02/01/DSCN2781_mid.jpg" alt="LM34DZ Fahrenheit temperature sensor" /></a></p>
<p>With a direct output voltage (rather than the varying resistance that many thermal probes provide), it&#8217;s perfect for hooking to a microcontroller A/D input.  So, how to convert the A/D reading back into Fahrenheit temperature?</p>
<p>Well, the sensor reads 10mV (or .01V) per &deg;F.  Microcontroller A/D converters tend to have 5V input and read 1024 steps over the 0-5V range.</p>
<blockquote><p>1024 steps / 5V &asymp; 205 steps / V</p></blockquote>
<p>So</p>
<blockquote><p>(.01V / &deg;F) * (205 steps / V) &asymp; 2 steps / &deg;F</p></blockquote>
<p>Thus you can get a &#8220;maybe close enough&#8221; approximation with code like</p>
<blockquote><p>tempF = analogRead(lm34Pin) / 2;</p></blockquote>
<p>With a conversion error of +2.4%, this&#8217;ll get you within a couple of degrees at room temperature &#8212; close enough to make some macro-level observations about whether it&#8217;s getting warmer or colder for a physical computing project.  Since the stated accuracy is only 1&deg;F anyway, that&#8217;s not too bad.</p>
<p>If you need a more accurate conversion, you&#8217;ll need to use floating-point arithmetic if you have it (which the Arduino <del datetime="2009-02-04T14:36:33+00:00">doesn&#8217;t</del> <em>[correction: does]</em>) or find a fixed-point arithmetic library if you don&#8217;t.  Or if your integer variables are large enough (at least 17 unsigned bits for temperatures up to 127&deg;F, 18 bits up to 255&deg;F), you can rearrange the order of calculation like so:</p>
<blockquote><p>tempF = (1024 * analogRead(lm34Pin)) / 5;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=131</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>&#8220;Organic Energy Cloud&#8221; Installation</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=280</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=280#comments</comments>
		<pubDate>Tue, 27 Jan 2009 23:32:59 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=280</guid>
		<description><![CDATA[This has been a tough post for me to get around to writing, mainly because I don&#8217;t feel I have particularly good pictures of the process or the result, as I was working so intently during the installation that I really didn&#8217;t have time to stop and document. But here&#8217;s what I have. Back in [...]]]></description>
			<content:encoded><![CDATA[<p>This has been a tough post for me to get around to writing, mainly because I don&#8217;t feel I have particularly good pictures of the process <em>or</em> the result, as I was working so intently during the installation that I really didn&#8217;t have time to stop and document.  But here&#8217;s what I have.</p>
<p>Back in November, I made a small <a href="?p=267">edge-lit plexiglass demo</a> as a technology study for a large LED and plastic piece that came to be called &#8220;Organic Energy Cloud.&#8221;  I&#8217;ve already written about the <a href="?p=274">design and construction of the LED driver modules</a>; all that remains is the Arduino code and the installation.</p>
<h4>Assembly</h4>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/28/DSCN2373.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/28/DSCN2373_mid.jpg" alt="Lisa Rundstrom installing LEDs on Organic Energy Cloud exhibit" /></a></p>
<p>That Friday, while I was connecting all the wires together and working on Arduino code, Lisa was hanging plastic,</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2452.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2452_mid.jpg" alt="A6276 LED driver board, wires, and plastic in Lisa Rundstrom's Organic Energy Cloud" /></a></p>
<p>placing LED controllers in it,</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2439.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2439_mid.jpg" alt="Wires and acrylic in Lisa Rundstrom's Organic Energy Cloud" /></a></p>
<p>routing wires, and hot-gluing the SMT LEDs onto the ends and bends of the plastic pieces.</p>
<h4>Melty Disaster (Having Nothing to Do with Hot Glue)</h4>
<p>I had been programming LED patterns into the Arduino, testing and fixing some bad connections, and occasionally alarming Lisa and her helpers by making everything go dark (Alarmed words from the ladder: &#8220;Did I do something???&#8221;) or light (&#8220;Whoa!, what&#8217;s that?&#8221;).</p>
<p>About 18:50, ten minutes before the show was scheduled to open, I was running wire from DC motors attached to a couple of bicycle wheels (it was a bicycle-themed show called rEvolve; more on that when we collect all the materials and get the web site up) to the breadboard, and the black jumper wire between the breadboard and the Arduino melted right in front of my face.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2420.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2420_mid.jpg" alt="Arduino and Organic Energy Cloud bus/wiring" /></a></p>
<p>It turned bright orange, the insulation was dripping off of it, and I couldn&#8217;t figure out what tool I might have at hand that I could use to disconnect things without getting burned.  It only lasted a second before it melted the wire, too &#8212; even had I jumped for the switch on the PC power supply I was using, the circuit would have opened from the wire melting before the power supply&#8217;s capacitors had drained.</p>
<p>After discarding the scorched ends of the jumper wire, I looked over the circuit carefully and couldn&#8217;t find anything wrong, and I still haven&#8217;t figured out what happened.  The melted wire was the ground wire connecting the power supply to the Arduino via the breadboard.  My wild speculation is that I bumped something that shorted, the wires warmed up and increased their resistance, and the ground wire became the resistor that now dissipated all of the circuit&#8217;s energy.</p>
<p>I hooked things back up and with great trepidation (and this time ready to kill power if needed) turned things back on, and they seemed to work.  The Arduino booted and resumed its test pattern, the lights came on, etc.  But I quickly found that I no longer had connectivity between the iBook and the Arduino.</p>
<p>Since the Arduino appeared to work except for the USB interface, my immediate guess was that the FTDI USB-serial chip had burned out &#8212; which turned out to be correct, and which <a href="?p=328">I have since successfully replaced</a>.  I had brought another Arduino to use as a backup if anything happened to my first one; but with now five minutes before the official gallery opening, and early arrivals already wandering around, I didn&#8217;t feel I had time to swap out the Arduino, program the new one, and be confident everything was going to work.</p>
<p>Fortunately, I had a reasonable program running at the time, which picked a random LED out of the entire piece and then randomly turned it on or off:</p>
<pre>
  cont = FIRST_BANK + random(LAST_BANK + 1 - FIRST_BANK);
  led = random(32);

  if (random(10) > 3) {
    leds[cont] |= (long) 1 << led;
  } else {
    leds[cont] &#038;= ~ ((long) 1 << led);
  }
  a6276_long(leds[cont]);
  a6276_latch(cont);
</pre>
<p>If that doesn't make sense, spend a little time thinking about how <em>you</em> would program a nice, random flickering effect with a bunch of LEDs.</p>
<p><a href="http://www.neufeld.newton.ks.us/files/electronics/led-cloud/led_cloud_test_multi.pde">Here's the whole program</a>, commented-out test code and all, since even this was still supposed to be test code.  That's what we left running all evening.</p>
<h4>And the Show Goes On</h4>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/28/DSCN2377.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/28/DSCN2377_mid.jpg" alt="Lisa Rundstrom's Organic Energy Cloud exhibit" /></a></p>
<p>Ready or not, the lights go out, the people come in, and the girls at the refreshments table start serving coffee and hot chocolate "with or without something fun in it."</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/28/DSCN2393.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/28/DSCN2393_mid.jpg" alt="Lisa Rundstrom's Organic Energy Cloud exhibit" /></a></p>
<p>This piece deviated far from its original conception, and also ended up not being fully realized due to scheduling and time issues, but it's only fair to show it with the bicycles, even though they no longer made sense as part of the exhibit.</p>
<p>Finally, here's <a href="http://www.vimeo.com/2672700">a video of the cloud</a> that was shot by Tom McGuire.  Tom had already posted it to YouTube, but I found that the compression had blurred almost all of the detail.  He graciously gave me a copy of the raw footage from his camera (which looked fantastic), and between iMovie and Vimeo, I think I managed to keep a little more detail in some of the closeups.</p>
<h4>Aftermath</h4>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2443.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2443_mid.jpg" alt="Lisa Rundstrom's Organic Energy Cloud by the light of day" /></a></p>
<p>The group opened the gallery for another show on the next Thursday evening when I had to be out of town, and we had to be cleared out of the space by that Saturday morning.  Arriving at 06:00 Saturday gave me a chance to take a few more pictures with the space lighted, which show a little more detail of the components of the piece and of the space in which the cloud was installed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=280</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A6276 LED Controllers for &#8220;Organic Energy Cloud&#8221;</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=274</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=274#comments</comments>
		<pubDate>Tue, 30 Dec 2008 02:38:17 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Inside]]></category>
		<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=274</guid>
		<description><![CDATA[My earlier edge-lit plexiglass demo was a study for an art/technology collaboration with Lisa Rundstrom that became known as &#8220;Organic Energy Cloud,&#8221; installed at Diver Studio for the November 28 Final Friday. Lisa and I ended up agreeing on 200 LEDs (and ultimately installing 160). I had decided early on that I wanted to use [...]]]></description>
			<content:encoded><![CDATA[<p>My earlier <a href="?p=267">edge-lit plexiglass demo</a> was a study for an art/technology collaboration with Lisa Rundstrom that became known as <a href="?p=280">&#8220;Organic Energy Cloud,&#8221;</a> installed at Diver Studio for the November 28 Final Friday.</p>
<p>Lisa and I ended up agreeing on 200 LEDs (and ultimately installing 160).  I had decided early on that I wanted to use two A6276 16-LED drivers to a board, for distributed LED control, all run by an Arduino.  Once I got all my parts, over the November 22 weekend, I designed and began assembling the driver boards.</p>
<h4>Schematic and Boards</h4>
<p><a href="http://www2.neufeld.newton.ks.us/files/electronics/led-cloud/driver.png"><image src="http://www2.neufeld.newton.ks.us/files/electronics/led-cloud/driver.png" alt="A6276 32-LED driver schematic" /></a></p>
<p>The schematic is dead simple &#8212; daisy-chained A6276es, common clock and latch lines, output enable tied active (low).  For speed and cost, I planned card-edge connectors to solder all the LED and &#8220;umbilical&#8221; connections to.  Although the A6276 doesn&#8217;t have separate digital and analog grounds, I used separate wires in the umbilical for digital and LED V+, and I doubled the GND and LED V+ lines for current-carrying capacity.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/24/DSCN2358.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/24/DSCN2358_mid.jpg" alt="Copper PCB with A6276 LED control boards milled" /></a></p>
<p>I hand-etched a prototype PCB to make sure the design worked, but it was pretty time-consuming and not my most beautiful work (especially being a two-sided board).  <a href="http://www.instructables.com/member/Tom+McWire/">Tom McGuire</a> milled me a much more beautiful set of boards (although not using <em>that</em> mill), and did a very nice job using the drill holes as registration marks to line up the milling for the back side.</p>
<h4>Assembly</h4>
<p>Monday the 24th, I started pressing my friends into service for slave labor.  Jeremy and Mindy were my first victims, and together we got all the PCBs and about half the LEDs assembled.  Jeremy was stripping wire ends and Mindy and I were soldering &#8212; she did a <em>fantastic</em> job, especially for someone who had never soldered electronics before.</p>
<p><a href="http://www2.neufeld.newton.ks.us//images/electronics/2008/12/28/DSCN2474.JPG"><img src="http://www2.neufeld.newton.ks.us//images/electronics/2008/12/28/DSCN2474_mid.jpg" alt="Soldering wires to SMT LEDs with clothespin vise" /></a></p>
<p>The key to retaining a shred of sanity while soldering wires onto SMT LEDs is a good soldering jig.  Sunday night while assembling my prototype control board, I had tried to assemble LEDs with just the helping hands vise, and the LEDs kept going crooked in the alligator jaws.  It took me about an hour to solder sixteen, and I knew that wouldn&#8217;t get 200 done in time.</p>
<p>I figured my mom still had some wooden clothespins, and after a little quality time on the disc sander, I had some perfectly elegant, incredibly functional SMT LED soldering jigs.  Production speed skyrocketed; frustration plummeted; stabbiness dissipated.</p>
<p><a href="http://www2.neufeld.newton.ks.us//images/electronics/2008/12/28/DSCN2480.jpg"><img src="http://www2.neufeld.newton.ks.us//images/electronics/2008/12/28/DSCN2480_mid.jpg" alt="Assembled 32-LED controller" /></a></p>
<p>With the LED wires attached, and especially once the umbilicals were on (not shown here), the controllers really reminded me of facehuggers.</p>
<p>Rather than try to size LED wires specifically for LED placement within the piece, we made them all the same length.  Lawrence, Gail, and the kids (especially Phill and Jake) stayed up late the next night helping me finish soldering LEDs and assembling the controllers.</p>
<h4>Bus</h4>
<p>I designed the controllers so that the clock and data lines would run in parallel to every board, but each board would have a separate latch line.  It doesn&#8217;t matter what&#8217;s in the A6276&#8242;s internal serial buffer &#8212; it only matters when <em>that chip</em> gets its buffer latched to the outputs &#8212; and this arrangement made for a minimum of connections to the Arduino.</p>
<p>I knew we were going to be plugging and unplugging the umbilicals from the Arduino multiple times before we got everything assembled; but because of the parallel bus arrangement, there were too many wires to plug the umbilicals directly into the Arduino&#8217;s headers.  I thought about plugging the bus together on a breadboard, but it would have made for a <em>lot</em> of jumper wires for the paralleled lines.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2423.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2423_mid.jpg" alt="Organic Energy Cloud bus" /></a></p>
<p>It ended up feeling easiest to design a small bus board with female headers on it, with the power, data, and clock lines bused, and the latch lines run to a separate 8-pin header at the top.  (The bus board could run eight controllers &#8212; 256 LEDs &#8212; although we only ended up using five controllers.)  I would have chosen to use ribbon cable to connect the latch header to the Arduino, except I forgot about that jumper and had to make something quickly out of borrowed wire while we were doing the gallery installation.</p>
<h4>All Together</h4>
<p>Because I was prepared to run 200 LEDs at &ge; 20mA each, the small power supplies I have weren&#8217;t going to be up to the task, and I used a PC power supply, not visible here except for its DC power cables.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2420.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/30/DSCN2420_mid.jpg" alt="Arduino and Organic Energy Cloud bus/wiring" /></a></p>
<p>The Arduino is plugged into the bus and the PC power supply, and in the foreground is a breadboard for a part of the project that didn&#8217;t come to fruition.  This is actually how it sat during the show &#8212; Lisa is fascinated by technological infrastructure, and the mess of wires was part of the &#8220;organicness&#8221; of the piece.  More on that in a <a href="?p=280">follow-up post on the installation</a>.</p>
<h4>Controller Enhancements</h4>
<p><a href="http://www2.neufeld.newton.ks.us//images/electronics/2008/12/28/DSCN2485.jpg"><img src="http://www2.neufeld.newton.ks.us//images/electronics/2008/12/28/DSCN2485_mid.jpg" alt="32-LED controller, closeup" /></a></p>
<p>Soldering all the LED wires to the card-edge connectors turned out to be a bit of a chore with someone helping with two vises and a needlenose pliers, and incredibly tedious to do alone.  All along, I&#8217;ve been thinking about how I could design or redesign the controllers so they&#8217;d be practical for artists to use without me there to assemble everything, and these boards just aren&#8217;t suitable.  I have three crucial considerations that weren&#8217;t anywhere near met:</p>
<ul>
<li>Wiring the LEDs to the board needs to be easy.  (Soldering individual wires was time-consuming and hard to do alone.)</li>
<li>Replacement of burned-out LEDs needs to be easy.  (Desoldering wires from the controller and resoldering new wires isn&#8217;t practical, especially once the board is installed in a piece.)</li>
<li>Replacement of burned-out boards needs to be easy.  (Desoldering <em>all</em> the wires from a bad board would be a nightmare.)</li>
</ul>
<p>So ideally I&#8217;m looking for a connector that would make it quick and easy to change individual connections on the LED side, and also quick and easy to change a whole batch of connections on the board side &#8212; like a daughtercard with an edge connector on the bottom and jacks for LED wires on the top.</p>
<p>Coincidentally, the week after the show, I was at Anixter&#8217;s Chicago facility evaluating replacement keycard door access control systems for work, and I found what looks like the perfect connector on the back side of some HID card readers.  The connector has screw terminals on the top for the wires that go to the door strike, motion sensor, etc., and plugs on the bottom to snap the whole thing into the socket on the card reader.  The guys from the lab told me they think it&#8217;s called a Phoenix or Buchanon connector, and kindly gave me one to take home!</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/12/29/DSCN2498.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/12/29/DSCN2498_mid.jpg" alt="Pluggable terminal strip, top side" /></a></p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/12/29/DSCN2506.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/12/29/DSCN2506_mid.jpg" alt="Pluggable terminal strip, bottom side" /></a></p>
<p>Now I just need to spend some time going through about a hundred pages of the Digi-Key catalog to see whether they carry this, and maybe to see what else they have that&#8217;s similar and might be even better.</p>
<p>Meanwhile, this past weekend during a scheduled power outage in our computer room for some kill switch and fire suppression work, I found this connector (upper left) inside the fire alarm control panel.  (BlackBerry camera + closeup == fuzzzzzzz .&nbsp;.&nbsp;.)</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/12/27/IMG00024-sharpened.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/12/27/IMG00024-sharpened_mid.jpg" alt="Fire suppression control panel with quick-release wire connectors" /></a></p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/12/27/IMG00023-sharpened.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/12/27/IMG00023-sharpened_mid.jpg" alt="Fire suppression control panel with quick-release wire connectors" /></a></p>
<p>I really like the orange quick-release levers on this &#8212; it&#8217;d sure be handy for hooking up the wires in the first place (presuming, as with the screw terminals above, that one is using a large enough gauge of wire that one <em>can</em> clamp them and make good contact).  I also love that the wires feed out the top of the connector instead of the side.  But it doesn&#8217;t offer bulk plug action like the above Phoenix-or-Buchanon connector.</p>
<p>Especially if the two had the same pin spacing, maybe one could offer boards with choice of connector.  I think I&#8217;d pick the quick-release connector for use in a project with only one or two controllers, and the two-level connector for use in a project with lots of controller boards.</p>
<p>More quality time with Digi-Key for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=274</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Edge-Lit Plexiglas Demo</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=267</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=267#comments</comments>
		<pubDate>Fri, 07 Nov 2008 03:41:43 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Circuits]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=267</guid>
		<description><![CDATA[11-Nov-2008 Welcome, Make and Gizmodo readers! I didn&#8217;t expect this kind of attention; but you mention light sabers, I guess geeks like us are bound to get excited. This was meant to be a crude, quick proof-of-concept prototype, and at that it succeeded. I now have 500 white SMT LEDs on the way from Hong [...]]]></description>
			<content:encoded><![CDATA[<hr/>
<p><i>11-Nov-2008</p>
<p>Welcome, <a href="http://blog.makezine.com/archive/2008/11/light_up_your_plexiglas_e.html">Make</a> and <a href="http://gizmodo.com/5082015/turn-your-broken-cd-case-shards-into-mini-led-light-sabers-for-your-wall">Gizmodo</a> readers!  I didn&#8217;t expect this kind of attention; but you mention light sabers, I guess geeks like us are bound to get excited. <img src='http://www.neufeld.newton.ks.us/electronics/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>This was meant to be a crude, quick proof-of-concept prototype, and at that it succeeded.  I now have 500 white SMT LEDs on the way from Hong Kong; and when they arrive, they&#8217;ll each &#8212; grain of rice sized &#8212; get glued to the end of a piece of plexi, where they&#8217;ll be nearly invisible when off.  It&#8217;s up to Lisa whether the connecting wires will be visible or minimal; and bless her heart, she says she wants to incorporate visible wires into this piece, so I don&#8217;t have to mess with 1000 hair-thin, enamel-coated wires.</p>
<p>Finally, this is only good for artistic purposes or accent lighting.  As you may have noticed when shopping for LED light-bulb replacements, there&#8217;s very little out there even close to the brightness of incandescents.  If you want to light a hallway as you walk through, I&#8217;d suggest Piranha (bright) or Luxeon (brighter) LEDs in the baseboards and an ultrasonic rangefinder at the end of the hallway to determine your position.</i></p>
<hr/>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2141.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2141_mid.jpg" alt="Edge-lit plexiglas strip in LED tester" /></a></p>
<p>I have the privilege of working with <a href="http://www.lisarundstrom.com/">Lisa Rundstrom</a> on an art installation for a show at the end of November.  Lisa does amazing work with plastic (especially acrylic) and light (<em>really</em>, go look at her site), and we&#8217;re planning a cloud of 200+ hanging acrylic pieces, edge-lit with white LEDs, interacting with audience members.</p>
<p>If I don&#8217;t descend into gibbering madness from the impending deadline, the piece is going to be amazing.  (If I do descend into gibbering madness, I expect that&#8217;ll be amazing too.)</p>
<p>Our art / technology / education collective has been meeting once a week in preparation for the show, and last night I built a little demo to give a rough idea of what controlled LEDs could look like.</p>
<p><span id="more-267"></span></p>
<p>A year ago, one of the teams in our <a href="http://cratel.wichita.edu/cratel/TASD2007">art and technology class</a> built a <a href="http://cratel.wichita.edu/blogs/johnharrison/files/2007/05/dscf0665.JPG">piece with much larger edge-lit plexiglas strips</a> (not a great photo but the best I can find), so I had a pretty good idea what they could look like.  I&#8217;ve also played around enough with microcontrollers and LED controllers that I can visualize very easily what kind of things you can do with them; but it was a little more difficult to convey in mere words to Lisa.  So I wanted to put together a little something to show lit strips fleeting around in a field.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2150.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2150_mid.jpg" alt="LED heatshrinked to plastic strip" /></a></p>
<p>I cut some plexiglas (an odd-shaped piece I had on hand and a cracked CD cover) down into approximately 1/4&#8243; x 2&#8243; strips, then heatshrinked a white LED onto the end of each.  (Thanks to Jonathan for playing around with them and discovering that end-lighting gives the most even illumination of the long edges.)</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2164.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2164_mid.jpg" alt="LEDs heatshrinked to plastic strips" /></a></p>
<p>One of the strips got a little warm during the heatshrink, so I took advantage of it and really heated it up and bent a wavy shape, to test how evenly it would light.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2168.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2168_mid.jpg" alt="LED-plexi strips installed on cardboard table" /></a></p>
<p>I then made a &#8220;table&#8221; out of cardboard, arranged the strips in a branching and recombining pattern, drilled holes through, poked all the LED leads down through, soldered on wires, ran the wires under the &#8220;table,&#8221; and terminated them into a breadboard.  (Did I mention the part where my mind went blank and I soldered all the wires with the opposite polarity I intended, forcing me to connect the battery to the breadboard &#8220;backwards&#8221;?)</p>
<p>I grounded (only it became +V) the cathodes (only they were really the anodes) of all the LEDs, and jammed male .1&#8243; headers into the breadboard in parallel with the anodes (only they were really the cathodes).  I then connected a wire to the positive (ah, negative &#8212; is anyone else getting tired of this?) terminal of an 8.4V NiMH battery so you could run it back and forth along the protruding male headers.  It causes the LEDs to light in a deterministic but not visually predictable sequence that moves approximately from one end of the board to the other.</p>
<p>Here are some time-exposure action shots.  The digital camera&#8217;s bloom really overdramatizes the effect &#8212; they don&#8217;t look nearly so much like lightsabers in person, and you can make out the edges more clearly.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2173.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2173_mid.jpg" alt="A few edge-lit plexiglas strips" /></a></p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2178.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2178_mid.jpg" alt="Edge-lit plexiglas strips" /></a></p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2179.JPG"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/11/05/DSCN2179_mid.jpg" alt="Edge-lit plexiglas strips" /></a></p>
<p>I took the demo along to the meeting tonight, and &#8212; crude as it was &#8212; Lisa was so excited by it that she asked if she could take it home for a week.  Sweet, sweet success. <img src='http://www.neufeld.newton.ks.us/electronics/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=267</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>First Pictures from Wired 3: Please Wait</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=231</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=231#comments</comments>
		<pubDate>Tue, 29 Apr 2008 13:46:28 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=231</guid>
		<description><![CDATA[The videographer&#8217;s pictures of Friday&#8217;s show are back and the album is available here: http://picasaweb.google.com/lonnyq/NewAlbum429081230AM Two notes: A minor point, the PA system in the corner of some of the pics wasn&#8217;t supposed to be there and the projection looked much cleaner without it, but we had trouble with Pd locking up while throwing sound [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www2.neufeld.newton.ks.us/images/techart/2008/04/25/IMG_9405.JPG"><img src="http://www2.neufeld.newton.ks.us/images/techart/2008/04/25/IMG_9405_mid.jpg" alt="Wired 3: Please Wait gallery photo" /></a></p>
<p>The videographer&#8217;s pictures of Friday&#8217;s show are back and the album is available here:</p>
<p><a href="http://picasaweb.google.com/lonnyq/NewAlbum429081230AM">http://picasaweb.google.com/lonnyq/NewAlbum429081230AM</a></p>
<p>Two notes:</p>
<p>A minor point, the PA system in the corner of some of the pics wasn&#8217;t supposed to be there and the projection looked much cleaner without it, but we had trouble with Pd locking up while throwing sound across the network and brought in the separate PA for ambient sound at the last minute (SFX still coming out of the 10-channel system).</p>
<p>And the class is preparing all of the materials from the show and putting them online, so I&#8217;ll have a followup post when they&#8217;re all available.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=231</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wired 3: Please Wait (Friday Night!)</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=230</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=230#comments</comments>
		<pubDate>Wed, 23 Apr 2008 17:22:14 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=230</guid>
		<description><![CDATA[I haven&#8217;t posted anything in a long time because I&#8217;ve been: Lying on a beach in Jamaica. Hauling off treasure troves of vintage electronics components from a secret lair off of Highway 77 in northeast Kansas. Utterly consumed by working with our Technology: Art and Sound by Design students to get our final show ready [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www2.neufeld.newton.ks.us/images/techart/2008/poster.png"><img src="http://www2.neufeld.newton.ks.us/images/techart/2008/poster_mid.png" alt="" /></a></p>
<p>I haven&#8217;t posted anything in a long time because I&#8217;ve been:</p>
<ol type="A">
<li>Lying on a beach in Jamaica.</li>
<li>Hauling off treasure troves of vintage electronics components from a secret lair off of Highway 77 in northeast Kansas.</li>
<li>Utterly consumed by working with our Technology: Art and Sound by Design students to get our final show ready for Friday night.
</ol>
<p>You guessed it; it&#8217;s option C, which WordPress&#8217;s stylesheet renders as 3.</p>
<p>We&#8217;re taking over WSU&#8217;s <a href="http://www.shiftspace.blogs.com/">Shift Space</a> gallery for April&#8217;s <a href="http://www.downtownwichita.org/corporate/news.cfm?ArticleID=39">Final Friday</a> gallery crawl.  We have ten projectors covering the gallery walls in 360&deg; video surround and displaying a giant, abstracted circuit in sections like this:</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/techart/2008/circuit1.png"><img src="http://www2.neufeld.newton.ks.us/images/techart/2008/circuit1_mid.png" alt="" /></a></p>
<p>The student technology projects (abstract LED display, traffic light and control button, computer-controlled archival video footate, floor pressure plates) interface with the &#8220;circuit&#8221; to control fireball &#8220;bits&#8221; moving about on the wires and through the gates.  Another student has prepared ten-channel audio with both spatially-located sound effects for circuit elements and ambient sound/music to set the tone for the show.</p>
<p>All electronics are done on <a href="http://www.arduino.cc/">Arduinos</a> (probably about six in use for the whole exhibit); and PC interfacing, circuit control, and audio are done in <a href="http://puredata.info/">Pd</a>.</p>
<p>If you&#8217;ll be near Wichita Friday night, I&#8217;d love for you to drop by and introduce yourself &#8212; ask around for Keith and someone will point you to me.</p>
<p>Shift Space is at <a href="http://maps.google.com/maps?hl=en&#038;um=1&#038;ie=UTF-8&#038;q=shift+space&#038;near=Wichita,+KS&#038;fb=1&#038;view=text&#038;latlng=37691667,-97328856,2372701744122413332">800 E 3rd St N</a>, and we&#8217;ll be open Friday night only from 19:00 to 23:00.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=230</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Parallax Motion Sensor from Radio Shack</title>
		<link>http://www.neufeld.newton.ks.us/electronics/?p=208</link>
		<comments>http://www.neufeld.newton.ks.us/electronics/?p=208#comments</comments>
		<pubDate>Sat, 05 Jan 2008 23:27:13 +0000</pubDate>
		<dc:creator>Keith Neufeld</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[LED Puck]]></category>
		<category><![CDATA[TechArt]]></category>

		<guid isPermaLink="false">http://www.neufeld.newton.ks.us/electronics/?p=208</guid>
		<description><![CDATA[The back cover of Servo Magazine is always an ad from Parallax, and the December issue featured several sensors that will now be distributed through Radio Shack, including a motion sensor for $10. John and I are getting ready for this spring&#8217;s Technology: Art and Sound by Design class; and although I think John will [...]]]></description>
			<content:encoded><![CDATA[<p>The back cover of Servo Magazine is always an ad from Parallax, and the December issue featured several sensors that will now be distributed through Radio Shack, including a motion sensor for $10.</p>
<p>John and I are getting ready for this spring&#8217;s <a href="http://cratel.wichita.edu/cratel/TASD2008">Technology: Art and Sound by Design</a> class; and although I think John will be doing most of the teaching this year, I&#8217;m always on the lookout for sensors that would be good for students&#8217; interactive sculptures.</p>
<p>Jason at work suggested that the LED puck could have a motion-sensing mode, to serve as a sort of intrusion alarm.</p>
<p>When two separate events occur simultaneously pertaining to the same object of inquiry, we must always pay strict attention.  Or, ah, three events.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1006.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1006_mid.jpg" alt="Two Parallax / Radio Shack motion sensor kits" /></a></p>
<p>I picked up a couple of the sensors last week to try out.  The clerk said when they got them, he had thought they&#8217;d never sell any.  Why am <em>I</em> always the guy buying the weird stuff?</p>
<h3>How Motion Sensors Work</h3>
<p>The heart of common motion detectors is a pyroelectric sensor, which is essentially a FET with a window in the case opening onto an infrared-sensitive gate.  Changes in the level of IR light with a wavelength corresponding to body heat cause changes in the drain-source resistance, which the circuit monitors.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1007.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1007_mid.jpg" alt="Parallax pyroelectric sensor" /></a></p>
<p>The real trick is that the sensor is then placed behind a multifaceted lens that (loosely speaking) &#8220;chops up&#8221; the view of the world into smaller cones of heightened visibility and intervening areas of lessened visibility.  Think of a stage polka-dotted with multiple spotlights, only actually <em>seeing</em> that way rather than merely <em>illuminating</em> that way.</p>
<p>A body moving from an area of reduced visibility into an area of increased visibility causes a rapid change in the amount of IR (body heat) shining on the sensor, hence a rapid change in its drain-source resistance.  The motion detector circuit watches for these rapid changes, and when detected, triggers the alarm. This is why Robert Redford has to move slowly while retrieving the MacGuffin from Cosmo&#8217;s office in <em><a href="http://www.imdb.com/title/tt0105435/">Sneakers</a></em>.</p>
<p>A brief note about the multifaceted lens:  It is usually a <a href="http://en.wikipedia.org/wiki/Fresnel_lens">Fresnel lens</a>, but being a Fresnel lens is a red herring.  That simply makes the lens thin and easy to mold out of plastic; it is really the multifaceted nature of the lens that&#8217;s important.  Closer examination of a motion sensor lens easily reveals that it comprises multiple adjacent Fresnel lenses.</p>
<p>The Fresnel dome of this sensor, by the way, is too large to fit into the LED puck (as, most likely, is the PCB).  However, it&#8217;s not out of the question to purchase a <a href="http://www.allelectronics.com/cgi-bin/item/IRD-10/280/INFRARED_DETECTOR_MODULE_.html">separate PIR element</a> and mill a multifaceted lens pattern into the puck enclosure above it.  It would be an interesting challenge, perhaps for a later version.</p>
<h3>The Parallax Sensor</h3>
<p>The sensor comes with an absolutely minimal connection diagram, and refers to the Parallax web site for <a href="http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/555-28027/List/1/ProductID/83/Default.aspx?SortField=ProductName%2cProductName">full documentation</a>.  The module has a three-pin connector (bottom) for ground/V+/output, and a two-position jumper (upper left) for retriggering mode.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1010.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1010_mid.jpg" alt="Parallax motion sensor, component side" /></a></p>
<p>The power/output header is annoyingly the same height as the other components on the back side of the board, so the sensor <em>cannot</em> be plugged directly into a breadboard for prototyping; it <em>requires</em> an extension.  Parallax recommends a servo extension cable; I soldered a three-pin header to a three-pin header socket to make a rigid extension for breadboarding.</p>
<p>The module&#8217;s output is active-high.  The Parallax documentation indicates that the jumper selects retriggering mode.  With the jumper in the L position, the module triggers the output upon detecting motion and then goes low again.  With the jumper in the H position, the module is supposed to keep the output high as long as motion continues, but mine does not.</p>
<p>The datasheet indicates that the module needs a &#8220;warmup&#8221; period of about a minute, during which time it&#8217;s adapting to ambient conditions and may trigger randomly.  My experience was similar, so anyone using this module needs to be prepared to accept random triggering for a while after startup.</p>
<p>The package and datasheet indicate a detection range of about 20&#8242;.  I didn&#8217;t have room to test this, but I&#8217;m willing to believe it until I learn otherwise.  Apart from the minor annoyances above, the sensor really is very easy to use, particularly for our class.  It seems quite responsive to motion, and certainly responsive enough to pick up gallery visitors not specifically trying to sneak up on it.  Output is a very clean 5V, so it&#8217;ll be easy for students to interface to the Arduino.</p>
<p>Sensitivity is fixed.  It&#8217;d be nice to have a trim pot to adjust sensitivity/range, particularly for use in interactive sculpture projects.  A Halloween prop-maker going by the name &#8220;Scary Terry&#8221; has written a <a href="http://www.scary-terry.com/itw/pirsensor/pirsensor.htm">nice review of the motion sensor</a>, and includes pictures of mounting it inside PVC pipe to control its angle of sensitivity.  I guess with care, the sensor could be angled toward the ground in such a way that it would be triggered only when feet entered a designated area.</p>
<h3>Hacking the Sensor</h3>
<p>I suspect that most students using this sensor either would trigger a long sequence of actions when motion is first detected, or would like to get a continuous (retriggered) signal the entire time motion is detected.  I&#8217;m somewhat interested, though, in a much finer-grained notion of &#8220;the entire time motion is detected&#8221; than that.</p>
<p>By my rough count, the sensor triggers for about two and a half seconds each time it detects motion.  It then locks out briefly (didn&#8217;t time it &#8212; say another couple of seconds?) during which time it&#8217;s <em>in</em>sensitive before it can detect motion again.</p>
<p>I&#8217;d like to be able to get a series of much shorter spikes and much shorter recovery time.  I don&#8217;t know exactly why; it just seems useful to me.</p>
<p>Let&#8217;s go back to that component view:</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1010.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1010_mid.jpg" alt="Parallax motion sensor, component side" /></a></p>
<p>The IC doing all the work is a BISS0001.  The only datasheet I can find for it is in Chinese, yay, don&#8217;t read that, sorry.  The chip has a bunch of comparators, some logic, a logic section labelled in Chinese, and two timers labelled in Chinese.  It looks like it&#8217;s probably made specifically for motion-sensing applications.</p>
<p>Fortunately the pinouts and component values are labelled in English, so I was able to make enough sense of the datasheet to understand how to set the timing constants.  From the sample application circuit, pin 2 is obviously the master output; and on the pinouts, pin 2 is labelled VO.</p>
<p>On the timing diagrams, VO goes high for a period labelled T<sub>X</sub> and low for a period labelled T<sub>i</sub>.  Just above that, we have the equation T<sub>X</sub> &asymp; 49152R<sub>1</sub>C<sub>1</sub> leaping out at me from a wad of impenetrable Chinese.  On the functional diagram, R<sub>1</sub> and C<sub>1</sub> stack from pin 3 to 4 to ground.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1010-r1c1.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1010-r1c1_mid.jpg" alt="Parallax motion sensor, pulse timing components" /></a></p>
<p>Okay!  On the PCB, pin 3 goes to a resistor that said &#8220;204.&#8221;  (Ignore the 473 in the picture.)  The resistor and the IC&#8217;s pin 4 go to a capacitor, which goes to ground.  We&#8217;re in business!</p>
<p>The resistor is labelled as a 200K&Omega;, and my meter confirms that.  The capacitor is unlabelled; in-circuit, my meter tests it at about 470pF.  Doing the math:</p>
<blockquote><p>49152 R<sub>1</sub> C<sub>1</sub> = 49152 * 200K&Omega; * 470pF &asymp; 4.6 seconds</p></blockquote>
<p>Hm, that&#8217;s a little off from the 2.6 seconds I was counting, but same order of magnitude.  For a capacitor value that small, I&#8217;m willing to believe that I&#8217;m getting extra capacitance from my meter probes and from measuring it in-circuit.  I think we&#8217;re in the ballpark.</p>
<p>The easiest way to shorten the on-period (T<sub>X</sub>) seems to me to be replacing the resistor.  To take the period down an order of magnitude, I should use about a 20K&Omega; resistor.  After looking at the SMT resistors on a dead PC motherboard, I found a 473 (47K&Omega;) and figured it was enough smaller to make my point.</p>
<p>I desoldered it by wrapping a piece of heavier wire around it and heating the wire, like <a href="http://www.neufeld.newton.ks.us/electronics/?p=204#comments">Josh suggested</a>, and it worked great.  Then out of laziness and because the new resistor was larger than the existing resistor and might not fit the pads well, I just soldered it on top of the resistor that was already there, in parallel.  Makes it a 38K&Omega; resistor instead of a 47K&Omega;, so we&#8217;re even going in the right direction.</p>
<p>I powered up the motion sensor again, waited a minute for it to settle down, and started timing its response.  On-time after sensing motion (T<sub>X</sub>) is now in the half-second range.  The absolute numbers still don&#8217;t match what the equation says I should get, but the relative values are right on &#8212; a resistor with 1/5 the value reduced T<sub>X</sub> to 1/5 of its former value.</p>
<p><a href="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1010-r2c2.jpg"><img src="http://www2.neufeld.newton.ks.us/images/electronics/2008/01/05/DSCN1010-r2c2_mid.jpg" alt="Parallax motion sensor, lockout timing components" /></a></p>
<p>Pretty slick!  Now I can pick whatever T<sub>X</sub> I want, be it short or long.  I haven&#8217;t tried it yet, but the lockout time between motion detection (T<sub>i</sub>) is set by R<sub>2</sub> and C<sub>2</sub> on pins 5 and 6, and they&#8217;re easily accessible as well, so I should be able to change that too.</p>
<h3>And About that Datasheet . . .</h3>
<p>Don&#8217;t get me wrong about the Chinese datasheet.  Sure I would have been disappointed if I couldn&#8217;t read it, but I was actually really pleased that sections of it were in English.  I&#8217;m aware that people throughout the rest of the world have to learn English in order to do a <em>lot</em> of technical things, and do so with ease and proficiency much greater than that of the few Americans who bother to learn languages other than English.</p>
<p><a href="http://www.bunniestudios.com/blog/?p=217">Bunnie Huang has an interesting blog post</a> that touches in passing on certain types of devices using chips of Chinese manufacture that can&#8217;t be found, or can scarcely be found, by searching Google in English:</p>
<blockquote><p>
Just try searching for USB mass storage controller ASICs, or digital picture frame SoCs on Google in English, and then go and open up one of these devices and compare your findings. I bet you’ll find that the chips most frequently used in these popular devices are best searched for in Chinese.
</p></blockquote>
<p>It&#8217;s a competitive world out there, and those of us in the west have had it awfully easy for an awfully long time.  I know as a mere hobbyist, the technology I use is far behind the leading edge, and I&#8217;m not yet impacted in nearly the way of engineers developing new products for market.  But the world <em>is</em> changing, no doubt about it, and I hope it&#8217;s a while yet before it impacts my ability to tinker.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neufeld.newton.ks.us/electronics/?feed=rss2&#038;p=208</wfw:commentRss>
		<slash:comments>60</slash:comments>
		</item>
	</channel>
</rss>
