Home DICEGRID Midenios Mecanum MPC corcpu wireguard-java Skibidicopter graal-bindgen

DICEGRID

This is a write-up of the DICEGRID challenge from the 2024 DiceCTF Finals competition.

What is DICEGRID?

DICEGRID is the world's first power electronics CTF challenge. Teams are given a DC power supply and earn points for selling AC power to the grid. The more efficient their inverter, the more power they can extract from the DC supply and sell to the grid.

There are three primary ways teams can earn and spend points:

  • Selling REAL POWER to the grid through their SOURCE.
  • Consuming REAL POWER from the grid through their LOAD.
  • Consuming REACTIVE POWER from the grid through their LOAD.

Further scoring and gameplay details can be found in the game manual.

Schematic of DiceGrid overall design, including lines, interconnects, and NPC LOADS
Top-level block diagram of DICEGRID

Design Overview

Designing and manufacturing the competition infrastructure for DICEGRID was a multi-person effort that took over 3 months to complete. The required capabilities of the competition infrastructure were:

Protection

  • Overvoltage protection
  • Overcurrent protection
  • THD limit enforcement
  • Fault detection and isolation

Scoring

  • Instantaneous I/V measurement
  • Power factor estimation
  • Local phase estimation

Gameplay

  • Team ATTiny84 flashing
  • Team ATTiny84 code viewer
  • Instantaneous V/I delivery
  • Team schematic viewing

These capabilities were implemented using 3 main components:

Enforcer

A 5:1 transformer connected to the wall that defines the grid voltage (20-30V RMS) and frequency (60 Hz).

An image of the IKEA box containing the enforcer transformer

Power Meter

WiFi-equipped device that flashes the ATTiny84s, measures the power produced and consumed by teams' sources and loads, and enforces the grid's THD limits.

An image of the IKEA box containing the enforcer transformer

Team Panel

Provide a breadboard, a DC power supply, and pinouts for the ATTiny84s. Each team had 1 team panel, connected via a DB25 cable to a power meter.

An image of the IKEA box containing the enforcer transformer

How it went

Ultimately, DICEGRID was a success. DiceCTF 2024 was the Foundation's first ever in-person event, and DICEGRID was an innovative challenge that really made the most of the competition format.

The Good

A photo of the DICEGRID competition
The transmission towers on competition day

The competition ran pretty smoothly, and the teams had a great time. We distributed the game manuals about a week before the competition, and teams did a great job designing robust inverters in the short time they had.

Thankfully, the power meters didn't have any issues, and were able to measure voltage and current, calculate RMS and phase angles and flash the ATTiny84s without any issues.

The winning team, BunkyoWesterns, supplied about 1 200 mAh (or ~31.2 Wh) of power to the grid, which averages to 200 mA over the 6-hour competition period.

The NPC loads (ie the bulbs on the towers) had a nice ambience, and provided a baseline 240W resistive load for teams to supply. We're glad we chose to use incandescent bulbs instead of power resistors, because although being massively inconvenient, they added a nice visual element to the competition.

BunkyoWesterns' team panel, with their inverter assembled on it
BunkyoWesterns' assembled inverter

The Bad

Although teams loved all the challenges themselves, they consistently told us that DiceCTF 2024 had too many challenges. For DiceCTF 2025, we're starting to plan early, and will concentrate on only 2-3 excellent challenges -- DICEGRID being one of them.

Teams without electrical engineers had a hard time engaging with the challenge. We're planning to fix this next year by doing 4 things:

  1. Including a simple, working reference design with the game manual. This will give less-experienced teams a starting point and allow experienced teams to work on more advanced techniques, like active power factor correction.
  2. Incorporating some sort of secondary, software-orientated game on top of the grid. This will allow teams to interact with the grid without designing physical hardware.
  3. Distributing the game manual a month -- rather than a week -- before the competition. This is what we intended to do this year, but with a three-person team, we just didn't have the time.
  4. Adding an EE-centric qualification path to DiceCTF Finals, so university engineering teams can qualify without needing to solve traditional CTF challenges.

The Ugly

  • Due to budget constraints, we had to use aluminium fence wire, as opposed to copper wire, for the transmission lines. Technically, stranded aluminium wire is closer to what's used in real-world power lines – but the wire we bought wasn't designed for this, and thus had almost 10V of IR drop across the line.
  • We couldn't afford (or at least thought we couldn't afford) CTs, so instead used isolated precision rectifiers and amplifiers to measure current on the power meters. This, combined with the isolation required for teams' sources and loads, meant each power meter had 7 isolated power domains.
  • We didn't want to buy crimping tools, so had to hand-solder each grid connection
  • The transmission tower design was woefully underconstrained, so had to partially redesign the towers the day before the competition to prevent them from collapsing.
  • We couldn't afford to give each team a power meter, so had to share 1 meter between every 2 teams. This made the design significantly more complex and contributed to delays in finishing the game manual.

Next year, the budget-related issues will be fixed by getting DICEGRID-specific sponsors, so we don't need to use money from the limited general competition fund. The time and planning-related issues will be fixed by assembling a larger, more structured team to organise the challenge.

Underconstrained transmission tower
The original transmission tower design

Future Plans

We're planning to run DICEGRID again next year, and have already begun work on the game manual and infrastructure. This year was an amazing proof-of-concept for the game, and we're excited to see what we can do with more time and resources.

The DICEGRID challenge will be a core part of DiceCTF 2025, and alongside the differences listed in The Bad, will have a few key improvements:

  1. The grid will be 3-phase, rather than a single phase.
  2. The NPC loads will consume reactive power. We plan on using cool, electromechanical devices to do this.
  3. There will be a mechanism by which teams can sabotage other teams' inverters.