KiCad project files for a hardware CTF challenge used during the 2026 ULP CTF. The board is meant to be used with the ch32v203-dev development board.
The challenge is split into three small hardware stages, each of which requires the player to interact with the board in a different way:
- Challenge 1: Stop the LED runner on the requested positions.
- Challenge 2: Guess a random number generated and written to the EEPROM.
- Challenge 3: Heat the thermistor and keep it around 80 C long enough to unlock the flag.
| Qty | Designators | Description | Footprint |
|---|---|---|---|
| 1 | C1 | Polarized capacitor | Capacitor_THT:C_Radial_D4.0mm_H7.0mm_P1.50mm |
| 1 | C2 | Capacitor | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P2.50mm |
| 2 | H1, H2 | 1x20 2.54 mm female headers | ulp:HDR-TH_20P-P2.54-V-F |
| 8 | LED1, LED2, LED3, LED4, LED5, LED6, LED7, LED8 | XL-302SURD red LEDs | ulp:LED-TH_BD3.8-P2.54-RD |
| 8 | R1, R2, R3, R4, R6, R7, R9, R10 | 100 Ohm resistors | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal |
| 4 | R5, R8, R11, R14 | 10 kOhm resistors | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal |
| 2 | R12, R13 | 2.2 kOhm resistors | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal |
| 1 | U1 | AT24C02N EEPROM | ulp:DIP-8_L9.2-W6.3-P2.54-LS7.62-BL |
| 1 | U2 | 1x4 2.54 mm female header | ulp:HDR-TH_4P-P2.54-V-F |
| 1 | U3 | NE555P timer | ulp:DIP-8_L9.8-W6.6-P2.54-LS7.6-BL |
| 1 | U4 | MF52A1103F3950 NTC thermistor | ulp:RES-TH_L2.5-W2.5-P1.70-D0.3 |
| 5 | U5, U6, U7, U8, U9 | TS665CJ tactile switches | ulp:SW-TH_4P-L6.0-W6.0-P4.50-LS6.5 |
| 1 | U10 | CD4017BE decade counter | ulp:DIP-16_16P-L20.2-W6.6-P2.54-LS7.6-BL |
The firmware/ directory contains the firmware for the board. It is a CH32V203 project for MounRiver Studio, and the main entry point is firmware/User/app/main.c.
The firmware in ../firmware/User/board.c converts the NTC resistance into temperature by linearly interpolating between these table points using:
T = T_high + (T_low - T_high) * (R_high - R_ntc) / (R_high - R_low)
| Temperature (deg C) | Resistance (ohms) |
|---|---|
| -20.0 | 105385 |
| -15.0 | 77898 |
| -10.0 | 58246 |
| -5.0 | 44026 |
| 0.0 | 33621 |
| 5.0 | 25925 |
| 10.0 | 20175 |
| 15.0 | 15837 |
| 20.0 | 12535 |
| 25.0 | 10000 |
| 30.0 | 8037 |
| 35.0 | 6506 |
| 40.0 | 5301 |
| 45.0 | 4348 |
| 50.0 | 3588 |
| 55.0 | 2978 |
| 60.0 | 2486 |
| 65.0 | 2086 |
| 70.0 | 1760 |
| 75.0 | 1492 |
| 80.0 | 1270 |
| 85.0 | 1087 |
| 90.0 | 934 |
| 95.0 | 805 |
| 100.0 | 698 |


