Summary of Contents for Duckietown Duckiedrone DD24
Page 1
The Duckiedrone Operation Manual Contents Preliminaries Safety Prerequisites How to Use Multimeters Included materials Other Required Materials Software initialization Initializing the Flight Controller Hardware build DD24 3D Assembly Tool Drone handling First boot First connection Troubleshooting Datasheets Using the drone Flight Controller PID Tuning Common issues Learning Experiences...
Page 2
A majority of the drone build involves soldering. Soldering is fun and safe when done with proper care; however, the soldering iron is very hot, and is a significant burn hazard. By-products of soldering are also dangerous: the fumes produced from the flux evaporating, as well as handling the solder itself (it may contain lead, a heavy metal).
Page 3
The black nuts (of the motors) should be on the clockwise motors/props, while the red nuts on the counter clockwise ones (so they don’t unscrew while spinning). Fig. 1 RED: counter clockwise propellers BLACK: clockwise propellers/motors Prerequisites This section contains information about the most important skills used in the build. Warning ...
Note Sometimes parts will have wires already tinned out-of-the-box by the manufacturer (i.e. pre-tinned). You can identify this by: 1. The “shininess” of the tip of a wire 2. The inability to fray the wire strands of the tip of a wire. However, such tinning is often ineffective.
Page 5
do this cleaning more frequently while soldering Troubleshooting The alligator clips of my helping hands are loose. SYMPTOM Remove the offending alligator clip from the helping hands, then use pliers to RESOLUTION carefully pinch the end tighter. Re-insert once fit is tight Troubleshooting I burned some insulator onto my wire while tinning.
Fig. 2 Multimeter Continuity Check In electronics, a continuity check is a test of the resistance between any two points of a circuit (that it is in fact a complete circuit). If there is zero resistance between two points, then there is a short between the points. Shorts are potentially dangerous because they may cause far too much current to flow throughout the circuit - thus resulting in the circuit frying due to heat generated by Joule effect.
Page 7
Continuity test dial position Continuity test mode Test the continuity test mode by touching and holding the multimeter leads together. A continuous beep will be audible for as long as the leads are held together. Fig. 3 Leads held together (a continuous beep is audible)
2. Perform the Continuity Check Place each lead at a point of the circuit or component you want to test. Fig. 4 Multimeter leads on breadboard If the path between the two points is continuous (i.e. is a short), then the screen will display a value of zero (or near zero) and the multimeter will emit a continuous beep for as long as the leads are held in place.
How to Use a Multimeter for Beginners - How to Measure V… See also For an introduction or review of circuit basics and Ohm’s Law, , check out this SparkFun V = I R article. Included materials In the picture there are all materials included in the Duckietown kit.
Fig. 6 The yellow box Fig. 7 What’s inside the box Other Required Materials Base Station (Laptop) This section contains what you will need to build and fly your drone that is not included in the kit. In order to fly the drone, you must have a laptop or personal computer that is capable of connecting to the internet.
Page 11
1. Betaflight Configurator. This is an application that will allow you to set up your Flight Controller. Note You will install this later in the manual. Balena Etcher Soldering Tools Essential: Fig. 8 Soldering iron with base, sponge and solder soldering iron solder brass wool or sponge to clean soldering iron...
Page 12
Fig. 9 Soldering iron with base, sponge and solder wire strippers safety goggles fume extractor multimeter helping hands Nice to have: solder remover (either solder sucker or de-soldering wick) to fix mistakes soldering mat tweezers or pliers flush cutters...
Misc. Tools Double-sided tape Software initialization What you will need A computer (a.k.a. “base station”) with an internet connection Balena Etcher or similar program A micro SD card (32GB, U3, Class 10), e.g., that from your Duckiebox A micro SD card reader, e.g., that from your Duckiebox What you will get ...
Page 14
Warning Double check that the “drive” is your micro SD card. You may be prompted to enter the base station password to proceed. This is normal: flashing an SD card deletes everything that is on it, so Etcher is making sure this process is OK with you. Note ...
Page 15
# NOTE: the following block is a template, use it to define connection to custom wifi networks network={ id_str="network_1" ssid="duckietown" psk="quackquack" key_mgmt=WPA-PSK : change it if you are not in the US (e.g., for Switzerland, for Canada; full list...
Page 16
This file can be edited after the first boot as well if you want to add other networks. ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US # NOTE: the following block is a template, use it to define connection to custom wifi networks network={ id_str="network_1" ssid="duckietown" psk="quackquack" key_mgmt=WPA-PSK network={ id_str="network_2" ssid="example-second-network" psk="quackquack2" key_mgmt=WPA-PSK network={ id_str="network_3"...
Page 17
Initializing the Flight Controller What you will need A base station computer Flight Controller USB to USB-C cable What you will get An up-to-date, initialized Flight Controller The Flight Controller (FC) implements several low-level behaviors, e.g., stabilizing the Duckiedrone around roll, pitch, and yaw through three different PID controllers.
Page 18
Fig. 13 Betaflight Configurator (BFC) welcome screen Flashing the correct firmware Updating the Flight Controller firmware (Flashing the Flight Controller) Flight Controllers might have different versions of firmware (i.e., the software that runs on the Flight Controller microcontroller) out of the factory. Normally, this only needs to be done once initially. Follow this procedure to update your firmware.
Page 19
Fig. 14 tab in Betaflight Configurator Firmware Flasher Configure the options in the tab as below: Fig. 15 parameters to set Firmware Flasher Flashing the Flight Controller Attention Normally, when connected to the base station, the Flight Controller connects in Normal mode This can be identified by: Having a red LED on the Flight Controller board...
Page 20
Fig. 16 button location on the SpeedyBeeF405V3 Flight Controller. BOOT 2. Connect the Flight Controller to the laptop while pressing the button. boot Now that the Flight Controller is in you can flash the correct firmware: bootloader mode 1. In the Betaflight Configurator Firmware Flasher tab, click the button in the bottom Load Firmware [Cloud] right.
Page 21
Fig. 17 button in the top-right corner of Betaflight Configurator "Connect" 4. Select the correct connection port Details might vary depending on available connections on your base station. The correct port should start with: Linux/macOS /dev/tty.usbserial* /dev/cu.usbserial* /dev/ttyUSB* Windows COM* 5.
Page 22
Fig. 19 Top left of Betaflight Configurator, check Betaflight Configurator version and Flight Controller firmware version here Restoring the correct settings We will restore the correct settings for the Flight Controller that reflect the setup we have on Duckiedrones (i.e. Flight Controller upside down, ESCs communication protocol, etc.) The settings for the Flight Controller can be saved and restored through the CLI interface of Betaflight, which is akin to a shell used to interact with the firmware.
Page 23
Fig. 21 CLI interface 6. Press on your keyboard to execute the commands and wait for the shell to finish (it should take a Enter few seconds) The Flight Controller will now reboot and reconnect. Configuring motors spin direction Warning ...
Page 24
Fig. 23 Motors direction wizard 3. The wizard will change to show you the different motors of the drone and after clicking on one you will be able to select whether to have it spin in the normal direction or to reverse it. Do this for each one of the 4 motors, then click Close Fig.
Page 25
Attention You need to connect the battery in order to program the ESCs. Note You need to use a Chrome-based browser (Google Chrome, Microsoft Edge, etc.) for this. 1. Connect the battery to the ESC board. (The ESC board cannot be powered by the flight controller, it needs its own power supply).
SYMPTOM We’re happy to support! Please contact our hardware team via email: RESOLUTION hardware@duckietown.com 3D Assembly Tool The 3D Assembly Tool is a powerful software application designed to assist users in visualizing and assembling the DD24. With its intuitive interface and advanced features, it provides step-by-step assembly instructions.
First boot There is only one first time you can connect to your Duckiedrone. Savor the experience. An assembled What you will need DD24 initialized SD card, see Software initialization DD24 A live What you will get DD24 Before getting started The first time a newly flashed SD card is inserted in the Duckiedrone a special “first boot”...
Do not power the Raspberry Pi just yet. Getting started Warning Do not interrupt the first boot procedure, e.g., by removing power to the Raspberry Pi. It will likely corrupt the SD card. A corrupted SD card will have to be flashed again. 1.
Page 29
Fig. 27 Pins & not shorted. 4. If you haven’t already, insert the initialized micro SD card inside the micro SD card slot of the Raspberry Pi, as shown here. Attention Do not connect the SD card inside the adapter to a USB-A port of the Raspberry Pi. 5.
Search for a duckietown-hostname-ap network instead. Reboot the Duckiedrone (with disconnected pins) to have it join the configured existing network. First connection You are now ready to connect to your Duckiedrone through the Duckietown Dashboard. A live (First Boot) DD24...
Page 31
Default robot name: amelia Default ssh user name: duckie Default ssh user password: quackquack Ssh always possible: ssh duckie@amelia.local Default access point (AP) network configuration: SSID: duckietown-amelia-ap Password: quackquack Default client (CL) network configuration: SSID: duckietown Password: quackquack Troubleshooting Troubleshooting I cannot connect to my Duckiedrone in AP mode.
between power and ground on the power distribution board. And verify that the Raspberry Pi is receiving 5 volts from the UBEC. Raspberry Pi Issues Most of the next debugging steps require getting “into” your Raspberry Pi using ssh, check the First connection chapter if you are not connected.
your camera is mounted firmly, pointed downwards. the range sensor is pointed downwards and hasn’t gotten rotated. the Flight Controller board is level and firmly attached, else the IMU and gyroscope will return incorrect readings. each propeller is tightened down all the way. Any of these issues could cause poor flight behavior.
Fig. 30 The “Acro” version has a mini USB port on the board. Camera Arducam 5mp 1080p OV5647 Time-of-Flight (ToF) [VL53L0X] (https://learn.adafruit.com/adafruit-vl53l0x-micro-lidar-distance-sensor-breakout) Fig. 31 ToF Sensor Raspberry Pi 3B+ Raspberry Pi 3B+ Power Distribution Board (PDB) PDB-XT60 Electronic Speed Controller XXD 30A 2-4S ESC Brushless Motor Speed Controller UBEC Hobbywing 5V 3A UBEC...
Page 35
For a consumer level drone, when you launch it for the first time (e.g. with virtual joysticks on phones, or with remote controls), you would expect it to take off and fly more or less stably, instead of shaking and going out of control.
Note In your own PID tuning process, you should only change the on ROLL, PITCH and on YAW. Only change the other values if you are sure what they mean and what you are doing. After apply the recommended starter values, with the knowledge from the previous subsection, you can keep trying the following for improving the basic manual performance of your Duckiedrone: Flying the drone manually and look out for erroneous behaviors Connect the FC to Betaflight, and adapt the PID values...
Page 37
Troubleshooting The flight controller node does not start correctly. SYMPTOM The last line printed out should be RESOLUTION /pidrone/battery If the last line printed out says that the USB is not plugged in: make sure that the USB is plugged into any one of the four USB ports on the make sure that the micro USB is plugged into the flight controller.
Page 38
The rosbridge node is not running- SYMPTOM The last line printed out should include the phrase Rosbridge websocket RESOLUTION server started on port 9090 If not: make sure you have no other programs using the same port as the Rosbridge server (9090) try rerunning the script.
Page 39
We leave this non- polished content here to provide ideas on projects or classes. We welcome contributions to these materials. Supported Learning Experiences An internet connection; About 10 minutes; A computer with the Duckietown What you will need Shell command installed and correctly setup;...
Overview The Robot Operating System (ROS) is widely used robot middleware that makes communication between processes, known as nodes, extremely easy through the use of ROS topics which can be published and subscribed to. Each topic has a certain message type that tells the publisher or subscriber what kind of data can be sent and received from over a topic.
Page 41
which are their own types of ROS messages built on primitives. To create a pose message, orientation you can import the message using and then instantiate it: from geometry_msgs import Pose pose_msg = . Then, you can modify its values in hierarchal order, for example, if you wanted to change the x position Pose() , you could write: .
Page 42
Python script: flight_controller_node.py Hardware interfacing: flight controller board Publishers: /pidrone/imu /pidrone/battery /pidrone/mode Subscribers: /pidrone/fly_commands /pidrone/desired/mode /pidrone/heartbeat/range /pidrone/heartbeat/web_interface /pidrone/heartbeat/pid_controller /pidrone/state `2: PID The PID controller node controls the flight of the drone by running a PID controller on the error calculated by the desired and current velocity and position of the drone.
Page 43
The state typically consists of the x,y,z positions and velocities, and the yaw of the drone. We’ve implemented several state estimators that vary in complexity. You will be implementing a state estimator that uses an Unscented Kalman Filter (UKF) in a future project. Python script: state_estimator.py Hardware interfacing:...
Need help?
Do you have a question about the Duckiedrone DD24 and is the answer not in the manual?
Questions and answers