<?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>Errors and omissions expected.</description> <lastBuildDate>Fri, 20 Jan 2012 20:34:26 +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>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[Home Automation]]></category> <category><![CDATA[electronics]]></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_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/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[Home Automation]]></category> <category><![CDATA[electronics]]></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_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/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_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/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>0</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[Home Automation]]></category> <category><![CDATA[electronics]]></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 x 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_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/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>1</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[Home Automation]]></category> <category><![CDATA[electronics]]></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_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/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[Home Automation]]></category> <category><![CDATA[electronics]]></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_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/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> <item><title>The Nanode family expands</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/Sc2O4qeKqBM/</link> <comments>http://nathan.chantrell.net/20111204/the-nanode-family-expands/#comments</comments> <pubDate>Sun, 04 Dec 2011 00:34:18 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Arduino]]></category> <category><![CDATA[Home Automation]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[nanode]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2345</guid> <description><![CDATA[<p>The original Nanode has proved to be a great success with a growing community of people building many interesting networked devices and this month, Ken Boak, the creator of the Nanode has launched several new additions to the line. The new Nanode RF is essentially an upgrade to the original Nanode 5 with an [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:32ba6e596efc2a064e5a280ecf68e835bca3ac04'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/WiNode2.jpg"><img class="alignright size-medium wp-image-2349" title="WiNode" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/WiNode2-300x220.jpg" alt="" width="300" height="220" /></a>The <a title="Nanode – The Network Application Node" href="http://nathan.chantrell.net/20110821/nanode-the-network-application-node/" target="_blank">original Nanode</a> has proved to be a great success with a growing community of people building many interesting networked devices and this month, <a title="Sustainable Suburbia" href="http://sustburbia.blogspot.com/" target="_blank">Ken Boak</a>, the creator of the Nanode has launched several new additions to the line. The new Nanode RF is essentially an upgrade to the original Nanode 5 with an on board RFM12B wireless transceiver and options for several extras such as a real time clock (RTC), 32KB SRAM and a Micro SD socket.</p><p>The second new member of the Nanode family is the WiNode, a low cost wireless node that is available in several different configurations, all using the same PCB with just the installed components differentiating between them. As with the Nanode and Nanode RF, the WiNode can be fitted with the standard Arduino headers for compatibility with Arduino shields as well as the RTC (SOIC or DIP), 32KB SRAM and Micro SD options as with the Nanode RF. The WiNode also features four 16V tolerant analogue inputs and when fitted with a dual H-bridge driver chip it can provide 2A digital outputs for driving relays or motors (although you can&#8217;t use the SRAM/SD if the H-bridge is used). Due to a nifty bit of design the WiNode can also be built for use as a shield for the original Nanode to add RFM12B wireless capability and more. Prices are very good, with WiNode kits starting at £17.50 (or £15 if you buy a pair) for the basic stand alone wireless node or only £10 if you want to use one to expand an existing Nanode 5. The Nanode RF kits start at £30 and for the first time a fully assembled unit with all the options is available for £40.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/NanodeRF.jpg"><img class="alignleft size-medium wp-image-2386" title="Nanode RF" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/NanodeRF-300x228.jpg" alt="" width="216" height="164" /></a>Pictured  above is my first WiNode build, decked out with the SRAM and SOIC RTC options. I&#8217;ve fitted all the optional bits on this one, headers, screw terminals and even the socket for the H-bridge driver as I will keep this one aside for experimentation and prototyping, subsequent builds will just include whatever is required for the particular use. That&#8217;s the Nanode RF on the left.</p><p>As with the original Nanode, both the Nanode RF and WiNode are supplied as a kit for you to build yourself and anyone with basic soldering skills should find it very straightforward. <a title="Ian Chilton's website" href="http://www.ichilton.co.uk" target="_blank">Ian Chilton</a> has already created a very comprehensive <a title="Nanode RF Build Guide with Photos" href="http://ichilton.github.com/nanode/rf/build_guide.html" target="_blank">guide to building the Nanode RF</a> which is available here and I suspect a WiNode version won&#8217;t be far behind (update: <a title="WiNode Build Guide" href="http://ichilton.github.com/nanode/wi-node/build_guide.html" target="_blank">WiNode build guide</a> is now almost complete).</p><p>Ken says he will have an online shop available shortly but for now you can order by sending a Paypal payment, for further details and prices of the various options see <a title="A Weekend Of Nanode" href="http://sustburbia.blogspot.com/2011/11/weekend-of-winode.html" target="_blank">this blog post</a>.</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111204%2Fthe-nanode-family-expands%2F&amp;linkname=The%20Nanode%20family%20expands" 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%2F20111204%2Fthe-nanode-family-expands%2F&amp;linkname=The%20Nanode%20family%20expands" 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%2F20111204%2Fthe-nanode-family-expands%2F&amp;linkname=The%20Nanode%20family%20expands" 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%2F20111204%2Fthe-nanode-family-expands%2F&amp;linkname=The%20Nanode%20family%20expands" 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%2F20111204%2Fthe-nanode-family-expands%2F&amp;linkname=The%20Nanode%20family%20expands" 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%2F20111204%2Fthe-nanode-family-expands%2F&amp;linkname=The%20Nanode%20family%20expands" 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%2F20111204%2Fthe-nanode-family-expands%2F&amp;title=The%20Nanode%20family%20expands" 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/Sc2O4qeKqBM" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20111204/the-nanode-family-expands/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20111204/the-nanode-family-expands/</feedburner:origLink></item> <item><title>The BBC Micro 30 Years On</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/V_SPR0aC9Kg/</link> <comments>http://nathan.chantrell.net/20111203/the-bbc-micro-30-years-on/#comments</comments> <pubDate>Sat, 03 Dec 2011 14:39:01 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Computing]]></category> <category><![CDATA[retro computing]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2336</guid> <description><![CDATA[<p>Hard to believe that another one of the computers that had such an impact on my life is now thirty years old, I don&#8217;t feel old enough for anything I remember so well to be 30 years ago. After the Sinclair ZX81 and the Spectrum that followed it our next family computer was the BBC [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:c12c40063e685f4a4e9a65c1aa22633229374b8f'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/BBC_Micro.jpg"><img class="alignright size-medium wp-image-2338" title="BBC Micro" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/BBC_Micro-300x225.jpg" alt="" width="300" height="225" /></a>Hard to believe that another one of the computers that had such an impact on my life is <a title="The BBC Microcomputer and me, 30 years down the line" href="http://www.bbc.co.uk/news/technology-15969065" target="_blank">now thirty years old</a>, I don&#8217;t feel old enough for anything I remember so well to be 30 years ago. After the <a title="Happy 30th birthday to the Sinclair ZX81" href="http://nathan.chantrell.net/20110305/happy-30th-birthday-to-the-sinclair-zx81/">Sinclair ZX81</a> and the Spectrum that followed it our next family computer was the BBC Micro Model B, it was an amazing computer for its time and remained in use for many years, I still have the same one today (that&#8217;s it on the right).</p><p>Made by <a title="Acorn Computers on Wikipedia" href="http://en.wikipedia.org/wiki/Acorn_computers" target="_blank">Acorn Computers</a> for the BBC as part of the BBC Computer Literacy Project it won out over the competition, including Sinclair, to build a computer for the BBC to use as part of its series to educate people about computers. The story behind the battle to win the contract was dramatised in the very enjoyable <a title="Micro Men" href="http://www.bbc.co.uk/programmes/b00n5b92" target="_blank">Micro Men</a> programme that was shown as part of the Electric Revolution season on BBC Four in 2009. If you didn&#8217;t see it at the time it is well worth a watch.</p><p>Affectionately known as the Beeb, the BBC Micro was a 6502 based 8-bit micro with 16k or 32k RAM depending on the model, it ran at a relatively fast (for the time) 2MHz and it had a proper, robust keyboard, a plethora of connectivity options and a key factor in its success was the comparitively sophisticated BBC BASIC. Unlike most computers that followed it the Beeb also came with a proper manual, a thick ring bound affair that was actually a proper guide to BASIC programming. The Advanced User Guide available separately covered things in more detail including 6502 machine code and even contained a full circuit diagram.</p><p>Along with the accompanying television programmes and thanks to most schools choosing the BBC Micro it went on to become the corner stone of computing education throughout the 80s, together with the time then given to computing in the school curriculum it gave kids of my generation a grounding in computers that hasn&#8217;t really been seen since.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/bbc_micro_manuals.jpg"><img class="alignleft size-medium wp-image-2339" title="BBC Micro User Guide and The Advanced User Guide" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/12/bbc_micro_manuals-300x213.jpg" alt="" width="240" height="170" /></a>I spent many happy hours with the Beeb and learnt a lot both in and out of school. These were the days when you were taught how to program a computer at school rather than just operate one as sadly seems to be the case in these days of ICT classes that just teach kids how to use programs such as Word and Powerpoint.</p><p>The BBC Micro also gave me my first experience of networked computers, something that would become so important in later life. After one summer holiday we were excited to return to school to find we now had a dedicated computer room full of BBC Micros all networked with econet, much fun ensued and a little good natured mischief (netmess anyone?). A year or so later myself and several friends ran a teletext type information system (using the little known Mikefax software) that was used at open nights and sports days and eventually had a dedicated screen in the school entrance hall. My first experience of publishing information electronically.</p><p>The BBC Micro also brought my first exposure to computer communications, first using a 1200/75 baud modem and later a Watford LeModem to connect to local bulletin board systems and services such as Micronet800, Telecom Gold and Prestel (often using dodgy logins aquired from a BBS) and look where that ended up.</p><p>As with many of my generation I owe a lot to the BBC Micro and what it taught me and as many others have commented recently, this sort of thing is missing from the lives of most kids these days. Projects such as <a title="Coding For Kids" href="http://codingforkids.org/" target="_blank">Coding For Kids</a>, <a title="Raspberry Pi" href="http://www.raspberrypi.org/sample-page" target="_blank">Raspberry Pi</a> and the recently launched <a title="The Goto Foundation - Making computer science more meaningful to the public" href="http://gotofdn.org/" target="_blank">Goto Foundation</a> can hopefully do something to help turn this around.</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111203%2Fthe-bbc-micro-30-years-on%2F&amp;linkname=The%20BBC%20Micro%2030%20Years%20On" 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%2F20111203%2Fthe-bbc-micro-30-years-on%2F&amp;linkname=The%20BBC%20Micro%2030%20Years%20On" 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%2F20111203%2Fthe-bbc-micro-30-years-on%2F&amp;linkname=The%20BBC%20Micro%2030%20Years%20On" 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%2F20111203%2Fthe-bbc-micro-30-years-on%2F&amp;linkname=The%20BBC%20Micro%2030%20Years%20On" 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%2F20111203%2Fthe-bbc-micro-30-years-on%2F&amp;linkname=The%20BBC%20Micro%2030%20Years%20On" 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%2F20111203%2Fthe-bbc-micro-30-years-on%2F&amp;linkname=The%20BBC%20Micro%2030%20Years%20On" 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%2F20111203%2Fthe-bbc-micro-30-years-on%2F&amp;title=The%20BBC%20Micro%2030%20Years%20On" 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/V_SPR0aC9Kg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20111203/the-bbc-micro-30-years-on/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20111203/the-bbc-micro-30-years-on/</feedburner:origLink></item> <item><title>DIY Micro SD Shield for Arduino</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/SyTgiE8UGUQ/</link> <comments>http://nathan.chantrell.net/20111128/diy-micro-sd-shield-for-arduino/#comments</comments> <pubDate>Mon, 28 Nov 2011 00:29:16 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Arduino]]></category> <category><![CDATA[electronics]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2307</guid> <description><![CDATA[<p>A few weeks ago I needed an Arduino compatible Micro SD adapter but didn&#8217;t want to wait for one to arrive in the post so inspired by the breadboard ghetto Micro SD socket I knocked up a mini shield using a bit of left over stripboard and a SD to Micro SD adapter.</p><p>Interfacing with an [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:ecf43df4be7d917664a89cfecfd034232770c0d1'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/P1020972-2.jpg"><img class="alignright size-medium wp-image-2329" title="Arduino Micro SD Adapter" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/P1020972-2-300x253.jpg" alt="" width="300" height="253" /></a>A few weeks ago I needed an Arduino compatible Micro SD adapter but didn&#8217;t want to wait for one to arrive in the post so inspired by the breadboard <a href="http://www.protostack.com/blog/2011/09/8-breadboard-hacks/" rel="nofollow">ghetto Micro SD socket</a> I knocked up a mini shield using a bit of left over stripboard and a SD to Micro SD adapter.</p><p>Interfacing with an SD or Micro SD using an Arduino is very simple as it can be controlled directly over SPI so it&#8217;s just a case of connecting to the Arduino&#8217;s SPI pins (11-13) and a pin for select. I used the hardware SS pin (10) for select as keeping all the pins together made for a small shield, you can use a different pin if 10 is already used but note that pin 10 must still be set as an output regardless or the library won&#8217;t function. Some resistors are required to drop the Arduino&#8217;s 5V to 3.3V for the SD card but other than the Micro SD adapter, some headers, a bit of stripboard, and a few pieces of wire that&#8217;s it.</p><p>The Arduino SD library is very easy to use with easy to follow examples and it supports FAT16 and FAT32 file systems but note that it only supports one open file at a time and can only use short 8.3 file names.</p><p>Here is the stripboard layout, to mount the SD adapter I&#8217;ve just soldered a right angle header to the contacts on it. There is also a badly drawn <a href="http://www.flickr.com/photos/nathanchantrell/6323290363/in/photostream/">schematic here</a>.</p><p><span id="more-2307"></span></p><p><a title="Click to enlarge (Micro SD Shield Stripboard Layout)" href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/sd-shield-stripboard-layout.png"><img class="alignnone size-medium wp-image-2308" title="Click to Enlarge (Micro SD Shield Stripboard Layout)" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/sd-shield-stripboard-layout-300x144.png" alt="" width="300" height="144" /></a></p><p><strong>Parts List:</strong><br /> Stripboard, minimum of 20 holes by 9 strips<br /> MicroSD adapter<br /> 3 x 4K7 resistors<br /> 3 x 10K resistors<br /> 5 pin straight header<br /> 1 pin straight header<br /> 7 pin right angle header<br /> 4 short pieces of wire for links</p><p>&nbsp;</p></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111128%2Fdiy-micro-sd-shield-for-arduino%2F&amp;linkname=DIY%20Micro%20SD%20Shield%20for%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%2F20111128%2Fdiy-micro-sd-shield-for-arduino%2F&amp;linkname=DIY%20Micro%20SD%20Shield%20for%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%2F20111128%2Fdiy-micro-sd-shield-for-arduino%2F&amp;linkname=DIY%20Micro%20SD%20Shield%20for%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%2F20111128%2Fdiy-micro-sd-shield-for-arduino%2F&amp;linkname=DIY%20Micro%20SD%20Shield%20for%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%2F20111128%2Fdiy-micro-sd-shield-for-arduino%2F&amp;linkname=DIY%20Micro%20SD%20Shield%20for%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%2F20111128%2Fdiy-micro-sd-shield-for-arduino%2F&amp;linkname=DIY%20Micro%20SD%20Shield%20for%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%2F20111128%2Fdiy-micro-sd-shield-for-arduino%2F&amp;title=DIY%20Micro%20SD%20Shield%20for%20Arduino" 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/SyTgiE8UGUQ" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20111128/diy-micro-sd-shield-for-arduino/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20111128/diy-micro-sd-shield-for-arduino/</feedburner:origLink></item> <item><title>Wireless Temperature Sensor Module</title><link>http://feedproxy.google.com/~r/NathanChantrell/~3/f59RWPXKFtY/</link> <comments>http://nathan.chantrell.net/20111102/wireless-temperature-sensor-module/#comments</comments> <pubDate>Wed, 02 Nov 2011 20:48:53 +0000</pubDate> <dc:creator>Nathan Chantrell</dc:creator> <category><![CDATA[Arduino]]></category> <category><![CDATA[Home Automation]]></category> <category><![CDATA[electronics]]></category> <category><![CDATA[nanode]]></category> <category><![CDATA[OpenEnergyMonitor]]></category><guid isPermaLink="false">http://nathan.chantrell.net/?p=2264</guid> <description><![CDATA[<p></p><p>UPDATE: There is a new improved version of this here: TempTX V2 Wireless Temperature Sensor Module</p><p>As I mentioned in my last post I wanted to get the GLCD display that I built for my OpenEnergyMonitor system to transmit the reading from its internal temperature sensor so that the Nanode could upload it to the emoncms web interface. [...]]]></description> <content:encoded><![CDATA[<div class='microid-mailto+http:sha1:d4aa32b0f79d08832cc66d4150c636f3ed8ee44e'><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/temperature_sensor.jpg"><img class="alignright size-medium wp-image-2266" title="Wireless Arduino Temperature Sensor Module" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/temperature_sensor-300x224.jpg" alt="" width="300" height="224" /></a></p><p><span style="color: #ff0000;"><strong>UPDATE:</strong> There is a new improved version of this here: <a title="TempTX V2 Wireless Temperature Sensor Module" href="http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/"><span style="color: #ff0000;">TempTX V2 Wireless Temperature Sensor Module</span></a></span></p><p>As I mentioned in my last post I wanted to get the <a title="emonGLCD Graphical Display for OpenEnergyMonitor" href="http://nathan.chantrell.net/20111015/building-a-graphical-display-for-openenergymonitor/">GLCD display</a> that I built for my <a title="OpenEnergyMonitor posts" href="http://nathan.chantrell.net/tag/openenergymonitor/">OpenEnergyMonitor system</a> to transmit the reading from its internal temperature sensor so that the Nanode could upload it to the emoncms web interface. Once that was working it gave me the idea of building wireless temperature sensor modules for other areas of the house, the first of these is now complete and is sensing the outside temperature which is being displayed on the GLCD as well as being uploaded to emoncms by the Nanode. This has now allowed me to retire the old one wire temperature sensor system that I had connected to <a title="My Home Automation System" href="http://nathan.chantrell.net/old-stuff/home-automation/my-home-automation-system/">my MisterHouse server</a>.</p><p>The board for the wireless temperature sensor module is basically the same as my <a title="Build your own Arduino for under £10" href="http://nathan.chantrell.net/20110819/build-your-own-arduino-for-under-10/">minimal Arduino build</a> with an RFM12B transceiver and a DS18B20 temperature sensor added. As it&#8217;s running directly from 2 x AA batteries no voltage regulation was added.</p><p>As I only have a 5V FTDI cable for programming and the RFM12B isn&#8217;t 5V tolerant I soldered it to a small carrier board so that it can be removed during programming, this also has the benefit of making the footprint for the main board smaller while still keeping things neat as the space under the RFM12B can be used for some of the links. The idea of soldering the RFM12B in this manner came from a picture that Andrew Lindsay <a title="Mounting an RFM12B transceiver" href="http://twitpic.com/748xsf" target="_blank">posted on Twitter</a> showing how he uses them with breadboard, simple but very effective.</p><p><span id="more-2264"></span></p><p>Here is the stripboard layout for the main board and RFM12B carrier, note that I haven&#8217;t connected all the connections on the RFM12B, only those actually required to interface with the ATmega.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/Wireless_Temp_Sensor.png"><img class="alignnone size-medium wp-image-2265" title="Wireless Temperature Sensor Module" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/Wireless_Temp_Sensor-300x256.png" alt="" width="300" height="256" /></a></p><p>I&#8217;ve lifted most of the code for the temperature module from the emontx examples, just removing the CT sensor parts and as it implements several power saving measures (putting the ATmega to sleep and powering down the RFM12B in between readings) the battery life should hopefully be as good as or better than the 5 months that the <a title="Real world battery life test" href="http://openenergymonitor.org/emon/node/115" target="_blank">OpenEnergyMonitor real world test</a> got.</p><p><strong>Displaying the readings</strong></p><p>I&#8217;ve now got the emoncms web interface showing the temperature readings from the GLCDs sensor and the wireless temperature module as well as the power reading from the emontx, I&#8217;ve also installed the <a title="emoncms multigraph extension" href="https://github.com/openenergymonitor/emoncms2_extras/tree/master/Visualisations/MultiGraph" target="_blank">Multigraph extension</a> which makes it easy to show all three on the one the graph:</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/emoncms_multigraph.png"><img class="alignnone size-medium wp-image-2267" title="emoncms multigraph" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/emoncms_multigraph-300x198.png" alt="" width="300" height="198" /></a></p><p>Here is my home made emonGLCD displaying the reading from its own sensor (Room Temp) and the temperature received from the wireless module (Outside Temp). The slight contrast difference on a couple of lines is due to the camera catching the refresh, it doesn&#8217;t show in real life.</p><p><a href="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/P1020896.jpg"><img class="alignnone size-medium wp-image-2269" title="emonGLCD with temperature readings" src="http://cdn.chantrell.net/blog/wp-content/uploads/2011/11/P1020896-300x229.jpg" alt="" width="300" height="229" /></a></p><p><strong>Code</strong></p><p>Here is the code I am currently using, it&#8217;s a bit rough and ready in places as I&#8217;m still experimenting but it works:<br /> <a title="TempTX on GitHub" href="https://github.com/nathanchantrell/TempTX" target="_blank"> Wireless Temperature Sensor Module</a><br /> <a title="emonGLCD_KS0108 on GitHub" href="https://github.com/nathanchantrell/EmonGLCD/tree/master/emonGLCD_KS0108" target="_blank"> emonGLCD with KS0108 display and temperature TX and RX</a><br /> <a title="NanodeRF_emoncms on GitHub" href="https://github.com/nathanchantrell/NanodeRF_emoncms" target="_blank"> Nanode receiving multiple transmitters</a></p><h3><span style="color: #ff0000;"><strong>UPDATE:</strong> There is a new improved version of this here: <a title="TempTX V2 Wireless Temperature Sensor Module" href="http://nathan.chantrell.net/20111229/temptx-v2-wireless-temperature-sensor-module/"><span style="color: #ff0000;">TempTX V2 Wireless Temperature Sensor Module</span></a></span></h3><h3><span style="color: #ff0000;"><br /> </span></h3></div><p><a class="a2a_button_twitter" href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fnathan.chantrell.net%2F20111102%2Fwireless-temperature-sensor-module%2F&amp;linkname=Wireless%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%2F20111102%2Fwireless-temperature-sensor-module%2F&amp;linkname=Wireless%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%2F20111102%2Fwireless-temperature-sensor-module%2F&amp;linkname=Wireless%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%2F20111102%2Fwireless-temperature-sensor-module%2F&amp;linkname=Wireless%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%2F20111102%2Fwireless-temperature-sensor-module%2F&amp;linkname=Wireless%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%2F20111102%2Fwireless-temperature-sensor-module%2F&amp;linkname=Wireless%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%2F20111102%2Fwireless-temperature-sensor-module%2F&amp;title=Wireless%20Temperature%20Sensor%20Module" 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/f59RWPXKFtY" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://nathan.chantrell.net/20111102/wireless-temperature-sensor-module/feed/</wfw:commentRss> <slash:comments>4</slash:comments> <feedburner:origLink>http://nathan.chantrell.net/20111102/wireless-temperature-sensor-module/</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 1/46 queries in 0.018 seconds using disk: basic
Object Caching 1024/1137 objects using disk: basic
Content Delivery Network via Amazon Web Services: S3: cdn.chantrell.net

Served from: nathan.chantrell.net @ 2012-02-05 03:39:11 -->

