Embedded Systems for IoT

Chapter 3
Microcontrollers and Hardware Platform Selection

Diploma in IOT
Embedded Systems for IoT   •   Diploma

Microcontrollers and Hardware Platform Selection

Introduction

An Internet of Things device is rarely successful because of a microcontroller alone. It succeeds when the processor, memory, sensors, communication interfaces, power system, enclosure, firmware, manufacturing process and operating environment are selected as one coherent platform. A poor choice may produce a prototype that works on a laboratory bench but fails in the field because of inadequate memory, unstable timing, excessive power consumption, unavailable components or unsuitable environmental protection.

This chapter develops a systematic method for interpreting microcontroller datasheets and block diagrams, comparing MCU families, development boards and modules, and selecting hardware for IoT applications. The emphasis is on professional decision-making rather than on memorising product names. Specific device specifications change frequently; therefore, designers should always verify current manufacturer documentation before committing to a design.

Learning Objectives

After studying this chapter, you should be able to:

  • explain the role and internal organisation of a microcontroller;
  • interpret important sections of a datasheet and block diagram;
  • distinguish an MCU, development board, communication module and system-on-chip;
  • compare MCU families using performance, memory, interfaces, power and lifecycle criteria;
  • select processor, memory, clock and supporting components for an IoT product;
  • evaluate prototype boards and production-ready modules;
  • identify electrical, environmental, supply-chain, security and regulatory constraints; and
  • justify a hardware selection using a traceable engineering method.

1. The Microcontroller as an IoT Computing Platform

A microcontroller unit (MCU) is an integrated circuit containing a processor core, memory and peripheral circuits. Unlike a general-purpose computer, an MCU is designed for dedicated control, sensing and communication tasks, usually with predictable timing and low energy consumption.

A typical MCU contains:

  • a central processing unit (CPU), including an arithmetic-logic unit, registers, control unit and program counter;
  • non-volatile program memory, commonly Flash;
  • volatile data memory, commonly SRAM;
  • clock and reset circuitry;
  • digital input/output pins;
  • timers, counters and pulse-width modulation units;
  • analogue-to-digital converters (ADCs), and sometimes digital-to-analogue converters;
  • serial interfaces such as UART, SPI, I²C, USB or CAN; and
  • interrupt controllers, watchdog timers and power-management circuits.

The CPU clock frequency is not by itself a complete measure of capability. A device with a lower clock frequency may outperform another in a particular application because it has a more efficient instruction set, better memory access, hardware acceleration or more suitable peripherals. IoT selection must therefore begin with workload and system requirements, not with the largest advertised frequency.

MCU, MPU, SoC, board and module

These terms are related but not interchangeable.

ItemMeaningTypical use
MCUIntegrated CPU, memory and peripheralsSensor nodes, controllers and appliances
MPUProcessor requiring external memory and supporting chipsLinux gateways and complex user interfaces
SoCHighly integrated system, often including MCU/MPU and radioWireless IoT products
Development boardPCB that exposes a chip and adds power, programming and connectorsPrototyping and teaching
Communication modulePre-certified or packaged radio subsystem with host interfaceAdding Wi-Fi, cellular, LoRaWAN or Bluetooth
System moduleMore complete computing subsystem, often including memory and operating system supportProduction designs requiring rapid integration

A development board is not automatically suitable for production. It may include an inefficient voltage regulator, exposed connectors, non-industrial components, an unoptimised antenna or programming circuitry that is unnecessary in a finished product.

2. Reading an MCU Block Diagram

A block diagram shows the functional architecture of a device and the relationships between subsystems. It is an abstraction: it does not normally show every transistor, internal bus or electrical limitation. Nevertheless, it is valuable for identifying data paths, dependencies and possible bottlenecks.

Simplified microcontroller block diagram CPU coreregisters • ALU Flashprogram memory SRAMworking data Bus matrixdata movement Timers / PWMcontrol timing ADC / DACanalogue signals UART • SPI • I²Ccommunications I/O pinsexternal world
Simplified microcontroller block diagram
Figure: Simplified microcontroller block diagram

Figure: A simplified MCU architecture showing the CPU, memory, bus, peripherals and external pins.

When reading a diagram, ask the following questions:

  1. Which memory is connected to the CPU, and is it internal or external?
  2. Which peripherals share a bus or pin multiplexing arrangement?
  3. Are analogue inputs connected through a multiplexer to one ADC, or are separate converters provided?
  4. Does the radio communicate with the CPU through an internal bus or an external serial interface?
  5. Which blocks remain active in sleep modes?
  6. Are security functions, cryptographic accelerators or secure storage included?

The diagram must be checked against the electrical and programming sections. A block labelled “USB” does not necessarily mean that every USB mode is supported, and an ADC block does not guarantee that all pins can be used simultaneously at the stated resolution and sample rate.

3. Interpreting a Datasheet

A datasheet is a technical contract describing the device’s capabilities, limits and conditions. It should be read selectively but systematically.

Absolute maximum ratings and recommended operating conditions

Absolute maximum ratings define stress limits, not normal operating targets. Exceeding them may cause permanent damage, while operation at the limit may be unreliable. Recommended operating conditions specify the voltage, temperature, frequency and other ranges within which the manufacturer guarantees specified behaviour.

For example, a supply range of 2.7–3.6 V does not imply that a 3.6 V design has the same noise margin, power consumption or analogue performance as a 3.0 V design. Check the relevant electrical-characteristics tables at the actual supply and temperature.

Electrical characteristics

Important entries include:

  • input-high and input-low voltage thresholds;
  • output source and sink current;
  • leakage current;
  • ADC reference voltage, resolution, offset, gain error and conversion time;
  • oscillator accuracy and start-up time;
  • current in run, idle, sleep and deep-sleep states; and
  • brown-out, reset and power-on behaviour.

A digital pin’s maximum current is not necessarily a recommended continuous operating current. Total current limits for a port and the entire package may also apply.

Pinout and alternate functions

MCU pins are commonly multiplexed. One pin may function as GPIO, UART transmit, SPI clock, ADC input or timer output, but usually not all at once. Pin planning should record:

  • required functions;
  • voltage domain;
  • boot-strapping restrictions;
  • analogue and digital conflicts;
  • interrupt capability;
  • drive strength;
  • pull-up or pull-down options; and
  • safe states during reset and sleep.

A pin that controls a sensor power rail must not accidentally float during reset. A boot-configuration pin must not be pulled to an unintended logic level by an attached peripheral.

Memory specifications

Flash capacity is used for program code, constants, bootloaders, update images and sometimes a file system. SRAM stores stacks, heaps, buffers and run-time variables. Non-volatile data may require EEPROM, a dedicated data-flash region or an external memory device.

Memory figures must be interpreted with reservations. A quoted Flash size may include reserved areas or boot ROM exclusions. SRAM may be divided into banks with different access restrictions. Wireless stacks and operating systems can consume substantial memory before application code is added.

A simple planning model is:

Mrequired = Mcode + Mstack + Mheap + Mbuffers + MOS + Mmargin

Here, Mrequired is required RAM or Flash, as appropriate; each term represents a measured or estimated allocation; and Mmargin is design reserve. The equation is a budgeting identity, not a guarantee of successful operation. Stack depth, interrupt nesting, dynamic allocation and worst-case communication buffering must be tested.

Timing and clocking

MCUs may use internal RC oscillators, external crystals, ceramic resonators, low-frequency watch crystals or clock sources supplied by another device. The choice affects cost, start-up time, frequency accuracy, power and communication reliability.

For a periodic timer, the ideal timer period is commonly related to the timer clock by:

T = (N × P) / ftimer

where T is the period in seconds, N is the timer count, P is the prescaler division factor, and ftimer is the timer input frequency in hertz. This relation assumes the timer mode and count convention match the datasheet. Some timers count from zero, reserve counts for reload, or receive a clock divided by additional circuitry.

For UART communication, baud-rate error depends on the clock divider and the receiver’s tolerance. The exact expression is device-specific; designers should use the manufacturer’s baud-rate formula rather than assume that a nominal clock produces an exact baud rate. A crystal or calibrated oscillator may be necessary when several devices must communicate reliably over temperature.

Interrupts, DMA and real-time behaviour

Interrupts allow an event to request CPU service. Direct memory access (DMA) can transfer data between peripherals and memory with limited CPU involvement. These facilities are especially useful for sensor sampling, serial reception and waveform generation.

Real-time performance depends on worst-case latency, not only average execution speed. Relevant causes of latency include higher-priority interrupts, disabled-interrupt sections, flash wait states, bus contention, operating-system scheduling and cache behaviour.

4. Comparing MCU Families and Platforms

A family is a group of related devices using a common architecture, toolchain or peripheral model. Family selection has implications beyond the first prototype.

Architecture and performance

Compare instruction-set architecture, word size, clock range, hardware multiply/divide, floating-point support, DSP instructions, cache and memory protection. A low-power 32-bit MCU may be preferable to an 8-bit MCU when cryptography, networking or a real-time operating system is required. Conversely, an 8-bit device can be economical for a simple low-volume controller with minimal firmware.

Performance should be expressed through the application workload: sensor sample rate, control-loop period, packet rate, encryption demand and wake-up response. Benchmark results must use representative code and compiler settings.

Peripherals and connectivity

The correct number and type of interfaces often matter more than CPU speed. Consider ADC channels and quality, timer channels, PWM resolution, USB modes, CAN or industrial buses, secure elements, display interfaces and radio support. Check whether multiple interfaces can operate concurrently and whether their pins conflict.

Power and energy

Battery devices are governed by energy, not merely sleep current. Average current can be estimated as:

Iavg = (Σ Ii ti) / Tcycle

where Ii is the current during operating state i, ti is the duration of that state, and Tcycle is the complete repeating cycle. Units must be consistent; if current is in milliamperes and time in seconds, the result is milliamperes.

For a battery with usable capacity Cbat in ampere-hours, an idealised operating time is:

tlife ≈ Cbat / Iavg

This assumes constant battery capacity, constant average current and no losses. Real life is shorter because of self-discharge, temperature, peak-current limitations, regulator losses, battery ageing and the selected end-of-discharge voltage.

Cost, availability and lifecycle

The lowest unit price may not produce the lowest total cost. Evaluate:

  • development tools and engineer familiarity;
  • PCB layers, external components and assembly complexity;
  • certification and radio testing;
  • firmware migration effort;
  • minimum order quantity and lead time;
  • second-source or pin-compatible alternatives;
  • product longevity and last-time-buy policy; and
  • software support and errata.

A platform with a larger ecosystem may reduce technical risk even when its component price is higher.

5. Selecting Supporting Components

Voltage regulation and power integrity

Select a regulator according to input range, output voltage, load current, quiescent current, dropout voltage, transient response and thermal behaviour. Wireless transmitters can create short current peaks. The regulator and decoupling network must support these peaks without causing brownout.

Each supply pin should follow the manufacturer’s decoupling recommendation. Capacitor value alone is insufficient: dielectric, bias dependence, equivalent series resistance, layout and placement affect performance. Analogue supplies may require filtering or a separate regulator, but isolation must not create an unintended ground or return-current problem.

Reset, watchdog and boot circuitry

A reliable design defines behaviour during power-up, brownout, software failure and firmware update. Use the watchdog where recovery is required, but design firmware so that repeated resets are recorded and diagnosed rather than hidden. Boot pins and programming connectors should be accessible during manufacturing and service.

Sensors and analogue interfaces

The sensor output range must fit the ADC input range, and source impedance must be compatible with the ADC’s sample-and-hold circuit. If a sensor produces a differential, current or very small signal, an amplifier or dedicated converter may be required. Protection components must not introduce excessive leakage or capacitance.

For an ideal n-bit ADC with reference voltage Vref, the nominal code width is:

ΔV = Vref / 2n

This is an idealisation. Quantisation, reference error, noise, non-linearity and input settling determine actual accuracy. The ADC should not be selected solely by its nominal number of bits.

Wireless and antenna considerations

A radio module may simplify certification and RF layout, but it still requires correct antenna placement, matching, grounding, power integrity and enclosure evaluation. Metal, batteries and cables can detune an antenna. Module certification conditions may specify permitted antennas, output power, shielding and layout.

6. Development Boards, Modules and Production Hardware

Development boards accelerate learning and proof-of-concept work. They commonly include a USB interface, voltage regulator, user LED, buttons, headers and debug circuitry. Their disadvantages include larger physical size, uncertain power consumption, duplicate regulators, exposed ESD-sensitive connections and non-production connectors.

A module integrates an MCU or SoC, memory, radio and sometimes antenna and certification-related design. It reduces design time and RF risk but increases unit cost, constrains layout and may create supply-chain dependence.

A production PCB should be designed around the actual electrical and mechanical requirements. Before migration from board to product, verify clock source, boot configuration, power sequencing, programming method, antenna design, thermal paths, test points and firmware provisioning.

A useful selection matrix assigns each criterion a weight and scores candidates. If wj is the weight of criterion j and sij is the score of candidate i, a weighted score is:

Si = Σ wj sij

with weights normally satisfying Σwj = 1. This method supports transparent comparison, but it does not replace engineering judgement. A candidate that violates a safety or voltage requirement should be rejected even if its total score is high.

7. A Systematic Selection Workflow

A professional workflow is as follows:

  1. Define requirements. Record sensing accuracy, sampling rate, latency, processing load, connectivity, battery life, dimensions, temperature, ingress protection, security and target cost.
  2. Classify constraints. Separate mandatory requirements from preferences. Identify safety, regulatory and interface constraints first.
  3. Estimate resources. Budget Flash, SRAM, CPU time, pins, timers, communication channels, peak current and thermal dissipation.
  4. Create a candidate list. Include MCU families, modules and development platforms rather than selecting from one vendor only.
  5. Read primary documentation. Use the datasheet, reference manual, errata, hardware-design guide, radio certification documents and software-support information.
  6. Build a comparison matrix. Record values under identical conditions and identify unknowns explicitly.
  7. Prototype critical risks. Test radio range, ADC performance, sleep current, start-up, peak supply current, thermal behaviour and firmware memory use.
  8. Review lifecycle and compliance. Check availability, change notifications, environmental compliance, radio regulations and secure-update provisions.
  9. Document the decision. State rejected alternatives and the evidence supporting the selected platform.

8. Illustrative Case: Battery-Powered Environmental Sensor

Background

A facilities company wants a wireless node measuring temperature, humidity and carbon dioxide in storage rooms. The node should transmit every five minutes, operate for at least one year from a battery, tolerate 0–50 °C, and support secure firmware updates. This is an illustrative case, not a product specification.

Problem analysis

The design requires a low-power MCU, an environmental sensor interface, a higher-data-rate interface for the gas sensor, non-volatile storage for credentials and measurements, a wireless link, a secure boot or update mechanism, and sufficient peak current for radio transmission. The device spends most of its time asleep, so sleep current and wake-up energy are more important than maximum CPU frequency.

Suppose a preliminary duty-cycle estimate is:

StateCurrentDuration per 300 s cycle
Deep sleep20 μA294 s
Sensor and MCU active12 mA4 s
Radio transmit80 mA2 s

The average current is:

Iavg = [(0.020 mA × 294 s) + (12 mA × 4 s) + (80 mA × 2 s)] / 300 s
Iavg = (5.88 + 48 + 160) / 300 ≈ 0.713 mA

The result is an estimate. It excludes regulator losses, sensor warm-up, retransmissions and battery self-discharge. A nominal 2,000 mAh battery would give an ideal estimate of about 2,000/0.713 ≈ 2,805 hours, or approximately 117 days—not one year. Therefore, the initial duty cycle or battery choice is inadequate.

Approach and solution

The design team can reduce radio-on time, transmit less frequently, use a lower-power radio strategy, select a larger battery, or improve sleep and sensor scheduling. It must also test whether the gas sensor has a warm-up current that dominates energy use. A candidate MCU should provide adequate Flash for a secure bootloader, RAM for the wireless stack, a watchdog, low-power timers, I²C or SPI, and a supported secure-update framework.

The team compares three candidate classes: a simple low-power MCU plus external radio, a wireless SoC, and a certified wireless module. The wireless SoC reduces component count and power but increases software complexity. The module reduces RF risk and development time but costs more and may constrain antenna placement. The final selection should be based on measured energy, available firmware support, certification path and lifecycle—not on nominal CPU frequency.

Outcome and learning points

The analysis reveals a common design error: estimating battery life from sleep current alone. The radio and sensor active periods dominate average energy. It also demonstrates why a requirement matrix, a current profile and a prototype measurement are necessary before committing to a platform.

9. Security, Environment and Governance

IoT hardware selection has security consequences. Useful features include secure boot, hardware random-number generation, cryptographic acceleration, protected key storage, debug-port control, memory protection and signed firmware updates. Security must include a provisioning process: who creates device keys, where are they stored, and how are compromised devices revoked?

Environmental requirements include operating and storage temperature, humidity, vibration, shock, corrosion, dust, water ingress, altitude and electromagnetic compatibility. Industrial products may need wider temperature ratings, conformal coating, locking connectors and surge protection. Consumer prototypes should not be represented as industrially qualified without evidence.

Compliance may involve radio regulations, electromagnetic compatibility, electrical safety, battery transport, environmental substances and data-protection law. If a sensor collects occupancy or location information, privacy and data minimisation become design concerns even when the MCU itself is technically adequate.

10. Contemporary Developments and Best Practice

Current MCU platforms increasingly integrate wireless radios, secure elements, AI or machine-learning accelerators, USB-C support, power-management controllers and edge signal-processing functions. TinyML can enable local classification, reducing bandwidth and latency, but it adds model memory, validation and update requirements. AI capability should be selected only when the workload justifies its energy and software cost.

Best practice includes:

  • design from measured workload and energy profiles;
  • keep a pin, memory and power budget from the first schematic;
  • read errata before finalising a design;
  • distinguish guaranteed specifications from typical values;
  • test worst-case temperature, voltage and communication conditions;
  • maintain an approved-vendor and second-source strategy;
  • provide manufacturing test points and secure provisioning;
  • separate prototype convenience from production requirements; and
  • document assumptions, test methods and revision-controlled decisions.

Chapter Summary

Microcontroller selection is a system-engineering decision. An MCU combines processing, memory, timing, analogue functions, digital interfaces, power management and security, but its suitability depends on the complete IoT workload and environment. Datasheets should be read through block diagrams, electrical limits, pin multiplexing, memory organisation, timing information, power modes, errata and lifecycle data. Development boards are excellent for experimentation, while modules and production PCBs address different cost, certification and integration needs.

A sound selection process begins with requirements, budgets CPU and memory resources, compares candidates transparently, prototypes critical risks and evaluates availability, security, environmental performance and compliance. Battery life must be estimated from the complete duty cycle rather than sleep current alone. Ultimately, the best platform is not necessarily the fastest or cheapest component, but the one that provides adequate capability, manageable risk and sustainable product support.

Key Terms

Microcontroller (MCU): An integrated circuit containing a processor, memory and peripherals for dedicated control tasks.

Microprocessor (MPU): A processor generally requiring external memory and supporting components.

System-on-chip (SoC): An integrated device combining major computing and peripheral functions, often including a radio.

Development board: A circuit board designed to expose and support a device for prototyping.

Module: A packaged subsystem integrating functions such as an MCU, radio, memory or antenna.

Flash memory: Non-volatile memory commonly used for firmware and persistent data.

SRAM: Volatile read/write memory used during program execution.

Peripheral: Hardware supporting functions such as timers, ADC, PWM or serial communication.

GPIO: A general-purpose input/output pin controlled by firmware.

ADC: An analogue-to-digital converter that represents an analogue signal as a digital code.

Interrupt: A hardware or software event that requests processor attention.

DMA: Direct memory access, allowing data transfer with limited CPU intervention.

Watchdog timer: A timer that can reset a system if software fails to service it.

Brownout: A supply-voltage condition that may cause unreliable operation or reset.

Duty cycle: The fraction of a repeated operating period spent in a particular state.

Quiescent current: Current consumed by a device apart from its delivered load current.

Pin multiplexing: Assignment of alternative peripheral functions to the same physical pin.

Secure boot: A process that permits execution only of authenticated firmware.

Errata: Manufacturer documentation describing known device errors or limitations.

Weighted decision matrix: A structured comparison assigning importance weights and scores to alternatives.

Review Questions

Short Answer Questions

  1. What are the principal differences between an MCU, an MPU and an SoC?
  2. Why must absolute maximum ratings not be treated as normal operating conditions?
  3. What information can be obtained from an MCU block diagram?
  4. Explain why pin multiplexing must be examined during hardware selection.
  5. Name four factors that influence the choice between a development board and a production PCB.

Long Answer Questions

  1. Describe a systematic method for interpreting an MCU datasheet for an IoT sensor-node design.
  2. Compare the importance of CPU frequency, memory, peripherals and power modes when selecting an MCU.
  3. Explain the advantages and limitations of using a wireless module instead of a discrete MCU and radio.
  4. Discuss how security, environmental conditions and product lifecycle affect platform selection.
  5. Explain how a weighted decision matrix can support hardware selection and why it cannot replace engineering judgement.

Analytical / Application Questions

  1. An IoT node operates at 15 μA for 590 s, 10 mA for 8 s and 100 mA for 2 s in a 600 s cycle. Calculate its average current and identify which state contributes most to average consumption.
  2. A proposed MCU has 128 kB Flash and 32 kB SRAM. The application requires 58 kB Flash, 12 kB bootloader, 24 kB wireless stack, 9 kB configuration storage and 20 kB SRAM for run-time data. Determine the remaining Flash and SRAM before additional safety margin, and explain whether this is sufficient evidence for approval.
  3. Select between a low-cost MCU plus external radio and a certified wireless module for a small-batch industrial product. Construct at least five decision criteria and justify which option you would prototype first.

Multiple Choice Questions with Answers

Question 1

Which statement best describes an MCU?

A. A processor that always requires external RAM and storage

B. An integrated device containing a processor, memory and peripherals

C. A passive component used to regulate voltage

D. A radio antenna with an embedded connector

Correct Answer: B. An integrated device containing a processor, memory and peripherals

Question 2

Why should absolute maximum ratings not be used as normal design targets?

A. They describe guaranteed performance at all temperatures

B. They apply only to software configuration

C. They define stress limits, and exceeding them may damage the device

D. They specify the recommended battery capacity

Correct Answer: C. They define stress limits, and exceeding them may damage the device

Question 3

A timer has a count of 1,000, prescaler 8 and timer clock 1 MHz. Using T = (N × P) / ftimer, what is the ideal period?

A. 0.008 s

B. 0.008 ms

C. 8 s

D. 125 s

Correct Answer: A. 0.008 s

Question 4

Which memory normally stores variables while firmware is running?

A. SRAM

B. Flash ROM only

C. Antenna matching memory

D. Boot configuration fuse only

Correct Answer: A. SRAM

Question 5

What is the principal purpose of DMA?

A. To increase battery voltage

B. To transfer data between memory and peripherals with limited CPU involvement

C. To replace all interrupt sources

D. To provide radio certification

Correct Answer: B. To transfer data between memory and peripherals with limited CPU involvement

Question 6

A device uses 20 mA for 2 s and 2 mA for 8 s during a 10 s cycle. What is its average current?

A. 2.4 mA

B. 3.6 mA

C. 4.0 mA

D. 22 mA

Correct Answer: B. 3.6 mA

Question 7

Which factor is especially important when selecting a battery-powered IoT MCU?

A. Only the maximum clock frequency

B. Average energy over the complete operating duty cycle

C. The colour of the development board

D. The number of unused package markings

Correct Answer: B. Average energy over the complete operating duty cycle

Question 8

Why can a development board be unsuitable for a production product?

A. It can never execute firmware

B. It may contain unnecessary circuitry, unsuitable connectors or non-production components

C. It always has too little voltage

D. It cannot expose any I/O pins

Correct Answer: B. It may contain unnecessary circuitry, unsuitable connectors or non-production components

Question 9

Which feature helps ensure that only authenticated firmware executes?

A. Secure boot

B. PWM output

C. An analogue multiplexer

D. A passive pull-down resistor

Correct Answer: A. Secure boot

Question 10

What is the main purpose of a weighted decision matrix?

A. To replace all laboratory testing

B. To compare alternatives using criteria with assigned importance

C. To calculate ADC quantisation noise exactly

D. To determine the absolute maximum voltage of a pin

Correct Answer: B. To compare alternatives using criteria with assigned importance

Embedded Systems for IoT
Chapter 3 of 15