Skip to the content
2 layers61.5 × 126.8 mmBadge eda, the printed circuit board in 3D

The Paranoids have designed a sound-reactive LED electronic conference badge for DEFCON 2022. This repository contains the PCB design files for the badge and the source code to the firmware that runs on the…

Size
61.5 × 126.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
88
Nets
112
Pads
454
Tracks, vias
840, 135
Pours
7
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
13 Jul 2022
Updated
15 Jul 2022

Overview

Badge eda is an open-source printed circuit board by theparanoids, from the theparanoids/keyhole-badge repository on GitHub. It is a 2-layer board of 61.5 × 126.8 mm with 88 parts on 112 nets, routed with 840 tracks and 135 vias.

It is built around the TPS613222ADBV, SN74LVC8T245PW and XZMDKCBDDG45S-9, with the SPH0655LM4H-1, SS2FH10-M3 and SSM3J332R,LF among its other parts. Its parts include 24 diodes, 16 capacitors, 13 resistors, 5 ICs and 4 switches. It belongs with the lEDs and displays boards of this library.

Main components

6

README

README.md

Paranoids DEFCON Badge

PCB design and firmware for a badge given out at DEFCON 2022

Table of Contents

Background

The Paranoids have designed a sound-reactive LED electronic conference badge for DEFCON 2022. This repository contains the PCB design files for the badge and the source code to the firmware that runs on the microcontroller.

This badge is designed around a Nordic nRF52833 SoC embedded in a Laird BL653 module. The badge features wireless connectivity (Bluetooth Low Energy in this firmware implementation), a NFC coil, a microphone, buttons, and LEDs.

The firmware is built using the nRF Connect SDK and Zephyr RTOS. It advertises BLE beacons and listens for beacons coming from neighboring badges, lighting up the LEDs according to the number of badges detected. It also blinks the LEDs either in response to sound or in other patterns, which are unlocked by inputting secret codes using the buttons.

Install

In order to edit the PCB design files, you will need to install Kicad version 6 or above. The badge design is located in the eda/ subdirectory. A pogo pin jig used during manufacturing is located in the jig/ subdirectory. Opening the .kicad_pro project file should automatically load both the schematic and PCB design.

If you only want to view the schematic or the final board layout, PDFs of the final version are located in final-artefacts.

In order to compile the firmware, you will need to install the Nordic nRF Connect SDK v1.9.0. This can be installed according to the official instructions. If you are using nRF Connect for Desktop and the Toolchain Manager, select "Open Terminal" from the arrow dropdown after installing the SDK. From this terminal, the firmware can be built using the following command:

bash
cd fw/
west build

The output will be located in fw/build/zephyr/zephyr.elf.

There are miscellaneous scripts written in Python that were used during testing and development. These require Python3, pySerial, NumPy, and scikit-image. These can be installed via pip using the following commands:

bash
# Create a new Python virtual environment
python3 -m venv venv
# Activate the virtual environment
source venv/bin/activate
# Install libraries
pip install pyserial numpy scikit-image

LED positions were computed using SolveSpace. This is saved in the notes.slvs file.

Usage

The Paranoids badge does not contain any kind of bootloader or firmware update functionality, so installing new firmware requires connecting to SWD (Serial Wire Debug) test pads on the back of the badge. This can be done either with a temporary jig or by soldering wires or pin headers. The test points are labeled on the backside fabrication drawing. Connections that are required are as follows:

  • TP3 / +V -- Microcontroller supply voltage. This may be labeled as "VCC" or "Vtarget" or similar. Corresponds to pin 1 of the ARM 10-pin connector. Caution: This pin is intended to be used as a voltage reference and not as a means to power the badge. Although powering the badge from this test point does work, doing so will bypass the reverse polarity protection circuitry. There is also no protection against back-powering the battery, which can result in a dangerous condition. If power is supplied using this test point, ensure that connections are correct and that batteries are not installed. Nominal voltage 3 V.
  • TP9 / GND -- Ground reference. Corresponds to pins 3/5/9 of the ARM 10-pin connector.
  • TP5 / SWDCLK -- SWD clock pin. Corresponds to pin 4 of the ARM 10-pin connector.
  • TP6 / SWDIO -- SWD data pin. Corresponds to pin 2 of the ARM 10-pin connector.
  • TP4 / ~RST (optional) -- reset pin (active low). Corresponds to pin 10 of the ARM 10-pin connector. Not required in most cases as reset can be triggered over SWD.
  • TP7 / DBGTX (optional) -- debug serial port, output from the board. In this firmware, this is configured with a 115200 baud 8n1 serial port for printing debug messages.
  • TP8 / DBGRX (optional) -- debug serial port, input into the board. In this firmware, this is technically configured as part of the debug console, but input is never read.

All signals are referenced to the voltage on TP3.

Programming new firmware requires an external ARM SWD debug probe, such as a Black Magic Probe or a J-Link. It is also possible to use a Raspberry Pi or any other compatible debug adapter.

Example commands for programming using a Black Magic Probe:

text
$ arm-none-eabi-gdb build/zephyr/zephyr.elf
(gdb) target extended-remote /dev/cu.usbmodemXXXXXXXX
(gdb) monitor swdp_scan
(gdb) attach 1
(gdb) load

Firmware debugging features

The badge connects the USB pins of the nRF52 chip to a USB micro-B connector on the bottom of the board. In this firmware, this is configured as a CDC-ACM serial port featuring a debug console (different from the one on the test points). Typing help will show a list of debug commands.

This USB debug console allows for capturing sound onto a connected computer. To capture sound, send the command debug sound on. The badge will then continuously output a stream of audio samples in signed 16-bit little endian format at 16 kHz with no framing. The test_sound.py script demonstrates capturing approximately 10 seconds of audio via this mechanism and writing it to a raw file which can be opened in tools such as Audacity.

If the flash memory of the nRF52 is blank, the firmware will start in factory test mode. Completion of factory testing is stored in flash memory, so none of the badges given out at DEFCON will start in test mode. As long as the Zephyr NVS data at the end of flash memory is not erased when programming new firmware, the badge will not enter test mode again. Test mode can be either re-entered after completion or forcefully bypassed without completing it by using the USB debug console. The factory test procedure goes through the following phases:

  1. Both eyes should be red. The edge LEDs should have a pattern of three lit LEDs animating and moving around in a loop. The other LEDs on the edge should be off. One LED should be blue, the next should be green, and the final lit LED should be red. The primary purpose of this test phase is to ensure that there are no breaks in the LED chain. To proceed to the next phase, press button SW1.
  2. Both eyes should be green. One LED on the edge, immediately below the eyes, should be white. All other LEDs on the edge should be off. To proceed to the next phase, press button SW2.
  3. Both eyes should be blue. Two LEDs on the edge, immediately below the eyes, should be white. All other LEDs on the edge should be off. To proceed to the next phase, press button SW3.
  4. Both eyes should be white. Three LEDs on the edge, immediately below the eyes, should be white. All other LEDs on the edge should be off. To proceed to the next phase, press button SW4.
  5. Both eyes should be white. All LEDs on the edge should be white. At this point in the test procedure, the edge LEDs, all three primary colors of the eye LEDs, and all buttons will have been tested. This phase with all LEDs lit also serves as a brief test of maximum current draw in order to try to catch obvious issues with the 5 V SMPS. To proceed to the next phase (finishing and exiting test mode), play a 440 Hz tone. This tests the microphone.

Contribute

Please refer to the contributing.md file for information about how to get involved.

Maintainers

License

  • This project is licensed under the terms of the Apache 2.0 open source license. Please refer to LICENSE for the full terms.

Parts

88
QtyValueFootprintReferences
21SK9822-2020badge_custom_parts:LED-SK9822-2020D1, D2, D3, D4, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21 +5
9TestPointTestPoint:TestPoint_Pad_1.0x1.0mmTP1, TP2, TP10, TP11, TP12, TP13, TP14, TP15, TP16
80.1 uFCapacitor_SMD:C_0603_1608MetricC4, C5, C6, C7, C13, C14, C15, C16
7TestPointTestPoint:TestPoint_Pad_2.0x2.0mmTP3, TP4, TP5, TP6, TP7, TP8, TP9
5DNL 10kResistor_SMD:R_0603_1608MetricR7, R8, R9, R10, R13
4SW_Pushbadge_custom_parts:FIXED_SW_Push_1P1T_NO_6x6mm_H9.5mmSW1, SW2, SW3, SW4
3300 pFCapacitor_SMD:C_0603_1608MetricC1, C2, C9
2154Resistor_SMD:R_0603_1608MetricR3, R6
222 uF CL31A226KOHNNNECapacitor_SMD:C_1206_3216MetricC10, C11
24.7 uFCapacitor_SMD:C_1206_3216MetricC3, C8
2422Resistor_SMD:R_0603_1608MetricR2, R5
284.5Resistor_SMD:R_0603_1608MetricR1, R4
2XZMDKCBDDG45S-9badge_custom_parts:LED_SunLed-PLCC4_3.2x2.8mm_CWD22, D23
110 uH NRS5020T100MMGJInductor_SMD:L_Taiyo-Yuden_NR-50xxL1
110kResistor_SMD:R_0603_1608MetricR11
15.11Resistor_SMD:R_0603_1608MetricR12
1BL653badge_custom_parts:BL653U1
1Conn_01x02_Malebadge_custom_parts:BATTERY_PADSJ2
1DNL 22 uF CL31A226KOHNNNECapacitor_SMD:C_1206_3216MetricC12
1SN74LVC8T245badge_custom_parts:SupplyChainFML-DB_DBQ_PW-24U2
1SN74LVC8T245Package_SO:TSSOP-24_4.4x5mm_P0.4mmU5
1SN74LVC8T245badge_custom_parts:SupplyChainFML-SO_SOIC-24U4
1SPH0655LM4H-1Sensor_Audio:Knowles_LGA-5_3.5x2.65mmMK1
1SS2FH10Diode_SMD:D_SMFD24
1SSM3J332R,LFPackage_TO_SOT_SMD:SOT-23Q1
1SolderJumper_2_BridgedJumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mmJP1
1SolderJumper_3_Bridged12Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mmJP2
1TPS613222ADBVPackage_TO_SOT_SMD:SOT-23-5U3
1USB_B_Microbadge_custom_parts:USB_Micro-B_Amphenol_10118192-0001LF_HorizontalJ1
1Val**badge_custom_parts:background8_text_v7bRef**
1Val**badge_custom_parts:badge-eyesRef**

The 87 most common of 88 parts.

More from theparanoids/keyhole-badge

1
  • 2 layers25.4 × 25.4 mmBadge jig, the printed circuit board in 3D

    Badge jig

    theparanoids/keyhole-badge

    The Paranoids have designed a sound-reactive LED electronic conference badge for DEFCON 2022. This repository contains the PCB design files for the badge and the source code to the firmware that runs on the…

    10 parts7

Similar boards

  • 2 layers29.2 × 18.3 mmBat IMU nRF5340, the printed circuit board in 3D

    Bat IMU nRF5340

    BigBroBob2/bat_tag_nrf5340dk

    A custom-designed device to record free-flying bat kinematics, echos, and eye movement

    21 parts
  • 2 layers140.5 × 70 mmAmbiSense, the printed circuit board in 3D

    AmbiSense

    TwoCoolCole12/Half-Life-Week-1-PCB-AmbiSense

    A portable environment sensor to sense ambient temperature, humidity, light, movement speed, and more!

    37 parts
  • 2 layers130 × 70.1 mmSenseU Microphoneboard, the printed circuit board in 3D

    SenseU Microphoneboard

    dersian/embeddedBikeSafety

    EBS is an Embedded solution protecting a cyclist from vehicles by detecting approaching vehicles using microphones and machine learning.

    37 parts2
  • 4 layers80.7 × 78.7 mmOstentus hw, the printed circuit board in 3D

    Ostentus hw

    golioth/ostentus-hw

    A PCB front panel for Golioth's Aludel hardware platform

    77 parts17CERN-OHL-P-2.0
  • 4 layers43 × 95 mmOe commutator controller, the printed circuit board in 3D

    Oe commutator controller

    open-ephys/commutators

    Active coaxial commutator for electrophysiology

    92 parts5
  • 4 layers43 × 95 mmOe commutator controller, the printed circuit board in 3D

    Oe commutator controller

    open-ephys/commutator-controller

    Open Ephys commutator PCB and firmware

    107 parts2
  • 2 layers101.3 × 63.1 mmMr Stash, the printed circuit board in 3D

    Mr Stash

    Wireb/Mr_Stash

    DC26 Mr Stash badge design

    64 parts1MIT
  • 2 layers179.5 × 53.5 mmWrightFlyer, the printed circuit board in 3D

    WrightFlyer

    AerospaceVillage/avBadge_2023

    Aerospace Village Badge for Def Con 2023

    39 parts1

Questions

How big is the Badge eda PCB?

It measures 61.5 × 126.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Badge eda use?

88 parts, built around the TPS613222ADBV, SN74LVC8T245PW, XZMDKCBDDG45S-9 and SPH0655LM4H-1. 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 Badge eda KiCad files?

From the theparanoids/keyhole-badge repository on GitHub, at the commit this page was made from: the board is eda/badge_eda.kicad_pcb and its schematic eda/badge_eda.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Badge eda design in my own project?

Its repository states no licence, so its author keeps all rights: ask theparanoids before reusing the design.