Hardware · Buying guide

A computer, or a microcontroller?

What this is
The first fork every hardware build hits
The short version
Sensing and switching? A microcontroller. Running software? A computer
The real answer
Most setups use both

Before you pick a board, pick a kind of board. Almost every project starts at one fork: do you need a small computer that runs an operating system, or a microcontroller that runs one program? They look similar and cost similar, and they are built for opposite jobs. Get this right and the rest of the choices fall into place.

A Raspberry Pi single-board computer
Image: adafruit.com

The fork.

A microcontroller, like an ESP32, is one chip that runs a single program from the instant it powers on. No operating system, no boot time, pennies of power. It reads sensors and switches outputs, and it is happy bolted to a bench for years. A computer, like a Raspberry Pi, runs Linux: it does many things at once, runs real software, stores data, drives cameras, and hosts the hub. It needs steady power and takes a moment to boot. One is a reflex; the other is a brain.

Side by side.

The differences that decide it:

Microcontroller versus small computer · verified 2026-06-23
By the job Microcontroller (ESP32) Computer (Raspberry Pi)
Runs an operating system No, one program Yes, Linux
Starts up in An instant About 20 to 30 seconds
Idle power Milliwatts; microamps asleep A few watts
Typical price A few dollars Tens of dollars and up
GPIO + analog Yes, built in GPIO yes, analog needs an add-on
Runs Home Assistant No, it reports to it Yes, it hosts it
Best for Cheap field sensor and control nodes The hub: software, storage, cameras

In short: the microcontroller wins on price, power, instant-on reliability, and direct sensor connections; the computer wins on running software, storage, networking, and anything that needs an operating system.

Most setups use both.

The honest answer to “which” is usually “both,” in their right roles. The cheap microcontrollers go out to the field as the limbs: a node at each bench, tank, or tunnel, reading a sensor and switching a relay, running for months on a small battery. The one computer sits in the middle as the brain: a Raspberry Pi or mini PC running Home Assistant, gathering every reading, keeping the history, and running the automations. That shape, many microcontrollers reporting to one computer, is the backbone of nearly every real grower setup.

How to decide.

Answer the one question, “what does this board need to do”:

Once you know it is a microcontroller, the which microcontroller guide narrows it to one board. If it is a computer, start with the Raspberry Pi and stray to other SBCs or a mini PC only for a clear reason.

Frequently asked questions.

What is the difference between a microcontroller and a computer like a Raspberry Pi?

A microcontroller such as an ESP32 runs a single program with no operating system: cheap, instant-on, low-power, and made for reading sensors and switching outputs. A Raspberry Pi is a small Linux computer that runs real software, stores data, and hosts a hub. They are built for opposite jobs.

Do I need a Raspberry Pi or an ESP32?

Use an ESP32 (a microcontroller) to read a sensor or switch something out in the field. Use a Raspberry Pi (a computer) to run Home Assistant, a database, cameras, or a website. If you are building a whole setup, you will likely use both: ESP32 nodes reporting to a Pi as the hub.

Can a Raspberry Pi read sensors directly?

It can read digital sensors over its GPIO pins, but it has no built-in analog input and is not good at precise real-time timing, since Linux is not a real-time system. For analog sensors or exact timing, a microcontroller is the better tool, often reporting its readings to the Pi.

Is a microcontroller or a computer cheaper to run?

A microcontroller, by far. It costs a few dollars and sips power, drawing microamps while asleep, so it can run for months on a small battery. A computer costs more and needs steady power of a few watts, which is why it lives at the powered hub, not out in a field on a coin cell.

Should beginners start with a microcontroller or a computer?

It depends on the first goal. To make a sensor and see a reading, start with a microcontroller like an ESP32, which is cheap and quick. To run Home Assistant as a hub, start with a Raspberry Pi. Many people end up with both as their setup grows.