Raspberry Pi–Arduino RC Car
A hybrid RC car built using Raspberry Pi 4 and Arduino Uno, designed for serial robot control with a 4-wheel differential drive system.
The Raspberry Pi acts as the main controller for high-level command handling, while the Arduino manages real-time motor control through dual motor drivers.
This architecture was used to separate decision-making (Raspberry Pi) from motor execution (Arduino), improving stability and control performance.
Supplies
- Raspberry Pi 4
- Arduino Uno
- MicroSD Card (Raspberry Pi OS installed)
- 4 × DC Gear Motors (4-wheel chassis)
- 2 × Cytron MDD10A Motor Drivers
- PDB-XT60 Power Distribution Board with BEC (5V & 12V output)
- Pro-Range A Grade IFR 32650 25.6V 12000mAh 3C 8S2P LiFePO4 Battery Pack
- Robot Chassis (Custom made 600x400 mm)
- Jumper Wires
- USB-C Cable (Raspberry Pi power)
- USB Cable (Raspberry Pi ↔ Arduino communication)
- 2 × Buck Converters (24V → 5V regulated supply)
System Architecture
The system is divided into two control layers:
Raspberry Pi 4 (Main Controller)
- Handles user input / command interface
- Sends movement commands via USB serial
- Acts as high-level decision unit
Arduino Uno (Motor Controller)
- Receives serial commands from Raspberry Pi
- Controls motor drivers in real time
- Ensures stable and fast motor response
Hardware Setup
Drive System
The robot uses a 4-wheel differential drive system:
- Left motors → Motor Driver 1 (Cytron MDD10A)
- Right motors → Motor Driver 2 (Cytron MDD10A)
Motor Driver Connections (Arduino → Drivers)
- IN1 → D2
- IN2 → D3
- IN3 → D4
- IN4 → D5
(Used for directional control of left and right motor groups)
Communication
- Raspberry Pi 4 → Arduino Uno via USB serial communication
- Commands: F (Forward), B (Backward), L (Left), R (Right), S (Stop)
Power System
- 25.6V LiFePO4 battery → Motor drivers (direct high-power supply)
- 24V → 5V Buck Converter → Arduino Uno
- Separate 5V Buck Converter → Raspberry Pi 4 (stable USB-C equivalent supply)
Arduino Code
The following code runs on Arduino Uno and receives commands from Raspberry Pi.
The code controls motor direction through Cytron MDD10A drivers.
Downloads
Working
The Raspberry Pi 4 acts as the central command unit and sends movement instructions to the Arduino via USB serial communication.
The Arduino processes these commands and controls two Cytron MDD10A motor drivers, which independently drive the left and right motor groups.
This creates a stable 4-wheel differential drive system capable of forward, backward, and turning movements.