<?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: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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>nathan.chantrell.net</title> <link>http://nathan.chantrell.net</link> <description>It's all about the ones and zeros.</description> <lastBuildDate>Sat, 19 May 2012 19:31:18 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/NathanChantrell" /><feedburner:info uri="nathanchantrell" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Raspberry Pi and the MCP23017 I2C I/O Expander</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/HO5bLewIV84/</link> <comments>http://nathan.chantrell.net/20120519/raspberry-pi-and-the-mcp23017-i2c-io-expander/#comments</comments> <pubDate>Sat, 19 May 2012 19:31:18 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Computing]]></category> <category><![CDATA[Electronics]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[Raspberry Pi]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2751</guid> <description><![CDATA[<p>I had a quick play with the I2C drivers that are currently being developed for the Raspberry Pi this afternoon and managed to get a MCP23017 16-bit I/O Expander working with it without any fuss.</p><p>Here is a highly exciting video of it blinking an LED:</p><p></p><p>The MCP23017 is a handy 28 pin [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:d8e871455c4af5d662279649f5e9de306f8e2f11'><p>I had a quick play with the I2C drivers that are currently being developed for the Raspberry Pi this afternoon and managed to get a MCP23017 16-bit I/O Expander working with it without any fuss.</p><p>Here is a highly exciting video of it blinking an LED:</p><p><iframe width="500" height="281" src="http://www.youtube.com/embed/XnA_uNi1Op0?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p><p>The MCP23017 is a handy 28 pin chip that gives you 16 pins that can be used as either inputs or outputs (max 25mA from each pin) and up to 8 of the MCP23017 can be used on one I2C bus so it can give you a whole lot more I/O than the Pi has built in as well as reducing the risk of frying the Pi and also has the added advantage that the expander can be located away from the Pi linked with only four wires. There is also the smaller MCP23008 which is an 8 I/O version that can be used in the same way. They are both available in DIP form making it easy for building your own boards with and experimenting on breadboard. Here is the <a title="MCP23017 I2C I/O Expander Datasheet" href="http://ww1.microchip.com/downloads/en/DeviceDoc/21952b.pdf" target="_blank">datasheet for the MCP23017</a>.</p><p>Read on for some info on what is required to get this working.</p><p><span id="more-2751"></span></p><p><strong>Connecting it up</strong></p><p>For a quick demo the following needs to be connected on the expander:</p><p>Pin 9 to Vcc (eg. 5V on the Pi or external source up to 5.5V)<br /> Pin 10 to Ground<br /> Pin 12 to SCL0 on the Pi<br /> Pin 13 to SDA0 on the Pi<br /> Pins 15,16,17 to ground (this selects the I2C address as 0&#215;20, other combinations can set different addresses)<br /> Pin 18 to Vcc (this turns the expander on)</p><p>For the location of the I2C and power pins on the Pi see the <a title="Raspberry Pi GPIO Pinouts" href="http://elinux.org/RPi_Low-level_peripherals#General_Purpose_Input.2FOutput_.28GPIO.29" target="_blank">diagram here</a>.  Note that the maximum you can draw from the 5V pin on the Pi will be the USB input current, typically 1A less the draw of the Pi itself, around 700mA for the Model B so that leaves us with around 300mA max.</p><p>For this test I also connected an LED and resistor between GPA0 on the MCP23017 (pin 21) and ground.</p><p><strong>Drivers and i2c-tools</strong></p><p>See <a title="Linux device drivers for Rapberry Pi on-board I/O" href="http://www.raspberrypi.org/phpBB3/viewtopic.php?f=41&amp;t=3975" target="_blank">this thread on the Raspberry Pi forums</a> for the current work that is being done on i2c drivers for the Raspberry Pi, it&#8217;s still very much in the early development stages. There is the original bitbanging one (slower) and the new faster hardware one, to take a short cut for now you can just download the pre-compiled kernel with the I2C bitbanging driver built in <a title="RPi kernel with bitbanging I2C" href="http://www.frank-buss.de/tmp/kernel.img">here</a> and simply swap it with the one in /boot on the Debian Squeeze distro and reboot.</p><p>Then you will want to install i2c-tools package via apt-get, this gives us some command line tools for scanning the I2C bus and sending values to I2C addresses and registers.</p><p>Now we can check that the Pi is communicating with the expander by doing:<em> i2cdetect -y 0</em><br /> If it is working you should see an ASCII representation of a table with 20 in the first column on the row marked 20. This signifies there is something there with an I2C address of 0&#215;20 as expected.</p><p><strong>Controlling the expander</strong></p><p>The I/O pins on the MCP23017 are in two banks, A and B and each bank is controlled together. To set whether each pin is an input or an output we need to send a hex value to the correct register (see Table 1.4 in the data sheet). IODIRA (0&#215;00) sets the input/output state for bank A and IODIRB (0&#215;01) for bank B, set each of the 8 bits as 1 for input (the default) and 0 for output.  eg. to set pins 0, 1, 7 as input and the rest as outputs it would be 10000011 in binary or 0&#215;83 in hex, to set a whole bank as outputs would be 0&#215;00.</p><p>Then to turn each pin on or off we send a hex value to the register for the relevant bank, 0&#215;12 for bank A, 0&#215;13 for bank B. We need to send a 1 to each bit we want on and a 0 for each we want to turn off in the same manner as above, so to turn pin 0 on it&#8217;s 00000001 in binary or 0&#215;01 in hex.</p><p>For a quick demo we can use the i2cset command that comes with i2c-tools, its format is:<br /> <em>i2cset i2-cbus i2c-address i2c-register value</em></p><p>eg.<br /> Set all of bank A to be outputs:<em> i2cset -y 0 0&#215;20 0&#215;00 0&#215;00</em><br /> Set GPA0 as on: <em>i2cset -y 0 0&#215;20 0&#215;12 0&#215;01</em><br /> Set GPA0 as off: <em>i2cset -y 0 0&#215;20 0&#215;12 0&#215;00</em></p><p>The -y switch just turns interactive mode off so it doesn&#8217;t ask for confirmation.</p><p>Here is a simple bash script to blink it 20 times:</p><p style="padding-left: 30px;"><em>#!/bin/bash </em><br /> <em>i2cset -y 0 0&#215;20 0&#215;00 0&#215;00</em><br /> <em>COUNTER=20</em><br /> <em>until [ $COUNTER -lt 10 ]; do</em><br /> <em>i2cset -y 0 0&#215;20 0&#215;12 0&#215;01</em><br /> <em>sleep 1</em><br /> <em>i2cset -y 0 0&#215;20 0&#215;12 0&#215;00</em><br /> <em>sleep 1</em><br /> <em>let COUNTER-=1</em><br /> <em>done</em></p><p>So there you go, a quick demo of an I2C I/O expander working on the Pi. Next I need to get set up for cross compiling and try the new hardware driver and look at how to use I2C in something a bit more advanced than bash.</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120519%2Fraspberry-pi-and-the-mcp23017-i2c-io-expander%2F&amp;linkname=Raspberry%20Pi%20and%20the%20MCP23017%20I2C%20I%2FO%20Expander" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120519%2Fraspberry-pi-and-the-mcp23017-i2c-io-expander%2F&amp;linkname=Raspberry%20Pi%20and%20the%20MCP23017%20I2C%20I%2FO%20Expander" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120519%2Fraspberry-pi-and-the-mcp23017-i2c-io-expander%2F&amp;linkname=Raspberry%20Pi%20and%20the%20MCP23017%20I2C%20I%2FO%20Expander" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120519%2Fraspberry-pi-and-the-mcp23017-i2c-io-expander%2F&amp;linkname=Raspberry%20Pi%20and%20the%20MCP23017%20I2C%20I%2FO%20Expander" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120519%2Fraspberry-pi-and-the-mcp23017-i2c-io-expander%2F&amp;linkname=Raspberry%20Pi%20and%20the%20MCP23017%20I2C%20I%2FO%20Expander" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120519%2Fraspberry-pi-and-the-mcp23017-i2c-io-expander%2F&amp;linkname=Raspberry%20Pi%20and%20the%20MCP23017%20I2C%20I%2FO%20Expander" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20120519%2Fraspberry-pi-and-the-mcp23017-i2c-io-expander%2F&amp;title=Raspberry%20Pi%20and%20the%20MCP23017%20I2C%20I%2FO%20Expander" id="wpa2a_2"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/HO5bLewIV84" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20120519/raspberry-pi-and-the-mcp23017-i2c-io-expander/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20120519/raspberry-pi-and-the-mcp23017-i2c-io-expander/</feedburner:origLink></item> <item><title>Raspberry Pi Finally Arrives</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/p0XXPB48g20/</link> <comments>http://nathan.chantrell.net/20120509/raspberry-pi-finally-arrives/#comments</comments> <pubDate>Wed, 09 May 2012 16:17:31 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Computing]]></category> <category><![CDATA[Electronics]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[Home Automation]]></category> <category><![CDATA[IoT]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[Raspberry Pi]]></category> <category><![CDATA[tech]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2727</guid> <description><![CDATA[<p>After a long wait the Raspberry Pi I ordered from Farnell on 29th February finally arrived yesterday.</p><p>I expect that most people reading this blog knows all about the Raspberry Pi and the charity behind it by now, designed with the aim to bring programming back into the school curriculum and spawn a new generation [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:bb647e7599c71a19dd7cb1c5ebe0e98a6ab63d17'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/05/Raspberry_Pi.jpg"><img class="alignright size-medium wp-image-2728" title="Raspberry Pi" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/05/Raspberry_Pi-300x169.jpg" alt="" width="300" height="169" /></a>After a long wait the Raspberry Pi I ordered from Farnell on 29th February finally arrived yesterday.</p><p>I expect that most people reading this blog knows all about the <a title="Raspberry Pi" href="http://www.raspberrypi.org/" target="_blank">Raspberry Pi</a> and the charity behind it by now, designed with the aim to <a title="About Raspberry Pi" href="http://www.raspberrypi.org/about" target="_blank">bring programming back into the school curriculum</a> and spawn a new generation of coders, it&#8217;s had some fantastic news coverage and even people with no idea about computers have mentioned it to me over the last few months. It has been a rocky road, originally it was expected to have been released in late 2011 but finally the much anticipated single board computer has started to be delivered into the eager hands of geeks around the world. Initially only a caseless version of the &#8220;Model B&#8221; is available, intended for early adopters and developers with a fully cased version being launched for education later in the year. The idea being that by the time it reaches the hands of school children there will already be a healthy eco system built up around it and those preparing educational material will have been able to do so.</p><p>At the moment I am just familiarising myself with it and getting a grasp of what it is capable of. I&#8217;m running Debian Squeeze on it as that&#8217;s my distro of choice for servers and the like anyway and is also what the Raspberry Pi team are currently recommending. As a desktop it&#8217;s usable but pretty sluggish, perhaps not as much as expected but it&#8217;s potential for me lies more in the home automation and IoT field, £30 for a tiny networked Linux box is unbeatable and with up to 17 GPIO pins, built in UART and support for I2C and SPI it also opens up a lot of possibilities for interfacing to other hardware, <a title="Raspberry Pi Expansion Boards" href="http://elinux.org/RPi_Expansion_Boards" target="_blank">a number of expansion boards</a> are already available or in the pipeline. Here is a good primer on <a title="Getting Started with Raspberry Pi GPIO and Python" href="http://lwk.mjhosting.co.uk/?p=343" target="_blank">Getting Started with Raspberry Pi GPIO and Python</a>.</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120509%2Fraspberry-pi-finally-arrives%2F&amp;linkname=Raspberry%20Pi%20Finally%20Arrives" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120509%2Fraspberry-pi-finally-arrives%2F&amp;linkname=Raspberry%20Pi%20Finally%20Arrives" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120509%2Fraspberry-pi-finally-arrives%2F&amp;linkname=Raspberry%20Pi%20Finally%20Arrives" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120509%2Fraspberry-pi-finally-arrives%2F&amp;linkname=Raspberry%20Pi%20Finally%20Arrives" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120509%2Fraspberry-pi-finally-arrives%2F&amp;linkname=Raspberry%20Pi%20Finally%20Arrives" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120509%2Fraspberry-pi-finally-arrives%2F&amp;linkname=Raspberry%20Pi%20Finally%20Arrives" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20120509%2Fraspberry-pi-finally-arrives%2F&amp;title=Raspberry%20Pi%20Finally%20Arrives" id="wpa2a_4"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/p0XXPB48g20" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20120509/raspberry-pi-finally-arrives/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20120509/raspberry-pi-finally-arrives/</feedburner:origLink></item> <item><title>The Magic of the Boost Converter</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/7YaegZX9WpI/</link> <comments>http://nathan.chantrell.net/20120430/the-magic-of-the-boost-converter/#comments</comments> <pubDate>Mon, 30 Apr 2012 22:49:39 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Electronics]]></category> <category><![CDATA[Arduino]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[tech]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2675</guid> <description><![CDATA[<p>Or how to get 5V From a single AA Battery.</p><p>It might seem like magic but a boost converter or step-up converter is a handy little device that can output a voltage greater than its input voltage. This makes it very useful for getting a consistent voltage in battery powered devices or running a circuit [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:3ea51668ec31f56443ffe5ccc9986a6fe6c0cc3a'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/boost_converter.jpg"><img class="alignright size-medium wp-image-2676" title="Boost Converter" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/boost_converter-300x260.jpg" alt="" width="300" height="260" /></a>Or how to get 5V From a single AA Battery.</p><p>It might seem like magic but a boost converter or step-up converter is a handy little device that can output a voltage greater than its input voltage. This makes it very useful for getting a consistent voltage in battery powered devices or running a circuit from fewer cells than would otherwise be required. If you don&#8217;t need much capacity it can also be a good way of using the last remaining power from batteries that other devices have deemed too flat, connect a few up to a boost converter and you can still get some useful power out of them for a while longer. For more capacity you can add more cells (as long as you keep the input voltage under the output voltage) or use higher capacity batteries such as C or D cells.<br /> The Maxim chip I am using here has an adjustable output (2.7-5.5V) and will work with an input voltage as low as 0.7V.</p><p>Obviously it isn&#8217;t really magic and this extra power can&#8217;t be generated from nowhere, P=IV and all that. What this means in practice is that by increasing the output voltage the available output current must be lower than the source current and will decrease as the input voltage decreases (as the batteries deplete), as seen in the graph on the left below. Efficiency is also dependent on the input voltage and the output current, peaking at around 87% with a 3.3V input and a 5V 200mA load as seen on the right hand graph.</p><p><span id="more-2675"></span></p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/max757_max_output_current.png"><img class="size-medium wp-image-2677 alignnone" title="MAX757 max output v current" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/max757_max_output_current-289x300.png" alt="" width="289" height="300" /></a> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/max757_efficiency.png"><img title="MAX757 efficiency" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/max757_efficiency-279x300.png" alt="" width="279" height="300" /></a></p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/max757_schematic1.png"><img class="alignright size-medium wp-image-2683" title="MAX757 schematic" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/max757_schematic1-300x265.png" alt="" width="300" height="265" /></a>Wikipedia has <a title="How Boost Converters Work" href="http://en.wikipedia.org/wiki/Boost_converter" target="_blank">a better explanation</a> of how a boost converter works than I could give so have a read of that if you&#8217;re curious about the details.  The <a title="Maxim MAX757 Data Sheet" href="http://datasheets.maxim-ic.com/en/ds/MAX756-MAX757.pdf" target="_blank">Maxim MAX757</a> I&#8217;m using here is an 8 pin DIP chip and requires minimal external components which makes it ideal for a stripboard build, it has an adjustable output voltage in the range 2.7V to 5.5V and can operate down to a 0.7V input voltage, the data sheet seems to imply that it needs at least 1.1V initially to start up but this doesn&#8217;t seem to be the case, at least it wasn&#8217;t in my testing. This output range combined with the low voltage capability means it is easy to get the two common voltages used with microcontrollers and other digital electronics of 3.3V and 5V from even a single AA or AAA cell although the extra capacity probably makes two (or more) more practical for most uses.</p><p>The output voltage on the MAX757 is set by a voltage divider between ground and the output which is connected to the feedback input (pin 2), the formula to calculate the required resistors is:</p><p><em>VOUT = (1.25) [(R2 + R1) / R2]</em></p><p>To get 5V I have used 30K for R1 and 10K for R2, for 3.3V you could use 18K for R1 and 11K for R2.</p><p>If you can find it an alternative part is the MAX756 which is a bit easier if you only need an output of 5V or 3.3V as the voltage can be set by connecting pin 2 low for 5V or high for 3.3V which negates the need for the voltage divider arrangement.</p><p>These chips also have a low battery output that can be used to light an LED to notify of a low battery, it brings pin 4 (LBO) low when the voltage at pin 5 (LBI) drops below the converters internal reference voltage of 1.25V. This means the lowest voltage you can trigger the warning is 1.25V so you would probably want to leave this off if using a single cell. For a warning at 1.25V you just need to connect pin 5 (LBI) to VIN and an LED with a suitable resistor to pin 4 (LBO). For a warning at a higher voltage you would need to use a voltage divider to output the desired voltage to the LBI pin.</p><p>Here is my stripboard layout for the MAX757, the MAX756 would be the same except R1 and R2 would be omitted and pin 2 would instead be connected to ground to select 5V output or to VIN to select 3.3V output.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/boost_converter_stripboard_layout1.png"><img class="alignnone size-full wp-image-2681" title="MAX757 Boost Converter Stripboard Layout" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/04/boost_converter_stripboard_layout1.png" alt="" width="550" height="362" /></a></p><p><strong>Parts list:</strong></p><p>1 x MAX757 Adjustable-Output Step-Up DC-DC Converter<br /> 1 x 8 pin DIL socket<br /> 1 x Piece of stripboard, minimum 8 rows by 21 holes<br /> 1 x 22 uH Inductor (0.03 Ohm or less, 1.2A or more)<br /> 1 x 150 uF electrolytic capacitor<br /> 1 x 100 uF electrolytic capacitor<br /> 1 x 100 nF ceramic capacitor<br /> 1 x 1N5817 Schottky Diode<br /> 1 x AA Battery holder of desired capacity<br /> 1 x LED (optional)<br /> 1 x 100 Ohm resistor (optional)<br /> <strong>For 5V output: </strong><br /> 1 x 30K resistor<br /> 1 x 10K resistor<br /> <strong>For 3.3V output:</strong><br /> 1 x 18K resistor<br /> 1 x 11K resistor</p><p>For other output voltages calculate suitable resistors using the formula VOUT = (1.25) [(R2 + R1) / R2]</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120430%2Fthe-magic-of-the-boost-converter%2F&amp;linkname=The%20Magic%20of%20the%20Boost%20Converter" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120430%2Fthe-magic-of-the-boost-converter%2F&amp;linkname=The%20Magic%20of%20the%20Boost%20Converter" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120430%2Fthe-magic-of-the-boost-converter%2F&amp;linkname=The%20Magic%20of%20the%20Boost%20Converter" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120430%2Fthe-magic-of-the-boost-converter%2F&amp;linkname=The%20Magic%20of%20the%20Boost%20Converter" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120430%2Fthe-magic-of-the-boost-converter%2F&amp;linkname=The%20Magic%20of%20the%20Boost%20Converter" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120430%2Fthe-magic-of-the-boost-converter%2F&amp;linkname=The%20Magic%20of%20the%20Boost%20Converter" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20120430%2Fthe-magic-of-the-boost-converter%2F&amp;title=The%20Magic%20of%20the%20Boost%20Converter" id="wpa2a_6"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/7YaegZX9WpI" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20120430/the-magic-of-the-boost-converter/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20120430/the-magic-of-the-boost-converter/</feedburner:origLink></item> <item><title>An ATtiny based Wireless Temperature Sensor</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/vunQVuvHzUg/</link> <comments>http://nathan.chantrell.net/20120225/an-attiny-based-wireless-temperature-sensor/#comments</comments> <pubDate>Sat, 25 Feb 2012 20:59:08 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Arduino]]></category> <category><![CDATA[Electronics]]></category> <category><![CDATA[Home Automation]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[IoT]]></category> <category><![CDATA[OpenEnergyMonitor]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2588</guid> <description><![CDATA[<p>I was poking around in the JeeLabs RF12 library recently (now part of JeeLib) and noticed that it now supports the ATtiny microcontrollers &#8211; it&#8217;s what the new JeeNode Micro uses, which got me thinking about even smaller, simpler wireless temperature sensor modules again. If you aren&#8217;t familiar with the Atmel TinyAVR range of microcontrollers they [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:2a03b12d2bf7ea8980109b6e07c528c34b0c74c1'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/ATtiny84_Wireless_Temperature_Sensor1.jpg"><img class="alignright size-medium wp-image-2612" title="ATtiny84 Wireless Temperature Sensor" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/ATtiny84_Wireless_Temperature_Sensor1-300x220.jpg" alt="" width="300" height="220" /></a>I was poking around in the JeeLabs RF12 library recently (now part of <a title="jeelib library on GitHub" href="https://github.com/jcw/jeelib" target="_blank">JeeLib</a>) and noticed that it now supports the ATtiny microcontrollers &#8211; it&#8217;s what the new JeeNode Micro uses, which got me thinking about even smaller, simpler wireless temperature sensor modules again. If you aren&#8217;t familiar with the <a title="Atmel tinyAVR" href="http://www.atmel.com/products/microcontrollers/avr/tinyavr.aspx" target="_blank">Atmel TinyAVR range</a> of microcontrollers they are the little brother of the ATmega that is used in our old friend the Arduino, smaller and lower cost, they are ideal for simple applications like this. The Arduino platform doesn&#8217;t support the ATtiny out of the box but thanks to the <a title="arduino-tiny" href="http://code.google.com/p/arduino-tiny/" target="_blank">arduino-tiny</a> project that is easily fixed, more on that later.</p><p>The version of the TinyAVR that I&#8217;m using here is the ATtiny84, it&#8217;s a 14 pin DIP package with 8KB flash, 512 byte RAM, up to 11 GPIO pins, 8 with ADC, and support for SPI, plenty to easily support the RFM12B and a temperature sensor. Using the ATtiny84 has allowed me to build my smallest (4cm square excluding the 2 x AA batteries), simplest and cheapest wireless temperature sensor yet which I&#8217;ve dubbed the TempTX-tiny, only 3 components are used, the ATtiny84 microcontroller itself, the RFM12B transceiver and a temperature sensor.</p><p><span id="more-2588"></span></p><p>This is how the ATtiny84&#8242;s pins translate to the standard Arduino pin labels, as you can see most of the pins are multi-purpose.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/ATtiny84_arduino-tiny_pins.png"><img title="ATtiny84 arduino-tiny pins" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/ATtiny84_arduino-tiny_pins.png" alt="" width="300" height="202" /></a></p><p>The reduced RAM of the ATtiny84 meant ditching the familiar DS18B20 digital temperature sensor that I&#8217;ve used <a title="TempTX V2 Wireless Temperature Sensor Module" href="http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/">previously</a> as the onewire and DallasTemperature libraries pushed the code size over the 8KB flash limit. Initially I considered trying to trim the libraries down to the minimum required to read a single sensor in degrees C but soon dropped that idea and went for a cheap analogue sensor instead (although I&#8217;ve found something that might work for the DS18B20 now so watch out for a follow up post).</p><p>There are a few options for analogue sensors but the <a title="TMP36:  Voltage Output Temperature Sensors" href="http://www.analog.com/en/mems-sensors/digital-temperature-sensors/tmp36/products/product.html" target="_blank">Analog Devices TMP36</a> seemed perfect, it is a TO-92 packaged (like the DS18B20) precision analogue temperature sensor with a range of -40°C to 125°C and runs from 2.7V &#8211; 5.5V with a 0.05 mA current draw. The TMP36 doesn&#8217;t require any external calibration and outputs the temperature as an analogue voltage in mV that is linearly proportional to the temperature in degrees celsius, with a scale factor of 10mV per degree and an offset of 500mV to allow for negative temperatures, eg. a voltage of 725mV equals a temperature of 22.5C and 475mV would equal a temperature of -2.5</p><p>This makes it incredibly simple to read the temperature, only requiring a few lines of code. The sensor&#8217;s output can be connected straight to one of the ATtiny&#8217;s analogue to digital converter (ADC) inputs where we can read it with the Arduino <em>analogRead</em> function. To get a consistent output from the ADC the ATtiny needs a fixed voltage to use as a reference (the aref), by default the supply voltage would be used but as the completed circuit will be running from 2 x AA batteries that will gradually decrease over time as the batteries deplete, fortunately the ATtiny also has an internal 1.1V reference voltage that we can use by setting <em>analogReference(INTERNAL). </em>This seems to be pretty stable but isn&#8217;t an accurate 1.1V so we will need to calibrate this later on if we want accurate readings. For now lets assume it is 1.1V</p><p>The resulting reading from the ADC will be a 10-bit value, ie. 1024 steps ranging from 0 to 1.1V, to turn this figure into mV we just need to multiply it by the reference in mV divided by 1024, we can then remove the 500mV offset and divide the result by 10 (the sensors 10mV per degree resolution) to give us the temperature in degrees celsius.</p><p>So in setup() we need to do:</p><p style="padding-left: 30px;"><em>analogReference(INTERNAL);  <span style="color: #808080;">// Set the aref to the internal 1.1V reference</span></em></p><p>and then in the loop:</p><p style="padding-left: 30px;"><em>tempReading = analogRead(tempPin); <span style="color: #808080;">// Get the reading from the sensor</span></em></p><p style="padding-left: 30px;"><em>double voltage = tempReading * (1100/1024); <span style="color: #808080;">// Convert reading from sensor into millivolts</span></em></p><p style="padding-left: 30px;"><em>double temperatureC = (voltage &#8211; 500) / 10; <span style="color: #808080;">// Convert to temperature in degrees C</span>.</em></p><p>Where tempPin is the pin the TMP36 Vout is connected.</p><p>This gives us temperatureC as a temperature in degrees celsius. In the final code I&#8217;m actually taking 11 readings, throwing the first away and then taking an average of the remaining 10 to help filter out any noisy readings. See further down for a link to the full code.</p><p>As with <a title="TempTX V2 Wireless Temperature Sensor Module" href="http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/" target="_blank">the previous TempTX design</a> I&#8217;ve powered the sensor from a pin on the microcontroller so that it can be turned on only when getting a reading. +Vs is connected to Pin 12 (as Arduino D9) and Vout to Pin 13 (as Arduino A0)</p><p>&nbsp;</p><p><strong>Connecting the RFM12B to the ATtiny84</strong></p><p><strong></strong>As I said earlier, the RFM12B on the ATtiny84 works with an unmodified JeeLib library, it just needs to connected as follows. The ATtiny&#8217;s internal oscillator also needs to be set to 8Mhz, I&#8217;ll cover how to do that further on.</p><table><tbody><tr><th>RFM12B</th><th>ATtiny84</th></tr><tr><td>IRQ</td><td>Pin 5</td></tr><tr><td>SDO</td><td>Pin 7</td></tr><tr><td>SDI</td><td>Pin 8</td></tr><tr><td>SCK</td><td>Pin 9</td></tr><tr><td>SEL</td><td>Pin 3</td></tr></tbody></table><p>Since a couple of people have asked, here is how I am mounting RFM12B transceivers to the stripboard.  The best method I&#8217;ve found so far is to solder short lengths of wire to the 8 contacts required on the RFM12B first and then fit it to the stripboard. Soldering the wire to the module is very fiddly.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/RFM12B_stripboard_mounting_s.jpg"><img class="alignnone size-thumbnail wp-image-2622" title="RFM12B stripboard mounting" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/RFM12B_stripboard_mounting_s-150x150.jpg" alt="" width="150" height="150" /></a></p><p>&nbsp;</p><p><strong> Complete stripboard layout for the TempTX-tiny</strong></p><p>Here is the layout for the complete board, as usual I&#8217;ve tried to keep it neat rather than going for the smallest footprint by crossing links etc.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/tempTX-tiny_stripboard_layout.png"><img class="alignnone  wp-image-2590" title="tempTX-tiny stripboard layout" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/tempTX-tiny_stripboard_layout.png" alt="" width="300" height="378" /></a></p><p>&nbsp;</p><p><strong>The Code</strong></p><p>The complete code is <a title="Code for TempTX-tiny ATtiny84 Bases Wireless Temperature Sensor Node" href="https://github.com/nathanchantrell/TempTX_tiny" target="_blank">available on Github here</a>, it will read the temperature and battery voltage once a minute and transmit them via the RFM12B. As with my other temperature sensors this transmission is picked up by my <a title="Wireless Graphical Displays" href="http://nathan.chantrell.net/20111217/winode-based-wireless-graphical-display/">wireless graphical displays</a> and a <a title="Nanode" href="http://nathan.chantrell.net/20111204/the-nanode-family-expands/">Nanode</a> which then uploads it to my <a title="emoncms v3" href="http://www.flickr.com/photos/nathanchantrell/6594110535/in/photostream" target="_blank">emoncms installation</a>.</p><p>For the voltage measurement I managed to get the code <a title="Arduino Secret Voltmeter" href="http://code.google.com/p/tinkerit/wiki/SecretVoltmeter" target="_blank">Tinker SecretVoltmeter code</a> that I&#8217;ve used previously to work with the ATtiny84 by changing the registers for the MUXs.</p><p>&nbsp;</p><p><strong>Getting the code onto the ATtiny</strong></p><p>As I mentioned at the start the Arduino IDE doesn&#8217;t support the ATtiny microcontrollers out of the box but this is where the <a title="arduino-tiny" href="http://code.google.com/p/arduino-tiny/" target="_blank">arduino-tiny project</a> comes in, this set of &#8220;cores&#8221; allows the Arduino platform to be extended to work with the ATtiny84, ATtiny85, and ATtiny2313 microprocessors. To install arduino-tiny you just need to create a directory under your Arduino sketchbook directory called hardware and unzip the <a title="arduino-tiny core" href="http://code.google.com/p/arduino-tiny/downloads/list" target="_blank">latest arduino-tiny from here</a> into it. Now restart the Arduino IDE and you should see the new ATtiny entries under the <span style="color: #000000;"><em>Tools &gt; Board</em> menu</span>.</p><p>There is no bootloader and the ATtiny doesn&#8217;t have the hardware serial of the ATmega so we&#8217;re limited to ICSP (In Circuit Serial Programming) to get the code onto the ATtiny but don&#8217;t worry, you don&#8217;t need a dedicated ICSP device, an Arduino can provide that function perfectly well.</p><p>&nbsp;</p><p><strong> Using an Arduino as an ICSP programmer</strong></p><p><strong></strong> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/ArduinoISP_s.jpg"><img class="alignright size-medium wp-image-2623" title="Using ArduinoISP to program an ATtiny84" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/ArduinoISP_s-300x225.jpg" alt="" width="300" height="225" /></a>To use an Arduino as an ICSP you need to load the ArduinoISP sketch on the Arduino and connect the SPI pins and reset between it and the ATtiny. A version of the ArduinoISP sketch is included in the examples directory with the Arduino IDE but it seems to be broken, <a title="Working ArduinoISP" href="https://github.com/rsbohn/arduinoisp" target="_blank">download this one</a> instead and load it onto your Arduino in the normal manner.</p><p>Now connect the Arduino to your ATtiny as follows:</p><table><tbody><tr><th>Arduino</th><th>ATtiny84</th></tr><tr><td>D13</td><td>Pin 9</td></tr><tr><td>D12</td><td>Pin 8</td></tr><tr><td>D11</td><td>Pin 7</td></tr><tr><td>D10</td><td>Pin 4</td></tr><tr><td>3.3/5V</td><td>Pin 1</td></tr><tr><td>GND</td><td>Pin 14</td></tr></tbody></table><p>The first thing we need to do is set the ATtiny&#8217;s internal oscillator to 8MHz (required for the RF12 support), to do this you need to go to <em>Tools &gt; board</em> and select &#8220;ATtiny84 @ 8MHz (internal oscillator;BOD disabled)&#8221; and then use <em>Tools &gt; Burn Bootloader</em>. Note that this isn&#8217;t actually burning a bootloader to the ATtiny, it is just using this function to set the AVR fuses to configure the oscillator.</p><p>Now download my <a title="Code for TempTX-tiny ATtiny84 Bases Wireless Temperature Sensor Node" href="https://github.com/nathanchantrell/TempTX_tiny" target="_blank">TempTX-tiny code from Github</a>. Load the <em>TempTX_tiny.ino</em> sketch in the Arduino IDE and then upload in the normal manner, the ArduinoISP sketch running on the Arduino will upload it on to the ATtiny. You will probably get the following message twice:</p><p style="padding-left: 30px;"><span style="color: #ff6600;"><em>avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny84</em></span></p><p>but this can be safely ignored, <span style="color: #000000;">as long as it says &#8220;Done uploading&#8221; at the end</span> then you are good to go.</p><p>If you get some errors about <em>&#8220;<span style="color: #ff6600;">expected identifier or &#8216;(&#8216; before &#8216;double&#8217;</span>&#8220; </em>then you need to comment out the following line in ~/sketchbook/hardware/tiny/cores/tiny/wiring.h</p><p style="padding-left: 30px;"><em>#define round(x) ((x)&gt;=0?(long)((x)+0.5):(long)((x)-0.5))</em></p><p>If you get &#8220;<span style="color: #ff6600;">not in sync</span>&#8221; or &#8220;<span style="color: #ff6600;">protocol error</span>&#8221; then try reducing the baud rate in the ArduinoISP sketch and in hardware/arduino/programmers.txt (under your Arduino IDE directory) <a title="Fixing ArduinoISP sketch by lowering baud rate to 9600 (from 19200)." href="https://github.com/arduino/Arduino/commit/80a2154279a02fd69f995ef6ff9eb889363c73ca" target="_blank">as mentioned here</a>, I had to do this to get it to work.</p><p>&nbsp;</p><p><strong>Calibration</strong></p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/TMP36_DS18B20_Comparison.png"><img class="alignright size-medium wp-image-2649" title="TMP36 DS18B20 Comparison" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/02/TMP36_DS18B20_Comparison-300x138.png" alt="" width="300" height="138" /></a>I was hoping to get away without this given that the TMP36 doesn&#8217;t need calibrating but I found that the readings were consistently out by a few degrees. This seems to be mostly due to the inaccuracy of the internal voltage reference as mentioned above, it seems to be stable but not an accurate 1.1V. I thought about using the battery voltage as the reference now I can measure that but of course that relies on the internal reference too so isn&#8217;t accurate either, fine for a low battery notification but no good for getting accurate temperature readings. I couldn&#8217;t find a simple way of determining the internal reference on the ATtiny84 so what I did was temporarily modify the code to transmit the analogue reading instead of the temperature, ie. change  <em>temptx.temp = temperatureC * 100;</em> to  <em>temptx.temp = tempReading;</em> and then placed the sensor next to a known accurate sensor to use as a reference (<a title="TempTX V2 Wireless Temperature Sensor Module" href="http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/">one of my DS18B20 based sensors</a>). I then logged a series of temperatures from the reference sensor and the corresponding analogue readings from the TMP36 and did the following calculation for each reading to calculate the reference voltage.</p><p style="padding-left: 30px;">aref = (reference_temp x 10 + 500) / analogue_reading x 1024</p><p>Then I added the results from all the samples up and divided by the number of samples to get an average. This gave me an aref value of 965.047318612. I divided this by 1024 and used the resulting value of <em>0.942382812</em> as my calibrated conversion factor for the mV reading, eg.</p><p style="padding-left: 30px;"><em>double voltage = tempReading * 0.942382812;</em></p><p>This has given me accurate results over a range of temperatures.</p><p>&nbsp;</p><p><strong>Parts List for the TempTX-tiny</strong></p><p>Stripboard min 15 holes x 16 rows (40x40mm)<br /> ATtiny84 Microcontroller<br /> RFM12B transceiver<br /> TMP36 Analogue temperature sensor<br /> 14 Pin DIP socket<br /> 2 AA Battery holder<br /> Wire for links<br /> Wire for antenna (165mm for 433MHz or 82mm for 868MHz)</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120225%2Fan-attiny-based-wireless-temperature-sensor%2F&amp;linkname=An%20ATtiny%20based%20Wireless%20Temperature%20Sensor" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120225%2Fan-attiny-based-wireless-temperature-sensor%2F&amp;linkname=An%20ATtiny%20based%20Wireless%20Temperature%20Sensor" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120225%2Fan-attiny-based-wireless-temperature-sensor%2F&amp;linkname=An%20ATtiny%20based%20Wireless%20Temperature%20Sensor" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120225%2Fan-attiny-based-wireless-temperature-sensor%2F&amp;linkname=An%20ATtiny%20based%20Wireless%20Temperature%20Sensor" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120225%2Fan-attiny-based-wireless-temperature-sensor%2F&amp;linkname=An%20ATtiny%20based%20Wireless%20Temperature%20Sensor" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120225%2Fan-attiny-based-wireless-temperature-sensor%2F&amp;linkname=An%20ATtiny%20based%20Wireless%20Temperature%20Sensor" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20120225%2Fan-attiny-based-wireless-temperature-sensor%2F&amp;title=An%20ATtiny%20based%20Wireless%20Temperature%20Sensor" id="wpa2a_8"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/vunQVuvHzUg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20120225/an-attiny-based-wireless-temperature-sensor/feed/</wfw:commentRss> <slash:comments>9</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20120225/an-attiny-based-wireless-temperature-sensor/</feedburner:origLink></item> <item><title>Building a Web Based Infrared Remote Control</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/zB31eQUjv_s/</link> <comments>http://nathan.chantrell.net/20120119/building-a-web-based-infrared-remote-control/#comments</comments> <pubDate>Thu, 19 Jan 2012 21:15:35 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Arduino]]></category> <category><![CDATA[Electronics]]></category> <category><![CDATA[Home Automation]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[IoT]]></category> <category><![CDATA[nanode]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2530</guid> <description><![CDATA[<p>This little project was born out of a wish to control a DAB tuner from other rooms of the house and a couple of hours on a Sunday afternoon made it reality. A Nanode (an original Nanode 5 in this case) is plugged into my ethernet network and an infrared emitter is connected to digital [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:ddc403319f531c66c5ca37963afbcaf118057af5'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/01/Nanode_Web_IR_Remote.png"><img class="alignright  wp-image-2560" title="Nanode Web IR Remote" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/01/Nanode_Web_IR_Remote_c.png" alt="" width="216" height="203" /></a>This little project was born out of a wish to control a DAB tuner from other rooms of the house and a couple of hours on a Sunday afternoon made it reality. A <a title="Nanode Website" href="http://www.nanode.biz/" target="_blank">Nanode</a> (an original Nanode 5 in this case) is plugged into my ethernet network and an infrared emitter is connected to digital pin 3, on visiting the ip address of the Nanode using a web browser you will see a series of buttons (shown on my phone in the screenshot on the right, click to see it full size) and selecting the various options makes the Nanode transmit the relevant infrared code to operate the DAB tuner.</p><p>The hard work here is done by the <a title="Infrared remote library for Arduino" href="http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html" target="_blank">IR Remote library by Ken Shirriff available here</a>. This infrared library has direct support for several common IR protocols (NEC, Sony SIRC and Philips RC5 and RC6) but not the one that my DAB tuner uses, fortunately this isn&#8217;t a problem as the library also makes it easy to read and transmit using the raw infrared codes (mark and space intervals) from any remote control.<br /> NB. If you are using Arduino IDE 1.0 note the comment on the library page about changing WProgram.h for Arduino.h &#8211; that&#8217;s the only change required for 1.0</p><p><span id="more-2530"></span></p><p><strong>Getting the codes from the original remote control</strong><br /> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/01/IR_Sensor.jpg"><img class="wp-image-2531 alignleft" title="IR Sensor" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/01/IR_Sensor.jpg" alt="" width="122" height="181" /></a><br /> The first step is to use an IR receiver connected to the Nanode to read the codes from the original remote control. An IR receiver is basically a photocell that is tuned to the infrared spectrum along with a demodulator that gives an inverted logic level output. I used a Vishay TSOP31238 IR sensor (63p +VAT from Farnell) and connected it to the Nanode as shown on the left.</p><p>To read the codes load the IRrecvDump example sketch that is included with the IR library onto the Nanode, open the serial monitor and point the remote control you want to get the codes from at the sensor, for supported protocols it will output the protocol, a hex value, the number of bits and the raw code as each button is pressed, for an unsupported protocol it will return &#8220;Could not decode message&#8221; and output the raw code only.</p><p>Press each button in turn and save the codes in a safe place. Once all the necessary codes have been gathered the IR receiver is no longer required for this project but has lots of potential for future use.</p><p><strong>Sending the codes from the Nanode</strong><br /> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/01/IR_Emitter.jpg"><img class="wp-image-2532 alignright" title="IR Emitter" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/01/IR_Emitter.jpg" alt="" width="150" height="181" /></a><br /> To transmit the IR codes you need an infrared emitter &#8211; a type of LED that emits infrared light. I used a Vishay TSAL7400 2.6V IR emitter (18p +VAT from Farnell) connected via a 27 Ohm resistor (as I&#8217;m using a 5V Nanode 5) to pin 3 of the Nanode as shown on the right.</p><p>The codes are transmitted by the library using pulse width modulation so a PWM pin must be used on the Nanode, the library is configured to use pin 3 which is convenient as it is free for use on a Nanode 5 (and on a Nanode Classic or RF provided you aren&#8217;t using an MCP7941x RTC).</p><p><strong>Supported protocol codes</strong></p><p>To send a code using one of the supported protocols you just need to use to use the relevant irsend command with the hex value and the number of bits, for example to send an NEC protocol command that IRrecvDump reported as &#8220;<em>Decoded NEC: A10C800F (32 bits)</em>&#8220; you would use:</p><p style="padding-left: 30px;"><em>irsend.sendNEC(A10C800F, 32)</em></p><p>Change sendNEC to sendSony, sendRC5 or sendRC6 depending on the protocol that IRrecvDump reported.</p><p><strong>Raw Codes</strong></p><p>For raw codes we first need to modify the output from the IRrecvDump sketch slightly, just remove the first group of digits and make all the numbers positive, then add commas between each group and put it into an array.</p><p>eg. The code received from the IRrecvDump sketch:</p><p style="padding-left: 30px;"><em>-14368 4500 -4500 600 -500 600 -1650 600 -550 550 -550 600 -500 600 -550 600 -500 600 -1650 600 -550 550 -1700 550 -550 600 -550 550 -550 600 -500 600 -550 600 -1600 600 -1650 600 -550 550 -550 600 -550 550 -550 600 -550 550 -550 600 -550 550 -550 600 -1650 600 -1600 600 -1650 600 -1650 600 -1650 600 -1650 600 -1650 600 </em></p><p>becomes</p><p style="padding-left: 30px;"><em>unsigned int rawCode[68] = {<em>4500, 4500, 600, 500, 600, 1650, 600, 550, 550, 550, 600, 500, 600, 550, 600, 500, 600, 1650, 600, 550, 550, 1700, 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 600, 1600, 600, 1650, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 550, 550, 550, 600, 1650, 600, 1600, 600, 1650, 600, 1650, 600, 1650, 600, 1650, 600, 1650, 600</em>};</em></p><p>and then to send it we use the sendRaw command with the array name, array length and the frequency (38kHz):</p><p style="padding-left: 30px;"><em>irsend.sendRaw(rawCode,68,38);</em></p><p><strong>Turning all this into a functional web based remote control</strong></p><p>So now I have all the relevant codes for my target device and can send them from the Nanode to control it, the next step was to build a simple web server on the Nanode to allow easy selection of the various codes.</p><p>I based this on the <a title="EtherCard RESTduino" href="https://github.com/thiseldo/EtherCardExamples/tree/master/EtherCard_RESTduino" target="_blank">Ethercard version of RESTduino</a> by Andrew D Lindsay (itself based on <a title="RESTduino" href="http://jasongullickson.posterous.com/restduino-arduino-hacking-for-the-rest-of-us" target="_blank">the original by Jason Gullickson</a>) modifying it to transmit IR codes instead of controlling the I/O pins and adding the menu. The only problem I ran into here was due to all the arrays for the raw codes eating up the RAM in the ATmega 328 but storing them in flash using <a title="PROGMEM - Store data in flash (program) memory instead of SRAM" href="http://arduino.cc/en/Reference/PROGMEM" target="_blank">PROGMEM</a> instead solved that. I&#8217;m not sure the way I&#8217;m reading them back is the most elegant but it works!</p><p>My <a title="Nanode Web IR Remote" href="https://github.com/nathanchantrell/Nanode_Web_IR_Remote" target="_blank">code for this is available on GitHub here</a> and it would be simple to modify for other IR controlled devices. There is also an optional css file there to prettify the basic HTML output, due to the lack of RAM this would need to go on a separate web server. Another option would be to build a full fat web interface on another server and just call the Nanode&#8217;s URLs to send each command, eg. &#8220;<em>http://192.168.0.188/4</em>&#8221; to send the command for preset 4.</p><p><strong>Other uses for infrared</strong></p><p>The IR library along with the IR receiver makes it easy to use an arbitrary infra red remote control to control the Nanode (or any other Arduino compatible for that matter). It&#8217;s as simple as building a conditional structure in the loop to do what you want on reception of the relevant code, this could be used to turn outputs on and off or trigger events over the network or RF.</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120119%2Fbuilding-a-web-based-infrared-remote-control%2F&amp;linkname=Building%20a%20Web%20Based%20Infrared%20Remote%20Control" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120119%2Fbuilding-a-web-based-infrared-remote-control%2F&amp;linkname=Building%20a%20Web%20Based%20Infrared%20Remote%20Control" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120119%2Fbuilding-a-web-based-infrared-remote-control%2F&amp;linkname=Building%20a%20Web%20Based%20Infrared%20Remote%20Control" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120119%2Fbuilding-a-web-based-infrared-remote-control%2F&amp;linkname=Building%20a%20Web%20Based%20Infrared%20Remote%20Control" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120119%2Fbuilding-a-web-based-infrared-remote-control%2F&amp;linkname=Building%20a%20Web%20Based%20Infrared%20Remote%20Control" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120119%2Fbuilding-a-web-based-infrared-remote-control%2F&amp;linkname=Building%20a%20Web%20Based%20Infrared%20Remote%20Control" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20120119%2Fbuilding-a-web-based-infrared-remote-control%2F&amp;title=Building%20a%20Web%20Based%20Infrared%20Remote%20Control" id="wpa2a_10"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/zB31eQUjv_s" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20120119/building-a-web-based-infrared-remote-control/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20120119/building-a-web-based-infrared-remote-control/</feedburner:origLink></item> <item><title>Further extending the TempTX battery life</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/JKAbkdKH-h8/</link> <comments>http://nathan.chantrell.net/20120107/further-extending-the-temptx-battery-life/#comments</comments> <pubDate>Sat, 07 Jan 2012 04:25:50 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Arduino]]></category> <category><![CDATA[Electronics]]></category> <category><![CDATA[Home Automation]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[IoT]]></category> <category><![CDATA[nanode]]></category> <category><![CDATA[OpenEnergyMonitor]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2503</guid> <description><![CDATA[<p>I&#8217;ve been struggling for thinking and tinkering time this week due to a bad cold that has totally wiped me out but I did have some more thoughts on further reducing the power usage of the TempTX V2. The first one is quite simple and will only have a minor effect but only needs [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:545cd06c963ac60a847af645b33c72362e47250a'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2012/01/temptx2-rt.jpg"><img class="alignright size-medium wp-image-2506" title="TempTX V2" src="http://cdn.chantrell.net/blog/wp-content/uploads/2012/01/temptx2-rt-300x212.jpg" alt="" width="300" height="212" /></a>I&#8217;ve been struggling for thinking and tinkering time this week due to a bad cold that has totally wiped me out but I did have some more thoughts on further reducing the power usage of the <a title="TempTX V2 Wireless Temperature Sensor Module" href="http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/">TempTX V2</a>. The first one is quite simple and will only have a minor effect but only needs a minor code change &#8211; it turns out that it is possible to reduce the time the DS18B20 temperature sensor takes to get a reading by reducing its resolution as shown in the table below. It is currently using a 12 bit resolution but even reducing it to the lowest setting of 9 bit, an effective resolution of 0.5°C at a time would be acceptable for most applications I think.</p><table><tbody><tr><th>Resolution</th><th>9 bit</th><th>10 bit</th><th>11 bit</th><th>12 bit</th></tr><tr><td>Conversion Time (ms)</td><td>93.75</td><td>187.5</td><td>375</td><td>750</td></tr><tr><td>LSB (°C)</td><td>0.5</td><td>0.25</td><td>0.125</td><td>0.0625</td></tr></tbody></table><p>Milliseconds might only seem like a small difference but that is as much as an 8 fold difference and as I said in the last post, every little counts.</p><p>Secondly, a <a title="@Monsonite @ceejay It looks like a fuse issue. The BOD is too high. Current value is 2.7V for 3.3V board. Change to 1.8V and its OK." href="https://mobile.twitter.com/andrewdlindsay/status/153554435673559040" target="_blank">completely unrelated discussion on Twitter</a> at the weekend lead to a likely explanation for the total drop out when the battery voltage reaches 2.7V, namely that the default BOD (Brown Out Detection) fuse setting for the ATmega328 when using the default Arduino bootloader is 2.7V (<a title="I’ve also run some tests on the voltage required to keep it running and it seems to run fine until it drops below 2.71V" href="http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/#voltage">sound familiar</a>?), when the voltage drops below this level the mcu is put into a reset loop until it rises again. That explains the sudden cut off at 2.7V.<br /> With some fiddling and reflashing of the bootloader this BOD setting can be changed to 1.8V or even disabled completely and some brief research shows that the ATmega328 can run from as little as 1.8V (although it would be out of spec running at 16MHz at that low of a voltage) and that the RFM12B module should run OK down to 2.2V so there is plenty of room there. Surprisingly the DS18B20 temperature sensor is not so tolerant, the datasheet says it needs a minimum of 3.0V, however, I&#8217;ve already proved that it runs ok at 2.7V (at current average temperatures anyway) and a little research found some reports that it works down to around 2.6V before it starts to give errors and the addition of an electrolytic capacitor should be sufficient for it to get a reliable reading at even lower voltages, especially at the lower resolutions where it needs to be powered for a shorter amount of time. I might try some more voltage tests with the BOD disabled to see how low I can get the whole thing will go before it starts to become unreliable.<br /> Another, maybe more sensible option might be to look at some different temperature sensors that are rated to work at lower voltages, there are several cheaper analogue alternatives to the DS18B20 that might make more sense, they would need to be calibrated though and it would mean only one sensor per input (not really a factor with the way I&#8217;ve been using these boards so far) but would have a secondary advantage in that the 1-wire and Dallas Temperature libraries wouldn&#8217;t be required which might mean that the code can be reduced to fit into one of the smaller ATmega microcontrollers thus reducing cost again.</p><p>Please feel free to post in the comments if you can think of any other suggestions or improvements.</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Ffurther-extending-the-temptx-battery-life%2F&amp;linkname=Further%20extending%20the%20TempTX%20battery%20life" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Ffurther-extending-the-temptx-battery-life%2F&amp;linkname=Further%20extending%20the%20TempTX%20battery%20life" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Ffurther-extending-the-temptx-battery-life%2F&amp;linkname=Further%20extending%20the%20TempTX%20battery%20life" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Ffurther-extending-the-temptx-battery-life%2F&amp;linkname=Further%20extending%20the%20TempTX%20battery%20life" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Ffurther-extending-the-temptx-battery-life%2F&amp;linkname=Further%20extending%20the%20TempTX%20battery%20life" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Ffurther-extending-the-temptx-battery-life%2F&amp;linkname=Further%20extending%20the%20TempTX%20battery%20life" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Ffurther-extending-the-temptx-battery-life%2F&amp;title=Further%20extending%20the%20TempTX%20battery%20life" id="wpa2a_12"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/JKAbkdKH-h8" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20120107/further-extending-the-temptx-battery-life/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20120107/further-extending-the-temptx-battery-life/</feedburner:origLink></item> <item><title>Vashta Nerada [Doctor Who Theme] by Traffic Experiment</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/tHvLxlnrXmA/</link> <comments>http://nathan.chantrell.net/20120107/vashta-nerada-doctor-who-theme-by-traffic-experiment/#comments</comments> <pubDate>Sat, 07 Jan 2012 04:19:41 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[TV/Radio]]></category> <category><![CDATA[doctor who]]></category> <category><![CDATA[music]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2519</guid> <description><![CDATA[<p>I just wanted to share this fantastic Pink Floyd-esque (with a hint of Ozric Tentacles in places) reworking of the Doctor Who theme tune from Traffic Experiment as it doesn&#8217;t seem to have been getting the love it so obviously deserves. You can also download this track for free as an MP3 or FLAC [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:42f45d80f9ef09ddbd1d116e10b6fc7a32e49699'><p>I just wanted to share this fantastic Pink Floyd-esque (with a hint of Ozric Tentacles in places) reworking of the Doctor Who theme tune from Traffic Experiment as it doesn&#8217;t seem to have been getting the love it so obviously deserves. You can also download this track for free as an MP3 or FLAC at the <a title="Vashta Nerada [Doctor Who Theme] by Traffic Experiment" href="http://www.trafficexperiment.net/traffic-experiment-vashta-nerada-doctor-who-theme.html" target="_blank">Traffic Experiment website</a>.</p><p><iframe width="500" height="281" src="http://www.youtube.com/embed/eRm8qmM-DTg?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p><p>I hope you enjoyed this interval, normal service will be resumed shortly.</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Fvashta-nerada-doctor-who-theme-by-traffic-experiment%2F&amp;linkname=Vashta%20Nerada%20%5BDoctor%20Who%20Theme%5D%20by%20Traffic%20Experiment" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Fvashta-nerada-doctor-who-theme-by-traffic-experiment%2F&amp;linkname=Vashta%20Nerada%20%5BDoctor%20Who%20Theme%5D%20by%20Traffic%20Experiment" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Fvashta-nerada-doctor-who-theme-by-traffic-experiment%2F&amp;linkname=Vashta%20Nerada%20%5BDoctor%20Who%20Theme%5D%20by%20Traffic%20Experiment" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Fvashta-nerada-doctor-who-theme-by-traffic-experiment%2F&amp;linkname=Vashta%20Nerada%20%5BDoctor%20Who%20Theme%5D%20by%20Traffic%20Experiment" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Fvashta-nerada-doctor-who-theme-by-traffic-experiment%2F&amp;linkname=Vashta%20Nerada%20%5BDoctor%20Who%20Theme%5D%20by%20Traffic%20Experiment" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Fvashta-nerada-doctor-who-theme-by-traffic-experiment%2F&amp;linkname=Vashta%20Nerada%20%5BDoctor%20Who%20Theme%5D%20by%20Traffic%20Experiment" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20120107%2Fvashta-nerada-doctor-who-theme-by-traffic-experiment%2F&amp;title=Vashta%20Nerada%20%5BDoctor%20Who%20Theme%5D%20by%20Traffic%20Experiment" id="wpa2a_14"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/tHvLxlnrXmA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20120107/vashta-nerada-doctor-who-theme-by-traffic-experiment/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20120107/vashta-nerada-doctor-who-theme-by-traffic-experiment/</feedburner:origLink></item> <item><title>TempTX V2 Wireless Temperature Sensor Module</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/sUF64S0Yv-M/</link> <comments>http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/#comments</comments> <pubDate>Thu, 29 Dec 2011 15:08:48 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Arduino]]></category> <category><![CDATA[Electronics]]></category> <category><![CDATA[Home Automation]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[IoT]]></category> <category><![CDATA[nanode]]></category> <category><![CDATA[OpenEnergyMonitor]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2428</guid> <description><![CDATA[<p> The original wireless temperature sensor module that I built at the end of October is still happily working away proving that the concept of a very minimal wireless node works and that it is quite happy running from two AA batteries.</p><p>There were a couple of factors that influenced the previous boards design [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:4beb3a70263300eca586bc6f5873eaf95239ffec'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/temptx_v21.jpg"><br /> <img class="alignright size-medium wp-image-2441" title="TempTX V2 Wireless Temperature Sensor Module - Click to enlarge" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/temptx_v21-300x218.jpg" alt="" width="300" height="218" /></a>The <a title="Wireless Temperature Sensor Module" href="http://nathan.chantrell.net/20111102/wireless-temperature-sensor-module/">original wireless temperature sensor module</a> that I built at the end of October is still happily working away proving that the concept of a very minimal wireless node works and that it is quite happy running from two AA batteries.</p><p>There were a couple of factors that influenced the previous boards design that meant is was less than ideal, firstly the need to remove the RFM12B when programming using a 5V FTDI cable complicated things and due to Royal Mail dragging their feet and my impatience to get the thing built I only had a piece of stripboard 18 rows high which necessitated placing the RFM12B alongside the ATmega instead of in line with it .</p><p>Now, armed with new supplies of stripboard and some new ideas I&#8217;ve made a new improved and smaller (40x65mm) board. To resolve the voltage issue I decided to make a small adapter board which contains a voltage regulator and smoothing caps (I didn&#8217;t want to put these on the main board in order to keep it as minimal as possible) and I&#8217;ve also moved the capacitor and pull up resistor for the reset on to this board meaning the TempTX (as I&#8217;ve been calling it) now requires two less components and a little less space. Of course only one adapter is required for as many of the TempTX nodes that are used so in the long run the saving of components required and time to build will make more sense. This adapter also allowed me to re-order the programming pins on the main board which further reduced the number of links required and therefore the space required. Other than using a resonator instead of the crystal and load capacitors I think this is as minimal as this board is going to get. I suppose you could omit the programming header and program the ATmega in another board but that&#8217;s probably taking minimalism a bit too far.</p><p><span id="more-2428"></span></p><p>One thing I overlooked in the original design was that the DS18B20 temperature sensor was constantly powered up, so even when the ATmega was put to sleep it was still sat there wasting power, they don&#8217;t draw much power when idle but every little helps so I&#8217;ve changed this in the new design by connecting the power pin to an output that is only turned on long enough to get a reading, turns out this is only around 840ms.</p><p><strong>Smaller, simpler and more efficient; The TempTX V2:</strong></p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/temperature_sensor_v21.png"><img class="alignnone size-medium wp-image-2438" title="TempTX V2 Wireless temperature sensor - Click to enlarge" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/temperature_sensor_v21-300x228.png" alt="" width="300" height="228" /></a></p><p>I&#8217;ve also cleaned up the code and updated it for Arduino IDE 1.0, adding plenty of comments along the way and removed a rogue delay that was causing the previous version to stay awake for longer than required for each reading. To further reduce the power consumption I&#8217;ve changed the time between each reading to once a minute as every 10 seconds was a bit over the top on reflection. That and the other improvements mean it is now only fully active for around 900ms out of every minute, for the rest of time the RFM12B is in standby, the DS18B20 is off and the ATmega is in low power mode waiting for the watchdog timer to wake it.</p><p>I&#8217;ve done some measurements and it is drawing approx 7mA for the 900ms it is awake and the idle current is too low for my cheap meter to read (its going to be in the µA range). Should have some nice improvements on the already good battery life.</p><p><a name="voltage"></a>I&#8217;ve also run some tests on the voltage required to keep it running and it seems to run fine until it drops below 2.71V. I&#8217;ve put a fresh set of batteries in and will see how long it runs, don&#8217;t expect an update on that any time soon!</p><p>Here is a picture of the FTDI to TempTX adapter and one with it connected.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/temptx_v2_adapter1.jpg"><img class="alignnone size-thumbnail wp-image-2442" title="TempTX V2 FTDI Adapter - Click to enlarge" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/temptx_v2_adapter1-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/temptx_v2_with_adapter1.jpg"><img class="alignnone size-thumbnail wp-image-2443" title="TempTX V2 Temperature Sensor Module and FTDI Adapter - Click to enlarge" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/temptx_v2_with_adapter1-150x150.jpg" alt="" width="150" height="150" /></a></p><p>The code is available <a title="TempTX Wireless Temperature Module code on GitHub" href="https://github.com/nathanchantrell/TempTX" target="_blank">on GitHub here</a> and this is the <a title="NanodeRF_emoncms on GitHub" href="https://github.com/nathanchantrell/NanodeRF_emoncms" target="_blank">code I&#8217;m running on a NanodeRF</a> (actually a <a title="Building an OpenEnergyMonitor system" href="http://nathan.chantrell.net/20111008/building-an-openenergymonitor-system/">Nanode 5 with an RFM12B</a>) to upload the readings from these and the sensors I&#8217;ve built into my graphical displays to my installation of <a title="emoncms web app for processing, logging and visualising energy, temperature and other environmental data" href="http://openenergymonitor.org/emon/emoncms" target="_blank">emoncms</a>.</p><p>Here is a screenshot of emoncms showing power usage and readings from 5 temperature sensors.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/emoncms_v3.png"><img class="alignnone size-medium wp-image-2450" title="Emoncms v3 - Click to enlarge" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/emoncms_v3-300x201.png" alt="" width="300" height="201" /></a></p><p>Cost to build one of the TempTX units is approx £12 (a couple of pounds less while I still have some of the cheap ATmegas that I bought when Proto-PIC had them on special offer) and that is almost all the cost of the ATmega, RFM12B and DS18B20.</p><p><strong>Parts list for the TempTX:</strong><br /> Stripboard min 15 holes x 24 rows (40x65mm)<br /> RFM12B transceiver<br /> ATmega328P-PU with Arduino bootloader<br /> 28 pin DIL socket<br /> 16MHz Crystal<br /> 2 x 22pF ceramic capacitors<br /> DS18B20 temperature sensor<br /> 4K7 resistor<br /> 2 AA Battery holder<br /> 5 pin right angle male header<br /> 3 pin header &amp; connector for sensor (optional)<br /> Wire for links<br /> Wire for antenna (165mm for 433MHz or 82mm for 868MHz)</p><p><strong>Parts list for the programming adapter:</strong><br /> Stripboard min 10 holes x 6 rows<br /> 6 pin right angle male header (with one pin pulled out)<br /> 5 pin right angle female header<br /> MCP1702-33 voltage regulator<br /> 10uF electrolytic capacitor<br /> 3 x 100nF ceramic capacitors<br /> 2 x 10K resistor</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111229%2Ftemptx-v2-wireless-temperature-sensor-module%2F&amp;linkname=TempTX%20V2%20Wireless%20Temperature%20Sensor%20Module" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111229%2Ftemptx-v2-wireless-temperature-sensor-module%2F&amp;linkname=TempTX%20V2%20Wireless%20Temperature%20Sensor%20Module" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111229%2Ftemptx-v2-wireless-temperature-sensor-module%2F&amp;linkname=TempTX%20V2%20Wireless%20Temperature%20Sensor%20Module" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111229%2Ftemptx-v2-wireless-temperature-sensor-module%2F&amp;linkname=TempTX%20V2%20Wireless%20Temperature%20Sensor%20Module" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111229%2Ftemptx-v2-wireless-temperature-sensor-module%2F&amp;linkname=TempTX%20V2%20Wireless%20Temperature%20Sensor%20Module" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111229%2Ftemptx-v2-wireless-temperature-sensor-module%2F&amp;linkname=TempTX%20V2%20Wireless%20Temperature%20Sensor%20Module" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20111229%2Ftemptx-v2-wireless-temperature-sensor-module%2F&amp;title=TempTX%20V2%20Wireless%20Temperature%20Sensor%20Module" id="wpa2a_16"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/sUF64S0Yv-M" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/feed/</wfw:commentRss> <slash:comments>15</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/</feedburner:origLink></item> <item><title>WiNode Based Wireless Graphical Display</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/Gt9639408Pg/</link> <comments>http://nathan.chantrell.net/20111217/winode-based-wireless-graphical-display/#comments</comments> <pubDate>Sat, 17 Dec 2011 15:29:18 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Arduino]]></category> <category><![CDATA[Electronics]]></category> <category><![CDATA[Home Automation]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[IoT]]></category> <category><![CDATA[nanode]]></category> <category><![CDATA[OpenEnergyMonitor]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2398</guid> <description><![CDATA[<p>I&#8217;ve recently put together another wireless GLCD display, this time using a WiNode together with a ST7565 GLCD with RGB backlight and a Nintendo DS touchscreen. The WiNode is fitted with a 433MHz RFB12B transceiver and the MCP79410 Real Time Clock (RTC) option as well as a DS18B20 temperature sensor for the room temperature reading.</p><p>This is [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:c5b9283b170b8970c970128b48a9b2325793fbe3'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-purple.jpg"><img class="alignright size-medium wp-image-2399" title="WiNode Based Wireless GLCD Display" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-purple-300x207.jpg" alt="" width="300" height="207" /></a>I&#8217;ve recently put together another wireless GLCD display, this time using a <a href="http://nanode.eu" rel="nofollow">WiNode</a> together with a ST7565 GLCD with RGB backlight and a Nintendo DS touchscreen. The WiNode is fitted with a 433MHz RFB12B transceiver and the MCP79410 Real Time Clock (RTC) option as well as a DS18B20 temperature sensor for the room temperature reading.</p><p>This is quite an improvement on the <a title="OpenEnergyMonitor Graphical Display" href="http://nathan.chantrell.net/20111015/building-a-graphical-display-for-openenergymonitor/">first display I made</a>, the feature list is now:</p><ul><li>Touch control using Nintendo DS touchscreen</li><li>3 Different display views selectable via touchscreen</li><li>Receive power reading from <a title="Building an OpenEnergyMonitor System" href="http://nathan.chantrell.net/20111008/building-an-openenergymonitor-system/">emonTX</a> via RF</li><li>Receive <a title="Wireless Temperature Sensor Module" href="http://nathan.chantrell.net/20111102/wireless-temperature-sensor-module/">remote temperature reading</a> via RF</li><li>Read room temperature from DS18B20 sensor</li><li>Transmit room temperature reading via RF</li><li>Backlight colour changes depending on power reading</li><li>Supports MCP79410 RTC for time &amp; date display</li></ul><p>The WiNode makes a great base on which to build a display like this and being 3.3V it pairs well with the 3.3V ST7565 displays. This particular display is the Adafruit one with the RGB backlight (available from <a title="Graphic ST7565 Positive LCD (128x64) with RGB backlight" href="http://proto-pic.co.uk/graphic-st7565-positive-lcd-128x64-with-rgb-backlight/" target="_blank">Proto-PIC</a>) that <a title="GLCD Screens and Touchscreens with the Arduino" href="http://nathan.chantrell.net/20111209/glcd-screens-and-touchscreens-with-the-arduino/">I covered here</a> and I&#8217;ve connected it up along with the touchscreen and temperature sensor as follows:</p><p><span id="more-2398"></span> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-rear.jpg"><img class="alignright size-medium wp-image-2402" title="WiNode based GLCD" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-rear-300x235.jpg" alt="" width="300" height="235" /></a></p><table><tbody><tr><th>WiNode Pin</th><th>Connected to</th></tr><tr><td>D0</td><td>RST on ST7565</td></tr><tr><td>D1</td><td>SID on ST7565</td></tr><tr><td>D4</td><td>DS18B20 data pin (with 4.7K pull up to +3.3V)</td></tr><tr><td>D5</td><td>Red cathode for backlight</td></tr><tr><td>D6</td><td>Green cathode for backlight</td></tr><tr><td>D7</td><td>SCLK on ST7565</td></tr><tr><td>D8</td><td>A0 on ST7565</td></tr><tr><td>D9</td><td>Blue cathode for backlight</td></tr><tr><td>A0</td><td>X1 on DS touchscreen</td></tr><tr><td>A1</td><td>Y2 on DS touchscreen</td></tr><tr><td>A2</td><td>X2 on DS touchscreen</td></tr><tr><td>A3</td><td>Y1 on DS touchscreen</td></tr><tr><td>3.3V</td><td>VDD on ST7565, VDD on DS18B20,<br /> Backlight Anode via 100 Ohm resistor</td></tr><tr><td>GND</td><td>CS and GND on ST7565, DS18B20 GND</td></tr></tbody></table><p>That makes it a full house, A4 and A5 are used for the I2C bus for the RTC, D2 is in use for the RFB12B interrupt, D3 is interrupt/wake up for the RTC, D10 is CS for the RFM12B and D11-D13 are for the SPI bus to the RFM12B. There is always the possibility of using more I2C devices or an I2C IO expander if I wanted to add anything else.</p><p>I haven&#8217;t used pull down resistors for the touchscreen, <a title="Using the Nintendo DS Touchscreen with the Arduino" href="http://nathan.chantrell.net/20111209/glcd-screens-and-touchscreens-with-the-arduino/">as I noted here</a> this allows it to be used on 3.3V and the accuracy is fine for this purpose (detecting relatively large areas for use as buttons).</p><p>Here you can see the menus and the colour changing with the power usage, there are a <a title="WiNode GLCD" href="http://www.flickr.com/photos/nathanchantrell/sets/72157628454795161/" target="_blank">few more pictures on Flickr here</a>.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-menu.jpg"><img title="WiNode GLCD Main Menu" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-menu-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-settings.jpg"><img title="WiNode GLCD Settings Menu" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-settings-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-view1.jpg"><img title="WiNode GLCD View 1" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-view1-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-purple1.jpg"><img title="WiNode GLCD Purple" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-purple1-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-red.jpg"><img title="WiNode GLCD Red" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/glcd-red-150x150.jpg" alt="" width="150" height="150" /></a></p><p>My code for this so far is <a href="https://github.com/nathanchantrell/EmonGLCD/blob/master/emonGLCD_ST7565_RGB_Touch/emonGLCD_ST7565_RGB_Touch.pde" rel="nofollow">available on GitHub here</a>.</p><p>For the above connections it is also necessary to change the pin numbers defined in the <a title="JeeLabs GLCDlib for ST7565 Displays" href="http://jeelabs.net/projects/cafe/wiki/GLCDlib">JeeLabs GLCDlib library</a>, in GLCD_ST7565.cpp to:</p><p style="padding-left: 30px;">#define PIN_SID 1<br /> #define PIN_SCLK 7<br /> #define PIN_A0 8<br /> #define PIN_RST 0</p><p>and the other changes for the ST7565 that I mentioned in the <a title="GLCD Screens and Touchscreens with the Arduino" href="http://nathan.chantrell.net/20111209/glcd-screens-and-touchscreens-with-the-arduino/">GLCD post here</a>.</p><p>Change LCDUNUSEDSTARTBYTES from 4 to 1 otherwise the display will be off to the right hand side:</p><p style="padding-left: 30px;"><em>#define LCDUNUSEDSTARTBYTES 1</em></p><p><em></em>Uncomment the slowSPI define:</p><p style="padding-left: 30px;"><em>// Switch from fast direct bit flipping to slower Arduino bit writes.</em><br /> <em>#define slowSPI</em></p><p>Change the PAGE_FLIP mode by changing from 0×7 to 0×3</p><p style="padding-left: 30px;"><em>// If the top line is appearing halfway down the screen, try the other mode.</em><br /> <em>//#define PAGE_FLIP 0×7</em><br /> <em>#define PAGE_FLIP 0×3</em></p><p>Adjust the contrast to your liking. I settled on 0×20</p><p style="padding-left: 30px;"><em>st7565_Set_Brightness(0×20); // strictly speaking this is the contrast of the LCD panel, the twist on the crystals.</em></p><p>and I reversed the colour defines in <em>GLCD_ST7565.h</em> so it makes more sense for a positive display:</p><p style="padding-left: 30px;"><em>#define BLACK 1</em><br /> <em>#define WHITE 0</em></p><p><strong>Still to do:</strong> It needs a case, mounting the touchscreen is going to be tricky, it&#8217;s just held on with insulation tape at the moment. I also need to come up with a better way of setting the RTC rather than putting it in the code, either through the touchscreen or possibly do it automatically from NTP over RF from a Nanode. Something to look into over the Christmas break I think. I also need to add a supercap so the RTC keeps its time when the display is powered off.</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111217%2Fwinode-based-wireless-graphical-display%2F&amp;linkname=WiNode%20Based%20Wireless%20Graphical%20Display" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111217%2Fwinode-based-wireless-graphical-display%2F&amp;linkname=WiNode%20Based%20Wireless%20Graphical%20Display" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111217%2Fwinode-based-wireless-graphical-display%2F&amp;linkname=WiNode%20Based%20Wireless%20Graphical%20Display" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111217%2Fwinode-based-wireless-graphical-display%2F&amp;linkname=WiNode%20Based%20Wireless%20Graphical%20Display" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111217%2Fwinode-based-wireless-graphical-display%2F&amp;linkname=WiNode%20Based%20Wireless%20Graphical%20Display" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111217%2Fwinode-based-wireless-graphical-display%2F&amp;linkname=WiNode%20Based%20Wireless%20Graphical%20Display" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20111217%2Fwinode-based-wireless-graphical-display%2F&amp;title=WiNode%20Based%20Wireless%20Graphical%20Display" id="wpa2a_18"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/Gt9639408Pg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20111217/winode-based-wireless-graphical-display/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20111217/winode-based-wireless-graphical-display/</feedburner:origLink></item> <item><title>GLCD Screens and Touchscreens with the Arduino</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/MqeeVrKUxMs/</link> <comments>http://nathan.chantrell.net/20111209/glcd-screens-and-touchscreens-with-the-arduino/#comments</comments> <pubDate>Fri, 09 Dec 2011 22:17:31 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Arduino]]></category> <category><![CDATA[Electronics]]></category> <category><![CDATA[Home Automation]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[IoT]]></category> <category><![CDATA[OpenEnergyMonitor]]></category> <category><![CDATA[tech]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2358</guid> <description><![CDATA[<p>I&#8217;ve been playing with some more GLCDs (Graphical Liquid Crystal Displays) recently, along with a Nintendo DS touchscreen. The parallel KS0108 display I used for my emonGLCD used an awful lot of pins, 16 including the power, which doesn&#8217;t leave a lot left over for anything else, so I thought I would try some [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:4df95e2b0df529c4641738fc86a26ab3870c8b86'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/st7565-rgb.jpg"><img class="alignright size-medium wp-image-2362" title="ST7565 GLCD RGB" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/st7565-rgb-300x179.jpg" alt="" width="300" height="179" /></a>I&#8217;ve been playing with some more GLCDs (Graphical Liquid Crystal Displays) recently, along with a Nintendo DS touchscreen. The parallel KS0108 display <a title="Building a graphical display for OpenEnergyMonitor" href="http://nathan.chantrell.net/20111015/building-a-graphical-display-for-openenergymonitor/">I used for my emonGLCD</a> used an awful lot of pins, 16 including the power, which doesn&#8217;t leave a lot left over for anything else, so I thought I would try some of the serial displays that are available, one from SparkFun and a nice one from Adafruit that has a RGB backlight, you can see a montage of pictures of this display on the right.</p><p>Interfacing with and coding for each of these displays is subtly different as there isn&#8217;t a single unified Arduino library but none of them are complicated, it&#8217;s basically commands to move to a particular pixel of the display, select a font and print it, or for boxes, lines etc. you need to provide coordinates for the start and end points.</p><p>In combination with these screens I&#8217;ve also been experimenting with the Nintendo DS Touchscreen which is available on its own from a number of suppliers and makes for a cost effective method of adding touch control to screens of this size. When you only want to detect relatively large areas of the screen, such as for a menu, they are very easy to use.</p><p><span id="more-2358"></span></p><h2>SparkFun LCD-09351 Serial 128&#215;64 GLCD</h2><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/LCD-09351.jpg"><img class="size-medium wp-image-2363 alignright" title="LCD-09351" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/LCD-09351-300x174.jpg" alt="" width="300" height="174" /></a>The <a title="SparkFun LCD-09351" href="http://www.sparkfun.com/products/9351" target="_blank">LCD-09351 from SparkFun</a> is basically a parallel KS0108 with an ATmega168 based serial backpack attached and only needs 3 pins including the power. It&#8217;s not all fun out of the box though as the firmware that is supplied on it isn&#8217;t very good at all. Fortunately someone has written a much <a title="summoningdark's firmware for the SparkFun Serial GLCD backpack" href="https://sourceforge.net/projects/serialglcd/" target="_blank">improved firware, available here</a>. To update this you will need to use an ICSP programmer to flash it with AVRDUDE or WinAVR, <a title="Flashing new firmware to the LCD-09351" href="http://www.sparkfun.com/products/9351#comment-4eaad851757b7fd351008a9f" target="_blank">this post</a> on the SparkFun product page has details. Unfortunately the ICSP pads on the serial backpack are unpopulated and they aren&#8217;t the easiest thing to solder to when the backpack is fixed to the screen. I did it by pushing some wires up from between the two and soldering on the top.</p><p>Here is the pinout for the ICSP:</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/SparkFun_LCD-09351_ICSP.jpg"><img class="alignnone size-medium wp-image-2369" title="SparkFun LCD-09351 ICSP Pinout" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/SparkFun_LCD-09351_ICSP-300x122.jpg" alt="" width="300" height="122" /></a></p><p>Once the new firmware from summoningdark has been flashed to the backpack you can use the <a title="Serial GLCD library for summoningdark's firmware" href="http://sourceforge.net/projects/serialglcdlib/" target="_blank">serialglcdlib library here</a>.</p><p>Another oddity of this screen is that VIN on the 4 pin header requires 6-7V for the display to work properly but on inspection this just goes to a regulator to feed 5V to the rest of the board so as long as you are providing it with a regulated 5V (eg. from an Arduino) you can just connect to the 5V pad on the opposite side of the board instead.</p><p>This is a nice display with a crisp output and good contrast, the 3 wire connection is very handy but on the downside it isn&#8217;t cheap, at <a title="Sparkfun serial GLCD LCD-09351 at SK Pang" href="http://www.skpang.co.uk/catalog/serial-graphic-lcd-128x64-p-655.html" target="_blank">£27+delivery from SK Pang</a> it&#8217;s nearly twice the price of a <a title="KS0108 GLCD at SK Pang" href="http://www.skpang.co.uk/catalog/graphic-lcd-128x64-stn-led-backlight-p-542.html" target="_blank">bare KS0108</a>. Also, unlike with the bare KS0108 it isn&#8217;t easy to use different fonts with this display, only two can be used and they can only be changed by compiling them into the firmware when flashing the backpack.</p><p>I&#8217;ve put some code <a title="Alternative versions of the EmonGLCD display from openenergymonitor.org" href="https://github.com/nathanchantrell/EmonGLCD" target="_blank">on GitHub</a> for using this display with an Arduino and RFM12B transceiver as a display for <a title="Open Energy Monitor" href="http://www.openenergymonitor.org" target="_blank">OpenEnergyMonitor</a>.</p><p>&nbsp;</p><h2>Adafruit ST7565 Serial 128&#215;64 GLCD with RGB backlight</h2><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/ST7565.jpg"><img class="alignright size-medium wp-image-2364" title="ST7565" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/ST7565-300x183.jpg" alt="" width="300" height="183" /></a>Another display I&#8217;ve been playing with is a <a title="Adafruit RGB Backlight GLCD" href="http://www.adafruit.com/products/250" target="_blank">ST7565 based unit branded by Adafruit</a> and <a title="ST7565 GLCD with RGB backlight at Proto-PIC" href="http://proto-pic.co.uk/graphic-st7565-positive-lcd-128x64-with-rgb-backlight/" target="_blank">sold in the UK by Proto-PIC</a> at the great price of only £17.99 It&#8217;s the same resolution as the KS0108 displays (128&#215;64) but is slightly larger and more readable in good light without the backlight on. The backlight is where this display differs from most 128&#215;64 displays as it is an RGB backlight, essentially three in one, you have a common anode and a separate cathode for each of red, green and blue, which means you can drive them from separate pins on the Arduino and use PWM to fade and mix the colours giving you a whole range of colours, not just red, green and blue.</p><p>To drive the LCD part you can either use the <a title="Adafruit ST7565 GLCD Library" href="https://github.com/adafruit/ST7565-LCD" target="_blank">Adafruit libary</a> or the <a title="JeeLabs ST7565 GLCD Library" href="http://jeelabs.net/projects/cafe/wiki/GLCDlib" target="_blank">JeeLabs library</a>. The Jeelabs library is an extension of the Adafruit one and is more actively developed, recently having been updated for Arduino 1.0 and has some nice <a title="JeeLabs GLCD-Library" href="http://jeelabs.org/2011/01/05/glcd-library/" target="_blank">additional functions</a> including support for remote displays that I&#8217;ve not looked at yet. It&#8217;s also the one that OpenEnergyMonitor use so was the natural choice.</p><p>This screen runs on 3.3V so you can either run your whole system on 3.3V or Proto PIC have included a very handy CD4050BC chip which can be used as a logic level converter as described on <a title="ST7565 GLCD Tutorial" href="http://www.ladyada.net/learn/lcd/st7565.html" target="_blank">this Adafruit tutorial</a>.</p><p>I&#8217;ve been testing this on a 5V Arduino and in order to leave pins free for the RFM12B transceiver and Nintendo DS touchscreen that I am also be using I&#8217;ve connected it as follows:</p><table><tbody><tr><th>Arduino pin</th><th>Screen</th></tr><tr><td>0 (via CD4050BC)</td><td>SID</td></tr><tr><td>1 (via CD4050BC)</td><td>SCLK</td></tr><tr><td>2</td><td>- will be used with RFM12B transceiver</td></tr><tr><td>3</td><td>Red backlight cathode</td></tr><tr><td>4 (via CD4050BC)</td><td>A0</td></tr><tr><td>5</td><td>Green backlight cathode</td></tr><tr><td>6</td><td>Blue backlight cathode</td></tr><tr><td>7 (via CD4050BC)</td><td>RST</td></tr><tr><td>8 (via CD4050BC)</td><td>CS</td></tr></tbody></table><p>Pins 3, 5 and 6 are used for the backlight as these pins can do hardware PWM which will allow the three colours to be dimmed individually.</p><p>The anode for the backlights is connected to 5V via a 270 Ohm resistor</p><p><strong>Changes to the JeeLabs library</strong></p><p>The JeeLabs library is written for their Graphics Board and if you want to use it with this display on an Arduino you will need to make a few minor changes.</p><p>Firstly, in <em>GLCD_ST7565.cpp</em> make sure the defines for the pins reflect what you are using, eg. I used:</p><p style="padding-left: 30px;"><em>#define PIN_SID 0</em><br /> <em> #define PIN_SCLK 1</em><br /> <em> #define PIN_A0 4</em><br /> <em> #define PIN_RST 7</em></p><p>Change LCDUNUSEDSTARTBYTES from 4 to 1 otherwise the display will be off to the right hand side:</p><p style="padding-left: 30px;"><em>#define LCDUNUSEDSTARTBYTES 1</em></p><p><em></em>Uncomment the slowSPI define:</p><p style="padding-left: 30px;"><em>// Switch from fast direct bit flipping to slower Arduino bit writes.</em><br /> <em> #define slowSPI</em></p><p>Change the PAGE_FLIP mode by changing from 0&#215;7 to 0&#215;3</p><p style="padding-left: 30px;"><em>// If the top line is appearing halfway down the screen, try the other mode.</em><br /> <em> //#define PAGE_FLIP 0&#215;7</em><br /> <em> #define PAGE_FLIP 0&#215;3</em></p><p>Adjust the contrast to your liking. I don&#8217;t think the contrast is as good on this as the KS0108 displays, you can adjust it in the library by changing the badly named <em>st7565_Set_Brightness</em> value in <em>GLCD_ST7565.cpp</em>, the default 0&#215;15 was far too light for me and I settled on 0&#215;19. 0&#215;20 does gives slightly better text but then lines start to appear in the background with some colours.</p><p style="padding-left: 30px;"><em>st7565_Set_Brightness(0&#215;19); // strictly speaking this is the contrast of the LCD panel, the twist on the crystals.</em></p><p>A minor point but the library has been written for a negative display so I reversed the colour defines in <em>GLCD_ST7565.h</em> to it makes more sense for a positive display, this will save some hair pulling later on I&#8217;m sure.</p><p style="padding-left: 30px;"><em>#define BLACK 1</em><br /> <em> #define WHITE 0</em></p><p>My code for using this screen as a display for <a title="Open Energy Monitor" href="http://www.openenergymonitor.org" target="_blank">OpenEnergyMonitor</a> with the backlight colour changing with power usage is also available <a title="Alternative versions of the EmonGLCD display from openenergymonitor.org" href="https://github.com/nathanchantrell/EmonGLCD" target="_blank">on my GitHub page</a>.</p><p>&nbsp;</p><h2>Using the Nintendo DS Touchscreen with the Arduino</h2><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/LCD-09351-ds-touchscreen.jpg"><img class="alignright size-medium wp-image-2365" title="LCD-09351 with Nintendo DS Touchscreen" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/LCD-09351-ds-touchscreen-300x216.jpg" alt="" width="300" height="216" /></a>The touchscreen from the Nintendo DS handheld game console makes a good companion to these small GLCDs, it&#8217;s slightly larger but this doesn&#8217;t matter and you could even use the extra off screen space for fixed (ie. none graphical) buttons.</p><p>They aren&#8217;t expensive either <a title="Nintendo DS touchscreen at Proto-PIC" href="http://proto-pic.co.uk/nintendo-ds-touch-screen/" target="_blank">£5.65 for the screen</a> and <a title="Nintendo DS Touchscreen breakout board from Proto-PIC" href="http://proto-pic.co.uk/nintendo-ds-touch-screen-connector-breakout/" target="_blank">£2.51 for a breakout board/connector</a> from Proto-PIC.</p><p>You WILL want the breakout board, don&#8217;t be tempted to try and solder to the ribbon connector, if you think it looks small in a picture I promise it is smaller in real life.</p><p>They are very easy to connect to an Arduino, it connects to four analogue pins and give you an x and y value of the place the screen was touched so you can build button areas by doing something like:</p><p style="padding-left: 30px;"><em>if (y&gt;510 &amp;&amp; x&lt;490) { //top left quadrant touched }</em></p><p>There is some good info on using these touchscreens with an Arduino <a title="Arduino and a Nintendo DS touch screen" href="http://kalshagar.wikispaces.com/Arduino+and+a+Nintendo+DS+touch+screen" target="_blank">here</a> and <a title="Nintendo DS Touchscreen Arduino Tutorial at Tronixstuff" href="http://tronixstuff.wordpress.com/2010/12/29/tutorial-arduino-and-the-ds-touch-screen/" target="_blank">here</a>.</p><p>The four connections from the touchscreen change purpose depending on which axis is being read, eg. to read the x value you need to put a positive voltage on X2 and ground on X1 the use the analogRead function to get the value of Y1. To read the y value you switch the positive to Y2, ground to Y1 and read X1</p><p>I haven&#8217;t used pull down resistors as the accuracy is fine for detecting large segments of the screen to use as buttons and not using resistors allows 3.3V to be used and I plan to use a <a title="WiNode" href="http://nathan.chantrell.net/20111204/the-nanode-family-expands/">WiNode</a> which is 3.3V for my final build.</p><p>My <a title="emonGLCD_ST7565_RGB_Touch" href="https://github.com/nathanchantrell/EmonGLCD/blob/master/emonGLCD_ST7565_RGB_Touch/emonGLCD_ST7565_RGB_Touch.pde" target="_blank">code for the ST7565 display</a> makes use of this touchscreen.</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111209%2Fglcd-screens-and-touchscreens-with-the-arduino%2F&amp;linkname=GLCD%20Screens%20and%20Touchscreens%20with%20the%20Arduino" title="Twitter" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a><a class="a2a_button_facebook" href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111209%2Fglcd-screens-and-touchscreens-with-the-arduino%2F&amp;linkname=GLCD%20Screens%20and%20Touchscreens%20with%20the%20Arduino" title="Facebook" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a><a class="a2a_button_reddit" href="http://www.addtoany.com/add_to/reddit?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111209%2Fglcd-screens-and-touchscreens-with-the-arduino%2F&amp;linkname=GLCD%20Screens%20and%20Touchscreens%20with%20the%20Arduino" title="Reddit" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/reddit.png" width="16" height="16" alt="Reddit"/></a><a class="a2a_button_digg" href="http://www.addtoany.com/add_to/digg?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111209%2Fglcd-screens-and-touchscreens-with-the-arduino%2F&amp;linkname=GLCD%20Screens%20and%20Touchscreens%20with%20the%20Arduino" title="Digg" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/digg.png" width="16" height="16" alt="Digg"/></a><a class="a2a_button_stumbleupon" href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111209%2Fglcd-screens-and-touchscreens-with-the-arduino%2F&amp;linkname=GLCD%20Screens%20and%20Touchscreens%20with%20the%20Arduino" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111209%2Fglcd-screens-and-touchscreens-with-the-arduino%2F&amp;linkname=GLCD%20Screens%20and%20Touchscreens%20with%20the%20Arduino" title="Delicious" rel="nofollow" target="_blank"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fnathan.chantrell.net%2F20111209%2Fglcd-screens-and-touchscreens-with-the-arduino%2F&amp;title=GLCD%20Screens%20and%20Touchscreens%20with%20the%20Arduino" id="wpa2a_20"><img src="http://nathan.chantrell.net/blog/wp-content/plugins/add-to-any/favicon.png" width="16" height="16" alt="Share"/></a></p><img src="http://feeds.feedburner.com/~r/NathanChantrell/~4/MqeeVrKUxMs" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20111209/glcd-screens-and-touchscreens-with-the-arduino/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20111209/glcd-screens-and-touchscreens-with-the-arduino/</feedburner:origLink></item> </channel> </rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 19/120 queries in 0.045 seconds using disk: basic
Object Caching 1171/1400 objects using disk: basic
Content Delivery Network via Amazon Web Services: S3: cdn.chantrell.net

Served from: nathan.chantrell.net @ 2012-05-19 21:45:54 -->

