• Operate · Embedded Control

    Introduction to Microcontrollers

    Introducing the programmable hardware used to connect sensors, execute control algorithms and generate outputs for physical actuators.

    Key Learning Outcomes

    By the end of this section, you should be able to:

    01

    Explain the role of a microcontroller within an embedded control system.

    02

    Identify the principal hardware features of the Arduino Uno R3, including its processor, memory and I/O connections.

    03

    Distinguish between digital input/output, analogue input and pulse-width modulation (PWM).

    04

    Explain how sensors, control algorithms and actuators can be connected through a microcontroller.

    Introduction to Microcontrollers

    A microcontroller is a compact programmable computing device designed to interact directly with physical hardware. It combines a processor, memory and input/output interfaces so that measurements can be acquired, processed and used to generate output signals.

    Within a control system, the microcontroller can provide the link between the measurement devices, control algorithm and actuators introduced previously. Sensor measurements are received as inputs, the programmed algorithm processes this information, and output signals are generated to influence the physical system.

    A simple embedded-control sequence is: measure → process → decide → actuate.

    The objective at this stage is not to study microcontroller architecture in detail, but to understand how a programmable device can connect the sensing and actuation elements of a practical control system.

    Arduino Uno

    The Arduino Uno R3 is used here to demonstrate the application of a microcontroller board. It provides a low-cost platform for connecting inputs and outputs, such as sensors and actuators, and for executing a control algorithm on embedded hardware.

    The board is based on the ATmega328P microcontroller, which executes the user program and manages the board's input/output operations. The Uno operates at 5 V and can be powered through its USB connection or from an external supply through the VIN pin or barrel jack.

    The board provides 14 digital input/output pins, six of which support pulse-width modulation (PWM), together with six analogue inputs. These interfaces allow a range of sensors and actuators to be connected for embedded measurement and control activities.

    Labelled Arduino Uno R3 showing the ATmega328P microcontroller, USB connector, power connector, digital I/O, analogue inputs, power and ground pins, AREF and reset controls.
    Figure 1: Key Components of the Arduino Uno Microcontroller.

    Hardware Overview

    The numbered labels in Figure 1 identify the main connections and hardware features used throughout the practical activities.

    ID Component Properties
    1MicrocontrollerATmega328P
    2Power supply pins5 V and 3.3 V regulated outputs
    3Voltage in (VIN)7–12 V recommended external input
    4External power supplyDC barrel jack or VIN pin
    5USB connectionUSB Type-B for power and programming
    6Digital input/output (I/O) pins14 digital pins; 6 support PWM output
    7Digital groundCommon ground (GND)
    8Analogue reference pinAREF
    9Analogue input pins6 inputs (A0–A5)
    10Ground pins (GND)Multiple GND connections
    11Reset pinActive-low reset
    12Reset buttonOn-board manual reset

    Operating and Electrical Characteristics

    The Arduino Uno R3 is designed for a 5 V operating voltage. When an external supply is used through VIN or the barrel jack, 7–12 V is the recommended input range. Each digital I/O pin should normally be designed around a recommended operating current of 20 mA.

    Program code is stored in 32 KB of Flash memory, 2 KB of SRAM is available for variables during execution, and 1 KB of EEPROM provides non-volatile storage. The ATmega328P on the Uno R3 operates at 16 MHz.

    Operating voltage 5 V
    Input voltage (recommended) 7–12 V
    Input voltage (limits) 6–20 V
    Digital I/O pins 14
    PWM-capable digital pins 6
    Analogue input pins 6
    Recommended current per I/O pin 20 mA
    3.3 V pin current 50 mA max.
    Flash memory 32 KB
    SRAM 2 KB
    EEPROM 1 KB
    Clock speed 16 MHz

    Interesting Resources

    The following resources provide useful support for exploring the Arduino Uno, microcontroller I/O and model-based implementation in more detail.

    UNO R3 Documentation

    Arduino. Official board documentation with the pinout, datasheet, schematics and technical information for the Uno R3.

    Explore resource ↗

    Built-in Examples

    Arduino. Introductory examples covering digital input/output, analogue measurement, buttons, LEDs, PWM and serial communication.

    Explore resource ↗

    Arduino Hardware

    MathWorks. Simulink support for creating, running and deploying models on Arduino hardware, including sensor and actuator I/O.

    Explore resource ↗

    ATmega328P

    Microchip. Technical information for the microcontroller used on the Uno R3, including memory, I/O, ADC and peripheral capabilities.

    Explore resource ↗

    Concluding Remarks

    Microcontrollers provide an important connection between control-system theory and physical implementation. They allow information from sensors to be acquired and processed before generating output signals that can influence actuators and the physical process.

    The Arduino Uno R3 provides an accessible platform for introducing these ideas. Its ATmega328P microcontroller, digital I/O, analogue inputs and PWM-capable outputs allow a range of sensors and actuators to be connected to a programmable controller.

    At this stage, the important idea is to recognise the microcontroller as the hardware on which the measurement, decision-making and control functions of an embedded control system can be implemented.