z80replacement · a Z80 CPU replacement with an FPGA

Mechanical design and PCB

outline, socket pins, PCB technology, assembly at PCBWay, placement study

Status, 29 November 2026: nobody has built this module yet. The first sample run of 2 boards comes soon. Wait until the project has tested these boards before you send an order or a build request to a factory.

Repository file: docs/mechanical.md

Outline

A 600 mil DIP-40 has two rows of 20 pins. The rows are 15.24 mm apart, and the pins are 2.54 mm apart. The plastic body is about 52.5 mm long. Get the exact limits from the Zilog package drawing before the PCB layout.

Item Value
Board length 52.5 mm maximum
Board width 25.34 mm: 15.24 mm between the rows, a 1.5 mm pin pad, 0.3 mm from pad to edge, and a 4 mm overhang on each long side
Height above the socket not limited by R2. Target 10 mm or less.

The board is 4 mm wider than the DIP-40 outline on each long side (9 November 2026; the first overhang was 3 mm). The strip outside each pin row holds the long tracks from the translators to the socket pins. Without this strip, these tracks went along the inner side of the pin rows. There they had to cross the escape of the FPGA and the DDR3L tracks, and the router could not complete the board (the DDR3L is no longer on the board since the same date: the SRAM U5 replaced the DDR3L, which freed the escape area of the FPGA) (pcb.md, "Routing").

The overhang strips have tracks and GND vias, but no parts on either side. Solder mask covers the tracks on the bottom side. A 600 mil socket body is about 17.5 mm to 18 mm wide, so each strip extends about 3.7 mm to 3.9 mm past the socket.

Chips and capacitors near the Z80 socket on the host board can touch the overhang. The header body holds the board 3.0 mm above the socket (see Socket pins). A DIP socket is about 3.5 mm to 4.5 mm high. Thus the bottom of the board is about 6.5 mm to 7.5 mm above the host board:

  • A DIP chip with no socket is about 4 mm to 5 mm high. It is below the overhang.
  • A DIP chip in a socket is about 7.5 mm to 8.5 mm high. It can touch the overhang. Put a second DIP socket under the module as a riser, or use a header with a higher body.
  • Measure tall parts next to the Z80 socket (capacitors, crystals) before you install the module.

Socket pins

The module needs 40 male pins that fit a DIP socket. These pins are through-hole parts. PCBWay solders through-hole parts during assembly, so R13 stays true.

The first choice is two 20-pin round-pin headers, chxunda XDZ254C-1-20-Z-3.0-G1 (LCSC C19184352). The data sheet gives these dimensions:

Item Value
Plastic body 3.0 mm high
Pin, end A 0.50 mm diameter, 4.13 mm below the body
Pin, end B 0.60 mm diameter, 4.10 mm above the body
Total length 11.96 mm. The sum of the three items above is 11.23 mm. Measure a sample header.
Material Brass, gold over nickel. The suffix G1 is 1 µin (0.025 µm) of gold.

A DIP socket accepts round pins from 0.38 mm to 0.56 mm in diameter. Thus only end A fits a DIP socket. Install the header with the plastic body below the board:

  • End A points down and goes into the host socket. The 4.13 mm pin is longer than the 3 mm that a DIP lead goes into a socket.
  • The plastic body is the spacer. The body holds the board 3.0 mm above the host socket. The bottom parts need 1.5 mm.
  • End B goes up through the board. Solder end B on the top side. About 3.1 mm of the pin is above the board. These pin ends are the test points for the bus: a logic analyzer grabber or a female jumper wire connects to them.

The data sheet shows the usual installation: end A in the board and the body on the top side. This module uses the header the other way: end B in the board and the body on the bottom side. Thus the assembly drawing for PCBWay must show the body below the board and end A down.

CAUTION: DO NOT PUT END B (0.60 MM) INTO A SOCKET. THE PIN IS TOO THICK AND CAN DAMAGE A TURNED-PIN SOCKET.

The G1 gold is thin for a pin that goes in and out of a socket many times. The ordering code of the header also has G4 (10 µin of gold). Ask LCSC or chxunda for XDZ254C-1-20-Z-3.0-G4 before a large order.

If the chxunda header fails the socket test, use turned pins from Mill-Max (350-10-120-00-006000) or Preci-Dip. They cost 30 to 40 times more. A machined SIP socket strip with its tail through the board is not satisfactory. cost.md gives the reasons.

CAUTION: A HOST BOARD WITH A SOLDERED Z80 AND NO SOCKET CANNOT TAKE THE MODULE. Remove the Z80 and install a socket first.

The pin holes take the two long edges of the board, on all layers. The placement study uses a 0.9 mm hole and a 1.5 mm pad. The 0.9 mm hole accepts the 0.60 mm end of the header. (The 0.80 mm hole in the header data sheet is for the 0.50 mm end.) The space between the pin courtyards is 13.5 mm wide.

A DIP Z80 has a U-shaped notch at the pin 1 end, between pins 1 and 40. The board has no place for a notch mark at that end, because the USB-C receptacle J1 is there. Since 11 November 2026 the top silkscreen has a filled triangle west of the square pad of pin 1 ("Placement" in pcb.md).

History: the placement study of 7 November 2026 had a U on the top silkscreen at the pin 1 end (pin1_notch() in hardware/placement_study/make_study.py). The USB-C receptacle filled the position of a small notch, so the U went around the receptacle.

The pin numbers of P1 are the pin numbers of a DIP-40 seen from the top. On 10 November 2026 the numbers were wrong (a mirror image). See "History: the mirrored pin numbers" in pcb.md.

The top side of the module (F.Cu, with J1) is the top view of the chip. The header body is under the board, and end A goes down. Hold the module with the J1 end (the notch, the pin 1 end) on the left. Pin 1 is at the bottom left (y = +7.62 mm from the center line of the pins, x = -24.13 mm).

Pins 1 to 20 go along the bottom row from left to right. Pins 21 to 40 go along the top row from right to left. Thus the numbers go counterclockwise, as on a real DIP-40 seen from the top.

The stock KiCad footprint Package_DIP:DIP-40_W15.24mm has the same order. Its pin 1 is at the top left with the notch at the top, and its pin 40 is at the top right. A turn of 90° that puts the notch on the left puts pin 1 at the bottom left. The footprint Z80_DIP-40_SocketPins has this order and is not flipped on the board.

Area budget

These are first estimates, with space around each part for routing.

Part Package Area (mm²)
ECP5 csfBGA285, 10 × 10 144
SRAM U5 (the DDR3L until 9 November 2026, 140 mm²) 48-ball mini BGA, 6 × 8 48
QSPI flash WSON-8, 6 × 5 40
Translators U10–U15 DHVQFN24, 3.5 × 5.5, six parts 150
CLK buffer U16 SOT-363 or smaller 5
USB-C receptacle about 9 × 7.5 68
RP2354A and 12 MHz oscillator QFN-60, 7 × 7 60
Isolators 2 × SSOP-16 60
Regulators and inductors 3 rails on the Z80 side (3.3 V, 1.1 V, 2.5 V), 1 on the USB side. Until 9 November 2026: 4 rails and VREF, 95 mm² 75
Oscillator, LEDs, jumpers 20
Total, without decoupling capacitors about 780

These first estimates showed that one side is not enough. The placement study below gives the measured result.

Layout choices

Choice Description Advantages Problems
A, one board, parts on two sides 6-layer HDI board. Tall parts on the top. Thin parts (translators, capacitors) on the bottom, between the pin rows. One board, no board-to-board connector. The bottom parts must clear the socket. Some sockets have a plastic bar between the rows.
B, two boards The lower board has the pins, the translators and the 5 V input. The upper board has the FPGA, SRAM, flash, USB and isolator. A board-to-board connector joins them. Each board is simpler. The lower board can be a 4-layer board with no HDI. Two boards, a connector with about 60 contacts, more height.

Choice A is the first choice. The placement study below shows that the parts fit with choice A. Before the final decision, measure the space under the board in the common sockets: a leaf socket, a turned-pin socket and a ZIF socket.

Placement study

hardware/placement_study/make_study.py puts all the parts of the full version on the outline and writes a KiCad board. The KiCad DRC then checks for courtyard overlaps. Run the script with the Python that comes with KiCad:

"%LOCALAPPDATA%\Programs\KiCad\10.0\bin\python.exe" make_study.py
kicad-cli pcb drc --severity-all -o drc.rpt placement_study.kicad_pcb

The study is not a layout. It has no nets and no tracks. KiCad has no footprint for the csfBGA285 or the DHVQFN24, so the script makes them. The csfBGA285 footprint has the real 18 × 18 ball grid with its 39 empty positions. The FPGA turns so that row A faces the memory part (the DDR3L at the time of the study) and the translators, as the pin assignment needs (fpga_pinout.md). The DHVQFN24 footprint has the correct body size and pitch.

Result

All parts fit, on two sides, with no courtyard overlap (KiCad 10.0.7 DRC, 7 November 2026).

Side Parts Courtyard area
Top USB-C, USB LDO, ESD diodes, 12 MHz oscillator, the two isolators, ECP5, DDR3L, DDR3L capacitors, VREF divider (the study is from before 9 November 2026: the SRAM replaced these three DDR3L items) 520 mm² of 709 mm²
Bottom RP2354A, QSPI flash, 25 MHz oscillator, three buck converters, 2.5 V LDO, six translators, CLK buffer, FPGA capacitors, eFuse U22, solder jumpers JP1 and JP2 339 mm² of 709 mm²

The area is the strip between the pin courtyards, over the full length. The top side is almost full along the length: USB-C, isolators, ECP5 and DDR3L (at the time of the study) take 51 mm of the 52.4 mm. Thus the RP2354A and four of the five regulators are on the bottom side.

The USB power option is requirement R9 of requirements.md: "R9" here is not a resistor of the board. The board parts of this option are the eFuse U22 and the solder jumpers JP1 and JP2 (usb_power.md). In the study, U22 is on the bottom side, in the gap at the isolation boundary. JP1 and JP2 are on the bottom side at the USB-C end, between the shell tabs of the receptacle.

The board of 11 November 2026 is different from the study (pcb.md). The RP2354A (U2), U22 and JP2 are on the top side. JP1 is on the bottom side. Thus set JP1 before you put the module in the socket. The LED D2 is on the top side, and the LED D3 is on the bottom side. The host socket hides D3 when the module is in the socket.

The board has all 159 parts placed (C1 to C79, no part without a position). In the study, about 12 regulator capacitors and about 10 RP2354A decoupling capacitors (about 36 mm² in total) were not placed.

What the study does not prove

  • Routing. The ECP5 and the DDR3L (the SRAM since 9 November 2026) need fanout with microvias, and the 40 pins connect to translators that are on the bottom side. A routing study on the real layer stack is necessary before the schematic is final.
  • Height under the board. On the board of 11 November 2026, the tallest bottom parts are the QSOP-16 isolators U3 and U4 (1.75 mm maximum). The next parts are D1 and U6 (SOT-23, 1.45 mm). The body of the chxunda header holds the board 3.0 mm above the socket, which gives about 1.25 mm of clearance. The header body must be 2.0 mm or more. Thus PCBWay must not use a header with a lower body. (Until 11 November 2026 this text gave the inductors and the translators, about 1.0 mm, as the tallest bottom parts, and a minimum of 1.5 mm.)
  • Isolation. The USB side is the end of the board with the USB-C connector, from x = 0 mm to x = 19.7 mm. The socket pins in that area belong to the Z80 side and are about 1 mm from the USB-side copper. This distance is enough to stop ground loops (functional isolation). It is not safety isolation.

PCB technology

The csfBGA285 has a 0.5 mm ball pitch. There are three methods to connect the inner balls:

  • small through vias between the balls: 0.15 mm drill, 0.28 mm pad, 0.089 mm (3.5 mil) track and space. The OrangeCrab uses this method on 6 layers with no microvias. See routing_study.md.
  • laser microvias (HDI)
  • vias in pads, filled and plated over (VIPPO)

The first method is not possible on this module: the through vias take the bottom side under the BGAs, where the parts are. The board is an HDI board with 8 layers, 1+1+4+1+1 (second-order staggered microvias, see pcb.md). HDI costs more than a standard board. cost.md has the PCBWay online-form prices for 5 to 100 boards. PCBWay gives the final price after it reviews the files.

History: the first board plan of 8 November 2026 was HDI 1+4+1. A study of the same day selected the structure 1+1+N+1+1 (pcb.md, "PCB technology: second-order staggered HDI").

The lite version uses the same PCB. Thus the lite version also needs HDI. If the lite version must cost much less, a separate lite PCB with an FPGA in a larger-pitch package is possible. This document does not plan that board.

Assembly at PCBWay

For each version, PCBWay needs:

  • Gerber files and drill files
  • a bill of materials with manufacturer part numbers
  • a component placement file (CPL)

KiCad writes all three. A KiCad plugin can write them in the PCBWay format. The bill of materials for the two versions differs: the lite version does not fit the memory part (the SRAM, or the DDR3L and its regulators before 9 November 2026), and uses the LFE5U-12F.

Order a small first batch. Check each board with the bring-up steps in plan.md before a larger order.

Source of this page: web/ and docs/ in the z80replacement repository. Hardware: CERN-OHL-S-2.0. Other files: GPL-3.0-or-later.