
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…

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…
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.
PCB design and firmware for a badge given out at DEFCON 2022
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.
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:
cd fw/
west buildThe 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:
# 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-imageLED positions were computed using SolveSpace. This is saved in the notes.slvs file.
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:
$ arm-none-eabi-gdb build/zephyr/zephyr.elf
(gdb) target extended-remote /dev/cu.usbmodemXXXXXXXX
(gdb) monitor swdp_scan
(gdb) attach 1
(gdb) loadThe 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:
Please refer to the contributing.md file for information about how to get involved.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 21 | SK9822-2020 | badge_custom_parts:LED-SK9822-2020 | D1, D2, D3, D4, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20, D21 +5 |
| 9 | TestPoint | TestPoint:TestPoint_Pad_1.0x1.0mm | TP1, TP2, TP10, TP11, TP12, TP13, TP14, TP15, TP16 |
| 8 | 0.1 uF | Capacitor_SMD:C_0603_1608Metric | C4, C5, C6, C7, C13, C14, C15, C16 |
| 7 | TestPoint | TestPoint:TestPoint_Pad_2.0x2.0mm | TP3, TP4, TP5, TP6, TP7, TP8, TP9 |
| 5 | DNL 10k | Resistor_SMD:R_0603_1608Metric | R7, R8, R9, R10, R13 |
| 4 | SW_Push | badge_custom_parts:FIXED_SW_Push_1P1T_NO_6x6mm_H9.5mm | SW1, SW2, SW3, SW4 |
| 3 | 300 pF | Capacitor_SMD:C_0603_1608Metric | C1, C2, C9 |
| 2 | 154 | Resistor_SMD:R_0603_1608Metric | R3, R6 |
| 2 | 22 uF CL31A226KOHNNNE | Capacitor_SMD:C_1206_3216Metric | C10, C11 |
| 2 | 4.7 uF | Capacitor_SMD:C_1206_3216Metric | C3, C8 |
| 2 | 422 | Resistor_SMD:R_0603_1608Metric | R2, R5 |
| 2 | 84.5 | Resistor_SMD:R_0603_1608Metric | R1, R4 |
| 2 | XZMDKCBDDG45S-9 | badge_custom_parts:LED_SunLed-PLCC4_3.2x2.8mm_CW | D22, D23 |
| 1 | 10 uH NRS5020T100MMGJ | Inductor_SMD:L_Taiyo-Yuden_NR-50xx | L1 |
| 1 | 10k | Resistor_SMD:R_0603_1608Metric | R11 |
| 1 | 5.11 | Resistor_SMD:R_0603_1608Metric | R12 |
| 1 | BL653 | badge_custom_parts:BL653 | U1 |
| 1 | Conn_01x02_Male | badge_custom_parts:BATTERY_PADS | J2 |
| 1 | DNL 22 uF CL31A226KOHNNNE | Capacitor_SMD:C_1206_3216Metric | C12 |
| 1 | SN74LVC8T245 | badge_custom_parts:SupplyChainFML-DB_DBQ_PW-24 | U2 |
| 1 | SN74LVC8T245 | Package_SO:TSSOP-24_4.4x5mm_P0.4mm | U5 |
| 1 | SN74LVC8T245 | badge_custom_parts:SupplyChainFML-SO_SOIC-24 | U4 |
| 1 | SPH0655LM4H-1 | Sensor_Audio:Knowles_LGA-5_3.5x2.65mm | MK1 |
| 1 | SS2FH10 | Diode_SMD:D_SMF | D24 |
| 1 | SSM3J332R,LF | Package_TO_SOT_SMD:SOT-23 | Q1 |
| 1 | SolderJumper_2_Bridged | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP1 |
| 1 | SolderJumper_3_Bridged12 | Jumper:SolderJumper-3_P1.3mm_Bridged12_RoundedPad1.0x1.5mm | JP2 |
| 1 | TPS613222ADBV | Package_TO_SOT_SMD:SOT-23-5 | U3 |
| 1 | USB_B_Micro | badge_custom_parts:USB_Micro-B_Amphenol_10118192-0001LF_Horizontal | J1 |
| 1 | Val** | badge_custom_parts:background8_text_v7b | Ref** |
| 1 | Val** | badge_custom_parts:badge-eyes | Ref** |
The 87 most common of 88 parts.

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…

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

TwoCoolCole12/Half-Life-Week-1-PCB-AmbiSense
A portable environment sensor to sense ambient temperature, humidity, light, movement speed, and more!

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

golioth/ostentus-hw
A PCB front panel for Golioth's Aludel hardware platform

open-ephys/commutators
Active coaxial commutator for electrophysiology

open-ephys/commutator-controller
Open Ephys commutator PCB and firmware


It measures 61.5 × 126.8 mm and has 2 copper layers, 1.6 mm thick.
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.
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.
Its repository states no licence, so its author keeps all rights: ask theparanoids before reusing the design.