QR Code 
| By Nathan Chantrell, on January 19th, 2012 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 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.
The hard work here is done by the IR Remote library by Ken Shirriff available here. 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’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. NB. If you are using Arduino IDE 1.0 note the comment on the library page about changing WProgram.h for Arduino.h – that’s the only change required for 1.0 Continue reading Building a Web Based Infrared Remote Control By Nathan Chantrell, on January 7th, 2012 I’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 a minor code change – 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.
| Resolution | 9 bit | 10 bit | 11 bit | 12 bit |
|---|
| Conversion Time (ms) | 93.75 | 187.5 | 375 | 750 | | LSB (°C) | 0.5 | 0.25 | 0.125 | 0.0625 |
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. Secondly, a completely unrelated discussion on Twitter 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 (sound familiar?), 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. 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’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. 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’ve been using these boards so far) but would have a secondary advantage in that the 1-wire and Dallas Temperature libraries wouldn’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. Please feel free to post in the comments if you can think of any other suggestions or improvements. By Nathan Chantrell, on December 29th, 2011 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.
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 . Now, armed with new supplies of stripboard and some new ideas I’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’t want to put these on the main board in order to keep it as minimal as possible) and I’ve also moved the capacitor and pull up resistor for the reset on to this board meaning the TempTX (as I’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’s probably taking minimalism a bit too far. Continue reading TempTX V2 Wireless Temperature Sensor Module By Nathan Chantrell, on December 17th, 2011 I’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.
This is quite an improvement on the first display I made, the feature list is now: - Touch control using Nintendo DS touchscreen
- 3 Different display views selectable via touchscreen
- Receive power reading from emonTX via RF
- Receive remote temperature reading via RF
- Read room temperature from DS18B20 sensor
- Transmit room temperature reading via RF
- Backlight colour changes depending on power reading
- Supports MCP79410 RTC for time & date display
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 Proto-PIC) that I covered here and I’ve connected it up along with the touchscreen and temperature sensor as follows: Continue reading WiNode Based Wireless Graphical Display By Nathan Chantrell, on December 9th, 2011 I’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’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.
Interfacing with and coding for each of these displays is subtly different as there isn’t a single unified Arduino library but none of them are complicated, it’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. In combination with these screens I’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. Continue reading GLCD Screens and Touchscreens with the Arduino By Nathan Chantrell, on December 4th, 2011 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 on board RFM12B wireless transceiver and options for several extras such as a real time clock (RTC), 32KB SRAM and a Micro SD socket.
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’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. Pictured above is my first WiNode build, decked out with the SRAM and SOIC RTC options. I’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’s the Nanode RF on the left.
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. Ian Chilton has already created a very comprehensive guide to building the Nanode RF which is available here and I suspect a WiNode version won’t be far behind (update: WiNode build guide is now almost complete). 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 this blog post. By Nathan Chantrell, on November 2nd, 2011 
UPDATE: There is a new improved version of this here: TempTX V2 Wireless Temperature Sensor Module 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. 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 my MisterHouse server. The board for the wireless temperature sensor module is basically the same as my minimal Arduino build with an RFM12B transceiver and a DS18B20 temperature sensor added. As it’s running directly from 2 x AA batteries no voltage regulation was added. As I only have a 5V FTDI cable for programming and the RFM12B isn’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 posted on Twitter showing how he uses them with breadboard, simple but very effective. Continue reading Wireless Temperature Sensor Module By Nathan Chantrell, on October 15th, 2011 As a followup to my post on building an OpenEnergyMonitor system here is a description of two different remote displays I have made, one using a 128×64 pixel graphical LCD and one using a 4×20 line LCD.
The GLCD Version The OpenEnergyMonitor project is working on a graphical display and I’ve based the code on their examples. For the emonGLCD they are using a serially connected JeeLabs based graphic LCD that uses the GLCD_ST7565 library, for the parallel SparkFun GLCD that I’m using I needed to use the KS0108 compatible GLCD library (formerly the KS0108 library) so modifications in both hardware and software were required. To use a KS0108 based display you will need to download the GLCD library and copy it to your Arduino IDE library directory. The first problem is that the KS0108 based screens use a lot of pins, 8 data pins and 5 command pins in addition to the power connections and the standard pinout uses several of the pins we will need for the RFM12B wireless module so the pin assignments must be changed. Continue reading Building a graphical display for OpenEnergyMonitor By Nathan Chantrell, on October 8th, 2011 OpenEnergyMonitor is a project to implement an open source whole house energy monitoring system built on the Arduino platform. This guide will show you how to make a complete system that will monitor your mains power usage and transmit it over a wireless link to a base station which will upload the data to a web server where you can view graphs of your power usage over time. The image to the right shows one example of the output from the web interface.
There are many options when it comes to building an OpenEnergyMonitor system and you can have systems with multiple current sensors, pulse count sensors and temperature sensors. The OpenEnergyMonitor website is a mine of information but it is very spread out and there isn’t really a simple description of how to build a complete wireless system from end to end so I thought I would document how I made my single sensor system for use on single phase electricity systems such as that used in the UK. First of all you are going to need some parts. I used a Nanode as the base station which receives the data from the transmitter and uploads it to a web app running on your server. For the transmitter I used a Xino Basic for Atmel which is a no frills Arduino compatible with a handy prototyping area which allows everything to be made on the one board. Here is my full parts list: Continue reading Building an OpenEnergyMonitor system By Nathan Chantrell, on August 26th, 2011 I’ve had my front door bell sending me text messages since 2004 using a combination of a hacked X10 wireless remote control and Misterhouse, initially through an email to SMS gateway (not ideal as it cost me every time someone pressed the door bell) and more recently using TTYtter. It worked well enough most of the time but the X10 (both the radio and mains components) was always the weak link in the chain. I first had the idea of changing this over to an Arduino based system some time ago when I bought a Duemilanove clone and ethernet shield but it seemed like a lot of money to have tied up in a doorbell, that all changed with the Nanode of course, £22 seems like a much more reasonable figure.
So here is the first Nanode version working, it’s very simple, just a few small changes to the ethershield Twitter demo code that sends a tweet using Supertweet.net’s API proxy when a pin is grounded. I have set it up to send a message via another Twitter account which I have told Twitter to send me a text message for, the tweet from the Nanode includes a link to the web feed for my front door camera so I am just one link away from seeing who is there. Twitter won’t send two identical messages in succession so I’ve added a changing number to the URL for the camera so that each message is always different from the last, it’s a bit hacky at the moment but it works. I’m now thinking of other things I can connect to in the vicinity of the front door, a snail mail alert is an obvious next step. The picture above shows the message coming into the Twitter client with the web interface in the background. There are another couple of pictures below, one showing the text message coming in and one showing the result of clicking on the link (yes my path needs weeding but where’s the fun in that?). I need another Nanode now. 
| |
Most Popular