Technical Aspects of IoT

Know Your Application

In the previous article, we discussed about the Design Principles for Internet of Things. In this article we’ll go about discussing the technical aspects one needs to consider for practically designing IoT capable systems.

The design for Internet of Things is all about making choices, smart ones. We might have lots of options available, but which one to choose? Should we choose the most expensive State-of-the-Art devices or the cheap ones? What processing device shall I use? And many more such questions.

Making smart decisions for such choices is the most key thing to be considered. For making smart decisions at such points, we must follow the Golden Rule:

The application actually dictates all the requirements of a design. The questions one needs to consider while designing are:

  1. What Sensors are required for the design?

  2. Should we use a Microcontroller or some SoC with Linux Running on it?

  3. How do we connect the device to the internet?

  4. Does power consumption really matter?

  5. What about the cost and size?

You can already guess, the generic answer to all these questions is “IT DEPENDS ON YOUR APPLICATION” Now you might think, “We already know that man!!” Well… do you?? Let’s discuss the key components of an IoT Design a little more technically.

  1. Choosing a Sensor:

Well choosing a sensor feels like it is a simple Google search away, but does google know the IoT application you are working on? Let’s take a case of a Design Statement, where we have to design a product that monitors health machinery in an industry and we need to choose a sensor that measures the temperature of a ball-bearing put onto the machine. What first comes to our mind are the most widely used sensors in hobby electronics, DHT11 & LM35. But do they serve the purpose?

  • First let’s use some common sense, both these sensors require a wire to transmit data, but the ball-bearing in a machine rotate at high speeds! The wires from those sensors might twist and break within a minute after the machine starts off.
  • Secondly, lets follow the golden rule (KNOW YOUR APPLICATION), since these sensors rely on surface contact for temperature measurement, how are we so sure that the part of their surfaces (which aren’t in contact with the bearings) won’t heat up due to some other reasons?

  • What about the power consumption by these sensors? A quick look at their datasheets tell us that these sensors don’t have any low power modes. Therefore, they would also continuously drain power.

Now, what can we do? Well, let the application drive us, we now know that

1) We can’t mount sensors on the bearing.

2) We can’t rely on contact-based temperature sensors.

3) Low power modes in sensors may be an added advantage.

So now, let’s call google to our help, search” Contact-less Temperature sensors”. We might see many options the cheapest one being the MLX9061. Upon a small inspection of its datasheet we notice the following:

  1. I2C interface

  2. Measures temperature in the range -70°C to +380˚C

  3. Field of View (angle): 35˚

  4. Sleep mode with 6μA current consumption at 3.3v

Source : MLX9061 Datasheet from www.melexis.com

This sensor seems to serve the purpose very well, we just need to point it towards the ball bearing and it will measure its temperature without actually being in contact via the IR radiation it emits. Also, in sleep mode it consumes nearly no power, 6μA current is negligible. The only disadvantage of this sensor is its field of view, i.e. at a time it can accurately measure only one bearing’s temperature. Therefore, we might need to put one sensor for each bearing, significantly increasing our hardware & non-sleep mode power consumption.

Now imagine, you have an array of such sensors (MLX9061), on a single chip, it might give us a wider field of view. Now let’s google our imagination by searching, “Contact-less Temperature sensors array”. Well we might find another substitute called AMG8833 or the Panasonic Grid Eye. Again, a quick inspection of its datasheet tells us:

  1. 8×8 Array of sensors

  2. I2C interface

  3. Measures temperature in the range -20°C to +120˚C

  4. Field of View: 60° Vertical 60° Horizontal

  5. Output: 64 Pixels of Thermal Image

  6. Low Power Modes with consumption of 0.2mA at 3.3v

This sensor offers a better field of view, therefore instead of placing 10 MLX9061 sensors (cost=850*10=8500) for 10 bearings, we just might need to put 2 Panasonic GridEye Sensors (cost=3000*2 = 6000), giving an advantage of cost and Field of View.

Source : Panasonic GridEye Datasheet 

And here comes the most important part of IoT, THE TRADEOFF: Panasonic GridEye is better in terms of cost & field of view, but its power consumption is higher than MLX9061 and the temperature measurement range is way lower than that of MLX9061. So now the question is which one to use? The answer is again simple, our golden rule: DEPENDS ON OUR APPLICATION 😊:

  1. We may want a wider range of measured temperature in some application, in such a case we’ll get a wider range at the stake of higher cost and more hardware by using MLX9061.

  2. We might need an application with not so wide temperature range but lesser cost & hardware, in such a case we might consider Panasonic GridEye being the better options.

Now, is this the best possibility of all? We have the state-of-the-art sensors, low energy consumption, what else do we need?

Read the following research paper: https://ieeexplore.ieee.org/document/6476626

In this paper, the authors propose that one may measure bearing temperature more effectively using magnetism. They attach magnets to the bearing as shown in the figure taken from the paper mentioned above. When the bearing heats up, the magnets too, heat up. Heating of the magnets causes change in their magnetic field. That change in magnetic field can be simply measured using Hall-Effect Sensors costing nearly 50Rs. Now even if we put 10 of them, the cost would be less than a single MLX9061 sensor. Still believe state-of-the-art devices make good products? 😊

Again, is this the most optimized approach? Well, let’s try to think and apply our knowledge. As you all have seen, there are now magnets & rotation, can we think of something? If we think smartly, if we put two broken arcs of magnets on the bearing, we will get a changing magnetic flux upon constant rotation if the bearing, if we put a small transformer circuit, we might be able to actually generate power & recharge our product’s batteries! Thus, we may indeed harvest energy using this smart trick & not worry about power consumption anymore! Since we are harvesting our own power always, we just need to charge batteries for the first run!

Such solutions have no limit, don’t limit your mind & keep thinking smartly!

2. Choosing a Processing Device

Now, after we have chosen the sensors for an application, the next part is what should we connect them to? What processing device shall be chosen in order to interface the sensors & process their data. As of the present situation, there are the following options for processing devices:

  1. Microcontrollers
  2. SoC (Single Board Computers)
  3. FPGA

Technology with FPGAs haven’t yet penetrated the industries & markets as yet so our discussion would be limited to the first two devices. Now the question is when to use Microcontrollers & when to use Single Board Computers. The answer is again the Golden Rule:

DEPENDS ON THE APPLICATION!

WHEN TO USE MICROCONTROLLERS

When the tasks to be performed are very deterministic in nature, one should go for Microcontrollers. In other words, if the processing device has to do tasks such as i) read sensor data, ii) display them, iii) check if alarm needs to be switched on, iv) transmit data, v) Go to sleep for 1 minute. For such tasks microcontrollers are the best choice. For more critical tasks which involve deadlines, for e.g. a sprinkler needs to turn on under 2ms after the detection of Fire, Microcontrollers may run light OS called Real Time Operating Systems, which aren’t a point of discussion of this article. Microcontrollers also help us achieve a small design principle of IoT i.e. Decentralization. In case of absence of a central control due to an emergency we may employ microcontrollers to make decisions on their own to safeguard their area of control. Thus, Microcontrollers maybe used for applications/devices that doesn’t have high processing needs & demand low power consumptions. Microcontrollers are the best choice when we need to design sensor nodes or low-processing power Edge Devices.

WHICH MICROCONTROLLER TO USE

Again, it DEPENDS ON THE APPLICATION, let’s consider the following cases:

  1. 8-bit/16-bit Microcontrollers: These may be employed when the tasks are small & we don’t need to use advanced peripherals like Ethernet, CAN or USB. These Microcontrollers can be employed for the sake of reading analogue data with a low resolution, low speed communication with devices etc. basically lesser peripheral requirements. Some common 8-bit Microcontroller families are AVR, PIC, STM8, MSP430 etc.

  2. 32-bit Microcontrollers: These maybe employed when the devices are required to perform huge tasks requiring a higher processing speed, a higher number of peripherals & advanced peripherals. For example , an application might require to host a Web Server displaying all the relevant data on a touchscreen panel (HID), or some application might require connection of various subsystems using CAN or ethernet, some applications might require Signal processing or even basic Machine Learning to be performed & data to be stored on an SD card on the node, the list is endless. In such situations using 32-bit microcontrollers becomes a necessity. Usually, these Microcontrollers come loaded with peripherals & features such as many low power modes, SD Card interface peripheral, Camera interface Module (peripheral), Ethernet MAC, USB OTG, along with dedicated peripherals for Motor Control & speed monitoring. The most commonly used 32-bit microcontrollers are based on ARM Cortex-M processor. Common Vendors include ST Microelectronics, NXP, Texas Instruments etc.

WHEN TO USE SINGLE BOARD COMPUTERS

Single board Computers might be employed when the tasks to perform aren’t deterministic, for example a person monitoring a factory using a Touch panel interfaced to a Single board computer, the person might command it to perform any task at any time, he might ask him the status of some area , then command it to increase coolant flow to some part etc. Such devices usually form the Edge Devices in an IoT network. Since they have better internet connectivity options, better options for making a responsive GUI, hosting a local server, higher processing power to make decisions faster, capability to run Machine Learning algorithms, all of this at once. Usually they have a General-Purpose OS Running on them, which allows them to do a huge amount of processing in no time. They also have the option of connecting to a cloud almost instantly. So, all the heavy processing that it might not be able to do can be outsourced to a cloud platform which can then store, process and even send back the processed data. Their speed also helps in faster routing, supporting decentralization. Some commonly used Single Board Computers are Raspberry Pi, NanoPi, BeagleBone etc.

3. Forming a Network

This is the most important part for a device to be attached with the label of “IoT”. Most of us have the illusion that it is necessary to connect device to the internet for making an IoT application. Well, again that DEPENDS ON THE APPLICATION. For example, you might simply need to build a system that can be controlled through your mobile phone to switch on appliances, that doesn’t need internet, we can simply use Bluetooth for that, or we could also use GSM for that matter. We might also network the appliances together. But how to form this network? And what topology to use?

Well, there are mainly two topologies, Mesh & Star, Star Topology as shown in figure, is used when multiple nodes need to connect to a single Master node. For example, all the appliances of the house maybe connected to a master node via Star Topology. The master node can be connected to the internet & provide remote access such as switch on your room’s AC when you are leaving from the office. Mesh topology is used where the number of nodes is so large that many nodes aren’t even in the range of Master Node. In such a case, a node at the corner may relay its data to its nearest node which then forwards both packets (its own and the one forwarded to it) and the process goes on until the Master Node is met. Such a topology is useful at places such as agricultural fields. The advantage of mesh is that even if a node stops working, the other nodes would be able to route their data via a different node.

The following are some technologies that can be used to create Networks:

  1. Ethernet (Wired)

  2. Bluetooth (Wireless)

  3. Zigbee (Wireless)

  4. Wi-Fi (Wireless)

  5. Wireless HART (wireless)

  6. Z Wave (wireless)

Author : Pranjal Shrivastava

Pranjal is an Electronics & Communications Engineering Student, completed 3rd Year at Institute of Technology, Nirma University, Ahmedabad .I n the initial years, he was in the Robocon Team of college where he got interested into Robotics , mainly concerning Robotic Drives , Motion & Path planning. Along with that currently his fields of interests are Internet of Things,  Embedded Systems & Re-configurable Hardware. He has done few projects as  Mini Projects in college & currently working to publish a paper on one of those projects.

Thanks for reading till end. Please provide your feedback regarding this article.

Embedkari has introduced its first low cost technical training .

You may like discussion on RISC-V .

Also subscribe  Embedkari for other interesting topics. .

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.