Putting the System Together
You now know what each subsystem does on its own. But a pile of sensors, a controller, motors, and a battery sitting separately on a workbench is not a robot. A robot is made when those subsystems are connected — electrically, mechanically, and through software — so that information flows reliably from sensors to controller to actuators and back. Integration is where most real robot builds succeed or fail. A sensor that cannot transmit its reading is useless. An actuator that receives no commands does not move. Getting the connections right is as important as choosing the right parts.
Power Wiring
The first set of connections to establish is power. The battery's positive terminal connects through a main power switch to a distribution board or directly to every component that needs power. Most robots have multiple voltage rails: motors might need 12 V while the controller and sensors run on 3.3 V or 5 V. Voltage regulators step down higher voltages to safe levels for delicate electronics. Power wiring must be sized correctly for the current it carries. Wire too thin for the current will heat up, lose voltage, and potentially catch fire. A wire's current capacity depends on its cross-sectional area — heavier gauge wire carries more current. Engineers use wire sizing charts to pick the right gauge for each part of the system.
Every component in a robot must share the same ground reference — the negative side of the power supply. When components have different ground references, small voltage differences create ground loops that inject electrical noise into sensor signals, causing erratic readings. A fundamental rule: connect all grounds together at one point. This is called a star ground topology.
Communication Buses
Sensors and actuators communicate with the controller through standardized communication protocols — agreed-upon rules for how data is formatted, timed, and transmitted over wires. I2C (Inter-Integrated Circuit) uses just two wires — a clock line and a data line — to connect up to 127 different devices to one controller. Each device has a unique address, and the controller reads or writes to each one by calling its address. I2C is popular for sensors (IMUs, temperature sensors, barometers) because the wiring is simple. SPI (Serial Peripheral Interface) is faster than I2C and uses four wires. It is preferred for sensors that produce large amounts of data quickly, like high-resolution displays or data loggers. UART (Universal Asynchronous Receiver/Transmitter) is a point-to-point protocol: one sender, one receiver, two wires. It is used for communication between the microcontroller and a separate module — a GPS unit, a Bluetooth radio, or a higher-level computer like a Raspberry Pi. PWM (Pulse Width Modulation) is not technically a data bus but a control signal: the controller sends a PWM signal directly to each servo motor or motor driver, encoding the desired speed or position as a pulse duration.
Match each communication protocol to its primary use case in a robot.
Terms
Definitions
Drag terms onto their definitions, or click a term then click a definition to match.
Software Integration
Connecting wires is only half of integration. The controller also needs software that reads each sensor's data correctly, interprets it, runs the control logic, and writes commands to each actuator at the right time. Many complex robots use a middleware framework called ROS (Robot Operating System) to manage this. ROS is not an operating system in the traditional sense but a set of software tools and communication standards that let different pieces of robot software — the sensor drivers, the path planner, the motor controller — run as separate programs that pass messages to each other. Even without ROS, the software architect must decide: in what order are sensors read? How often? What happens if a sensor fails to respond? What should the robot do if a motor's encoder reports it moved less than commanded? These software questions are as critical as the hardware connections.
When a robot uses sensor feedback to verify and correct its actions, that is called closed-loop control. The loop is closed because information flows from actuator output back to sensor input back to controller. When it acts without checking results, that is open-loop. A garage door opener that runs a motor for exactly 12 seconds assuming the door is fully open is open-loop. A robot arm that reads its joint encoders after every move and corrects any position error is closed-loop. Closed-loop systems are more accurate and more robust to disturbances.
A robot controller reads temperature from 8 different sensors on the robot's body. Which communication protocol is best suited to connecting all 8 sensors to a single controller while minimizing wiring complexity?
What is the key difference between open-loop and closed-loop robot control?
Wire Your Robot on Paper
- Step 1: Take the robot design you worked with in previous lessons (or start fresh). Your robot has: 1 microcontroller, 2 drive motors with motor drivers, 1 servo arm, 1 ultrasonic distance sensor, 1 IMU, and a 7.4V LiPo battery.
- Step 2: Draw a wiring diagram — boxes for each component connected by labeled lines. Show power lines (with voltage) and communication lines (with protocol name).
- Step 3: Identify which voltage each component needs. Where do you need voltage regulators?
- Step 4: Assign a communication protocol to each sensor and actuator connection. Justify each choice.
- Step 5: Identify two things that could go wrong during integration (for example, a wiring mistake or a software bug) and describe how you would diagnose each problem.