Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Robots often need two kinds of brains working together. A microcontroller is excellent at fast, predictable control of motors, sensors, and electrical signals. A single-board computer, or SBC, is better for heavy computing tasks such as vision, mapping, and decision making.

Understanding the difference helps you design robots that are reliable, responsive, and powerful.

Key Facts

  • Microcontrollers are best for real-time I/O because they can read sensors and update motors with predictable timing.
  • SBCs are best for high-level processing because they have faster CPUs, more memory, and can run full operating systems.
  • Control loop frequency is f = 1/T, where T is the loop period in seconds.
  • A 1 ms control loop has f = 1/0.001 = 1000 Hz, which is typical of fast motor control.
  • Data rate can be estimated by data rate = samples per second x bytes per sample x number of channels.
  • A common robot design uses the SBC for planning and perception, while the microcontroller handles motor control, encoders, servos, and safety shutoff.

Vocabulary

Microcontroller
A small computer on a chip designed to control hardware pins, sensors, and actuators with predictable timing.
Single-board computer
A complete computer built on one circuit board, usually capable of running an operating system and complex software.
Real-time I/O
Input and output that must happen within strict timing limits so a system responds correctly.
Control loop
A repeated process in which a robot reads sensors, computes an action, and updates actuators.
Operating system
Software that manages hardware resources and allows programs to run on a computer.

Common Mistakes to Avoid

  • Using an SBC alone for precise motor timing is a mistake because a general-purpose operating system can delay tasks unpredictably.
  • Choosing a microcontroller for camera-based vision is a mistake because most microcontrollers lack the memory and processing power needed for image analysis.
  • Ignoring communication delay between boards is a mistake because commands sent from the SBC to the microcontroller may arrive too slowly for fast control loops.
  • Connecting motors directly to logic pins is a mistake because microcontroller and SBC pins cannot supply the current needed by motors and can be damaged.

Practice Questions

  1. 1 A microcontroller runs a motor control loop every 2 ms. What is the control loop frequency in hertz?
  2. 2 A robot has 4 distance sensors sampled at 200 samples per second. Each sample is 2 bytes. What is the total sensor data rate in bytes per second?
  3. 3 A robot must follow a line while also recognizing objects with a camera. Which tasks should be assigned to the microcontroller and which to the SBC, and why?