Press a button on a microwave and the display counts down, the fan starts, and a beep sounds at the end. Nobody installed an app to make that happen, and there is no keyboard, mouse or screen full of icons. Yet a small computer is in there, reading the keypad and switching the parts on and off. That hidden computer is what this course is about.
A computer inside a product
An embedded system is a small computer hidden inside a product. It does one job for that product. A microwave has one. So does a TV remote, a washing machine and a car key fob. The owner never thinks "computer". They just press a button and the product reacts.
That hidden computer is usually a microcontroller, MCU for short. It is one chip that holds all the parts a tiny computer needs:
- The CPU, the central processing unit, follows the program's instructions one at a time.
- Flash memory stores the program. It keeps it even when the power is off, like a USB stick does.
- RAM, random-access memory, is scratch paper. The program writes numbers there while it runs. They vanish when the power goes.
- The peripherals are the chip's hands and ears. They switch pins on and off, keep time, and measure voltages.
Plug it in and it runs its one program straight away. The Uno R4 Minima, one of this course's two boards, runs at 48 MHz. That means 48 million ticks of its clock every second. It holds 256 kB of program and 32 kB of working memory. A kB is about a thousand bytes, and a byte holds one letter. Section 4 explains bytes properly.
A microprocessor is different. It is only the CPU. It needs other chips around it for memory, storage and power. Your laptop and your phone are built that way. Each is a full computer. It has a fast microprocessor and lots of RAM, often 16 GB. That is about half a million times the Uno's 32 kB. It also runs an operating system, such as Windows, macOS, Linux or Android. That is the big program that starts other programs and shares the machine between them.
So the difference is not just size. A microcontroller gives up speed and memory. In return it is one cheap chip. It starts almost instantly, can run for months on a battery, and connects straight to buttons, sensors and motors.
An embedded system is a computer built into a product to do one job, or a small set of jobs, as part of that product. The product's owner does not think of it as a computer: they press buttons on a microwave, and the computer inside reads them. Most of these computers are microcontrollers.
A microcontroller (often shortened to MCU, microcontroller unit) is a single chip that holds everything a small computer needs:
- a CPU (central processing unit), the part that follows instructions one at a time;
- flash memory, which stores the program and keeps it when the power is off;
- RAM (random-access memory), the working memory that holds values while the program runs and forgets them when power goes;
- peripherals, the hardware that connects the chip to the outside world: pins that can be switched on and off or read, timers, and circuits that measure a voltage.
Power the chip and it starts running the program in its flash at once. The course's 5 V board, the Arduino Uno R4 Minima, is built around a Renesas RA4M1 microcontroller running at 48 MHz (48 million clock ticks per second) with 256 kB of flash and 32 kB of RAM (Arduino docs). A kB is about a thousand bytes, and one byte holds a single letter of text. Section 4 builds bytes from scratch.
A microprocessor is a CPU chip on its own. To work it needs separate memory chips, storage, and power chips beside it on a circuit board. That is the design inside a laptop, a phone or a desktop computer: a fast microprocessor, gigabytes of RAM, and an operating system (Windows, macOS, Linux, Android) that loads and runs many programs and shares the hardware between them. A laptop's RAM is often 16 GB, about half a million times the Uno R4's 32 kB.
The line between the two is about design, not size. An MCU trades speed and memory for being one cheap chip that starts in milliseconds, runs for months on a battery, and talks directly to switches, sensors and motors.
Microcontroller or full computer?
Before you sort, decide for each device whether it needs an operating system that runs many programs. Then drop each one in a bin and check.
Loading interactive…
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Correct answer
Also accepted:
Why
Why
Worked example
Spotting the embedded system in a microwave (basic)
-
1
A microwave oven has a keypad, a display, a turntable motor, a fan, a light and a door switch. Which part is the embedded system, and what does it do?
-
2
Find the decisions. Something has to read the keypad, count down the time, and decide when to switch the heater, fan and turntable on and off. Those are decisions, so a computer makes them.
-
3
Name the computer. It is a microcontroller on the circuit board behind the keypad. Its flash holds the one program the oven ever runs.
-
4an embedded system is the computer plus the hardware it controls, built for one product
Name what it is not. The motor, fan, light and door switch are hardware the microcontroller controls or reads. They are not computers themselves.
an embedded system is the computer plus the hardware it controls, built for one product
Worked example
Is a phone an embedded system? (common trap)
-
1
A learner says: "My phone has a processor inside a product, so it is an embedded system."
-
2
Ask what it runs. A phone runs an operating system, and you install and remove apps on it. Its job is not fixed. That makes it a general-purpose computer, built around a microprocessor.
-
3
Look inside anyway. A phone also contains small helper chips that do one fixed job each, such as managing the battery's charging. Those can be embedded systems inside the larger computer.
-
4
Settle it. "Has a processor" is not the test. "Is built to do one job inside a product" is.
Firmware and applications
Firmware is the program that lives inside a microcontroller. It sits in the chip's flash memory. It starts by itself the moment power arrives. No operating system runs underneath it, so it controls the pins and parts directly. It is written for one exact chip. It rarely changes, and an update means loading a whole new program.
An application, or app, is the kind of program you know from a laptop or phone. You start it yourself. The operating system loads it, lends it memory, and draws its windows for it. Lots of apps share one computer. You can add or delete each one.
One product often has both kinds. A smart thermostat has a microcontroller on the wall running firmware. The firmware reads the temperature and turns the heating on and off. The app on your phone sets the schedule. That app is an application. On the Arduino boards in this course, a firmware program is called a sketch. Chapter 11 has you write your first one.
Firmware is the program stored in a microcontroller's flash. It starts by itself when power arrives, runs without an operating system underneath it, and controls the hardware directly. It is written for one exact chip and board, and it changes rarely: a user updates it, if at all, by loading a whole new program.
An application (an app) is a program a user starts on a computer that already has an operating system. The operating system loads it, gives it memory, and handles the screen, files and network for it. Many applications share one computer, and each can be installed and removed on its own.
The same product often has both. A smart thermostat's microcontroller runs firmware that reads the temperature and switches the heating. The phone app that sets the schedule is an application. When either one is written for the Arduino boards in this course, the firmware is called a sketch, Arduino's word for a program; Chapter 11 writes the first one.
It helps to picture a connected product as four layers, stacked like floors in a building. Each floor rests on the one below it.
- Hardware is the ground floor: the chip, the board, the sensors, the motors and the wires.
- Firmware sits on top. It is the program in the microcontroller that runs that hardware.
- Software comes next. These are apps on a phone or computer that talk to the device, by cable or by radio such as Bluetooth or Wi-Fi.
- The cloud is the top floor. It is computers on the internet that gather data from many devices and send commands back.
Not every product has every floor. A microwave stops at firmware. A
fitness band adds a phone app. A warehouse full of sensors feeding one
web dashboard uses all four. This course builds the bottom two floors
properly. It touches a little software for saving data on your computer.
The cloud floor belongs to a later course called iot.
A connected product is easiest to think about as four layers, each built on the one below:
- Hardware: the microcontroller, its board, sensors, motors, wires.
- Firmware: the program on the microcontroller that runs the hardware.
- Software: applications on phones and computers that talk to the device, for example over USB, Bluetooth or Wi-Fi.
- Cloud: servers on the internet that collect data from many devices and pass commands back.
A product does not need all four. A microwave stops at firmware. A
fitness band adds a phone app. A shop full of sensors reporting to one
dashboard uses all four. This course covers hardware and firmware in
depth, uses a little host software for logging, and leaves the cloud
layer to a later course, iot.
Which layer?
Each card is one part of a smart thermostat system. Say which layer it belongs to before you drag it, then check.
Loading interactive…
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Correct answer
Also accepted:
Why
Why
Worked example
A thermostat, layer by layer (typical)
-
1
A smart thermostat on the wall shows the temperature, has two buttons, and can be set from a phone. The readings also appear on a website. Place each part on the stack.
-
2
Hardware. The wall unit's board, its temperature sensor, its display, its two buttons and the relay that switches the heating.
-
3
Firmware. The program in the wall unit's microcontroller. It reads the sensor and buttons, updates the display, and switches the relay.
-
4
Software. The phone app that sends a new schedule to the wall unit.
-
5if the internet goes down, the bottom two layers still keep the house warm
Cloud. The servers behind the website, holding readings from thousands of homes.
if the internet goes down, the bottom two layers still keep the house warm
Worked example
Firmware or application? (recognition)
-
1
Decide which kind of program each one is: (a) the program in a washing machine that runs the spin cycle; (b) a photo editor on a laptop; (c) the program in a bike computer that counts wheel turns.
-
2
(a) Firmware. It lives in the washing machine's microcontroller and starts when the machine is switched on. Nobody installs it.
-
3
(b) Application. The laptop's operating system starts it, and you can remove it without changing the laptop.
-
4
(c) Firmware. One fixed job, running from power-on on a small chip inside the product.
Where this goes next
Every later chapter leans on these words. Chapter 9 follows a program
from source code to the bytes stored in a microcontroller's flash.
Chapter 11 writes the first firmware for the Uno R4 Minima and the
ESP32-S3, and shows the hidden main() that starts it. Chapter 20 opens
the microcontroller up: CPU, memory, peripherals and the bus between
them. Chapter 21 adds a small real-time operating system, which brings
some of the "many programs" idea from full computers down to a
microcontroller. The cloud layer is the starting point of the iot
course that follows this one.
Check your understanding (counts toward your progress)
A smart doorbell's microcontroller keeps working when the home internet goes down, but the phone alerts stop. Which layers are still working?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
The cloud is exactly what the internet outage cut off.
Phone alerts are what stopped, and they need the software and cloud layers.
The doorbell itself still works, so its own layers do too.
Why
The bottom two layers live in the doorbell itself, so they keep running. The phone alerts depend on the upper layers and the internet.
Which layers live inside the doorbell?
What does a microcontroller hold on its one chip?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
That describes a microprocessor, which needs memory chips around it.
The CPU is inside the microcontroller too. That is what makes it one complete chip.
A microcontroller usually runs one program with no operating system at all.
Why
A microcontroller is a complete small computer on one chip: CPU, flash for the program, RAM for working values, and peripherals for the pins.
The 'micro' computer has everything it needs in one package.
Sort each part of a fitness band and its companion phone app by layer.
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
What this task checks
Structure checked automatically. Whether your ideas are convincing isn't graded, so reread with the checklist.
The compiler says
A model answer
Why
The sensor, battery and board are hardware. The step-counting program in the band is firmware. The phone app is software. The backup server is the cloud.
Correct answer
Also accepted:
Why
Physical parts first; then ask where each program runs.
A laptop has a fast CPU chip with separate RAM chips, storage and an operating system. What is its CPU chip called?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
A microcontroller holds its own memory on the chip. This CPU needs separate RAM and storage beside it.
Firmware is a program, not a chip.
Peripherals are the pin and timer hardware around a CPU, not the CPU itself.
Why
A CPU chip that needs separate memory, storage and power chips around it is a microprocessor. Full computers are built around one.
Does the chip carry its own memory, or rely on chips around it?
Practice: Telling the computers apart (5 problems Β· doesn’t affect your progress)
A car key fob sends a code when you press its button. It has no screen and runs one program. What is inside it?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
An operating system would be far more than a key fob needs.
A laptop would never fit, or last on a coin cell.
Something has to decide which code to send and when: that is a computer.
Why
One fixed job, from power-on, on a tiny battery: a microcontroller running firmware.
A microcontroller
Which memory does a microcontroller's program use for values that change while it runs, such as a counter?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
Flash holds the program itself. Working values go in RAM.
Pins connect to the outside world; they don't store a counter.
Firmware usually runs with no operating system.
Why
RAM is working memory. It holds values while the program runs and forgets them when power goes.
One memory keeps the program when power is off. The other is working memory. Which one changes while the program runs?
RAM
The Uno R4 Minima has 32 kB of RAM. A laptop has 16 GB. Roughly how many times bigger is the laptop's RAM?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
GB is a thousand times bigger than MB, which is a thousand times bigger than kB.
16 GB against 32 kB is a far larger gap.
The difference is enormous: that is the trade a microcontroller makes.
Why
16 GB is about 16 000 000 kB. Divided by 32 kB, that is about 500 000.
Put both on the same prefix first: how many kB are in 16 GB?
Then divide that by 32 kB.
About half a million times
A smart plug has a microcontroller, a relay, a phone app and a company server. Which part is the cloud layer?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
The phone app is the software layer.
The relay is hardware.
The program on the microcontroller is firmware.
Why
Servers on the internet that hold data from many devices are the cloud layer.
The cloud layer holds data from many devices on the internet. Which part lives there?
The company server
A phone contains a small chip that only manages battery charging, running one fixed program. Is that chip an embedded system?
Right on try — credit. Right — the answer had already been shown, so no credit this time. Next try is worth Answer shown after three tries — this one no longer earns credit. You chose to see the answer — this one earns no credit.
A big computer can contain small embedded systems.
Firmware runs without an operating system and is still a program on a computer.
Most embedded systems have no screen at all.
Why
One fixed job inside a larger product is the definition, even when the larger product is itself a computer.
What is the section's definition of an embedded system?
Does the definition say anything about what the larger product is?
Yes; it is a computer doing one job inside a product