
<?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>The Lucas Eckels Blog &#187; arduino</title>
	<atom:link href="http://blog.lucaseckels.com/category/arduino/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lucaseckels.com</link>
	<description></description>
	<lastBuildDate>Fri, 07 Oct 2011 23:16:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Quasar, yet another DIY ambient orb (with wireless!)</title>
		<link>http://blog.lucaseckels.com/2009/10/09/quasar-yet-another-diy-ambient-orb-with-wireless/</link>
		<comments>http://blog.lucaseckels.com/2009/10/09/quasar-yet-another-diy-ambient-orb-with-wireless/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 03:59:44 +0000</pubDate>
		<dc:creator>Lucas</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[xbee]]></category>

		<guid isPermaLink="false">http://blog.lucaseckels.com/?p=242</guid>
		<description><![CDATA[This project has been done many times, so I won&#8217;t go into much detail. I wanted a general purpose notifier, especially once I built Laundrymon. I figured a box with a high powered RGB LED and an XBee would fit the bill. The enclosure is just a project box with a sheet of cheap copy [...]]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="264"><param name="movie" value="http://www.youtube.com/v/X9RkHgmDgDA&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/X9RkHgmDgDA&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="264"></embed></object></p>
<p>This project has been done many times, so I won&#8217;t go into much detail.  I wanted a general purpose notifier, especially once I built <a href="http://blog.lucaseckels.com/2009/10/01/laundrymon-the-wireless-noninvasive-arduino-based-laundry-monitor/">Laundrymon</a>.  I figured a box with a <a href="http://www.seeedstudio.com/depot/luxeon-iii-star-compatible-1wchannel-rgb-p-146.html">high powered RGB LED</a> and an XBee would fit the bill.  The enclosure is just a project box with a sheet of cheap copy paper shaped with some wire and hot glue.  I added a <a href="http://en.wikipedia.org/wiki/Photoresistor">photoresistor</a> to dim the light in the bedroom at night.</p>
<p>I&#8217;m building a couple of these to scatter throughout the house so I always know when the laundry&#8217;s done, an email arrives, or whatever else I might want to be notified about.</p>
<p>Important note:  I misplaced one of the capacitors when designing the board.  It seems to be running well enough with a wire in its place.  It&#8217;s the one on the right in the lower left corner, above the power connector.</p>
<p><a href="http://lucaseckels.com/files/quasar.zip">Downloads the source and Eagle files</a><br />
<a href="http://www.batchpcb.com/index.php/Products/23182">Buy the PCB from BatchPCB</a></p>
<p><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-going.jpg" rel="lightbox-quasar" title="Quasar in action"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-going-150x150.jpg" alt="Quasar in action" title="Quasar in action" width="150" height="150" class="alignnone size-thumbnail wp-image-244" /></a><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-populated.jpg" rel="lightbox-quasar" title="Quasar populated board"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-populated-150x150.jpg" alt="Quasar populated board" title="Quasar populated board" width="150" height="150" class="alignnone size-thumbnail wp-image-246" /></a></p>
<p><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-prototype.jpg" rel="lightbox-quasar" title="Quasar breadboard prototype"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-prototype-150x150.jpg" alt="Quasar breadboard prototype" title="Quasar breadboard prototype" width="150" height="150" class="alignnone size-thumbnail wp-image-247" /></a><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-pcb.png" rel="lightbox-quasar" title="Quasar PCB design"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-pcb-150x150.png" alt="Quasar PCB design" title="Quasar PCB design" width="150" height="150" class="alignnone size-thumbnail wp-image-245" /></a></p>
<p><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-schematic.png" rel="lightbox-quasar" title="Quasar schematic"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/quasar-schematic-150x150.png" alt="Quasar schematic" title="Quasar schematic" width="150" height="150" class="alignnone size-thumbnail wp-image-248" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lucaseckels.com/2009/10/09/quasar-yet-another-diy-ambient-orb-with-wireless/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Laundrymon, the wireless, noninvasive, Arduino-based, laundry monitor</title>
		<link>http://blog.lucaseckels.com/2009/10/01/laundrymon-the-wireless-noninvasive-arduino-based-laundry-monitor/</link>
		<comments>http://blog.lucaseckels.com/2009/10/01/laundrymon-the-wireless-noninvasive-arduino-based-laundry-monitor/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 05:57:52 +0000</pubDate>
		<dc:creator>Lucas</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[xbee]]></category>

		<guid isPermaLink="false">http://blog.lucaseckels.com/?p=198</guid>
		<description><![CDATA[I always forget to set a timer when doing laundry, and the machines are in the garage so they&#8217;re hard to hear. I&#8217;ve seen a couple of approaches to remotely monitor laundry machines. Unfortunately, I am not a commerical laundromat, and the since machines belong to the landlady I can&#8217;t really open them up to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/populated-board.jpg" rel="lightbox-laundrymon" title="Laundrymon populated circuit board"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/populated-board-300x195.jpg" alt="Laundrymon populated circuit board" title="Laundrymon populated circuit board" width="300" height="195" class="aligncenter size-medium wp-image-209" /></a><br />
I always forget to set a timer when doing laundry, and the machines are in the garage so they&#8217;re hard to hear.  I&#8217;ve seen a <a href="http://www.youtube.com/watch?v=wkMXpKmRXvU&amp;feature=player_embedded#">couple</a> of <a href="http://www.laundryview.com/lvs.php">approaches</a> to remotely monitor laundry machines.  Unfortunately, I am not a commerical laundromat, and the since machines belong to the landlady I can&#8217;t really open them up to hack on.  I needed a non-invasive solution.</p>
<p>The ideal approach would be something that I could put next to the washer and dryer that would passively detect whether the machine was running.  Laundry machines generally vibrate pretty much, so I decided to try to use an accelerometer to detect vibration.  The <a href="http://en.wikipedia.org/wiki/Wii_Nunchuk#Nunchuk">Wii Nunchuk</a> is a handy accelerometer with an I2C interface with Arduino <a href="http://todbot.com/blog/2008/02/18/wiichuck-wii-nunchuck-adapter-available/">code available</a>.  So I bought an <a href="http://store.fungizmos.com/index.php?main_page=product_info&amp;cPath=69&amp;products_id=212">adapter</a>, wrote a basic logging sketch, and taped a Nunchuk to the side of the washer to see what would happen.</p>
<p><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/graph.png" rel="lightbox-laundrymon" title="One run of the washer"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/graph-300x152.png" alt="Laundrymon graph" title="One run of the washer" width="300" height="152" class="size-medium wp-image-207" /></a></p>
<p>Hey, looks like this might actually work!</p>
<p>It turns out that even if you pay the full retail price of $20, the Nunchuk is still pretty much the cheapest accelerometer you can buy once it&#8217;s <a href="http://www.sparkfun.com/commerce/categories.php?c=80">broken out</a> from a tiny surface mount package.  I needed two Nunchuks &mdash; one for the washer and one for the dryer.  Normally, it&#8217;s easy to have multiple I2C devices connected together, but the Nunchuk has the slave address hard coded.  That&#8217;s easily solved with a <a href="http://www.wiimoteproject.com/tech-chat/2-nunchuck-with-arduino-help/">few transistors</a>.</p>
<p>Time to put it all together.  While the Nunchuk adapters are great for prototyping, they don&#8217;t really give a solid connection, so I swapped the cable for some network cable I had lying around.  I started with a basic <a href="http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard">breadboard Arduino</a> tutorial, and added an XBee for wireless and the nunchuk circuitry.  I used the excellent <a href="http://www.batchpcb.com">BatchPCB</a> for fabrication.  Even though the final board doesn&#8217;t looks much like an Arduino, it&#8217;s based on at Atmega168, so I can still use the Arduino IDE to develop the firmware.</p>
<p>Right now, all it does it play a sound on my home theater PC.  My next project is to make a bunch of blinkie notifiers to scatter throughout the house.</p>
<p><a href="http://lucaseckels.com/files/laundrymon.zip">Download the source and Eagle files</a><br />
<a href="http://www.batchpcb.com/index.php/Products/23181">Buy the PCB from BatchPCB</a></p>
<p><a title="Full Laundrymon setup" rel="lightbox-laundrymon" href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/full.jpg"><img class="size-thumbnail wp-image-206" title="Full Laundrymon setup" src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/full-150x150.jpg" alt="Full Laundrymon setup" width="150" height="150" /></a><a title="Nunchuk hang off of the dryer" rel="lightbox-laundrymon" href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/nunchuk-hanging.jpg"><img class="size-thumbnail wp-image-208" title="Nunchuk hang off of the dryer" src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/nunchuk-hanging-150x150.jpg" alt="Nunchuk hang off of the dryer" width="150" height="150" /></a></p>
<p><a title="Laundrymon schematic" rel="lightbox-laundrymon" href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/schematic.png"><img class="size-thumbnail wp-image-210" title="Laundrymon schematic" src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/schematic-150x150.png" alt="Laundrymon schematic" width="150" height="150" /></a><a title="Laundrymon circuitboard design" rel="lightbox-laundrymon" href="http://blog.lucaseckels.com/wp-content/uploads/2009/10/circuitboard.png"><img class="size-thumbnail wp-image-205" title="Laundrymon circuitboard design" src="http://blog.lucaseckels.com/wp-content/uploads/2009/10/circuitboard-150x150.png" alt="Laundrymon circuitboard design" width="150" height="150" alt="foo"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lucaseckels.com/2009/10/01/laundrymon-the-wireless-noninvasive-arduino-based-laundry-monitor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Arduino IR transmitter</title>
		<link>http://blog.lucaseckels.com/2009/08/23/arduino-ir-transmitter/</link>
		<comments>http://blog.lucaseckels.com/2009/08/23/arduino-ir-transmitter/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 03:22:02 +0000</pubDate>
		<dc:creator>Lucas</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[infrared]]></category>

		<guid isPermaLink="false">http://blog.lucaseckels.com/?p=174</guid>
		<description><![CDATA[A while back, I bought a universal remote for the entertainment system. I chose one fancy enough to have learning capability, but not fancy enough to be programmed with a computer. Annoyingly, the factory and universal remote only had a button to toggle through the various inputs. This gets tedious quickly when you have a [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, I bought a universal remote for the entertainment system.  I chose one <a href="http://www.universalremote.com/product_detail.php?model=47">fancy enough</a> to have learning capability, but not fancy enough to be programmed with a computer.</p>
<p/>
Annoyingly, the factory and universal remote only had a button to toggle through the various inputs.  This gets tedious quickly when you have a few video game consoles.  I knew that the TV had <a href="http://www.remotecentral.com/cgi-bin/mboard/rc-discrete/list.cgi">discrete codes</a>, which would take you directly to a selected input.  But I didn&#8217;t have a way to program the remote with these codes.</p>
<p>
So I wrote an IR transmitter for Arduino.  Then I could use the Arduino to program the remote, and have nice discrete component access straight from the remote that I&#8217;m already using.  My TV is a Samsung, which uses the <a href="http://www.sbprojects.com/knowledge/ir/nec.htm"NEC IR protocol</a>.  It&#8217;s a pretty simple protocol consisting of two address bytes and two command bytes, with a 9 ms burst ahead of it.  Ones and zeros are encoded as different pauses after a short burst at 38 kHz.  My <a href="http://blog.lucaseckels.com/2009/05/04/really-simple-arduino-ir-receiver/">previous IR project</a> was very helpful for debugging timing issues.</p>
<p/>
<a href="http://lucaseckels.com/files/SamsungBlinkie.pde">Download the code.</a>  The only hardware required is an IR LED attached to pin 13.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lucaseckels.com/2009/08/23/arduino-ir-transmitter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Really simple Arduino IR receiver</title>
		<link>http://blog.lucaseckels.com/2009/05/04/really-simple-arduino-ir-receiver/</link>
		<comments>http://blog.lucaseckels.com/2009/05/04/really-simple-arduino-ir-receiver/#comments</comments>
		<pubDate>Tue, 05 May 2009 06:08:11 +0000</pubDate>
		<dc:creator>Lucas</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[infrared]]></category>

		<guid isPermaLink="false">http://blog.lucaseckels.com/?p=162</guid>
		<description><![CDATA[I use a Mac Mini as a media center computer. While I generally like Front Row, and have a few custom (unsupported) plugins, sometimes you really just want something one button away. I&#8217;m already using a universal remote, but the Mini&#8217;s built-in IR receiver can only detect the signals for the 6 buttons on the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/05/irmon.jpg" rel="lightbox"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/05/irmon-150x150.jpg" alt="Arduino with IR remote receiver" title="Arduino with IR remote receiver" width="150" height="150" class="size-thumbnail wp-image-164" /></a><br />
I use a Mac Mini as a media center computer.  While I generally like Front Row, and have a few custom (unsupported) plugins, sometimes you really just want something one button away.  I&#8217;m already using a universal remote, but the Mini&#8217;s built-in IR receiver can only detect the signals for the 6 buttons on the Apple remote.</p>
<p>
As a quick-and-dirty solution, I wrote this sketch for the Arduino, using a generic <a href="http://www.seeedstudio.com/depot/infrared-remote-control-receiver-module-wo-steel-shield-p-104.html">IR remote receiver</a>.  When reset, the Arduino starts listening for an IR remote command.  It remembers the timing of the pulses, then listens for a similar set of pulses and signals over the serial port.  I wrote a few lines of Python to listen to the serial port and do something interesting.</p>
<p>Now I can eject a DVD without messing with any menus.  I&#8217;ll probably need a more complete solution some day, but for now, I&#8217;m set.</p>
<p><a href="http://www.lucaseckels.com/files/IRMon.zip">Download IRMon</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lucaseckels.com/2009/05/04/really-simple-arduino-ir-receiver/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Larmie, the Arduino Alarm Scheduler</title>
		<link>http://blog.lucaseckels.com/2009/03/02/larmie-the-arduino-alarm-scheduler/</link>
		<comments>http://blog.lucaseckels.com/2009/03/02/larmie-the-arduino-alarm-scheduler/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 03:53:31 +0000</pubDate>
		<dc:creator>Lucas</dc:creator>
				<category><![CDATA[arduino]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://blog.lucaseckels.com/?p=68</guid>
		<description><![CDATA[When I heard about Libelium&#8217;s Arduino Hacking Life contest, I knew it was time for me to finally solve one of my daily annoyances — setting the alarm clock. Every night, the alarm gets set to a different time. Sometimes there&#8217;s an errand in the morning, sometimes an early meeting. On weekends, the alarm usually [...]]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="264"><param name="movie" value="http://www.youtube.com/v/87cPtjpXoVg&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/87cPtjpXoVg&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="264"></embed></object></p>
<p>When I heard about Libelium&#8217;s <a href="http://www.libelium.com/tienda/catalog/contest.php">Arduino Hacking Life contest</a>, I knew it was time for me to finally solve one of my daily annoyances — setting the alarm clock.
<p />
<p>Every night, the alarm gets set to a different time.  Sometimes there&#8217;s an errand in the morning, sometimes an early meeting.  On weekends, the alarm usually isn&#8217;t needed, unless something&#8217;s going on.  And then in the morning, I need to set the clock again for my wife&#8217;s own set of daily scheduling variables.
<p />
<p>Enough!  Why should I need to deal with this?  Why should I need to stand there pressing buttons time and time again?  Why can&#8217;t I set my alarm clock with the rest of my schedule &mdash; in the calendar?  Larmie solves all these problems.</p>
<p>Larmie consists of four components:</p>
<ol>
<li>A regular alarm clock, with an interface cable added</li>
<li>An Arduino with a custom shield, for interfacing with the clock</li>
<li>A computer, which regularly updates the Arduino with what time to set the alarm to</li>
<li>A calendar system.  Larmie currently uses Google Calendar</li>
</ol>
<p><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/03/clock-top.jpg"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/03/clock-top-300x238.jpg" alt="Clock innards, top" title="Clock innards, top" width="300" height="238" class="alignnone size-medium wp-image-99" /></a>To start, I cracked open my 10+ year old alarm clock.  Newer ones might be different, but I&#8217;d expect to see essentially the same design in just about every clock.  Between the buttons and the LCD is a DIP IC.  This looks promising.  It&#8217;s labeled as <a href='http://blog.lucaseckels.com/wp-content/uploads/2009/03/lm8560.pdf'>LM8560</a>, which a quick Google search tells me is an all-in-one alarm clock.  Jackpot.
<p/>
<p><a href="http://blog.lucaseckels.com/wp-content/uploads/2009/03/underside-wired-and-annotated.jpg"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/03/underside-wired-and-annotated-300x225.jpg" alt="Clock underside" title="Clock underside" width="300" height="225" class="alignnone size-medium wp-image-95" /></a>What I want to do is twiddle the voltage on the LM8560&#8242;s input pins, to simulate pressing the buttons on the clock.  According to the datasheet, they&#8217;re activated at the supply voltage.  This is a problem, since the supply voltage is something like 11V, which the Arduino can&#8217;t output by itself.  To get around this, I used a 7405 hex inverter with open collectors that I had lying around.  The hex just means there are 6 inverters (NOT gates) on the chip.  The open collector is what&#8217;s interesting.  When the gate output is logical false, it&#8217;s pulled to 0V.  When it&#8217;s logical true, the pin floats.  You can pull it to whatever voltage you need.  I pull it to the clock&#8217;s high with a resistor, and put in an LED as an indicator.  After testing it out a breadboard, I put together the final circuit on some perf board. <a href='http://blog.lucaseckels.com/wp-content/uploads/2009/03/circuit.pdf'>Here</a> is the schematic.
<p/>
<a href="http://blog.lucaseckels.com/wp-content/uploads/2009/03/board-insert.png"><img src="http://blog.lucaseckels.com/wp-content/uploads/2009/03/board-insert-300x177.png" alt="Larmie circuit on perf board" title="Larmie circuit on perf board" width="300" height="177" class="alignnone size-medium wp-image-83" /></a><br />
The Arduino expects to be told the alarm over a serial connection.  This can actually be over USB, XBee, Ethernet, or whatever is convenient.  I followed the datasheet for how to set and reset the alarm and time.  The datasheet doesn&#8217;t describe how quickly you can pulse the inputs, but I found that 25 ms and 25 ms off works reliably, and still fast enough to set the time in a few seconds.  The biggest challenge in writing the Larmie firmware was avoiding setting off the alarm while setting it.  If the current time and alarm time are ever the same, the alarm will continue to go.  On top of that, I can&#8217;t read the current time out of the clock.  Instead, I have the current time sent along with the alarm time.  Since there might be a minute or two difference between the clock and the time on the PC, I&#8217;ll need to avoid a whole range.  That gets complicated around the beginning and end of an hour, so the firmware simply refuses to set the alarm at those times.  Since the PC component should be running every few minutes, this doesn&#8217;t matter very much.
<p/>
<p>The last piece is a small Python script that requests event data from Google Calendar, and sends the alarm time to the Arduino.  This script should be run periodically, using something like launchd on OS X, cron on Linux, or Scheduled Tasks on Windows.  The interface between the PC and the Arduino is very simple, so this component can be swapped out for whatever&#8217;s convenient.
<p/>
<p>Download the source, including circuit diagram, Arduino code, and Python.<br/><br />
<a href='http://lucaseckels.com/files/Larmie.zip'>Source code for Larmie</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lucaseckels.com/2009/03/02/larmie-the-arduino-alarm-scheduler/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

