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.
Mostly printed parts and plug-in servos. Good first build.
Our estimate, part-time
About $245, per the DonkeyCar hardware guide
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
| Part | Qty | Notes |
|---|---|---|
| RC chassis (Magnet / HSP 94186 class) | 1 | |
| Raspberry Pi 5 (8 GB) | 1 | $60 |
| PCA9685 servo driver | 1 | $12 |
| Wide-angle Pi camera | 1 | $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.
Software
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 →
Get dealDeal · Everblog
10% off
ShopShop · CircuitMess
DIY robot kits
Robot and gadget kits you build yourself.
ShopShop · GRABO
Cordless vacuum lifter
GRABO Pro Brushless: the original cordless vacuum lifter for pavers, stone, glass and panels.
Like what we do? Buying through these links supports Bots n' Beans. We earn a commission at no extra cost to you. Thank you!
