What is a microcontroller (MCU)? How does it work?

Even if you have heard the name “microcomputer,” few people may know its role or how it works. Microcomputers are called MCUs (Micro Controller Units), and are built into a variety of electronic devices that we use every day.

Below, we take a deeper look at how microcontrollers control and manage the operation of devices and make our lives more convenient.

What is a microcontroller? What is its role?

An MCU (commonly known as a microcomputer) is a semiconductor product that integrates a CPU, memory, and peripheral devices on a single chip. It controls various electronic devices such as home appliances, automobiles, and industrial equipment in real time and efficiently processes specific tasks.
Its features include low power consumption and compatibility with simple systems.

The main role of a microcontroller is to control and manage electronic devices and systems. Specifically, it processes input data and generates appropriate output to control the operation of the device.

For example, a heater or cooler can read data from a temperature sensor and adjust the temperature to keep the room temperature constant. It also has a wide range of other functions, such as receiving operational input from the user and displaying it on a screen.

Examples of using microcontrollers

Microcontrollers are embedded in a wide range of products, including commonly used home appliances and industrial products.
Below are some main use cases:

Home appliances

Air conditioner: Detects temperature and controls airflow direction, volume, etc.

Washing machine: Running programs such as adding water and detergent

Microwave ovens and rice cookers: Control cooking time and temperature

Microcontrollers have enabled home appliances to have improved energy-saving functions and interfaces that are easy for users to operate. In addition, microcontrollers in smart home appliances consolidate network functions, enabling them to link with other devices and smart home systems.

Microcontrollers are ideal for home appliances that require low power consumption and highly efficient operation, contributing to user comfort and extending the product’s lifespan.

car

Engine control: Optimizing fuel injection and ignition timing

Safety systems: Process data on airbags, braking systems, traction control, etc. to prevent accidents

Comfort features: Automatic climate control, seat adjustment, lighting control, etc.

ADAS (Advanced Driver Assistance System): Integrates data from cameras, radars, and sensors to realize autonomous driving functions, lane keeping assistance, collision avoidance assistance, etc.

Microcontrollers in automobiles are used throughout the vehicle’s electronic systems and play a vital role in improving vehicle performance, safety, and comfort.

How does a microcontroller work?

How exactly does a microcontroller work?
We will explain how it works using the example of a microcontroller installed in a washing machine.
(1) Loading the program

When a microcontroller is turned on, it loads the built-in program. The program is written in advance into ROM (Read-Only Memory) and defines what the microcontroller will control and how.

In the case of a washing machine, programs such as washing modes like “quick mode” and “standard mode” are stored.

(2) Clock signal operation

Microcomputers operate according to a timing signal called a clock signal. The clock has the role of controlling the timing of CPU instruction execution, and ensures that operations proceed at a regular rhythm.

In a washing machine, the wash and rinse times are controlled by a clock signal to ensure they proceed precisely.

(3) Data entry

Signals from external sensors, switches, etc. are input through the microcontroller’s I/O ports.
The signals can be analog or digital data from temperature sensors, buttons, light sensors etc. In case of analog signals, the microcontroller converts them into digital signals using its built-in Analog-to-Digital Converter (ADC).

Washing machines have built-in water level and temperature sensors that send data to a microcontroller. For example, the water level sensor measures the amount of water, and the microcontroller controls the valve accordingly to manage the water inflow.

(4) Data processing

The input data is processed by the CPU based on a program, including various operations such as calculations, data comparisons, and conditional branching.

The amount of water will be adjusted according to the amount of laundry, the temperature will determine whether to use hot water, the amount of detergent and the wash time will also be determined based on the program.

(5) Data output

The processed data is transmitted to external devices through the output port.

Based on the results of this processing, it performs output operations such as operating the motor to rotate the drum, opening and closing valves to let water in, and operating the drain pump. This allows the washing, rinsing, and spin-drying to be carried out accurately.

(6) Feedback loop

Many microcontrollers receive real-time data feedback to continuously monitor and control the state of the system.

As the wash progresses, the microcontroller continuously receives data from the sensors and adjusts its operation as needed, optimizing its operation in real time, such as stopping the water supply when there is enough water and adjusting the drum speed depending on the weight of the laundry.

(7) Low power consumption operating mode

Most microcontrollers are designed for low power consumption.

When the washing machine is on standby, the microcontroller goes into “low power mode” and only wakes up when needed, reducing the washing machine’s overall energy consumption.


The difference between a microcontroller and an SoC

Both microcontrollers and SoCs (System on Chip) are integrated circuits in which multiple functions are integrated into a single chip. An SoC is a semiconductor product in which a CPU, GPU (graphics processing unit), memory controller, communication module, etc. are integrated into a single chip.

Microcontrollers are primarily used for specific control tasks and when simple or real-time processing is required, whereas SoCs are used in devices that require complex calculations and multi-function processing.

Below is a summary of their uses and components.

 MicrocomputerSoC
Features・Operates on relatively small software ・Used for specific control tasks ・Real-time processing– Multifunctionality – Advanced processing capabilities – High-speed data processing
ApplicationsHome appliances, automotive control systems, industrial equipment, IoT devices, etc.Smartphones, tablets, smart home appliances, TVs, game consoles, etc.
ComponentsBasic peripherals such as CPU, flash memory, RAM, timers, ADC, GPIO, etc.CPU, GPU, memory controller, communication module (Wi-Fi, Bluetooth, etc.), various interfaces (USB, PCIe, etc.)
Power ConsumptionLow power consumptionVaries greatly depending on application
Design and ManufacturingRelatively simpleComplex due to high functionality

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注