Skip to the content
2 layers163.5 × 40.5 mm0xEntropy, the printed circuit board in 3D

Compact, open-source, USB-powered True Random Number Generator (TRNG) based on Zener diode avalanche breakdown noise and powered by an RP2040.

Size
163.5 × 40.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
42
Nets
50
Pads
188
Tracks, vias
331, 0
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
25 Sep 2026
Updated
27 Sep 2026

Overview

0xEntropy is an open-source printed circuit board by dudleydehenau, from the dudleydehenau/0xEntropy repository on GitHub. It is a 2-layer board of 163.5 × 40.5 mm with 42 parts on 50 nets, routed with 331 tracks and 0 vias.

It is built around the MT3608 and LM393. Its parts include 16 resistors, 12 capacitors, 3 ICs, 2 diodes and 1 connector. It belongs with the RP2040 boards of this library.

Main components

2

README

README.md

0xEntropy

PCB 3D Render

Compact, open-source, USB-powered True Random Number Generator (TRNG) based on Zener diode avalanche breakdown noise and powered by an RP2040.


Overview

0xEntropy is a standalone hardware entropy generator. It harnesses the physical phenomenon of avalanche breakdown in a Zener diode to capture non-deterministic quantum noise, amplifies it, digitizes it at high speed using the Raspberry Pi Pico PIO state machines, and applies real-time SHA-256 cryptographic whitening.

The system features an onboard touchscreen interface, continuous health monitoring, and streams random data over USB.


Features

  • Pure Physical Source: Avalanche breakdown noise from a reverse-biased 12V Zener diode, filtered and amplified (MCP6002).
  • Filtered Virtual Ground ($V_{REF} = 2.5\text{V}$): Strict isolation against USB power rail noise and ripples.
  • Hardware Sampling (PIO): High-speed, jitter-free capture offloaded from the CPU.
  • Dual-Core Architecture (RP2040):
    • Core 0: Touchscreen LCD interface (ultra-lightweight 1-bit bitmap rendering engine), statistics processing, and alerts.
    • Core 1: Raw bit acquisition, real-time statistical health tests, and SHA-256 post-processing.
  • Live Monitoring: Real-time Shannon entropy calculation and physical source health supervision.
  • 100% Plug & Play: Powered and queried via a standard USB port.

Hardware & Schematics (KiCad)

The PCB isolates the sensitive analog front-end (Zener, op-amp, comparator) from the digital domain (RP2040, screen).

Schematic

KiCad Schematic

PCB Layout

KiCad PCB Routing


Enclosure & 3D Design

A custom 3D enclosure was designed to house the main board, the touchscreen display, and provide access to the micro-USB port.

3D ModelAssembled Prototype
3D Model Enclosure Photo

3D Printing Timelapse
Enclosure 3D printing timelapse

(F3D / STEP source files are available in the /file3D directory)


Firmware Structure

The firmware is written in C/C++ using the Pico SDK:

  • firmware/0xEntropy.c: Main entry point, orchestration, and core loop.
  • firmware/Entropy/: Physical signal sampling and entropy generation routines.
  • firmware/Health/: Continuous health monitoring (failure detection and drift detection).
  • firmware/Stats/: Real-time statistical computations on bitstreams.
  • firmware/UI/: Display drivers and user interface logic.

UI Screen
Simulated values


Full Prototype Overview

Overall view of the assembled hardware: the operational PCB connected to the touchscreen display.

Complete 0xEntropy Prototype
Final 0xEntropy board assembled and connected to its touchscreen display


Quick Start

1. Flash the RP2040

  1. Download the latest 0xEntropy.uf2 binary from the Releases.
  2. Hold down the BOOTSEL button on the Raspberry Pi Pico and plug it into your computer via USB.
  3. Drag and drop the .uf2 file onto the mounted USB storage volume.

2. Stream Random Bytes

The Pico emulates a standard USB CDC serial port.

Option A: Using the Python Script (Recommended / Cross-platform)

Handles real-time throughput monitoring, automatic resume on disconnect, and works on Windows, Linux, and macOS:

bash
# Dependency
pip install pyserial

# Stream data (e.g., capture 100 MB)
python collect.py -p COM4 -s 100000000 -o random.bin
Option B: Direct Command Line (Linux / macOS)
bash
# Quick capture of 1 MB
head -c 1M /dev/ttyACM0 > random.bin

3. Verify Entropy Quality

Quick distribution analysis using the standard ent tool:

bash
ent random.bin

Comprehensive statistical test battery with Dieharder:

bash
# Run the full test suite (-a) on a binary stream (-g 201)
dieharder -a -g 201 -f random.bin

Performance & Validation

The generator has been rigorously tested and validated for statistical randomness at scale.

  • Observed Throughput: ~1,300 kbps (~162 KB/s) continuous stream over USB CDC.
  • Post-Processing: SHA-256 cryptographic whitening. Default 2:1 compression ratio (512:256 bits), user-selectable on-screen (4:1, 8:1, 16:1).

1. ent Test (10 GB Dataset)

Raw distribution analysis performed on a continuous 10 GB dataset (10,000,000,000 bytes):

text
Entropy = 8.000000 bits per byte.

Optimum compression would reduce the size
of this 10000000000 byte file by 0 percent.

Chi square distribution for 10000000000 samples is 279.96, and randomly
would exceed this value 13.56 percent of the times.

Arithmetic mean value of data bytes is 127.5013 (127.5 = random).
Monte Carlo value for Pi is 3.141522385 (error 0.00 percent).
Serial correlation coefficient is -0.000013 (totally uncorrelated = 0.0).

2. Dieharder Test Suite (10 GB Dataset)

Full results from the Dieharder v3.31.1 test battery executed against a 10 GB stream (SHA-256 2:1 ratio):

Click to view all 86 detailed test results (Dieharder)
Test Namentupletsamplespsamplesp-valueAssessment
diehard_birthdays01001000.39466437PASSED
diehard_operm501 000 0001000.07592355PASSED
diehard_rank_32x32040 0001000.59062810PASSED
diehard_rank_6x80100 0001000.95475163PASSED
diehard_bitstream02 097 1521000.40506079PASSED
diehard_opso02 097 1521000.88837531PASSED
diehard_oqso02 097 1521000.69125958PASSED
diehard_dna02 097 1521000.69906629PASSED
diehard_count_1s_str0256 0001000.39737472PASSED
diehard_count_1s_byt0256 0001000.92060347PASSED
diehard_parking_lot012 0001000.43926798PASSED
diehard_2dsphere28 0001000.92344609PASSED
diehard_3dsphere34 0001000.96173291PASSED
diehard_squeeze0100 0001000.79221232PASSED
diehard_sums01001000.55542507PASSED
diehard_runs0100 0001000.13786658PASSED
diehard_runs0100 0001000.17085449PASSED
diehard_craps0200 0001000.67687026PASSED
diehard_craps0200 0001000.91082777PASSED
marsaglia_tsang_gcd010 000 0001000.93839213PASSED
marsaglia_tsang_gcd010 000 0001000.84764647PASSED
sts_monobit1100 0001000.28551441PASSED
sts_runs2100 0001000.29973049PASSED
sts_serial1100 0001000.45563392PASSED
sts_serial2100 0001000.14689616PASSED
sts_serial3100 0001000.16976266PASSED
sts_serial3100 0001000.58643956PASSED
sts_serial4100 0001000.62041623PASSED
sts_serial4100 0001000.93374301PASSED
sts_serial5100 0001000.42325503PASSED
sts_serial5100 0001000.96197560PASSED
sts_serial6100 0001000.21788455PASSED
sts_serial6100 0001000.69535327PASSED
sts_serial7100 0001000.03066406PASSED
sts_serial7100 0001000.01328619PASSED
sts_serial8100 0001000.62365992PASSED
sts_serial8100 0001000.28004021PASSED
sts_serial9100 0001000.90096448PASSED
sts_serial9100 0001000.97761790PASSED
sts_serial10100 0001000.51356615PASSED
sts_serial10100 0001000.64523823PASSED
sts_serial11100 0001000.93859732PASSED
sts_serial11100 0001000.32514183PASSED
sts_serial12100 0001000.19453278PASSED
sts_serial12100 0001000.35736285PASSED
sts_serial13100 0001000.41024144PASSED
sts_serial13100 0001000.52009147PASSED
sts_serial14100 0001000.63356596PASSED
sts_serial14100 0001000.05597814PASSED
sts_serial15100 0001000.44014124PASSED
sts_serial15100 0001000.17108281PASSED
sts_serial16100 0001000.83506756PASSED
sts_serial16100 0001000.92781694PASSED
rgb_bitdist1100 0001000.50215495PASSED
rgb_bitdist2100 0001000.67467770PASSED
rgb_bitdist3100 0001000.68604339PASSED
rgb_bitdist4100 0001000.63639093PASSED
rgb_bitdist5100 0001000.00711522PASSED
rgb_bitdist6100 0001000.03642615PASSED
rgb_bitdist7100 0001000.54886931PASSED
rgb_bitdist8100 0001000.94844778PASSED
rgb_bitdist9100 0001000.80804374PASSED
rgb_bitdist10100 0001000.76694934PASSED
rgb_bitdist11100 0001000.55405954PASSED
rgb_bitdist12100 0001000.79849495PASSED
rgb_minimum_distance210 00010000.38755637PASSED
rgb_minimum_distance310 00010000.93853771PASSED
rgb_minimum_distance410 00010000.63970846PASSED
rgb_minimum_distance510 00010000.33087978PASSED
rgb_permutations2100 0001000.80472843PASSED
rgb_permutations3100 0001000.80939095PASSED
rgb_permutations4100 0001000.64196966PASSED
rgb_permutations5100 0001000.97396760PASSED
rgb_lagged_sum01 000 0001000.29546209PASSED
rgb_lagged_sum11 000 0001000.10736047PASSED
rgb_lagged_sum21 000 0001000.90786168PASSED
rgb_lagged_sum31 000 0001000.03800803PASSED
rgb_lagged_sum41 000 0001000.69745767PASSED
rgb_lagged_sum51 000 0001000.30052203PASSED
rgb_lagged_sum61 000 0001000.81286624PASSED
rgb_lagged_sum71 000 0001000.79490517PASSED
rgb_lagged_sum81 000 0001000.85376675PASSED
rgb_lagged_sum91 000 0001000.46383055PASSED
rgb_lagged_sum101 000 0001000.63063661PASSED
rgb_lagged_sum111 000 0001000.39341615PASSED
rgb_lagged_sum121 000 0001000.21353291PASSED
rgb_lagged_sum131 000 0001000.73964502PASSED
rgb_lagged_sum141 000 0001000.76922594PASSED
rgb_lagged_sum151 000 0001000.55600967PASSED
rgb_lagged_sum161 000 0001000.59271918PASSED
rgb_lagged_sum171 000 0001000.90342589PASSED
rgb_lagged_sum181 000 0001000.59641374PASSED
rgb_lagged_sum191 000 0001000.59765640PASSED
rgb_lagged_sum201 000 0001000.52991615PASSED
rgb_lagged_sum211 000 0001000.44300317PASSED
rgb_lagged_sum221 000 0001000.94796060PASSED
rgb_lagged_sum231 000 0001000.20987094PASSED
rgb_lagged_sum241 000 0001000.36604221PASSED
rgb_lagged_sum251 000 0001000.28560285PASSED
rgb_lagged_sum261 000 0001000.52958989PASSED
rgb_lagged_sum271 000 0001000.17134459PASSED
rgb_lagged_sum281 000 0001000.99634800WEAK
rgb_lagged_sum291 000 0001000.36655513PASSED
rgb_lagged_sum301 000 0001000.16353244PASSED
rgb_lagged_sum311 000 0001000.36323221PASSED
rgb_lagged_sum321 000 0001000.67537924PASSED
rgb_kstest_test010 00010000.60363864PASSED
dab_bytedistrib051 200 00010.70763534PASSED
dab_dct25650 00010.18425080PASSED
dab_filltree3215 000 00010.80178758PASSED
dab_filltree3215 000 00010.26571865PASSED
dab_filltree205 000 00010.69465598PASSED
dab_filltree215 000 00010.71074721PASSED
dab_monobit21265 000 00010.57586976PASSED

Parts

42
QtyValueFootprintReferences
7100nFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC1, C3, C4, C5, C6, C9, C11
510µFCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC2, C7, C8, C10, C13
410KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2, R9, R11, R12
4MountingScrewMountingHole:MountingHole_2.2mm_M2H1, H2, H3, H4
210kPotentiometer_THT:Potentiometer_Vishay_T93YA_VerticalRV1, RV2
210kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR5, R13
212vDiode_THT:D_DO-35_SOD27_P7.62mm_HorizontalD1, D2
21kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR6, R14
22.2KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R7
22.2kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR8, R16
2220Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3, R4
25.1MResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR10, R15
1BuzzerBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1Conn_01x12_PinConnector_PinHeader_2.54mm:PinHeader_1x12_P2.54mm_VerticalJ1
1LM393Package_DIP:DIP-8_W7.62mmU3
1MCP6002-xPPackage_DIP:DIP-8_W7.62mmU2
1MT3608Perso:MT3608U1
1RaspberryPi_PicoModule:RaspberryPi_Pico_Common_UnspecifiedA2

Similar boards

  • 2 layers100 × 85 mmVNA, the printed circuit board in 3D

    VNA

    profdc9/VNA

    Vector Network Analyzer based on the STM32F103C8T6 bluepill

    178 parts93
  • 2 layers68.9 × 23 mmRPM, the printed circuit board in 3D

    RPM

    midasgossye/RPM-counter

    Open-source DIY RPM counter using IR reflectance

    64 parts3
  • 4 layers88 × 80 mmVetroplach board, the printed circuit board in 3D

    Vetroplach board

    jankrejci/vetroplach

    An ultrasonic anemometer: KiCad PCB designs and ESP32-S3 firmware.

    132 parts1
  • 2 layers62 × 41 mmPowerLossHeatCreepArrester v1.0, the printed circuit board in 3D

    PowerLossHeatCreepArrester v1.0

    deogratius2phantom/Power-Loss-Heat-Creep-Arrester

    This repository contains the Shecmatic and PCB design for a timer circucit providing 24v backup power to a 3d printer hotend fan in the even tof power loss during printing.

    58 partsCC0-1.0
  • 2 layers125 × 85 mmTastatur, the printed circuit board in 3D

    Tastatur

    steewbsd/Tastatur

    145 parts
  • 2 layers231.1 × 106.7 mmSnark barker, the printed circuit board in 3D

    Snark barker

    schlae/snark-barker

    A 100% compatible replica of the famed SB 1.0 sound card

    199 parts687
  • 2 layers130 × 80 mmSmu main 1, the printed circuit board in 3D

    Smu main 1

    jaromir-sukuba/J-SMU

    DIY source-measure unit

    210 parts244
  • 4 layers292.1 × 88.3 mmSnark barker mca, the printed circuit board in 3D

    Snark barker mca

    schlae/snark-barker-mca

    A Sound Blaster compatible sound card for Micro Channel bus computers

    177 parts69

Questions

How big is the 0xEntropy PCB?

It measures 163.5 × 40.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the 0xEntropy use?

42 parts, built around the MT3608 and LM393. 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 0xEntropy KiCad files?

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

Can I use the 0xEntropy design in my own project?

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