build details

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

Assembly - Duckiebot DB19

Modified 2021-03-13 by duckietown

This page is for the DB19 Duckiebot configuration, used in classes worldwide in 2018 and 2019.

These instructions are fundamentally the same as the instructions for the DB18. However this version includes DC motors with built-in encoders.

For older instructions from 2017 see the DB17 Duckiebot operation manual.

Duckiebot DB19 parts (get them here). You may want to check out the different configurations here.

A microSD card with the Duckiebot image already on it. This procedure is explained here.

1.5 hours of assembly time.

An assembled Duckiebot in configuration DB19.

Make sure you visit the FAQ section at the bottom of this page. This may already answer your comments, questions or doubts.

The complete assembly process is divided into 9 subparts. Make sure to complete them in the following order:

What is in the box

Modified 2021-01-08 by duckietown

All the pieces in your Duckiebox are shown in Figure 18.1. Note that the battery and camera calibration pattern are not shown in the picture.

Moreover, you might have slightly different components than those shown: for example, different USB power cables, slightly different sets of screws or a camera mount and backplate of different colors. Do not worry, these instructions can be followed anyway.

Components in Duckiebot package (Duckiebox).

Some of the components in your Duckiebox will not be used at this stage, e.g., the traffic signs and stands. Keep these aside, they will come in handy in other parts of the book.

Finally, you should have several spares, especially for the mechanical bits (nuts and screws). These are included just in case you drop a few and can’t find them anymore (especially the tiny nylon ones like to hide in the cracks!).

Preliminary Steps

Modified 2021-01-08 by duckietown

Unboxing

Modified 2021-01-08 by duckietown

Unbox all of your components and lay them out on a flat surface. Ensure that you have well lit, uncluttered space to work on.

Although not necessary, you might find useful getting a small (M2.5) wrench to ease some of the passages.

Do the bumper braces fit?

Modified 2021-01-08 by duckietown

Take the rear bumper bracers and the back bumper. The back bumper will be mounted in the last steps as a press fit to the rear bumper bracers. Try to fit the bracers into the holes of the back bumper.

Some bumper bracers have a plastic protective film which is a residue of the manufacturing process. If you struggle in the press fitting, peel off the plastic cover from one side of the bracer. If this does not help, peel off the plastic cover from both sides.

Plastic cover

Modified 2021-01-08 by duckietown

Peel the plastic cover from all the chassis parts (except the bumper bracers) on both sides.

Screws

Modified 2021-01-08 by duckietown

Note that a few among all of your metal screws are special. They are “countersunk” screws. Keep these aside. They will be needed in Part 7: Back bumper.

Countersunk screws have a tapered head.

Every time you read M3x8 screw, a M3x10 will do the same trick. You can exchange them at will.

Do not exchange metal and nylon screws though. The latter are not electrically conductive and are passive protections to potential short circuits that can damage your Duckiebot beyond repair. This is especially true for - Part 3: Bottom chassis; make sure you use the correct nylon screws at that step.

Remember that instructions are your friend! At least at this stage, try to follow them precisely.

If regardless of this foreword you still choose to try and figure it out yourself, it’s ok, but for the love of what is precious, do not plug the battery in until you have performed a visual inspection here.

Motors

Modified 2021-01-08 by duckietown

From the Duckiebox package take the following components:

  • Bottom plate (1x)
  • Blue dc motors (2x)
  • Motor holders (4x)
  • M3x30 screw (4x)
  • M3 nuts (4x)

Step 1

Modified 2021-01-08 by duckietown

Pass two of the motor holders through the openings in the bottom plate of the chassis as shown in Figure 18.3. If you have troubles fitting the holders, it is probably because you have not removed the protective plastic film. Note which holes you are using. You should be using the middle section ones.

How to mount the motor holders.

Put one motor between the holders as shown in Figure 18.4.

How to mount the first DC-motor.

Orient the motors that their wires are pointing to the inside (i.e., towards the center of the plate).

Use your screwdriver.

Use 2 M3x30 screws and 2 M3 nuts to secure the motor to the motor supports. Pass the screws through the holes from the outside inwards, then tighten the screws to secure the holders to the bottom plate of the chassis.

You might find aligning the holes to be a little bit hard. It is easier to first get the top screw aligned and place the screw in, and then push in the side support piece in to place. If that still doesn’t work, get the bottom screw and the side support in first, align it, and secure with nuts. Then try to push the top screw through. You might have to use the screw to expand the hole a bit.

Step 2

Modified 2020-04-03 by Rafael Froehlich

Do the same for the second motor as well as shown in Figure 18.5 and Figure 18.6

How to mount the second motor supports
How to mount the second DC-motor

Tighten the motors firmly, as a wobbly motor might cause troubles later on.

Step 3

Modified 2020-04-03 by Rafael Froehlich

Wire the cables of the two motors through the bottom plate of the chassis and make sure they are well separated (Figure 18.7).

Cables through central hole

Bottom chassis

Modified 2020-04-03 by Rafael Froehlich

The Duckiebot is driven by controlling the wheels attached to the DC motors. Still, it requires a passive support on the back. In this configuration an omni-directional wheel is attached to the bottom plate of the chassis to provide such support.

From the Duckiebox package take the following components: - Steel omni-directional wheel (1x) - M3x25 metal spacers (2x) - M3x10 metal screws (2x) - M3x10 nylon screws (2x)

Step 4

Modified 2020-04-03 by Rafael Froehlich

Assemble the omni-directional wheel as shown in figure Figure 18.8.

Assembly of the omni-directional wheel

Step 5

Modified 2020-04-03 by Rafael Froehlich

Then mount it to the bottom plate of the Duckiebot as shown in figure Figure 18.9.

Mounting the omni-directional wheel

Sometimes you might need a bit of force to get the screw and the standoffs fully connected.

Step 6

Modified 2020-04-03 by Rafael Froehlich

From the Duckiebot kit take the following components:

  • M3x10 screws (4x)
  • M3x25 metal spacers (2x)
  • M3x30 metal spacers (2x)
  • 1x Rear bumper bracer

and mount the rear bracer to the bottom plate with the 25cm spacers (Figure 18.10)!

Mounting the rear bracer

Step 7

Modified 2020-04-03 by Rafael Froehlich

Now use the M3x30 standoffs (longer ones) for the front of the Duckiebot (Figure 18.11).

Mount front spacers

Step 8

Modified 2020-04-03 by Rafael Froehlich

From the Duckiebot kit take the following components:

  • Wheels (2x)

Figure 18.12 shows how to mount the big yellow driving wheels to the bottom chassis.

Mounting the driving wheels

Mind that there is a particular orientation at which the wheels will fit. Don’t force them too much!

Figure 18.13 shows how the assembly should look like after mounting the wheels.

The wheels mounted on the bottom plate assembly.

Computation unit

Modified 2020-04-03 by Rafael Froehlich

From the Duckiebot kit take the following components:

  • Raspberry Pi 3B+ (1x)
  • Heat sink (1x) (or 2x if there are two of them)
  • Camera cable (1x) (This should be in the same box as the camera)
  • Micro SD card (1x)

You probably have two heat sinks, make sure you use the bigger one for sure. The smaller one can be used as shown in the following pictures or apply it on the USB port you will later use for the external 32GB USB dongle.

You will notice there is a camera cable already attached to the camera. We won’t use this one since it is a bit short. You will find a longer camera cable inside the same box as the camera.

Figure 18.14 shows the components needed to complete the following steps.

The bigger heat sinks and the Raspberry Pi 3 B+.

Step 9

Modified 2020-04-03 by Rafael Froehlich

Peel the cover from the bottom of the heat sink and place it on the Raspberry Pi microchip, as shown in Figure 18.15. Make sure to put it on the

How to mount the heat sink(s)

Step 10

Modified 2020-04-03 by Rafael Froehlich

Insert the SD card in the slot as shown in figure Figure 18.16.

If the card is not flashed yet, do the initialization first: Unit C-4 - Setup - Duckiebot SD Card, but only until the section Section 4.2 - Burn the SD card, because you will need the fully assembled Duckiebot for the following steps of the Duckiebot Initialization.

Insert SD card

Step 11

Modified 2020-04-03 by Rafael Froehlich

Make sure that the visible metal connectors of the camera cable match the ones in the Raspberry Pi (Figure 18.17), then plug in the cable and push down the black wings to fasten the connection, making sure it “clicks”.

Please be aware that different camera cables have the text on different sides and with different orientation, do not use it as a landmark.

Put the camera cable in the open plug

Then close the camera plug once the cable is pushed in properly. You can check by pulling at the cable once you have closed the plug and you mustn’t be able to tear it out at all.

Close camera cable plug

Step 12

Modified 2020-04-03 by Rafael Froehlich

From the Duckiebot kit take the following components:

  • Duckiebot Hut (1x)
  • Top plate of the chassis (1x)
  • M2.5x12 nylon spacers (4x)
  • M2.5x10 Nylon screws (4x)
  • M2.5x4 Nylon spacers (4x)
  • M2.5 nylon nuts (4x)
  • USB to micro USB cables (2x)
  • Set of three female to female(F/F) jumper wires (1x)

Figure 18.19 shows the components needed to complete this part of the tutorial.

The parts needed to assemble the Raspberry Pi and the Hut.

In the newest version of the Hut, the pins are removed. This is to prevent them from being shorted. You will not need them so you can neglect them in the next few pictures.

It is more convenient to not separate the jumper cables, but leave them in two sets of three.

Place the spacers on the bottom part of the Duckiebot hut and secure them using the M2.5 nylon nuts, see figure Figure 18.20

Mount spacers to Hut

Step 13

Modified 2020-04-03 by Rafael Froehlich

Mount the pre-assembled Hut and Raspberry Pi to the top plate with nylon screws as shown in figure Figure 18.21

Mount computation unit

Make sure that the Raspberry Pi GPIO pins fit into the Hut connector.

Step 14

Modified 2020-04-03 by Rafael Froehlich

Connect the F/F jumper wire to the pins on the Hut as shown in figure Figure 18.22 and make sure the camera cable is put in the slit of the Hut

Connect jumper wire

Step 15

Modified 2020-04-03 by Rafael Froehlich

Finally, attach the two USB cables to the power plugs on the Hut and Raspberry Pi, as in Figure 18.23.

Plugging in the power cables

Camera

Modified 2020-04-03 by Rafael Froehlich

From the Duckiebox package take the following components:

  • Raspberry Pi camera
  • Camera mount (1x)
  • M3x10 screws (3x)
  • M3 nuts (3x)

Step 16

Modified 2020-04-03 by Rafael Froehlich

Open the camera cable plug on the Raspberry Pi camera as shown in figure Figure 18.24.

Open camera cable plug

Make sure the cable is routed through the camera mount as well!

Close the plug once the cable is pushed in completely as in Figure 18.25

Close camera plug

Insert the M3x10 nylong screws from the front to screw the camera to its mount, see Figure 18.26

Screw the camera to its mount

Make sure the camera is as parallel to its mount as possible, i.e. facing downwards at this very angle.

Step 17

Modified 2020-04-03 by Rafael Froehlich

Screw the camera mount to the top plate with three M3x10 screws and metal M3 nuts, see Figure 18.27.

Screw the mount to the top plate

Top chassis

Modified 2020-04-03 by Rafael Froehlich

From the Duckiebox package take the following components: - Metal screws M3x10 (4x) - Back bumper bracer (1x)

Step 18

Modified 2020-04-03 by Rafael Froehlich

Put the top plate on the bottom part of the chassis as shown in figure Figure 18.28 but do not screw it in yet. This is how it should look like in the end.

Placing the top plate

Step 19

Modified 2020-04-03 by Rafael Froehlich

Now open the slots for the cables of the DC motors on the Hut with a small screw driver and make sure you mount the cables in correctly, see figure Figure 18.29. Probably you have to take the top and bottom part of the chassis apart again

Connect the DC motor cables to the Hut

Step 20

Modified 2020-04-03 by Rafael Froehlich

Place the second rear bumper bracer on top of the chassis spacers in the back of the chassis. Again, the holes should align (Figure 18.30). If you experience a slight misalignment, carefully pass an M3 screw through the top plate and the top bumper bracer first, then move the standoff until you can plug the screw in. At the end, put in the second M3 screw as well.

Rear bumper bracer positioning

Step 21

Modified 2020-04-03 by Rafael Froehlich

Fasten the top plate in the front using the other two M3x10 screws, as in(Figure 18.31.

Fasten the top plate completely

Step 22

Modified 2020-04-03 by Rafael Froehlich

You can use a zip tie to help with cable management (Figure 18.32). Tip: you can use the same zip tie to keep the camera cable down and the USB cables below from touching the wheels.

Cable management

Back bumper

Modified 2020-04-03 by Rafael Froehlich

From the Duckiebot kit take the following components:

  • Back bumper (1x)
  • M3x10 nylon screws (2x)
  • M3x10 metal screws (4x)
  • M3x10 countersunk screws (2x)
  • M3 metal nut (4x)
  • M3x25 spacers (2x)
  • Back pattern plate (1x)
  • Circle pattern sticker (1x)

In the picture, nylon screws are used. However you probably used them to assemble the omni-directional wheel, then use the metal screws.

Figure 18.33 shows the components needed to complete this upgrade.

The parts needed to mount the circle grid holder.

You could have a back plate of a different color with respect to the picture, e.g., black or white. They are all functionally equivalent.

Step 23

Modified 2020-04-03 by Rafael Froehlich

Mount the spacers using the metal screws, as in Figure 18.34.

How to mount the spacers

Pay attention that the spacers should be in the same direction as the LEDs.

Step 24

Modified 2020-04-03 by Rafael Froehlich

Fasten the back plate to the back bumper standoffs using the countersunk screws. The back plate is not symmetric, place it such that it is centered with respect to the back bumper as shown in picture Figure 18.35.

Mount the pattern plate

Step 25

Modified 2020-04-03 by Rafael Froehlich

Peel off the sticker with the circle pattern and put it on the pattern plate mounted before, see picture Figure 18.36.

Pattern sticker

Step 26

Modified 2020-04-03 by Rafael Froehlich

Connect a new jumper wire (F/F) to the connector on the back bumper, see picture Figure 18.37.

Jumper wire to back bumper

No matter what exact solution you choose concerning the cable management, the objective is to avoid any cables from touching the wheels in the end. One solution could be something like it is shown in figure Figure 18.38.

Cable management

Step 27

Modified 2020-04-03 by Rafael Froehlich

Screw the back bumper to the rest of the chassis with four metal screws and nuts, see picture Figure 18.39.

Mounting the back bumper

Pay attention that the pins of the bumper bracers are properly put in the holes of the back bumper. It might be a little bit difficult to place it properly.

Wire the cable mounted in step 26 through the top plate of the chassis as shown in the picture as well.

Front bumper

Modified 2020-04-03 by Rafael Froehlich

From the Duckiebot kit take the following components:

  • Front bumper (1x)
  • M3x10 metal screws (2x)

Step 28

Modified 2020-04-03 by Rafael Froehlich

At that point you should have arrived with two loose cables in the front. Make sure to connect both of them to the front bumper. The one from step 26 on the right hand side and the other on the left hand side, see picture Figure 18.40.

Wiring the front bumper

Step 29

Modified 2020-04-03 by Rafael Froehlich

First, click in the front bumper without any screws. Maybe you have to bend the top and bottom plate of the chassis a little bit in order to make it fit, see pictures Figure 18.41 and Figure 18.42

Clicking in the front bumper

Step 30

Modified 2020-04-03 by Rafael Froehlich

Now use the two M3x10 metal screws to finally fix the top plate of the chassis properly. This will now prevent the front bumper from falling out again. Probably you will have to move the standoffs a little bit in order to make the holes flush, see figure Figure 18.43.

Fixing the top plate

Battery and Duckie

Modified 2020-04-03 by Rafael Froehlich

From the Duckiebot kit take the following components:

  • Battery (1x)
  • Zip tie (1x)
  • Duckie (N+1x)

Visual inspection

Modified 2020-04-03 by Rafael Froehlich

Before plugging in the battery, make sure the Hut’s GPIO pins are (a) not touching each other, (b) not touching any metal screws (in case you did not follow these instructions exactly) and (c) are free from any external object that might have gotten stuck there during the assembly process.

If the GPIOs of the Hut get shorted (there is an electrically conductive connection between them) when you plug in the battery, you might damage the Raspberry Pi beyond repair!

Step 31

Modified 2020-04-03 by Rafael Froehlich

Place the battery and fix it using a zip tie (Figure 18.44), then connect the USB cables.

Do not unplug/replug the bumper wires when the power is on. You could break the bumpers!

Fixing the top plate

There are different batteries concerning the outer dimensions, so the result could look like either of the following pictures Figure 18.45 or Figure 18.46:

Solution with smaller battery
The final Duckiebot assembly, with longer form factor battery.

Now place a Duckie on top of your brand new Duckiebot, but be careful not to hurt the Duckie!

Check the outcome

Modified 2020-04-03 by Rafael Froehlich

The complete Duckiebot 19

As a final check, verify that no cable is touching the wheels. You can use the provided zip ties to ensure that cables stay out of the way.

Troubleshooting

Modified 2021-03-12 by duckietown

The omni-directional wheel, the back bumper or the Raspberry Pi are challenging to mount.

Sometimes in life you have to push a little to make things happen. (But don’t push too much or things will break!)

I have a different color of the back patter plate. Do I get the wrong one?

The color of this part can be of any and all are functionally equivalent.

My battery is different from the one shown in the pictures! Did I get the wrong box?

If there is a duckie in or on your box, you most probably got the right one. We support different battery models. All supported models are functionally equivalent, although the form factor varies.

The robot doesn’t move in the right direction or moves backwards instead of forward.

You have attached the motor wires in the wrong sockets. You will have to open the robot, fix that and test again.