Skip to the content
2 layers60.2 × 53.6 mmDancing duck, the printed circuit board in 3D

Bumbershoot 2024

Size
60.2 × 53.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
15
Nets
43
Pads
132
Tracks, vias
238, 4
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
7 Jun 2024
Updated
29 Aug 2024

Overview

Dancing duck is an open-source printed circuit board by Ponderosa, from the Ponderosa/dancing_duck repository on GitHub, published under the MIT licence. It is a 2-layer board of 60.2 × 53.6 mm with 15 parts on 43 nets, routed with 238 tracks and 4 vias.

Its parts include 5 connectors, 3 resistors, 3 ICs and 1 capacitor.

README

README.md

Dancing Duck

This repo contains all software and tools for the Dancing Duck installation (title subject to change) for the Bumbershoot 2024 Festival.

  • Duck Firmware (Foundational work complete - RTOS, WiFi, MQTT Messaging, JSON interpretation, and Motor Control)
  • Coordinator (Mosquitto is functionally passing motor command messages to duck)
  • Monitor (No progress)

The design consists of ~20 motorized ducks that can be controlled to perform coordinated dance moves in the water. The ducks are decoys with an RC hobby boat mounted to the bottom. There are two DC brushed motor, each attached to a propeller. A custom PCBA will be manufactured that will feature the rPi Pico and a TI DRV33xx chip. The multicore RP2040 will be running SMP FreeRTOS and include LwIP and MQTT stacks. It will be able to interface with the Coordinator MQTT broker to receive motor commands, which will interface with a TI 83xx driver chip. Also included is a magnetometer to help ducks point in desired directions and to return to dock when needed.

The ducks will be controlled via MQTT text based instructiones (JSON, G-Code, Something hand rolled?) being issued from the RPi4 Coordinator. The Coordinator will be running a broker, likely Mosquitto. Logging and monitoring infrastructure will be running on the Coordinator and may be accessed via a touchscreen mounted directly to the RPi4 or an external laptop known as the Monitor.

Duck Firmware

Build Instructions

text
$ sudo apt update
$ sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib build-essential git
$ cd ~/workspace (or wherever you want to clone to)
$ git clone --recurse-submodules https://github.com/Ponderosa/dancing_duck.git
$ cd dancing_duck
$ git submodule update --init --recursive
$ cp wifi_example.sh wifi_secret.sh
$ vim wifi_secret.sh (add desired access point and MQTT broker information here)
$ ./build.sh <device_id>

Note: Please be careful not to commit any private wifi AP information.

For further Pico information, please see the getting started link below.

Flashing Instructions

Copy to mass storage via USB

The Pico can load firmware images by copying the U2F output file. It needs to put into mass storage mode first. To do this hold down the button on the pico while plugging in the USB cable. More instructions can be found in the getting started manual linked below.

J-Link

  1. Download and install latest package https://www.segger.com/downloads/jlink/ (Top section)
  2. Solder 3 pins to Debug port on Pico and wire to SWD interface on J-Link.
  3. Wire up hard reset pin to J-Link (Labeled "Run" on Pico)
  4. Use flash.sh, ex $ JLinkExe -ip 192.168.4.151 flash.sh

OpenOCD

Follow the getting started with Pico guide below.

Debugging

Serial Port

printf() is currently outputting to UART0 (GP0, GP1) at 3.3V. The UART is set to 115200-8-N-1. A lot of useful information is being streamed to this port. It is highly recommended to utilize this debug feature before venturing into GDB.

Todo: Add build configuration file that can switch to USB CDC printf(). Or just move to USB CDC printf(). More details on CMakeLists modifications here: https://deepbluembedded.com/raspberry-pi-pico-serial-usb-c-sdk-serial-print-monitor/

GDB

Since the rp2040 is dual core, care must be taken in properly attaching to the device.

Included is a .vscode/launch.json to use with the VSCode plugin Cortex-Debug by marus25. Please feel free to add more configurations, as you probably don't have the same J-Link IP address I do. To get this to work start the Debug session directly from VSCode. You may need to reset the device one or two times with the left most reset button that appears in the new toolbar in the center top of VSCode. Once you do that, you should be able to use breakpoints and step through the code.

Getting ARM GDB to run properly on Linux can be challenging. You may need to install older versions of libncurses and libncursesw

For my Ubuntu build this did the trick

text
sudo apt-get install libncurses5
sudo apt-get install libncursesw5

Pico Documentation

Coordinator

  1. Install https://mosquitto.org/download/ on RPi4.
  2. edit etc/mosquitto/conf.d/mosquitto.conf and add
text
allow_anonymous true
listener 1883 0.0.0.0
  1. Run https://mqttx.app/ on any machine in the network for monitoring.

MQTT Topics WIP

text
dancing_duck/
├── devices/
│   ├── {device_id}/
│   │   ├── sensors/
│   │   │   ├── temperature
│   │   │   ├── battery_voltage
│   │   │   └── ...
│   │   ├── metrics/
│   │   │   ├── freertos/
│   │   │   │   ├── heap
│   │   │   │   ├── tasks
│   │   │   │   └── ...
│   │   │   └── lwip
│   │   └── logs/
│   │   |   ├── info
│   │   |   ├── warning
│   │   |   └── error
│   │   └── command/
│   │   |   ├── motor
│   │   |   ├── navigate
│   │   |   ├── return_to_dock
│   │   |   ├── set_test_mode
│   │   |   └── ...
│   │   └── quack

Parts

15
QtyValueFootprintReferences
3Conn_01x02Connector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_HorizontalJ1, J2, J4
2LOGOLOGOG_LOGO, G***
10 DNPJumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mmR3
11000pfCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC1
1220kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1
1330kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR2
1Conn_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_PT-1,5-2-3.5-H_1x02_P3.50mm_HorizontalJ3
1Conn_02x02_Counter_ClockwiseConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_VerticalJ5
1MountingHole_2.7mm_M2.5_ISO14580_Pad_TopBottomMountingHole:MountingHole_2.7mm_M2.5_ISO14580_Pad_TopBottomREF1
1~adafruit:lis2mdl_breakoutU3
1~adafruit:drv8833_breakoutU2
1~raspberry_pi:RPi_Pico_SMD_WU1

Similar boards

  • 2 layers19 × 76 mmSub, the printed circuit board in 3D

    Sub

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    15 parts3kApache-2.0
  • 2 layers26.7 × 62.2 mmDeniseadapter, the printed circuit board in 3D

    Deniseadapter

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    15 parts1kGPL-3.0
  • 2 layers100 × 44 mmVideoslot, the printed circuit board in 3D

    Videoslot

    mntmn/amiga2000-gfxcard

    MNT VA2000, an Open Source Amiga 2/3/4000 Graphics Card (Zorro II/III), written in Verilog

    15 parts1k
  • 2 layers91 × 51 mmBusinessCard, the printed circuit board in 3D

    BusinessCard

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    15 parts915
  • 2 layers24.3 × 57.9 mmFlosspods pro flex, the printed circuit board in 3D

    Flosspods pro flex

    kenp-io/not-for-airpods-repairs

    The content of this repository is licensed under the WTFPL License. Please have a close look at the terms before using this material.

    15 parts609WTFPL
  • 2 layers20.3 × 15.2 mmL0 Load, the printed circuit board in 3D

    L0 Load

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    15 parts546MIT
  • 2 layers68 × 50 mmEleLab v2 PowerFeed, the printed circuit board in 3D

    EleLab v2 PowerFeed

    Chrismettal/EleLab_v2

    Cheap DIY lab system for hobbyists and the tinkering folk

    15 parts531GPL-3.0
  • 2 layers50.8 × 35.6 mmInterface, the printed circuit board in 3D

    Interface

    harbaum/I2C-Tiny-USB

    Cheap and simple I²C to USB interface

    15 parts454

Questions

How big is the Dancing duck PCB?

It measures 60.2 × 53.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Dancing duck use?

15 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Dancing duck KiCad files?

From the Ponderosa/dancing_duck repository on GitHub, at the commit this page was made from: the board is pcb/dancing_duck/dancing_duck.kicad_pcb and its schematic pcb/dancing_duck/dancing_duck.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Dancing duck design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).