Skip to content
Beginner build

How to build DonkeyCar

2-DoF self-driving race car · Beginner

DonkeyCar turns a 1/16 RC car into a self-driving car using a Raspberry Pi 5, a PCA9685 and a wide-angle camera, with MIT-licensed Python autopilots. About $245.

Difficulty
Beginner

Mostly printed parts and plug-in servos. Good first build.

Build time
1–2 weekends

Our estimate, part-time

Parts cost
$244

About $245, per the DonkeyCar hardware guide

Degrees of freedom
2

MIT (software only)

What is DonkeyCar?

DonkeyCar is a community platform for small self-driving cars. You take a hobby RC chassis, add a Raspberry Pi (or Jetson Nano), a PCA9685 servo driver and a camera, then train a neural network to copy your driving.

The Python library is MIT-licensed and modular, with support for cameras, lidar, GPS and game controllers. Documentation is hosted at docs.donkeycar.com.

No roll cage or top-plate CAD is published under a hardware license.

DonkeyCar specifications

Drive
RC steering + throttle
Compute
Raspberry Pi 5 (8 GB)
PWM
PCA9685
Camera
Wide-angle CSI

Figures as published by the project. See Sources below.

Bill of materials

PartQtyNotes
RC chassis (Magnet / HSP 94186 class)1
Raspberry Pi 5 (8 GB)1$60
PCA9685 servo driver1$12
Wide-angle Pi camera1$16
M2×6 and M3×10 screws—
Where's the full bill of materials?

The full BOM, with exact quantities and vendors, lives in the project's own files. Prices change often, so treat $244 as a ballpark from the project. Start at the project repository.

Tools you'll need

  • Screwdrivers
  • A laptop for training
  • Game controller

Step-by-step build overview

Electronics & wiring overview

The Pi talks to the PCA9685 over I²C, and the PCA9685 sends PWM to the steering servo and ESC. The camera uses CSI.

Battery packpower sourceLaptop / PChigh-level control2D LiDAR + camerasensingRaspberry Pireal-time controllerServo bus adapterdrivers / bushobby/smart servos2 joints / motors
PowerData / commandsSensor feedbackOverview only. Follow the project's own schematic for pinouts and voltages.

Software

Python

The donkeycar Python library (MIT).

Tips from the bench

  • ☕ Clean, consistent laps matter more than lots of data.

DonkeyCar FAQ

Do I need a GPU?

Training is faster on one, but the car itself runs on the Pi.

Sources

Written by Bots n' Beans from the project's own documentation. Check the sources for the latest revision before you buy parts.

Related builds

Robot deals

All deals →
  • Everblog AI fridge calendar

    Deal · Everblog

    10% off

    Get deal
  • CircuitMess DIY robot kits

    Shop · CircuitMess

    DIY robot kits

    Robot and gadget kits you build yourself.

    Shop
  • GRABO Cordless vacuum lifter

    Shop · GRABO

    Cordless vacuum lifter

    GRABO Pro Brushless: the original cordless vacuum lifter for pavers, stone, glass and panels.

    Shop

Like what we do? Buying through these links supports Bots n' Beans. We earn a commission at no extra cost to you. Thank you!