A Guide for selecting the right microcontroller for your IoT project

Feb 15, 2018

The Internet of things(IoT) is enabling our hyperlinked world to get even more connected. Microcontrollers are a tiny, self-contained computers hosted on a microchip. They enable connectivity and control in all the things which could be connected to the internet. Microcontrollers are designed to perform specific functions, and they can be integrated into almost anything ranging from industrial equipment, warehouse inventory items, wearables devices, to home appliances and much more.

The difference between Microcontroller and Microprocessor

Microprocessors are different than microcontrollers in their design. Microprocessors have the only CPU inside them and no in-memory support.

Microcontrollers, on the other side, has CPU, RAM, ROM and other peripherals which are all embedded on the chip.microcontroller-microprocessor

At times it is also termed as a mini computer or a computer on a single chip. At the moment, there are tons of microcontrollers with a wide range of features designed for different use-cases.

Microcontroller types for IoT devices

Manufacturers produce different microcontrollers with different specification and configuration. Hence, microcontrollers can be divided based on memory, architecture, and bits.microcontroller

For Instance, below are some microcontrollers based on bits:

  • 8 bits microcontrollers which are used to execute logic and arithmetic operations.
  • 16 bits microcontrollers perform operations with greater accuracy and better performance.
  • 32 bits microcontrollers which are usually deployed in appliances, and medical devices. They can carry out arithmetic, as well as logical operations.
  • 64 bits microcontrollers

Microcontrollers based on architecture:

  • Von Neumann: In this architecture, the CPU communicates with a single data and address bus, to RAM and ROM simultaneously.
  • Harvard: In this architecture, the CPU has two separate buses; those are address bus and data bus to communicate with the RAM and ROM.

Which microcontroller is right for your IoT needs?

If you’re building an IoT product, the selection of a right microcontroller will determine the success of your product. For Instance, there is no point in adding a 1MB RAM, and high-power microcontroller in a smart home appliance product.

The leading architectures used by ⅔ of the IoT developers and organizations are:

  • ARM
  • MIPS
  • X86

The selection of the microcontroller heavily depends on the functional requirements of your IoT product, like does it require low power, or high-performance, wireless connectivity, or high-end security.

Often, IoT products in industries are more complex and have more computing power and energy constraints. Thus, it requires more niche but advances criteria to assess your microcontroller needs.

On that note, we have handpicked some major criteria to evaluate which microcontroller is right for you.

Processing Power of Microcontrollers

Processing speed is critical for IoT products, while some IoT products can run at low speed, but some require the microcontroller to provide a higher speed, so they can execute more demanding tasks.

Your IoT device could be small or large, it can perform a simple sensing function or send raw data back to control center. It can even collect data from more than one source, perform local analysis and then execute a request.

Regardless of the features, environment, and their operational activities, the microcontroller needs enough processing to execute the functions and tasks.

Memory capacity of Microcontrollers

Microcontroller selection based on the amount of memory is significantly important, as the processing speed, and overall performance of microcontroller depends on the memory size.

Different microcontrollers have different memory capacity, usually in two components:

ROM: It stores the application program in the microcontroller. Bigger the size, the more complex it becomes.

RAM: It usually performs two functions i.e. reads and writes to the stored data. Additionally, it holds the data to be analyzed by the processor and take an action.

For memory size information of major Microcontrollers, check the original version of this article on our website.

Power consumption in microcontrollers

Microcontrollers, first and foremost need to be energy efficient for IoT products. Often manufacturers who are building microcontrollers for IoT devices, face performance and power challenges, especially for wearable and battery-powered devices.

For Instance, a microcontroller in a smart thermostat that wakes up every once and while to check the temperature and adjust the Air conditioner temperature based on its findings.

In the above case, the microcontroller would consume lots of power, where it supposed to consume as little as possible.

Fast Wake Up time(RPC) in Microcontrollers

Ultra-low power applications generally spend the most time in the lowest power mode, wake up to perform a task or measurement, and then quickly re-enter the lowest power mode.

Therefore, it is extremely important to select an MCU with ultra-low power consumption and the fastest wake-up time.

A relatively slow wake-up time results in wasted energy because the MCU cannot perform any additional tasks during this time. As a result, MCUs with a slow wake-up time cannot achieve the optimal low-power consumption required by IoT connected devices.

Network Connectivity interfaces in Microcontrollers

Microcontrollers use network interfaces to interact with other devices locally and to push the data to the IoT application for any analysis.

Moreover, they are designed to support one or many network protocols like Wifi, Bluetooth, Cellular networks like 2G/3G or even RFID.

IoT devices can be either connected through a wired connection like in smart buildings, and homes or it can connect through a wireless connection.

Hence, you have to determine the utility of your IoT device, and then its network requirements.

Check the network interfaces supported by major microcontroller here.

Hardware and operating cost of microcontrollers

The cost of the microcontroller can vary for different use-cases. Furthermore, some microcontrollers even charge some licensing fees for specific device drivers, but as you scale up your project, the overall cost will offer you a better value.

For the hardware costs check the table on our website.

Community, and Manufacturer support for Major Microcontrollers

To be more specific, Documentation, manufacturer and community support is crucial to develop your IoT project.

A comprehensive documentation helps anyone who is using the microcontroller for the first time and need guidance and information to make the informed decisions on the specifications, features and how to program and use it.

Furthermore, Manufacturer support is something that’s most likely to be there, but community support is crucial because it’s the place where you will hear about actual problems, implementations errors, and all the secrets to innovate your product.

Although, Community support sometimes lacks for the microcontrollers developed by a new vendor, so it’s always nice to do find small communities related to that particular microcontroller.

Number of Input/Output Ports in Microcontrollers

The ports in the microcontroller act as input channel from the sensor to the device, and output channel for the device to sensor communication. The I/O ports can be digital or analog.

The digital ports process simple logic like yes or no type input. Moreover, Analog ports are for continuous input/out. For Instance, temperature, or speed.

Depending upon your IoT product requirements, you might need few or many ports. Hence, once you define the data format and other requirements, you can determine the microcontroller based on the type and number of I/O ports you need.

Microcontrollers security

In the digital age, securing data is the biggest concern for microcontroller designers and the end consumers who are using the IoT device.

Often, the manufacturers of major microcontrollers deploy security measures such as data encryption and shield layers to prevent the access from any malicious activities.

Furthermore, they are building more specialized security chips that can be integrated with the microcontroller to securely store encryption keys and user credentials.

On that note, following are some standard security features that every developer should evaluate before selecting the microcontroller:

Protection from Tampering, and Reverse engineering

Often attackers put injected code into the targeted IoT device, or the microcontroller. Once the code is successfully injected, they execute it to take full control of the device, and its brain .i.e the microcontroller.

Moreover, microcontrollers also open up your device to reverse engineering problems, where someone can differentiate some features by putting some algorithms into the device, and benefits from your innovations.

The consequences can be bad, depending on the device and its use-case. To prevent these kinds of attacks, some microcontrollers have built-in tamper detection, which detects these activities and protect the device from becoming a botnet to attack others on the same network.

Cryptographic bootloader

Manufacturers often release firmware and other security updates for the microcontroller, and cryptographic bootloader provides a secure update.

Basically, the bootloader encrypts the security keys before the update which prevents any information leaks during the update process.

Cryptographic hardware accelerator

The cryptographic process of encryption and decryption consumes memory and processing power of the microcontroller, which slows down other activities or events which are scheduled to be executed.

Sometimes manufacturers integrate a hardware accelerator with certain algorithms in the microcontroller to speed up this process.

Aside from the accelerator chip, the cryptographic efficiency pretty much depends on the algorithm they’re using.

Conductive shield layer

The microcontrollers often use network interfaces like Bluetooth, Wifi etc to communicate with other devices, or with the application. Sometimes attackers use a strange algorithm to read the internal signals to get inside the microcontroller and controller the device.

Conductive shield layers prevent any sort of reads and write on the internal signals.

On a final note, if you, as a developer or an organization, looking to adopt a microcontroller for your next projects, look for the availability of these security features.

Memory protection Units in IoT Microcontroller

Memory protection units are usually deployed in the microcontroller to define access rules to memory locations, which helps the microcontroller to control what memory can be read, written, or executed.

Although, Memory protection units don’t come in-built with microcontrollers as some manufacturers integrate it with the microcontroller, and some don’t.

Hence, it is recommended to choose a microcontroller which supports the integration of memory protection units.

Conclusion

IoT devices often have demanding requirements of high performance and low power microcontrollers which offer the highest level of integration with available peripherals and software stacks.

With over 100s of microcontrollers available in the market, I hope this guide will help you evaluate them and make the right decision.

Check the full article here.

Atit BhavsarThis article was written by Atit Bhavsar, who has 7+ years of experience in defining and delivering complex connected products and solutions to Food & Beverages, Manufacturing, Oil and Gas, Retail, Transportation, Financial, and Communication/Media/Entertainment industry. 

The post A Guide for selecting the right microcontroller for your IoT project appeared first on Create a culture of innovation with IIoT World!.


Other news

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Interchange Terms and Conditions