HomeLearnCoursesHackathonsAccount
Embedded Systems for Robotics
Putting It Together: A Realistic Mobile Robot Architecture · 1/2

Walking through the full stack, sensor to actuator

Consider a differential-drive mobile robot with a camera, a lidar, an IMU, and two motors, a fairly typical setup. The SBC (say, a Jetson or Raspberry Pi) runs Linux and handles the camera and lidar directly, usually over USB or a dedicated camera interface, since these sensors produce high-bandwidth data that benefits from a full OS's driver support and processing power. The SBC runs perception and planning software, possibly ROS nodes, that turn that sensor data into a decision: 'drive forward at 0.3 m/s while turning slightly left.'

That decision doesn't go straight to the motors. It's packaged as a small message and sent over UART or CAN bus to a dedicated MCU. The MCU, meanwhile, is independently running its own tight control loop, reading two motor encoders (often over simple digital GPIO pins or a quadrature decoder peripheral built into the chip) and an IMU on I2C for orientation and tilt data. It takes the SBC's velocity target, runs it through a PID loop at a fixed rate like 1kHz, and outputs PWM signals to the motor drivers, while continuously checking for fault conditions like overcurrent or a triggered limit switch.