Apologies
Firstly, apologies for the lack of comms recently. I was in the midst of writing this blog when I was taken into hospital with a burst appendix. It was a bit of a long haul so I’ve had a couple of weeks off, but I’m home and recovering so should be back at the project now.
Whilst recovering in my hospital bed I did wonder if perhaps I had chosen the wrong category and should have gone for “In the Air Tonight” instead. Then I could have taken the kit into hospital with me and measured the quality of the air on the ward or even in the operating theatre! Anyway I decided that they would not have allowed me to bring a random breadboard with lots of dangling red wires into theatre anyway, “it’s not a bomb, honest, it’s just my experiment!” - I didn’t feel up to having that conversation. So “Intellilight”, my adaptive smart bulb controller project continues...
Recap
In my first blog I introduced the project idea and in my previous blog I outlined the schedule for this project for the Summer of Sensors Design Challenge. The project is a low cost, adaptive smart bulb controller using a proximity sensor and an ambient light sensor from Vishay. The proximity sensor will be used to automatically turn the light on and off when the user sits down next to the light. The ambient light sensor will be used to control the brightness of the bulb to equalise with the ambient light level and reduce eye tension.
In today’s blog, I will be summarising some of the research undertaken surrounding smart bulb technologies with the aim of selecting a suitable smart bulb to start testing with.
What is a Smart Bulb?
For those who do not know, a smart bulb is a light bulb that connects to a wireless network and incorporates a remote control interface, usually via a smartphone app. Smart bulbs can be connected directly to a smartphone (point to point network topology), connected to another smart bulb (mesh topology), or connected to a central hub.
Generally most smart bulbs use an LED (Light Emitting Diode) light source rather than traditional incandescent, halogen or flourescent light bulbs. This provides many advantages including reduction in power consumption and the ability to digitally control the brightness and colour of the emitted light.
Smart bulbs, like regular light bulbs, are available in most of the standard fittings. This is identified by a single letter followed by a two digit number. The letter designates the fitting type, “E” for “Edison Screw” and “B” for “Bayonet”; the number indicates the diameter of the fitting. For example, the two most common light bulbs in the UK use the E27 (27mm diameter screw) and B22 (22mm diameter bayonet) fitting.
Smart Bulb Protocols
There are literally dozens of manufacturers of smart bulbs and they can be bought individually or as part of a kit, so it is important that we select the correct one for this project. The manufacturer is not particularly important in our case, but the technology used to communicate with the bulb is. Wi-Fi, Bluetooth and Zigbee are the most common protocols used in Internet Of Things (IoT) systems. The first two I’m sure everyone has heard of; the latter is probably less widely known unless you have done anything with IoT in which case you probably know far more than me about it.
Zigbee
- Based on the IEEE 802.15.4 standard but with enhanced security features (128-bit AES encryption).
- Supports mesh network topology (device to device rather than device to central hub). Each node can self discover on the mesh network and as more and more nodes are added, the routing paths automatically reconfigure to allow the best connection between all the nodes.
- Very low power consumption (with battery operated devices in mind); ideal for IoT sensors in remote locations where changing the battery is not ideal. They utilise a special sleep mode which turns off the RF (Radio Frequency) circuitry when not transmitting.
- Low bandwidth (250kb/s) as it is not designed for high data traffic (like WiFi). This technology is designed for low rate, intermittent transmissions (e.g. to signal a bulb to turn on, or a temperature sensor reporting its latest reading).
- Although Zigbee operates on the same frequency as WiFi (2.4GHz in the UK), the RF output power is typically lower (1mW = 0dBm), therefore the signal range is reduced in comparison. The range varies depending on the surrounding conditions but typically might be around 30 meters line of sight. Having said that, the range can theoretically be extended due to the mesh topology if the nodes are spread out in a linear pattern allowing them to leap frog off each other. In this setup, one node can send a command to its nearest node and then the nodes can keep relaying the command until the correct node receives its intended command. The shortest path from one node to another node will be defined in the routing table which is updated each time a new node is added so the nodes will know exactly where to relay the command, rather than just randomly passing the command on in the hope it will eventually be received.
Wi-Fi
- Everyone is familiar with WiFi technology, so I won’t go into much detail here. In many ways it is very similar to Zigbee, however there are a few slight differences which may aid the decision making.
- It is based on the IEEE 802.11 standard and has a higher power consumption (typically 100mW = 20dBm) which in turn means the range is greater, however, this does mean that battery operated devices will suffer more. If the device is powered from a mains socket, then maybe this is not so much of a disadvantage, but for remote IoT sensors, supporting full power WiFi modules can be very battery-draining. This can be improved with power-saving techniques but is not comparable to Zigbee which was specifically designed for low power IoT applications.
- WiFi operates on both 2.4GHz and 5GHz (in the UK) and supports wider bandwidths, however the higher data rate is overkill for IoT applications because they only require intermittent commands and a little bit of data (e.g. for sensor readings).
- One advantage of WiFi is that most people already have a WiFi system fully setup in their homes, so there is no new infrastructure needed. They simply connect their new bulb to the WiFi router and it will immediately be accessible.
Bluetooth Low Energy (BLE)
- Bluetooth Low Energy, or Bluetooth as we usually call it, is low on cost (due to the simpler RF design and performance requirements), low on power consumption (due to the low RF output power) and typically quite short range (10m/100m).
- Bluetooth supports point-to-point connection topology meaning the controller (e.g. a mobile phone) connects directly to the device. This means that you cannot control multiple end points (e.g. light bulbs) simultaneously – you have to disconnect from the first bulb in order to connect another bulb. This is not ideal in scenarios where you have a room setup with multiple bulbs and want to dynamically control the whole room.
Summary
So we’ve discussed the three most common protocols used to connect IoT devices. Now to choose which one to use for this project.
From the pros and cons listed above, it is quite clear to see that Zigbee is a very good choice for a fully-fledged IoT system. Bluetooth is cheap and easy to integrate with. WiFi is very common. If I was designing a new IoT application from scratch then I would probably go down the Zigbee route, and there are many Zigbee-enabled microcontrollers on the market nowadays.
However, I had to remind myself why I was doing this project – what was my aim, objectives and project brief? Well one of my main aims was to target the non-tech-savvy audience. To make something cheap and easy to use for those people who already have a smart bulb and never use it because they are not interested enough or cannot afford to spend money on a whole smart system with a hub and everything. So looking at the above from this point of view, I don’t think it would be best to target a Zigbee lightbulb because someone who has bought one of those is most likely already into the whole IoThingiverse and probably has many other Zigbee smart devices on their mesh network – they often come in starter packs with a few light bulbs and sockets.
So having thought carefully, the WiFi light bulb is probably the best candidate here, and connecting to a WiFi smart bulb will be dead easy with an ESP8266 or ESP32 micro-controller.
What’s Next…
As always, thank you for your interest in this project and taking the time to read this blog!
Yesterday I finally received a notification from UPS that my kit was on its way. Yippeee! So expect my next blog to be an unboxing, and maybe we’ll get to connect it up and turn it on...
Prev Blog (Part 2) | Next Blog (Part 4) |