Friday, 4 June 2010

6LowPAN: the "Tiny" Internet of Things

It's been a while since I wrote my last post in this blog. My researches on the available wireless technologies have taken some time and I wanted to be really sure before choosing the correct solution for my next projects. Besides, the crisis in the European market has forced me to invest more time in the research of projects for my professional activity. A good number of companies have stopped their investments, mainly in the home automation area, and only those projects with obvious commercial perspectives are being taken ahead. This is specially true in Spain, where I'm supposed to obtain the most part of my contracts.

Back to the original subject of this post, I've been suffering from some bustle, where I used to spend days with any wireless M2M technology that could find a place in the market. Tons of documentations and discussions just to come into these simple conclusions:
  • Choose something open. Avoid chip-locked technologies.
  • Focus only on well supported technologies. Openness becomes useless if only a bunch of people is using such technology.
  • Scalability is something that you'll probably want. If not now, maybe in the future...
  • Pay attention only to those well-constructed standards. Some pseudo-standards are constantly pushed by “commercial forces” so they end by releasing new revisions, not really compatible with the precedent ones.
This said, people from Freaklabs suggested me to look into 6LowPAN as possible technology for my projects. Later talks with wireless M2M specialists confirmed this suggestion so I decided to further investigate this option.

6LowPAN (IPv6 over Low power Wireless Personal Area Networks) was created by an IETF working group as a way to overcome the current gap between Wireless Low Power and the IP world. Some people may say that this was already achieved by Wi-Fi but this is not true since Wi-Fi is far from being low power. As an example, 6LowPAN allows and promotes the development of wireless IP motes capable to run from a single coin battery for years.

Let's accept that 6LowPAN's concept is quite revolutionary, but how can a low power sensor enter the complex IP cloud? 6LowPAN nodes communicate over 802.15.4 in fact. Then, a smart data compression is done in order to to facilitate the transport of IP data into IEEE 802.15.4 frames. Finally, the 6LowPAN stack shows the way to stablish low power IP communications between wireless nodes and maintaining routing paths between wireless low power and conventional IP networks (Ipv4 and Ipv6). At the end, programming low power IP meshes should be as simple as developing with POSIX sockets from a PC.

Another good point about 6LowPAN is its openness and level of standardization. IETF is behind this movement so this is quite comprehensible. Moreover, 6LowPAN has had the opportunity to learn from other's mistake: no member fees, no royalties, really open and free of use. Unlike other wireless standards, 6LowPAN's philosophy perfectly fits the open source concept. As result, we're assisting to an important number of open initiatives by companies and individuals to bring this technology into real applications.

Tuesday, 30 September 2008

Touch technology - Hiding buttons anywhere

The touch technology is something very common in our lives nowadays. Elevators, PDA's, cell phones, anything potentially controllable by the end user can incorporate this technology, simple to use but somehow complicated to implement.

The target of this project is to develop a capacitive touch button panel that could be mounted behind any non-conductive surface, mainly plastic and glass. This experiment aims now to produce a 5V signal when a button is touched (or almost touched) but next evolutions of this project should incorporate some kind of communication interface to report button changes to the bus. For example, the addition of a DS2406 would allow the panel to communicate with our opn-one or any other 1-Wire master.

This project came to my mind when I began thinking in the way of putting hidden buttons behind bathroom mirrors and under methacrylate tables. Installing conventional mechanical buttons often affects the aesthetics of the room so why not putting one of this panels instead?

The complexity of the touch panel has been reduced to the minimum. This version is only formed by a linear voltage regulator, two QT100A capacitive detectors, two touch keys directly built on the PCB and two LED's to give visual feedback of the key activation. I will try to post the schema once I tune a couple of capacitor values. Meanwhile, I leave here some pictures of the project and a demonstration video.

Rear view of the panel. The capacitive keys are directly built on the copper layer.




Front view of the panel. As you can see, it is a single side PCB. This side can be




Panel mounted behind a picture frame




This video shows how the panel works when mounted behind a non-conductive surface




Sorry for those having asked about the schematics some time ago... Here you have the shematics:


Batteryless magic

In the past ten years, at least a dozen of wireless technologies have appeared with the intention to cover the retrofit Home Automation market. Among them, Zigbee and Zwave seem having taken some advantages over the rest mainly due to the fact that any company can develop compatible products at relative low cost. However, even not being as popular and as broad adopted as the "Z" technologies, a German solution takes strongly my attention and makes me imagine very good successes for the next years.

EnOcean, a spin-off company from Siemens, was founded in 2001 over some unique patents that allow their wireless sensors work without batteries. At this point, I think that nobody could find any argument against the originality of such feature; wireless sensors that don't need of a human maintenance forever... The more I think about this, the more I'm sure about the success of this solution. But we technical people need to know more about how this magic works.

EnOcean, as Zwave, is the company that provides anyone wanting to develop products under the technology with the OEM RF modules and integration tools. Besides, EnOcean also sells the energy harvesters, the actual kingdom treasure. EnOcean acts then as OEM provider, promoter and owner of this technology, having created this year the enOcean Alliance formed by more than 25 companies (Siemens among them).

This technology was designed simple and easy to use. The product portfolio is formed by transceivers, receivers and transmitters. Transceivers and receivers are the most common devices; they need obviously of an external power source as they are always alert on the reception of a transmitter message. Transmitters, on the other hand, sleep most of the time and only wake up at the moment of reading values and sending data to the receivers and bidirectional transceivers. Needing much less energy to work than the receivers, EnOcean transmitters are specially designed to be powered by their patented energy harvesters. EnOcean wall switches take the necessary energy to send on/off (or up/down) commands from the mechanical action deployed onto the switch button and the scrolling of a magnetic ferrite into a coil. Temperature and humidity sensors are powered by small solar panels that can bring power even in conditions of relative darkness. EnOcean is even working in a wireless sensor that could take the power from the current generated by the Peltier effect.

But what could be limiting the adoption of the EnOcean technology? EnOcean compatible products seem having a relative success when combined with other building automation technologies as EIB, Lonworks or BacNet. Nevertheless, only the transmitters can be integrated with other technologies as only transmitters have unique addresses that make them identifiable in the network. In this case, the simplicity of this technology could be limiting the use of EnOcean's receivers in large intelligent networks. Besides, the price of the OEM modules is still expensive. Excessive price and the lack of addressing and acknowledgment at the receivers side could be somehow complicating the deployment of EnOcean wireless modules in standard home automation installations.

Some of the news coming from EnOcean could be pointing to the direction of solving some of these issues in the future. It seems that the German company could be working in a new protocol specification that would simplify the bidirectionality and addressing of receivers. Perhaps a wider use of this technology would reduce production costs and would let us users introduce this magic technology into our homes at lower prices.

Link to EnOcean website

Saturday, 27 September 2008

Zigbee Smart Energy solutions

After being a little rough with Zigbee in the past and complaining about the lack of products compatible with the Home Automation profile, I must admit that this standard has done a lot of progresses in the Energy Management area during the last year. Whilst the big companies don't dare to release Zigbee compatible devices for the Home Automation market, other smaller companies specialized in the Energy sector are surprising us with smart solutions for saving energy and controlling our bills. It's obvious that the offer of solutions for energy management applications has traditionally been much smaller than the portfolio of technologies commercialized around the Home Automation market. This fact translates into a less exposed market, less competitiveness and a lack of primitive prejudices. We also may take into account how vertical is the Energy sector compared with the sometimes ambiguity of the Home Automation environment. Even though, nobody will be shocked if we include the energy management as a part of the home automation ecosystem. But the reality is that a dozen of companies, sponsored by utility companies in some cases, have decided to release specific products for Energy Management applications. Most of these smart energy solutions have been certified by the Zigbee alliance and claim to be strictly compatible with the Zigbee Smart Energy profile, meaning that the products are interoperable between them.

Plug-in modules measuring the energy consumed by the appliance connected to the outlet, thermostats displaying temperature and energy costs, energy meters transmitting data to a central point, are some of the offers designed under the Zigbee logo. Around this range of products, utilities, web portals and end users are offered a way to control and monitor the energy consumption (and production, of course) and saving resources in the interest of a better sustainable development.

Link to the list of Zigbee Smart Energy Certified Products

Thursday, 1 November 2007

Balanced designs - choosing the correct technology for a new product

"Balanced design" is a concept that I often use in my reports during the initial definition of architectures for embedded controllers. It's a term that I invented to describe the proportion between device functionality and platform power. Device functionality is the set of functional features provided by the device (ex: amount of control points, graphical interface, communication channels, processing speed, etc.). Platform power gives an idea about the amount of technological resources invested in the controller, most of them hardware capabilities but others related to the operational system (software) itself. Note that this term is only used by me into my projects, mainly embedded controllers and gateways but I guess that it could also be applied to any technological solution in the market. On the other hand, the concept only tries to serve as a parameter when comparing and choosing technical solutions. It should never be used as a way of evaluating the commercial aspects of a product. Unfortunately, technical excellence doesn't always translates into commercial success.

Thus, when could a device be considered technologically balanced? Rating the "balance" of an electronic product depends on the following points:

- Functionality provided by the device
- Speed of processing
- Immunity to faults
- Configuration and programming capabilities
- User interfaces
- Communication channels

In other words, prior to quantify the balance of a product, the product itself must comply with its specifications and provide the functionality that is supposed to have. After that, the platform power is then evaluated. The optimum balance of a device is reached when the chosen platform fits but doesn't exceed the needs in terms of computing. Thus, a product could not be well-balanced at the beginning of its life but gain in functionality and then improving the technical balance progressively with the release of new versions. On the other hand, a device with an overkilled hardware platform and an unnecessarily costly OS will always present a low technological balance.

But which is the interest of providing a good technological balance? I summarize the most interesting points of following this philosophy:

- Avoid unnecessary power consumption
- Simplify the maintenance of the product reducing the amount of components
- Provide an optimum embedded solution
- Show the appearance of a compact product
- Avoid unnecessary noise and production of interferences
- Reduce the overall costs of the product

Zigbee: another "unstandarizable" standard?

It seems that Zigbee is finally following the steps of other "promising" standards. Started in 2003, Zigbee appeared as the solution for all our frustrations in terms of interoperable wireless control. Most important manufacturers were there, supporting the emergent standard and publishing imminent dates for the release of new products. Any Zigbee device from any manufacturer was going to provide total interoperability with any Zigbee compliant product. From light control systems to thermostats and even remote controls for the multimedia equipment, this standard made us think that the total solution for controlling devices wirelessly was just arriving. The massive production of Zigbee compliant devices was initially announced for 2004, then 2005, ... Now, three years after the rings and bells, Zigbee is still in the oven.

This article doesn't pretend to question Zigbee itself as technology. Indeed, Zigbee was started on a solid technological base. Based on a well defined low-level standard as IEEE 802.15.4 and providing support for different frequency bands, a great amount of IC manufacturers soon released Zigbee compatible interfaces and OEM modules. The price of the new RF controllers corroborated the promise of producing really low-cost devices and the presentation of a couple of prototypes in some international exhibitions removed the doubts of some of the most critic technologists. Moreover, the wish of the Zigbee organization has always been to provide reliable-interoperable low-cost devices.

Thus, what happens with these international standards? Why is moving these things ahead so hard? This is the actual subject of this article.

Communication standards are often created as a way of sharing costs and resources among the promoters. Besides, a company wanting to develop a product under a certain standard will find a communication protocol already defined and even the availability of well-tested platforms where to start developing from. But the companies creators of the standard always assume the extra work and costs of participating in the definition of the new technology. As result, these companies usually try to impose their decisions, all them based on their own commercial and technical interests. When a committee is formed by dozens of members, each one with its own market and a precedent technological basis, the negotiation process becomes complicated. Mainly when the members are big companies that don't worry about the costs of delaying the release of the new technology up to the infinite.

In contrast to these open standards, other "de facto" standards leaded by a single company producing a one-chip solution get sometimes better results. This is the case of Lonworks, a technology created and promoted by Echelon. But I don't mean that "democratic" open standards have a worse future than proprietary ones. Some open initiatives as CanOpen, Devicenet, EIB, BacNet, etc. are example of collaboration among companies and academic institutions. The secret of the success is maybe in understanding that interoperability is something positive for the market.

TCP/IP vs field buses for control applications. The eternal discussion

Why not use TCP/IP for control applications instead of those complicated field buses?. Indeed, this discussion is appearing every day in most environments with control needs. But which are the typical positions around this subject?

Software engineers typically defend TCP/IP as communication channel for control applications. Their main argument is that this communication channel can be found in most computers and appliances nowadays. Moreover, Ethernet and Wi-Fi hardware interfaces present low prices compared to some years ago.

TCP/IP is one of the few channels that allow combining big packets of data with short control-oriented messages. This feature makes this technology specially suitable for home applications where multimedia and control can share a common communication system. Besides, Ethernet-certified cables and RJ45 connectors are very cheap compared to some control-oriented cabling systems. Most buildings already contain a LAN infrastructure with the necessary hardware and connecting IP control systems to those infrastructures is as easy as installing a new computer in the LAN.

On the other hand, control engineers don't usually like the idea of relaying on the TCP/IP technology for controlling critical applications. Furthermore, Ethernet follows a physical star topology and this complicates the installation process in networks with big amounts of endpoints. On the other hand, Wi-Fi is often avoided in industrial environments due to the electromagnetic noise potentially produced by this technology. Control-specific technologies usually follow a bus topology, reducing cable runs and providing a separate communication channel for the control messaging. Control interfaces as CAN, RS485, Lonworks, LIN and others can be used with low-power microcontrollers as the communication protocol is often easier to maintain than the TCP/IP stack. These simple controllers participate in the bus as listeners, transmitters or both but will never have to worry about a possible overhead of information coming from a computer or a media server.

Nevertheless, integrators know that TCP/IP is an excellent complement to the industrial control solutions. Ethernet is still the natural way of connecting a PC to a network and the inclusion of the web technology in remote monitoring applications force us to mix somehow the best of both worlds. Multimedia, temperature sensing, web access, binary control, SCADAs, ... when all these applications have to be integrated into a single solution, then the use of a hybrid network is often the best solution.

The following schema, extracted from the opnode project, is an example of integration of TCP/IP and several control-oriented technologies:



As you can see, TCP/IP or "the green network" is used in the above example to transport multimedia data and also as integration point between different control technologies. The link between every control technology and the IP world is relayed on a high performance gateway that translates and filters the commands coming from both channels, avoiding then the overhead of data on the control side and reducing the amount of short commands on the IP LAN.

This architecture is being widely used in industrial and building applications. No matter which control bus is installed, it will be connected to the LAN infrastructure in some point.

After this explanation, a new term comes into focus: the cost per endpoint. This parameter gives an idea about the cost (price and power consumption) of controlling a single endpoint using a given technology or mix of technologies. IP controllers are more expensive in price and consumption. Thus, the only way of reducing the cost per endpoint is to add more control points to the device. This is the reason because most IP controllers are designed to control important amounts of endpoints whilst other less expensive control-oriented technologies provide devices controlling just the temperature of one room.