Selecting a microcontroller (MCU) for your IoT product
The ins and outs of Microcontrollers, and an overview of the difference between MCU and microprocessors (MPU).
What is (and Isn't) a Microcontroller?
A microcontroller unit (MCU) is a small, self-contained computer that is housed on a single integrated circuit, or microchip. They differ from your desktop computer in that they are typically dedicated to a single function, and are most often embedded in other devices (e.g. cellphones; household electronics).
What's the Difference Between a Microcontroller and a Microprocessor (MCU vs MPU)?
Microcontrollers also differ from microprocessors. Microprocessors contain only a CPU, and therefore require added peripherals to perform tasks. MCUs, on the other hand, contain RAM, ROM, and similar peripherals, which allow them to perform (simple) tasks independently.
Ultimately, despite similar names and appearances, microcontrollers and microprocessors differ widely in their applications. Microprocessors are more powerful, but must be employed as single components in larger systems to function. Microcontrollers, meanwhile, are limited in power and functionality, but can perform simple functions independently. Your Apple TV, for example, requires a microprocessor to handle all the varied and demanding tasks it performs. A connected coffeemaker, on the other hand, only needs to perform simple routines and tasks, and therefore employs a microcontroller.
What is the difference between a microcontroller (MCU) and a system-on-a-chip (MCU vs SoC)?
The other term one hears often in this discussion is System on a Chip (SoC). The distinction between an MCU and an SoC is much less clear, and the two terms are often used interchangeably. However, in common usage, the term SoC typically refers to MCUs with a greater number of onboard peripherals and functionality. For the purposes of this outline, we won’t make a distinction between MCUs and SoCs.
Why use an MCU for IoT
Simplicity
In most IoT use-cases, the relative simplicity of an MCU is an advantage rather than a disadvantage. MCUs don’t require operating systems to function, and are easy to interface with external devices such as sensors and motors. Their lack of external dependencies also makes them easy to set up. You can simply turn them on, upload firmware, and they work. Additionally, the coding required to program an MCU is minimal.
SECURITY
By virtue of their relative simplicity, MCUs also offer fewer avenues of attack. As a rule, each open port and available IoT protocol is also a potential vulnerability. Code on MCUs runs “bare metal”, meaning it includes no intermediary operating system to execute instructions. This results in limited potential attack vectors and increased inherent security.
Cost
In most contemporary IoT applications, an MCU can deliver all the processing power and functionality one needs. As a result, MCUs are most often the best, most economic hardware choice for IoT applications. Overall, they offer simple, secure, functionality for little cost.
Which MCU is Right For You?
Tech Specs
Which technical specifications your MCU should have will depend entirely upon its intended application. The relative importance of specs such as processing speed and memory capacity will be different from use-case to use-case. For example, An IoT device meant to perform more demanding tasks will necessitate an MCU with a higher clock speed. Less processing-intensive tasks, however, may not necessitate such high-performance hardware. That’s why it is imperative that you clearly determine your technical needs before deciding upon a specific piece of technology. Overall, primary spec considerations include: memory; speed; power use; security features; and connectivity type (Bluetooth/Wi-Fi/Cellular).
Cost
All these technical specifications will be invariably weighed against their cost. Although the cost of MCUs is rapidly decreasing, added power, memory, and other specs will generally result in increased costs. While the costs of hardware may not seem daunting initially, increases in scale can quickly amplify even minute differences in hardware price. At the same time, selecting an MCU with only the bare minimum specs required to function may leave you unable to implement updates, new features, and other improvements in the future.
Support
When selecting an MCU, it’s also important to consider the community surrounding it. MCUs with limited adoption will have fewer resources available to aid you in development. Devices like the Photon, on the other hand, already have large communities of users and developers, which makes it much easier to find information and support when needed. With a community of over 100,000 developers and engineers, the Particle platform has a wealth of resources available, including sample projects, demos, and development tools. Also, by selecting a more widely adopted MCU, you will ensure that integrating your IoT device with existing cloud services will be easy.
Looking Beyond the MCU
Your IoT product is a system, not a component. When planning any element of your design, it’s important to take into consideration the full stack of hardware, software, and connectivity. You should consider factors like which IoT protocols make sense for your product, as well as things like scalability, connectivity (for example, cellular vs. WiFi), device management, and use case-specific features and applications.
How it does so, and how that data is managed, should be central considerations in your IoT development process. In the past, developing, hosting, and managing one’s own cloud infrastructure was a necessary part of IoT implementation. Now, platform providers like Particle are offering cloud-connected hardware and comprehensive IoT platforms that lower the total cost of ownership of an IoT project, as well as reduce the time to market.
Pre-configured modules like the Electron are ready to connect to the internet right out of the box, and are already FCC/CE/PTCRB certified. These integrated platforms are allowing entrepreneurs to focus on their products, rather than the complications of connectivity.
Begin Your IoT Project
A piece of IoT hardware is only as good as the platform it lives on. As a full-stack IoT Platform-as-a-Service, Particle provides everything you need to connect your device to the web. We offer a variety of low-cost, Wi-Fi and Cellular MCU dev kits that are easy to set up, and simple to integrate with your organization’s existing infrastructure.