---------------Getting along in the 21st Century with half the baggage you carried in the last.------------ /*************************Low cost electronic solutions for a low impact lifestyle.************************/
Sunday, August 26, 2012
Building an end to end wireless sensor network
Over the last couple of days, I have been busy setting up a wireless sensor network as part of the preparations in readiness for a web controlled central heating and energy monitor system.
The various hardware modules are all open source designs - and I chose to use a mix and match approach to the system which was put together using hardware from a variety of vendors. Compatible devices were used from JeeLabs, Openenergymonitor and Nanode Ltd.
If you haven't looked recently, there are now new offerings of ethernet gateways, wireless sensor nodes and open data services from a number of providers - the smart wireless sensor arena is starting to get interesting.
Here's a brief description of what is needed. A fuller report will appear in a later post.
There are four main parts to the system:
1. The Wireless Node or WiNode. Supplied by Nanode Ltd.
This is the system's analogue sensor, with 4 channels of 10 bit ADC. WiNode can interface to a range of analogue inputs, such as thermistors for temperature sensing, current sensors or optoreflective sensors for detecting motion or occupancy or even reading the dial on the gas meter. Additionally there are 4 channels of high current pwm driver which can be used to control relays, solenoids, dc motors etc. WiNode can be powered from a 5V USB type supply, or from a 9V-12V unregulated dc supply. Typically WiNode reads its analogue inputs every 5 to 10 seconds and sends that data wirelessly to the display and the ethernet gateway.
Whilst WiNodes can be bought from Nanode Ltd - for around £30, there are other compatible sensors such as the JeeNode available from JeeLabs and emonTX - an electricity monitor available from Openenergymonitor. The JeeNode was the first device to combine the ATmega328 and the RFM12B - and through Jean-Claude Wippler's RFM12 code library, wireless communication between devices has been made very simple to implement. The JeeNode is the "barebones" wireless node - and this is reflected in the price - just 18.50 Euros - from the Jeelabs Shop.
Alternativley, if you are feeling keen, the basic microcontroller and RF module used on WiNode can be hand assembled on stripboard for about £10. Here Nathan Chantrell shows temperature sensors based on both the ATmega328 and a temperature sensing node based on the ATtiny.
2. The second part of the system is the Ethernet Gateway. This is supplied by Nanode Ltd - and is known as the Nanode RF.
The gateway combines the microcontroller and wireless transceiver with an ethernet controller - in this case the ENC28J60. The on board micro runs a simple client, which receives the data packets from the sensor nodes, and pushes them up to the web based server.
As well as pushing data up to the server, the Nanode RF makes the occasional request for server time. Once it receives the packet containing server time - it makes it available to the emonGLCD so that real time can be displayed. The time packet could be sent to all nodes in the system to synchronise their time - as WiNode has an on-board real time clock, which could be occasionally be reset to server time.
The basestation is supplied by openenergymonitor as emonBase, or you can buy it directly from Nanode Ltd as the Nanode RF for about £30.
3. The third part of the system is a local graphic LCD display from openenergymonitor.org.
This display allows you to monitor the wireless data from the sensors, and also can be used as a user interface. It has it's own temperature and light sensors, and two Red/Green LEDS which can be used to indicate physical conditions - such as too hot, too cold - or for energy monitoring applications high load and low load. In addition, the display has 3 user configurable push buttons - which can be used for screen and menu item selection.
Whilst primarily a display module, the emonGLCD also sends regular temperature readings up to the server, and also has it's on screen clock regularly updated by time requests to the server.
This display is obtainable from openenergymonitor.org as a DIY kit, emonGLCD for approximately £50.
4. The final piece of the "end to end" system is the cloud based application software running on a web server. This program receives the raw data from the Ethernet Gateway, and allows it to be processed and visualised by the remote server. The very nice chaps at Openenergymonitor have written a very comprehensive server, data logger, visualiser, and analysis package called emonCMS.
Here is a screenshot from Nathan Chantrell - who has been using emonCMS for energy and temperature monitoring.
It just takes a few minutes to log in to emonCMS, obtain an api key and start to record and graph data from the sensor network. emonCMS was originally intended for energy monitoring, but it is versatile enough to manage a range of different data feed types and has a wide variety of data manipulation, graphing, visualisation and dashboard controls.
Saturday, August 25, 2012
Building Blocks for Wireless Sensor Networks
"Smart wireless sensor networks will bring about improvements to the quality of life, allow greater interaction with everyday systems and lead to energy savings and better efficiency". Well - that sounds like quite a tall order, but if you care to look back over the last five or six years, and have witnessed the rapid growth in this area of technology, you will surely agree that wireless technology is now thoroughly embedded in many aspects of our daily lives.
What has brought about this quiet revolution has been the availability of low cost wireless hardware and innovative design. Wireless technology has very much become an area of innovation within the open source community, and the availability of low cost open hardware for experimentation has greatly assisted in putting smart sensors into the hands of the amateur enthusiast, hacker or maker.
One of the most innovative proponents of low cost wireless hardware undoubtedly is Jean Claude Wippler of JeeLabs. Over the last 4 years, jcw has blogged tirelessly about wireless networks, physical computing and ultra low power sensor networks. Not only has jcw had new and fresh material almost o a daily basis, but this material has been a living lab-book of all his experimentation and product development. jcw returns to his blog at the start of September after his summer break - and if you haven't got him on your list of "must read" now would be a good time to start.
jcw's main innovation was to come up with the combination of a low cost microcontroller grafter to an equally low cost wireless transceiver module. By making the microcontroller the same as the one used by the Arduino community and writing a code library to support the wireless operation , this ensured a rapid and large uptake by the DIY market. However, through the JeeLabs shop, this hardware was made available at less than 20 Euros, putting it well within the budget of the hacker and maker community.
Not only has jcw produced a fine platform on which to base wireless sensor designs, but he also single handedly has developed almost every possible add-on widget to enhance the basic sensor. The JeeLabs shop is an Aladin's cave of low cost pcbs and kits - both in conventional through hole construction and in size reduced SMT format.
JeeLabs has inspired others to contribute to the community, and there are a number of open hardware designs based around the JeeNode core. Energy monitors, internet gateways, sensor/actuators, tiny format sensors, graphic displays have all arisen from the original work by jcw.
For all the reasons above, I would like to show my respect and appreciation for all the work done by jcw in furthering the open hardware community.
A Small Success
For anyone working with open hardware, there is always that great feeling when stuff comes together - and just works.
The latest example, is my recently acquired emonGLCD from openenergymonitor - as it's name suggests, a graphical LCD. This display however has at it's heart an ATmega328 microcontroller connected to the ubiquitous RFM12B wireless transceiver - so it's an Arduino compatible wireless graphical display. How cool is that?
Well, actually, it's very cool, because the GLCD can provide a big, bold display of wireless sensor data, and it can also communicate with a web connected basestation and display text, data, messages - even graphs from the internet.
So this evening's task was to build up the GLCD kit and get it to display data from my WiNode wireless sensor.
The build to just under an hour, and about another half hour to gather together all the various code libraries scattered around the web to breathe life into it and get a working display. Assembly was very easy - assisted with the excellent pictorial and video build guide.
A few modifications to the emonTx (energy monitor) code - so that it worked correctly on the WiNode hardware, was all that it took to get the system up and running.
Tomorrow I will endeavour to get the emonBase (aka Nanode RF) to communicate with the system and get some of the sensor data up to a remote server.
Central Heating - Revisited
One of the areas in which wireless sensor networks have already made a visible impact, is that of energy monitoring, and there are numerous commercial products available for electricity monitoring, as well as some from the open hardware community.
However, whilst an electricity monitor may help you to shave your electricity bill by a few pounds a year - the area in which smart sensors could really make a difference is in the control of the domestic central heating system.
Here in the UK, where natural gas prices are always on the rise, and we are more reliant on overseas gas, almost every UK gas heated property is using a heating control system that fundamentally has not changed in effectiveness since the 1960s. Most homes are still reliant on a time clock, a poorly located bi-metal thermostat and a couple of motorised valves - at the helm of controlling their greatest energy consuming appliance - the gas central heating boiler.
There are several key places where wireless sensors - and actuators could make an impact on the average domestic heating system.
Firstly - a better thermostat - one that is actually located in the room you wish to control the temperature of! So many houses had their thermostats located in the hallway - that draughty wasted space between the front door and the stairs. With a wireless thermostat, you have one which can be located in the room you are sitting in, and if the thermostat is a display unit like GLCD - then you can have instant feedback on the room temperature.
Radiators located in unoccupied rooms should be shut off, or at least to a minimum, when the room is not occupied. Clearly we don't want the risk of the room being freezing, but if the radiator is fitted with a thermostatic valve, we have the means of individually controlling when that radiator comes on, and to what temperature it heats the room.
By monitoring one a room by room basis, how the house responds to changes in external temperature it should be possible to construct a model of how much heat is needed to keep the various living areas comfortable.
Now that we are approaching the end of August, and with the "heating season" only about a month away, the aim is to put in place and prove, the main elements of an end to end web based smart heating control system. By better informing the occupants, and finer control of the boiler and radiators, a saving of energy should be possible.
The WiNodes will be used for room temperature and water temperature sensing - and the high current pwm outputs can be used to drive power resistors - used to close down thermostatic radiator valves when not needed. The GLCD will be the user interface - located in the living room, - easy to get at, simple, intuitive and not buried at the back of some airing cupboard.
Gas Meter Monitoring
If you can measure it - you can control it
Most of us haven't got a clue of how much gas we use in a typical day - and how this can vary wildly with outside temperature.
With simple monitoring it is possible to obtain fine grained reading of the gas meter consumption. I am fortunate that my meter has a reflective patch in the centre of the end zero digit - so I can use an opto reflective sensor to monitor when a unit of 10 litres of gas has been consumed.
With a better knowledge of when gas is being consumed, and how this relates to central heating, water heating and cooking activities will allow these activities to be better co-ordinated with lifestyles. For example if hot water is needed for a morning shower, then this tank heat up period should be incorporated into the morning heating period - when the boiler is already up to temperature and can take the extra load of the hot water coil, without loss of efficiency.
If a bath is required in the evening - then the heating controller should have a bath button - which heats the tank sufficiently for the bath or baths to be taken - and informs the user of when the bath will be ready.
Friday, August 24, 2012
WiNode - a technical summary
Thursday, August 23, 2012
Wireless Sensor Networks - a review of devices
The second part of a post reviewing what is available to the hobbyist in terms of open source hardware for wireless sensing networks. This time I look at a series of kits that are compatible with the JeeNode from JeeLabs.
1. Motor driver IC for driving 2 motors, 4 relays or even a loudspeaker. Accessible via screw terminals.
2. 4 general purpose analogue inputs with voltage scaling networks. Accessible via screw terminals. Could be used for current transformers or opto-reflective pulse counters (gas meter)
3. microSD card – for datalogging or file storage. Can be used to store audio files for playback via loudspeaker
4. 32K battery backed SRAM – retain data during a power outage
5. Real Time Clock and Calendar with alarm wake-up function.
Air Quality Egg - by Wicked Device
This is a new development this year from our friends at Wicked Device and Sensemakers/Cosm.
On the left is a stripped down Nanode RF - fitted with the Air Quality Egg sensor shield - a series of plug in gas sensors to allow measurements of typical air pollutants to me measured and sent up to a open data server - provide by Cosm.
Building Bridges
Tuesday, August 21, 2012
Oggcamp 12 - The open movement goes from strength to strength
Sunday, August 05, 2012
Distant Writing
The first is "The Victorian Internet" - a 1998 book by Tom Standage, describing the world's first online communication system.
The second is a most detailed account of the early commercialisation of the telegraph in London in the late 1840's "Distant Writing" by Steven Roberts.
Whilst some consider the telephone to be the most significant communications invention of the Victorian Era, it should be realised that the telegraph was already providing a service, a full 30 years before Alexander Graham Bell received his 1876 patent, and it was the telegraph network infrastructure that allowed Bell and several other notable contributors, to perfect the transmission of audio signals by wire.
It is technically ironic that analogue telephony arose from substantially a system of digital signalling, and how modern broadband, to carry our digital traffic has essentially been laid on top of the analogue voice network - at least for the last mile.
Standage's book describes how as far back as the 1890s - we had all the modern trappings wee associate with the internet, from online shopping, social networking, romance, image transmission (facsimile) and hacking.
It is also noteworthy, that much of the punched tape apparatus developed for high speed telegraphy was adopted by the early computer pioneers for paper tape input and output into their machines - a trend that was to last right up until the mid-1980s, when magnetic disks became the preferred choice of portable data exchange. It was no surprise that the BASIC interpreter that Micro Soft (note spelling) delivered to Altair for their 8800 home computer system was supplied on a paper tape.
Curiosity
The 7 minute descent manoeuvre, and the 14 minute delay in communications between Mars and Earth - mean that it will be a very tense 14 minutes for all those following the mission - and the staff of the Jet Propulsion Labs in Pasadena, California. This video 7 minutes of Terror, gives a good illustration of what the final descent and landing involves.
So far, of all the Mars surface probes launched, there has only been a 40% success rate of safely landing. Lets hope that the $2.5 billion Curiosity bucks the trend, has a safe descent, and does not become the latest member of the exclusive Mars "Crash and Burn" club.
Space Exploration, or any kind of exploration, carries with it certain risk. The early Explorers of the New World, faced numerous perils, not to mention the arduous sea journey with the risk of shipwreck, disease, pirates or unfriendly natives.
I have recently finished reading an excellent history of San Francisco, which covers the 1830s to 1906, the Gold Rush and Boom Town years right up to the earthquake and its aftermath. It is fascinating that in the 1840s, San Francisco was little more than a village of 500, and by 1852, as a result of the Gold Rush was almost 35,000.
Getting to California in the 1850s was a dangerous and long journey. For the European, the journey could be over a year, by boat via the Isthmus of Panama, or the considerably longer journey around the Cape Horn. For those that set out by wagon trail across the Mid-West, the perils of the Sierra mountains, often resulting in starvation and death by exhaustion - it was estimated that those who made it to 1850s San Francisco disease due to poor sanitation, overcrowding and violent crime 20% were dead within 6 months.
Compare this with modern long haul air travel, where we spend 12 hours in a 747, and the only discomforts we face are to moan about the food, the size of the seat and the disappointing choice of movies.
Having crossed the Atlantic four return times in the last 12 months, and peered out over the Sierras from 35,000 feet, it is hard to imagine what our forefathers endured, to fulfill their basic instinct of human curiosity.
California Dreaming...
It's been a while since my last post, and perhaps some readers might want to know what I've been doing for the last 7 months.
Last Autumn, I was invited to join a startup in Berkeley, California and be involved with biomass energy conversion - notably wood gasification.
Shortly after Christmas, I left the UK to visit the organisation, and apart from a couple of brief returns to the UK, I have been out in California for most of the last 7 months.
My involvement with All Power Labs goes back to February 2010 when I attended a wood gasification workshop, and got involved with a project to convert a Lister diesel engine to spark ignition such that it could be fuelled with woodgas.
In the last 2 years, APL has further developed their Power Pallet - a generator set that is fuelled from waste wood - such as woodchips or nut shells etc, and are now manufacturing them at a rate of approximately 10 per month. The Power Pallets are shipped all over the world, to provide personal and village scale biomass power production, and to communities that live off grid.
Leaving the San Francisco Ferry Terminal
Gasification 101
Wood gasification is not a new technology, it's been known about since the early 1800s, and exploited in the early 20th century for providing motive power, by way of reciprocating gas engines, gasifying a range of carbon based fuels. This reproduction of an early Paxman catalogue of 1913, shows the extent of the technology even 100 years ago. Below is a Paxman gas producer on the left, with the gas engine and scrubber. The engine is a type K - producing about 30hp. The ladder on the left on the producer gives some idea of scale.
Gasification involves the thermal decomposition of biomass into a gaseous fuel, which consists of a mixture of the flammable gases hydrogen and carbon monoxide. Air normally drawn in by the engine passes through the gasifier, where it gets converted to wood gas. This is then cleaned, cooled and mixed with further atmospheric air to form an explosive mixture which will run a spark ignition engine.
Converting wood to a gaseous mixture and running an IC engine in this way is far more efficient that running a steam engine directly on wood. For a given amount of wood, you can generate approximately four times the electricity. It also scales down to relatively small power outputs - and it is this small scale energy conversion that APL is currently involved with.
The "modern" gasifier was developed just around World War II, as a means of vehicle propulsion not reliant on petroleum fuel - and it is this modern, lightweight gasifier to which the APL design owes a lot of its heritage.
As a person with an interest in alternative energy and appropriate technology, the opportunity to work with one of the world's few gasifier companies, was one that I could not turn down - and so whatever else was going on in my life in the UK, had to be put on hold, as I pursued my Californian Dream.
In the next few posts, I'll try to give a perspective of life in today's California, and the ups and downs of working with a startup 8500 miles from home.
Monday, January 30, 2012
Starting a Tech Company - Week 2 - The Heat is On.
Week 1 was just a blur - mainly because I was still jetlagged having returned from San Francisco - and really not slept well for a few days.
Our mission for Week 2 was to complete the website, and online store and go live on Friday 20th January - which coincided with the January meetup of the #iotLondon internet of things group.
The website had come on in leaps and bounds and by the Sunday night it was then necessary to test the online shop with a few test purchases. I bought a few items - and all seemed to be well, Paypal worked, emails were sent and the shop backend worked perfectly. We now just had to polish up a few pages, add some more up to date content and get it ready for the launch on the Friday.
To incentivise some "friends of Nanode" to help us test the store - we offered free UK shipping up until midnight on the 20th. This worked well and we took more than £500 in this first week of unofficial trading.
The plan was to photograph the product for the online shop pictures, and to produce a series of build guides - explaining to new purchasers how to build their Nanode and WiNode kits. A series of camera problems meant that this didn't happen as quick as intended - and the store had to go live using the old build guides produced by Ian Chilton - not ideal - but at times like this, not a bad Plan B.
Friday came around all to quickly, and we spent the last couple of hours of the afternoon making some flyers to hand out at #iotLondon.
We rushed around to Shoreditch with a big box of stock only to find the pub venue so packed - it was virtually impossible to move - let alone do a presentation. After an hour of chaos - part of the group took off to an office building 2 streets away in Scrutton Street, leaving about half of the attendees in the pub - bemused and confused. The words "piss-up" and "Brewery" could certainly have been useful that night.
Despite awkward circumstances - we managed to do a company plug, and sell nearly £200 of stock, bringing to an end the first week of real trading.
The next job was to find an accountant and get set up with a Limited Company.
Debbie's accountant, came with her full recommendation - only hitch, he was located in Gloucester. So early morning on Monday 23rd, we set off in my Golf to Gloucester to meet her Accountant.
After a three and a half hour meeting - we were all set, and it was agreed that Nanode Ltd would be purchased as an off the peg company from Jordans in Bristol, who sort out the legal paperwork and can turn around a limited company in just a few days.
On the way home in the car, Debbie took a call from a friend, the result of which that we learned that the guy doing our website and store had walked, leaving us with a not quite fully finished site, and the problem of hiring someone else to finish off the detail - and it's never easy picking up someone else's work. Undeterred, we called in a few friends, and we think we have a solution to our immediate problem.
So, this morning at 10:30am - not quite 21 days to the hour after me getting off the plane at Heathrow, we now have a proper limited company, Nanode Ltd, the store is fully stocked, and business is brisk.
Nanode Ltd - forming a Tech Startup Company in 21 days!

From it's early beginnings last March, Project Nanode has grown from strength to strength. It was now time to start a company www.nanode.biz and open an online store - problem was - we only had 3 weeks to do it in - so no pressure!
What started out as a back-bedroom tabletop operation has now morphed into a fully fledged tech startup company, Nanode Limited - marked by the Certification of Incorporation of a Private Limited Company - 30th January 2012.
Morphing a sole trader operation into a limited company came not without it's own fair share of growing pains - and it didn't help that I had just 3 weeks in the UK before jumping back on a plane and starting a new career in Northern California.
However, it was becoming increasingly important that Nanode had it's own identity, and the safest way to ensure it's success was to separate it's operations from that of my own limited company Arbour Wood Ltd - and set it up on it's own legal standing as Nanode Ltd.
Debbie Davies, who I have worked with on Project Nanode since last August, has been appointed Managing Director, and she will run the sales and marketing and day to day operations out of the London office. I am taking a backroom role as Technical Director - or should that be CTO, and I will be responsible for the technology roadmap- and more long term strategic planning. This can be done remote to London - which is fortunate, because I will be spending significant periods from now on, working abroad.
Parachuting into one of the biggest Tech Communities on the Planet (Silicon Valley) gives me an ideal opportunity to promote Nanode on the West Coast. This role will be done in association with Dirk Swart, and Victor Aprea - who are based on the East Coast - in Ithaca, New York, and are handling US sales and distribution. Between the current "Nanode Team" we cover London, New York, San Francisco and Shenzhen, China time zones. A true global organisation - of just 5 people.
The last 3 weeks have been a buzz. Flying back to London from San Francisco overnight on 8th/9th January - I realised that I would have a challenge on my hands. Firstly, to unwind myself from my position with my current employer, start a company - leave it in capable hands, and then ramp up into my new role as Head of Electronics, with All Power Labs, in Berkeley, California - so that I could hit the ground running by Monday 6th of February.
The first week was a little hectic - made Solomon Grundy's week look a bit dull:
Sunday: Leave Berkeley, BART to SFO international and get a 5pm overnight flight back to London
Monday: Arrive Heathrow 11am, tube to central London, half a day working at Nanode HQ
Tuesday: Go into work - resign by 11pm. Have 2 days to handover current project and tidy my office.
Wednesday: Handover Day - sorting out 18 months of work so that others can pick it up (or can it)
Thursday: I am now officially "between jobs" - go to pub to celebrate
Friday: Full Day working out of Nanode HQ
Saturday: Full Day working out of Nanode HQ
Sunday: Full Day working out of Nanode HQ
If that wasn't exciting enough - the next 2 weeks got even busier!
Tuesday, December 27, 2011
A £10 Tiny Basic Computer you can build yourself

Back in August 2010, I came up with the idea of a DIY Arduino built from a few components and an AT mega built on stripboard for about £10.
Just take an ATmega328 pre-programmed with the Arduino bootloader (from CoolComponents, Farnell etc) and build it onto a small scrap of stripboard about 50mm square, with a 16MHz crystal, a few capacitors, resistors and a 6 way header strip to accept a programming cable - and for about £10 you have a little Arduino compatible computer on which you can run real control programs.
If you then load Arduino Tiny Basic onto the microcontroller, you have a device that you can program in a very simple programming language - direct from a serial terminal program, and use it to flash LEDs, make light chaser displays, make analogue sensor readings and a whole load of other stuff - just with a few lines of Basic code.
Tiny Basic is a very simple to learn language and is ideal to teach newcomers the fundamentals of computing. This makes it ideal for youngsters and students who perhaps have had no experience of real computer programming.
In this minimal form, the ATmega328 has 12 digital output lines and 6 analogue inputs - plus the two signal used to support the serial terminal interface.
I hope to release a very low cost pcb and kit of parts for this in the New Year - allowing anyone to make a £10 computer.
Happy New Year
Sunday, December 25, 2011
More Tiny Basic - the plot thickens
So its now possible to flash LEDs from a simple basic program - so there is now temptation to write a Christmas lights chaser routine with a handful of LEDs and a few lines of code.
I have started a Tiny Basic Wiki page for anybody to put up their contributions, updates and improvements.
What I love about an interpreted language like Basic - is that you don't have to go through the edit-recompile-upload process - you can change your code as quick as you can type a new line and type run. This means that it is very quick to change variables, like loop parameters, delays, threshold values - without having to spend 3 minute going through the previous cycle.
This immediacy of changing how your application work with a change to a single line of code is what really appeals - it makes programming a lot more fun. And this could be very important if you are 7 years old with the attention span of a goldfish.
Tiny Basic running on the Nanode or Arduino is proving to be very quick. I think my generation that grew up with 8 bit home computers, had the attitude that Basic was slow - and perhaps it was on a machine clocked at 4MHz or under - where the cpu was doing a lot of other stuff at the same time. This cut down version of Tiny Basic is lightening quick on a 16MHz ATmega328.
I noted a few benchmarks whilst running the serial terminal interface at 115200 baud:
1 million FOR - NEXT loops in 45 seconds
10,000 10 -bit ADC reads and printed in 7 seconds, 4 seconds if you don't print them.
The plan is now to start a Wiki page so that others can contribute to the Tiny Basic project, add new functionality and extend the usefulness.
On the Nanode we now have a rich set of peripherals and interfaces. Making use of the micro SD card as a solid state drive for loading and saving programs is an obvious choice. Some better editing features would make code entry simpler - and of course having interactive coding via a web browser is a goal for the near future.
Happy Christmas
Ken
Saturday, December 24, 2011
Tiny Basic running on Nanode - Christmas Challenge
This would make Nanode a lot more accessible to novice programmers - and could have an important role to play in helping to teach kids the basics of programming and computer science - just like we learned 30 years ago - on simple 8 bit machines running basic.
A Nanode as a web connected platform sells for just £25, or fully built, tested and expanded to include micro SD card, Realtime Clock and wireless transceiver for just £40. (That happens to be what I paid for a ZX81 kit in 1983).
The latest Nanode really is evolving into a small computer system, with it's 32K SRAM and the micro SD card. There should be the means to run programs out of these memory devices, and use the SD card like a hard disk for file storage and retrieval - and tasks such as datalogging.
The first task was to find a program which can be used like an operating system - in order to tie all the various hardware functions and libraries together.
Tiny Basic hails from 1976, when the Homebrew Computer Club of Menlo Park - in Silicon Valley were looking around for a simple and compact interpreted language that would run on their homemade Altair 8800 machines - and did not want to pay the young entrepreneur William Gates $150 for his version of basic. So a challenge went out to the members to write their own - and several did, the most notable was Tom Pittman.
http://www.ittybittycomputers.com/IttyBitty/TinyBasic/index.htm .
Tom's original code has been adapted for many different platforms over the years - some written in native assembly language and some ported to C - so that it might be platform independent.
I recently was made aware of an assembly language version that compiled on an AVR (eg ATmega328) into under 4K - but modifying this code was going to be a little to intense for most people - so I was delighted to see that Mike Field
http://ec2-122-248-210-243.ap-southeast-1.compute.amazonaws.com/mediawiki/index.php/Arduino_Basic
As it's written in C, and uses simple tables of tokens or keywords, it is easily extendable to write new keywords and functions which exercise the Nanode hardware. Additionally there is plenty program space left - about 22K, into which the various library functions for ethernet, SD card, RTC, MAC and SRAM may be added.
Whilst it currently executes code from internal RAM, this could probably be redirected to the external 32K SRAM - into which we can TFTP a simple basic program listing - or access the SD card - which we can use as a local repository or "juke box" of our favourite sketches.
Extending this Tiny Basic and including the common Arduino libraries to form an Nanode operating system (NanOS ?)will be an interesting but achievable task.
The Tiny Basic plus all the nex=cessary hardware libraries fit into just 13K of program space leaving 17K for language extensions and application code. The breakthrough will be to get the SRAM and the SD working as a program application memory and solid state disk.
With the Tiny Basic is a means to list the program, so that lines of code can easily be edited with a terminal program. - or probably a whole file loaded using a file transfer program such as Hyperterminal or whatever.
A simple text editor could also be used to edit and manipulate html text, stored on SD or SRAM - so that web pages could be locally edited and then displayed on a browser.
The Tiny Basic is certainly fast enough to be usable, especially with the baudrate at 57600 - I did 10,000 iteration loops of
10 For A = 0 to 9999
20 Print "My Name is Joe"
30 Next A
In just 30 seconds - anyone who remembers the early 1980s machines like the Spectrum will appreciate this is several times quicker.
It should be straight forward to get the Nanode (Arduino) I/O pins accessible from basic keywords - perhaps something like defining each pin as a keyword
to set Digital 4 High. As there are only 20 I/O pins on a ATmega - it's not going to take much program space to code them up. eg
10 Let D4 = 1 // Set Dig 4 High
20 Let A = AN1 // Get input from Analogue 1
Lots of simple hacking fun for the Christmas holiday - and if you are old enough to remember the Spectrum - this should be like child's play again.
So here's the challenge - download Arduino Tiny Basic from here
http://ec2-122-248-210-243.ap-southeast-1.compute.amazonaws.com/mediawiki/index.php/Arduino_Basic
add in the various Nanode hardware libraries: Ethercard, wire, SD, NanodeMAC, RTC, Ports , RF12
And the best Nanode/WiNode Tiny Basic hack by New Year - wins a pair of fully expanded Winodes - or a pre-assembled Nanode XRF and a WiNode. - worth £60.
Happy Hacking Chrismas
Ken
BTW

Saturday, December 03, 2011
Testing Nanode RF - 4 simple test sketches
Before you fit the RFM12B module and Magjack, fit the ATmega328 and the 74HCT125 ICs and apply power via the programming cable.
The red led should wink at approximately 1 second intervals.
Ian Chilton has subsequently made these test sketches available on Github - because code does not travel well in these blogs - getting corrupted by the formatting codes.
https://github.com/ichilton/nanode-code/tree/master/test_rfm12b
https://github.com/ichilton/mcp7941x_arduino/blob/master/examples/RTC/RTC.pde
Now cut and paste the following italicised code into a new sketch and check that you can load it. On reset the Red and Green LEDs will flash alternately. This Blinky sketch shows that the ATmega is running and that the upload process is working.
Include below are the LED test, the RF send test, the RF receive test and the Realtime Clock test.
The RFM12 module and 82mm antenna should be soldered in place after you have run the LED test. Make sure you fit the 74HCT125 - because the /INT line from the wireless module passes through this buffer.
Building blocks for the Internet of Things.

Three years ago exactly, I first got interested in web connected devices. I bought a £100 dev-kit from Microchip, loaded a few examples, but frankly found the technology poorly documented and with a very steep learning curve, I admit I made very little progress.
Undaunted, I took a new job in central London, met a whole host of people with similar interests, through HomeCamp, Pachube, London Hackspace and Minibar and was inspired to develop some of my own ideas into commercial products.
The idea of being able to connect bits of hardware - like sticking Lego blocks together - had a huge appeal. The open source Arduino was trailblazing ahead with a low cost platform and gaining a huge momentum of users and developers. It seemed sensible to produce a compatible platform which is built on the foundations of the Arduino project but adds a whole bunch of new network connectivity functions. Thus was born Nanode - Arduino's well connected cousin.
This week sees the launch of two new product offerings in the Nanode family.
Nanode RF is a much updated Nanode which includes a low power wireless transceiver module - allowing it to communicate with similar networked devices - whilst retaining web connectivity.
Nanode RF also has a real time clock/calendar which can be used to wake up the board at certain times to perform given tasks.
The 32K x 8 static RAM, provides a useful buffer space for storing larger web packets, and also provides a means of upgrading the Nanode RF firmware via the web using a TFTP server.
On the underside of the pcb is a micro SD card socket. This allows a huge amount of external storage - can be used like a disk drive, for holding a repertoire of web pages or as a store for vast quantities of datalogged information.
Nanode RF has conventional Arduino shield connectors, and like Arduino provides a variety of analogue, digital and PWM I/O Pins.
Like the Nanode 5 predecessor - Nanode RF uses predominantly through-hole construction, and may be built form a kit, with a simple pictorial assembly guide and basic soldering skills.
Nanode RF can also be purchased as a fully built and tested board - the Nanode RFX is a maxxed out board with all options fitted.
To complement the Nanode RF - who's role is that of an ethernet connected gateway or basestation, we also introduce a low cost sensor/actuator node: WiNode is a low cost wireless node aimed at networked wireless control, monitoring and actuation applications.
WiNode is also available as a kit, and retains much of the functionality of Nanode RF, but without the ethernet connection.

WiNode has four analogue inputs - buffered for voltages of up to 18V, and four high current (2A) digital outputs. These signals are accessed through the easy to connect screw terminals.
The high current outputs may be used for speed control of 2 dc motors, or high current loads such as relays or high brightness LED lighting. The 4 outputs can also be used to drive a single stepper motor.
WiNode also features the familiar Arduino shield connectors, allowing a variety of expansion hardware to be added.
WiNode has the 32K x 8 SRAM, the real time clock/calendar for task scheduling, and when fully populated will accept the micro SD connector for stand alone datalogging applications.
Unlike Arduino, the Nanode and WiNode products do not have the serial programming IC on board. Instead we have produced a customised budget programming adaptor. This allows automatic programming of Nanode products using the Arduino IDE software environment.

Nanode and WiNode products can be purchased online. We currently accept orders by PayPal.
Check out our www.nanode.eu website
Kits:
Nanode 5 - the original - discounted stocks - a few still remaining £19.25 +£0.75 P&P
Nanode Classic £25 - RF module not included - but can be added later (£5.99 Maplins)
Nanode RF £30
Nanode RFX £40 - fully built and tested board
Basic WiNode - from £25
Pre-Asembled and tested:
Nanode RFX - fully assembled and tested £40
Nanode USB programming lead £5.
For more details, contact me, Ken Boak at nanodenanode at gmail dot com
Nanode products are fully Open Source and ethically produced by Arbour Wood Limited - by a collaborative team of friends based in the UK, New York and Shenzhen, China.
Wednesday, November 30, 2011
Teaching Kids to Code and Build

Britain will drift into the Digital Doldrums if we can't excite a whole new generation of kids to get involved with learning the skills of computer programming and making - which we learned in our bedrooms back in the early 80's with our Sinclair Spectrums and BBC Micros.
I built my first computer from a kit, when I should have been revising for my A Levels, and I made a Turtle robot in the Easter holidays before the exams. What seemed normal for a geeky 17 year-old back then, when there wasn't the easy access to low cost technology, meant that you had to go out and make your own. What I learnt in the last few summers of my schooldays set me up for life as an electronics design engineer.

Now in my mid-40s, I am one of a generation of technology professionals who learned their craft on simple 8-bit machines - often in the late nights and early mornings - with school the next day. However, lack of sleep to a 17 year old is the last thing on your mind when you are programming a new game, or in my case a floor-roaming robot controlled by a ZX81 and half a kilo of NiCad batteries.
In the last few months, I have been alerted to the fact that some of my contemporaries are now forming a movement to campaign for a return to the teaching of real computer science in schools, as the years of the very much lesser ICT has left students bored and disinterested.
David Braben, Emma Mulqueeny and Dr. Sue Black - to name but a few, are most vociferous in this field. David is spearheading Raspberry-Pi, a £15 computer to excite youngsters in learning real programming. Emma is running a campaign to get Parliament to reintroduce computer science in schools, and Sue has just announced the goto
Making computer science more meaningful to the public, generating public excitement in the creation of software, and helping to build a tech savvy workforce
More strength to their bows, I say, and in these depressing times we live in, it good to see people take on a challenge like they have and really pick it up and run with it.
So, ask not what your country can do for you - but what y
Well in the last 8 months I have released a couple of low cost 8-bit computing platforms, based on the ever-popular Arduino, but take Arduino into the re
However, these are going against the Arduino gr
Over 1600 Nanode kits have been sold, and there have been very few failures. Part of this high success rate is a very easy to follow pictorial build guide - which bypasses the more traditional methods of component identification and placement, and
Nanode was conceived in a hotel room in China in June of 2010 as the lowest cost Arduino like board which could connect to the internet - a simple pcb with all through hole construction which can be made by anyone with the most rudimentary soldering experience.
December 6th marks the arrival of a completely updated version: Nanode RF. The same basic philosophy of a low cost board with ethernet connectivity - but now with low power wireless as well.
Nanode RF can form the gateway between the ethernet and remote wireless devices offering up exciting possibilities of wireless connected sensors and even robots - controlled remotely from a web browser.
To give Nanode RF a paired device to talk to- so we have created our own

WiNode is essentially an Arduino with a low cost wireless transceiver attached. But we have thrown in some analogue sensor channels, a two channel bi-directional driver circuit for controlling dc motors or relays and fitted it out with easy to use screw terminals.
But best of all - the basic WiNode will only cost you £15 - when bought in pairs. I remember that my first ZX81 kit cost me £39.99 in the early 1980s - so WiNode at 2 for £30, is clearly a good buy.
Solderpad.com is a repository for open source hardware designs - here's how they sum up Nanode and WiNode:
Brainchild of monsonite and developed in conjunction with London Hackspace, the Nanode is an open source Arduino-like board that has in-built web connectivity.
It is supplied as a kit of through-hole components, that can be assembled by following a pictorial build guide.

Nanode starts with a kit of parts - within a couple of hours you have built your own web connected computer.
In supplying the Nanode as a kit, it not only keeps costs down but provides a sense of achievement for hobbyists and experimenters that are new to electronics. Use of through-hole components means that assembly, and repair, is within the grasp of those without experience of working with surface-mount technology (SMT).
Projects such as Open Energy Monitor have employed Nanode extended with wireless capabilities, to act as a wired-wireless bridge or hub for remote wireless devices. A common Internet of Things (IoT) use case for Nanode, this has led to the development of the Nanode RF- a variant that can directly accommodate an RFM12B wireless module, with additional features that include a microSD card socket, real-time clock (RTC) and SRAM.
The WiNode is the third member of the Nanode family and is intended to be used as an end node in a wireless network. It employs the same RFM12B module as the Nanode RF, but drops support for Ethernet in favour of enhanced I/O capabilities. In addition to acting as a remote sensor and actuator control node, it can also serve as a shield to a classic Nanode, thereby extending it with support for wireless, a RTC and increased I/O capability.
All three are fully Arduino-compatible and make use of the same IDE and libraries etc. However, to keep costs down a USB controller has been omitted and programming requires use of a USB to serial adaptor cable. Traditionally this would be a FTDI cable - costing nearly as much WiNode. But a chance find on Taobao - the Chinese equivalent of Ebay, and Nanode now has it's own customised programming lead for just £5. Only one cable is required for programming - regardless of how many Nanodes you have.
Creating useful open source hardware building blocks - at the lowest possible price - that people have a need for. Through the Power of Making - electronics becomes accessible again to education and enthusiasts.
Contact nanodenanode at gmail dot com for more details of the Nanode products, pricing and availabilty.