Wednesday, September 01, 2010

September - Time to Reflect

July and August have been busy months, what with starting a new job in July and developing a whole bunch of Arduino ideas with the guys from openenergymonitor.org, Pachube and the London Hackspace.

I thought I'd summarise the project so far - and think about where it's all heading.

Low Cost, Arduino Compatible Devices.

At the heart of this project is the popular, open source hardware Arduino microcontroller board. An 8-bit microcontroller with clock circuit and programming interface, which can be programmed in a C like language from an IDE which runs on Windows, Linux and Mac platforms. The Arduino and its derivatives have become very popular amongst developers, hackers and other creative communities. Whilst an Arduino costs about £12.50 from a number of vendors, the hardware is trivial and easily built on stripboard or breadboard for about £5 in components. Such was the attraction of having a number of low cost Arduinos, that in early August I considered the notion of DIY Arduinos having seen some examples produced by the FizzPop hackspace in Birmingham.

The Internet of Things.

At the end of July, I attended a MiniBar event in London discussing the Internet of Things. For some time I had an interest in the idea of a number of low cost smart sensors, all connected to the Internet and able to communicate with applications and each other. The Arduino already had an ethernet shield available, so I wondered just how cheap you could make a home-made, web connected Arduino. This led on to the "ether-duino" project - an Arduino compatible web server for £12. Whilst the hardware was relatively easy to build on a breadboard, the ethernet library to control the ethernet controller IC was a bit out of my depth, so I was delighted to receive assistance from Andrew Lindsay and John Crouchley - both of whom had worked with this controller and had some example sketches available.

Low Cost Web Connectivity.

For some time, I had been thinking on how these network connected microcontrollers would communicate with each other, and also with the internet, so by way of experiment I developed a serial command interpreter which allowed Arduino compatible hardware to be controlled with simple serial commands. It was not much of a step on from this to realise that if these serial commands could be passed across the internet or other network then it would be possible to get these network connected devices to talk to each other. Smart sensors could pass data and commands between similar devices across the wired network and the internet. So I came up with a simple method by which the web-enabled Arduinos could pass simple messages between each other using Pachube as a message broking service. This bit of experimental work came to fruition in the third week of August when I finally got it together and succeeded in getting one web enabled Arduino to control a LED on another similarly web connected device.

A Smart Sensor Network

Having succeeded to make a breadboard version, to prove the concept of the web connected Arduino, I worked on a pcb version, done in conjunction with the London Hackspace. These would be inexpensive boards made from conventional components which anyone with basic soldering skills could put together. They would provide the basic circuit to connect to the internet and allow experimentation with internet connectivity for smart sensors. Whilst making the prototype, I realised that one of the components on the board, a tristate buffer, had two spare gates, and these would make an excellent means to extend the communication network beyond the web, and allow several slave sensor boards to be connected to a network radiating out from the web connected Master unit.

Building the Network.

With these thoughts in mind, I travelled up to Snowdonia, for a weekend build session with the lads from openenergy and it was here that we were to share the ideas and develop the hardware and firmware for the network connected Arduinos. We built up a total of 4 slave sensors, two with displays, and proved that we could send data and commands down 300m of network cable. We used one of the network sensors to monitor and control a solar pV installation and lead acid battery monitor.

The Next Steps.

So in just a few weeks we have developed a system of low cost network sensors which can be accessed through the internet and send commands and data to each other. From the outset this project was to be experimental, and make use of readily available low cost components and be easy to build by anyone interested in the Arduino Project.

The techniques that have been used may not be optimal in terms of performance, but they are easy to follow, by anyone wishing to build something similar. Now that the fundamentals have been proven, it is time to make up a batch of low cost pcbs, which will support both the web connected Master, or the simpler network Slave. With the infusion of low cost hardware into the hacker community, plus simple firmware to control it, then hopefully the project will soon gain momentum.

2 comments:

Matthias said...

There are two barriers to entry I've been looking to address with this "internet of things" mentality. Both are related to wires, powering sensors, and getting data from sensors over a wire makes deployment limited to where you can run cable. I'm currently trying to lay out my senior design project in some attempt to address the wire issues if possible. I've looked at solutions for power from companies such as Power Caster and simple 315Mhz RF transmitters with a base station of some sort to collect data. While the cost of wireless communication is relatively low the power issue is not a cheap one to solve. Do you think people will be willing to put up with sensors they have to plug in or change the batteries in every ~6 months? And at price do you think it would become beneficial for mass adoption to include a technology like wireless charging into the "internet of things" idea?

Ken Boak said...

Matthias,

Supplying power to a device and getting the data from it are two of the biggest issues facing the electronic design engineer.

Low power radio is a good solution, and it is possible to get a system to function on only a few tens of microwatts of battery power. I designed a gas meter pulsecounter about 10 years ago which worked on a 3.6V lithium thionyl chloride AA cell and had a battery life of 10 years. Mean current consumption was 25uA. The micro was asleep most of the time, and when it woke up to send data every 15 seconds we kept the data packet short and the baud rate low (2400 baud).

With these low power requirements you might be able to work from a small solar cell (garden solar lamp), or possibly harvesting energy using a mechanical vibration or RF means. The TI website has a page describing various energy harvesting techniques based on their very low power 16 bit MSP430 microcontroller.

Good luck with your design project.

Ken