build details

Show: section status errors & todos local changes recent changes last change in-page changes feedback controls

Getting the Duckiebot hardware

Modified 2021-03-13 by duckietown

Parts to assemble a Duckiebot.


Modified 2021-10-30 by tanij

You can acquire Duckiebots in two ways.

  • Do it yourself (DB17): the DB17 Duckiebot configuration is made of components that you can source independently.

  • “One click” solution (DB18 and above): you can source complete hardware kits on the Duckietown project online store. These kits are tested to work with Duckietown software, and guaranteed to work.

Acquiring the parts for a DB17

Modified 2021-03-13 by duckietown

Here, we provide a link to all bits and pieces that are needed to build a DB17-jwd Duckiebot, along with the price tag.

In general, keep in mind that:

  • The links might expire, or the prices might vary.
  • Shipping times and fees vary, and are not included in the prices shown below.
  • International deliveries are subject to additional custom clearances and import fees.
  • Substitutions are OK for the mechanical components, and not OK for all the electronics, unless you are OK in writing some software. Limited technical support will be offered for hardware customizations.
  • Buying the parts for more than one Duckiebot makes each one cheaper than buying only one.
  • For some components, the links we provide contain more bits than actually needed.

DB17 Bill of materials

Modified 2021-03-13 by duckietown

Bill of materials
Chassis USD 20
Camera with 160-FOV Fisheye Lens USD 39
Camera Mount USD 4
300mm Camera Cable USD 2
Raspberry Pi 3 - Model B+ USD 39
Heat Sinks USD 3
Power supply for Raspberry Pi USD 7.50
16 GB Class 10 MicroSD Card USD 10
Mirco SD card reader USD 6
DC Motor HAT USD 22.50
2 Stacking Headers USD 2.50/piece
Battery Pack USD 25
16 Nylon Standoffs (M2.5 12mm F 6mm M) USD 0.06/piece
4 Nylon Hex Nuts (M2.5) USD 0.02/piece
4 Nylon Screws (M2.5x10) USD 0.05/piece
2 Zip Ties (300x5mm) USD 9
Wireless Adapter (5 GHz) (DB17-w) USD 25
Joypad (DB17-j) USD 10.50
Tiny 32GB USB Flash Drive (DB17-d) USD 10
PWM/Servo HAT (DB17-l1) USD 17.50
Power Cable (DB17-l1) USD 7.80
Male-Male Jumper Wire (DB17-l1) USD 1.95
8 M3x10 pan head screws (DB17-l2) USD 7
8 M3 nuts (DB17-l2) USD 7
Bumpers set (DB17-l2) USD 7 (custom made)
Bumper bracers set (DB17-l2) USD 7 (custom made)
LEDs (DB17-l3) USD 10
LED HAT (DB17-l3) USD 9/piece (but 3 pieces minimum)
20 Female-Female Jumper Wires (300mm) (DB17-l3) USD 8
4 4 pin female header (DB17-l3) USD 0.60/piece
12 pin male header (DB17-l3) USD 0.48/piece
2 16 pin male header (DB17-l3) USD 0.61/piece
3 pin male header (DB17-l3) USD 0.10/piece
2 pin female shunt jumper (DB17-l3) USD 2/piece
40 pin female header (DB17-l3) USD 1.50
5 200 Ohm resistors (DB17-l3) USD 0.10/piece
10 130 Ohm resistors (DB17-l3) USD 0.10/piece
Soldering tools USD 20
Total for DB17 configuration USD 193
Total for DB17-w configuration USD 218
Total for DB17-j configuration USD 203
Total for DB17-d configuration USD 203
Total for DB17-wjd configuration USD 238
Total for DB17-l configuration USD 367


Modified 2019-04-16 by tanij

We selected the Magician Chassis as the basic chassis for the robot (Figure 3.1).

We chose it because it has a double-decker configuration, and so we can put the battery in the lower part.

The chassis pack includes 2 DC motors and wheels as well as the structural part, in addition to a screwdriver and several necessary mechanical bits (standoffs, screws and nuts).

The Magician Chassis

Raspberry Pi 3 - Model B

Modified 2019-04-16 by tanij

It is recommend to upgrade to Raspberry Pi 3 model B+. In this case the 5 GHz wireless adapter is no longer necessary.

The Raspberry Pi is the central computer of the Duckiebot. Duckiebots use Model B (Figure 3.2) ( A 1.2GHz 64-bit quad-core ARMv8 CPU, 1GB RAM), a small but powerful computer.

The Raspberry Pi 3 Model B

Power Supply

Modified 2019-04-16 by tanij

We want a hard-wired power source (5VDC, 2.4A, Micro USB) to supply the Raspberry Pi (Figure 3.3) while not driving. This charger can double down as battery charger as well.

The Power Supply

Heat Sinks

Modified 2019-04-16 by tanij

The Raspberry Pi will heat up significantly during use. It is warmly recommended to add heat sinks, as in Figure 3.4. Since we will be stacking HATs on top of the Raspberry Pi with 15 mm standoffs, the maximum height of the heat sinks should be well below 15 mm. The chip dimensions are 15x15mm and 10x10mm.

The Heat Sinks

Class 10 MicroSD Card

Modified 2019-04-16 by tanij

The MicroSD card (Figure 3.5) is the hard disk of the Raspberry Pi. 16 GB of capacity are sufficient for the system image.

The MicroSD card

Mirco SD card reader

Modified 2019-04-16 by tanij

A microSD card reader (Figure 3.6) is useful to copy the system image to a Duckiebot from a computer to the Raspberry Pi microSD card, when the computer does not have a native SD card slot.

The Mirco SD card reader


Modified 2019-04-16 by tanij

The Camera is the main sensor of the Duckiebot. All versions equip a 5 Mega Pixels 1080p camera with wide field of view ( 160^\circ ) fisheye lens (Figure 3.7).

The Camera with Fisheye Lens

Camera Mount

Modified 2019-04-16 by tanij

The camera mount (Figure 3.8) serves to keep the camera looking forward at the right angle to the road (looking slightly down). The front cover is not essential.

The Camera Mount

The assembled camera (without camera cable), is shown in (Figure 3.9).

The Camera on its mount

300mm Camera Cable

Modified 2019-04-16 by tanij

A longer (300 mm) camera cable Figure 3.10 makes assembling the Duckiebot easier, allowing for more freedom in the relative positioning of camera and computational stack.

A 300 mm camera cable for the Raspberry Pi

DC Motor HAT

Modified 2021-03-13 by duckietown

We use the DC Stepper motor HAT (Figure 3.11) to control the DC motors that drive the wheels. This item will require soldering to be functional. This HAT has dedicate PWM and H-bridge for driving the motors.

The Stepper Motor HAT

Stacking Headers

Modified 2021-03-13 by duckietown

We use a long 20x2 GPIO stacking header (Figure 3.12) to connect the Raspberry Pi with the DC Motor HAT. This item will require soldering to be functional.

The Stacking Headers


Modified 2021-03-13 by duckietown

The battery (Figure 3.13) provides power to the Duckiebot.

We choose this battery because it has a good combination of size (to fit in the lower deck of the Magician Chassis), high output amperage (2.4A and 2.1A at 5V DC) over two USB outputs, a good capacity (10400 mAh) at an affordable price. The battery linked in the table above comes with two USB to microUSB cables.

The Battery

Standoffs, Nuts and Screws

Modified 2019-04-16 by tanij

We use non electrically conductive standoffs (M2.5 12mm F 6mm M), nuts (M2.5), and screws (M2.5x10mm) to hold the Raspberry Pi to the chassis and the HATs stacked on top of the Raspberry Pi.

The Duckiebot requires 8 standoffs, 4 nuts and 4 screws.

Standoffs, Nuts and Screws

Zip Tie

Modified 2021-03-13 by duckietown

Two 300x5mm zip ties are needed to keep the battery at the lower deck from moving around.

The zip ties

Configuration DB17-w

Modified 2021-03-13 by duckietown

Wireless Adapter (5 GHz)

Modified 2021-03-13 by duckietown

The Edimax AC1200 EW-7822ULC 5 GHz wireless adapter (Figure 3.16) boosts the connectivity of the Duckiebot, especially useful in busy Duckietowns (e.g., classroom). This additional network allows easy streaming of images.

The Edimax AC1200 EW-7822ULC wifi adapter

This component is not necessary if upgrading to Raspberry Pi 3 Model B +.

Configuration DB17-j

Modified 2021-03-13 by duckietown


Modified 2021-03-13 by duckietown

The joypad is used to manually remote control the Duckiebot. Any 2.4 GHz wireless controller (with a tiny USB dongle) will do.

The model linked in the table (Figure 3.17) does not include batteries.

A Wireless Joypad

2 AA 1.5V batteries (Figure 3.18) not included in the bill of materials.

A Wireless Joypad

Configuration DB17-d

Modified 2021-03-13 by duckietown

Tiny 32GB USB Flash Drive

Modified 2021-03-13 by duckietown

In configuration DB17-d, the Duckiebot is equipped with an “external” hard drive (Figure 3.19). This add-on is very convenient to store logs during experiments and later port them to a workstation for analysis. It provides storage capacity and faster data transfer than the MicroSD card.

The Tiny 32GB USB Flash Drive

Configuration DB17-l

Modified 2021-03-13 by duckietown


Modified 2021-03-13 by duckietown

This Duckiebot is equipped with 5 RGB LEDs (Figure 3.20). LEDs can be used to signal to other Duckiebots, or just make fancy patterns.

The pack of LEDs linked in the table above holds 10 LEDs, enough for two Duckiebots.



Modified 2021-03-13 by duckietown

The LED HAT (Figure 3.21) provides an interface for our RGB LEDs and the computational stack. This board is a daughterboard for the Adafruit 16-Channel PWM/Servo HAT, and enables connection with additional gadgets such as ADS1015 12 Bit 4 Channel ADC, Monochrome 128x32 I2C OLED graphic display, and Adafruit 9-DOF IMU Breakout - L3GD20H+LSM303. This item will require soldering.

This board is custom designed and can only be ordered in minimum runs of 3 pieces. The price scales down quickly with quantity, and lead times may be significant, so it is better to buy these boards in bulk.



Modified 2021-03-13 by duckietown

The PWM/Servo HAT (Figure 3.22) mates to the LED HAT and provides the signals to control the LEDs, without taking computational resources away from the Rasperry Pi itself. This item will require soldering.

The PWM-Servo HAT

Power Cable

Modified 2021-03-13 by duckietown

To power the PWM/Servo HAT from the battery, we use a short (30cm) angled male USB-A to 5.5/2.1mm DC power jack cable (Figure 3.23).

The 30cm angled USB to 5.5/2.1mm power jack cable.

Male-Male Jumper Wires

Modified 2021-03-13 by duckietown

The Duckiebot needs one male-male jumper wire (Figure 3.24) to power the DC Stepper Motor HAT from the PWM/Servo HAT.

Premier Male-Male Jumper Wires

Female-Female Jumper Wires

Modified 2021-03-13 by duckietown

20 Female-Female Jumper Wires (Figure 3.25) are necessary to connect 5 LEDs to the LED HAT.

Premier Female-Female Jumper Wires


Modified 2021-03-13 by duckietown

These bumpers are designed to keep the LEDs in place and are therefore used only in configuration DB17-l. They are custom designed parts, so they must be produced and cannot be bought. We used laser cutting facilities.

Headers, resistors and jumper

Modified 2021-03-13 by duckietown

Upgrading DB17 to DB17-l requires several electrical bits: 5 of 4 pin female header, 2 of 16 pin male headers, 1 of 12 pin male header, 1 of 3 pin male header, 1 of 2 pin female shunt jumper, 5 of 200 Ohm resistors and finally 10 of 130 Ohm resistors.

These items require soldering.

Caster (DB17-c)

Modified 2021-03-13 by duckietown

The caster (Figure 3.26) is an DB17-c component that substitutes the steel omni-directional wheel that comes in the Magician Chassis package. Although the caster is not essential, it provides smoother operations and overall enhanced Duckiebot performance.

The caster wheel

To assemble the caster at the right height we will need to purchase:

Standoffs for caster wheel.
Screws for caster wheel.
Split lock washers for caster wheel.
Mechanical bits to assemble the caster wheel.

The caster wheel use is to be considered experimental and has been dropped in official configurations starting from DB18.