Raspberry Pi–Arduino RC Car

by cakee in Circuits > Robots

51 Views, 0 Favorites, 0 Comments

Raspberry Pi–Arduino RC Car

IMG_20241112_182915.jpg
IMG_20241112_183541.jpg

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

IMG_20240920_082726.jpg
  1. Raspberry Pi 4
  2. Arduino Uno
  3. MicroSD Card (Raspberry Pi OS installed)
  4. 4 × DC Gear Motors (4-wheel chassis)
  5. 2 × Cytron MDD10A Motor Drivers
  6. PDB-XT60 Power Distribution Board with BEC (5V & 12V output)
  7. Pro-Range A Grade IFR 32650 25.6V 12000mAh 3C 8S2P LiFePO4 Battery Pack
  8. Robot Chassis (Custom made 600x400 mm)
  9. Jumper Wires
  10. USB-C Cable (Raspberry Pi power)
  11. USB Cable (Raspberry Pi ↔ Arduino communication)
  12. 2 × Buck Converters (24V → 5V regulated supply)

System Architecture

The system is divided into two control layers:

Raspberry Pi 4 (Main Controller)

  1. Handles user input / command interface
  2. Sends movement commands via USB serial
  3. Acts as high-level decision unit

Arduino Uno (Motor Controller)

  1. Receives serial commands from Raspberry Pi
  2. Controls motor drivers in real time
  3. Ensures stable and fast motor response

Hardware Setup

IMG_20241109_101724.jpg
IMG_20241108_142246.jpg
IMG_20241108_150737.jpg
IMG_20241111_151519.jpg
IMG_20241112_183159.jpg
IMG_20241112_182915.jpg
IMG_20241112_183541.jpg

Drive System

The robot uses a 4-wheel differential drive system:

  1. Left motors → Motor Driver 1 (Cytron MDD10A)
  2. Right motors → Motor Driver 2 (Cytron MDD10A)

Motor Driver Connections (Arduino → Drivers)

  1. IN1 → D2
  2. IN2 → D3
  3. IN3 → D4
  4. IN4 → D5

(Used for directional control of left and right motor groups)


Communication

  1. Raspberry Pi 4 → Arduino Uno via USB serial communication
  2. Commands: F (Forward), B (Backward), L (Left), R (Right), S (Stop)

Power System

  1. 25.6V LiFePO4 battery → Motor drivers (direct high-power supply)
  2. 24V → 5V Buck Converter → Arduino Uno
  3. 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.