Microcontrollers & Computers for Robotics
Every robot needs a brain. But not all brains are equal — and choosing the wrong one for a task is one of the most common beginner mistakes. A microcontroller is great at spinning a motor at exactly the right speed every millisecond. A Raspberry Pi is great at running a web server and processing camera images. A Jetson is great at running neural networks in real time. Let's learn what each does and when to use it.
1. Microcontrollers — The Real-Time Layer
A microcontroller (MCU) is a tiny computer built for one job: running a simple program, repeatedly, as fast as possible, with guaranteed timing. They're used for low-level hardware control.
Arduino (Uno, Mega, Nano)
The most beginner-friendly microcontroller ecosystem. The Arduino Uno has an 8-bit processor running at 16 MHz, 2KB of RAM, and 32KB of program storage. Those specs sound terrible by modern standards — but it's more than enough to control 20 servo motors, read 6 analog sensors, and communicate over serial, all at the same time. The Arduino IDE and massive community make it the perfect starting point.
STM32 & Teensy (advanced MCUs)
When Arduino's performance isn't enough, these more powerful 32-bit microcontrollers step in. They run at 120–600 MHz and are used in drone flight controllers, motor drivers, and professional robotics. The learning curve is steeper but the capabilities are far greater.
What microcontrollers are good at
Hard real-time tasks — things that must happen within a guaranteed time window. Reading an encoder every 1ms, sending a PWM signal to a motor every 10ms, or sampling an IMU at 1000Hz. A full Linux computer like a Raspberry Pi can't guarantee these timings because the OS might pause your code to do other things.
2. Single-Board Computers — The High-Level Brain
These are full Linux computers on a small circuit board. They're too slow for hard real-time tasks but powerful enough for navigation, communication, and running ROS.
Raspberry Pi 4 / 5
The go-to single-board computer for robotics hobbyists and researchers. A quad-core ARM CPU at 1.8GHz, 4–8GB RAM, WiFi, Bluetooth, USB, and HDMI — for about $80. It runs full Raspberry Pi OS (Debian Linux), ROS 2, Python, and can process 720p camera streams. Perfect for the "thinking brain" of a mobile robot.
Common robot pattern
Most DIY and research robots use a two-level architecture: a Raspberry Pi for high-level logic (navigation, planning, WiFi communication) and an Arduino for low-level hardware (reading sensors, driving motors). They talk to each other over a serial (USB) connection. ROS runs on the Pi and sends commands to the Arduino via rosserial.
3. AI Accelerator Boards — The Perception Brain
Running a deep learning model on a Raspberry Pi is possible, but very slow. AI accelerator boards add a GPU or dedicated neural network processor to the mix.
NVIDIA Jetson Orin Nano / AGX
The gold standard for edge AI in robotics. The Jetson Orin Nano delivers up to 40 TOPS (trillion operations per second) of AI performance at 7–15 watts. It can run YOLO object detection at 60fps, run SLAM algorithms, and power a full ROS 2 stack — all simultaneously. Used in autonomous delivery robots, drones, and research platforms.
Google Coral TPU
A USB-sized accelerator that plugs into a Raspberry Pi and runs TensorFlow Lite models at up to 4 TOPS. Great for adding fast inference to an existing Pi-based robot without switching to a Jetson. Limited to TFLite models only.
When do you need an AI board?
When your robot needs to run neural network inference in real time — object detection, depth estimation, person tracking, NLP for voice commands. If you're just doing IMU-based balance control or GPS navigation, a regular Pi is enough.
Frequently Asked Questions
Which board should an absolute beginner start with?
Arduino Uno. It's $25, the IDE is simple, tutorials are everywhere, and it teaches you the fundamentals of hardware control. Once you're comfortable, add a Raspberry Pi for WiFi, cameras, and ROS.
Can a Raspberry Pi replace an Arduino?
Partially. A Pi can drive servos via GPIO, but it can't guarantee the precise timing that a microcontroller can — the Linux OS introduces latency jitter. For hobby projects with slow motors this is fine. For high-speed control loops (IMU-based balance, brushless motor ESCs), you need a dedicated MCU.
What's ROS, and which board runs it?
ROS (Robot Operating System) is the middleware framework that lets different parts of a robot communicate. It runs on full Linux computers — Raspberry Pi, Jetson, or a regular laptop. Microcontrollers like Arduino can connect to ROS via a package called micro-ROS.
How much does a complete robot brain setup cost?
A basic setup (Arduino Nano + Raspberry Pi 4) costs about $100–120. A perception-capable setup (Pi 4 + Coral TPU) runs about $130–150. A full professional AI robot brain (Jetson AGX Orin) costs $500–800 — though the Jetson Orin Nano at ~$150 is a great middle ground.
Frequently Asked Questions
What will I learn here?
This page covers the core concepts and techniques you need to understand the topic and progress confidently to the next lesson.
How should I use this page?
Start with the overview, then follow the section links to deepen your understanding. Use the table of contents on the right to jump to specific sections.
What should I read next?
Use the navigation below to continue to the next lesson or explore related topics.