FirebaseOTA 3x6 — Rev A v2.1

SSR Carrier · IoT Energy Monitoring Kit · Ghana Build

✔ DRC rules met (SP-checked) GitHub · Let's Build Run in EasyEDA Pro 230 V 50 Hz · Ghana/West Africa

Assembly diagram

                          ┌──────────────────────────────┐
                          │   230 V  AC IN / OUT 50 Hz   │
                          └──────┬──────────┬────────────┘
                                 │ L        │ N
                          ┌──────┴──────┐   │
                          │ 5x20 fuse   │   │
                          │ T500 mA     │   │
                          └──────┬──────┘   │
                                 │          │
                 F1  ────────────┘          │
                 │                          │
                 │    ┌─── safety MOV ──┐   │
                 │    │  275 VAC 14 mm  │   │
                 │    └────────────────┘   │
                 │                          │
            ┌────┴──────────────────────────┴────┐
            │   J8 · AC IN / OUT terminal  5.08  │
            └────┬──────────┬──────────┬───────┘
                 │ L        │ L_f      │ N
                HLK      load ───── load
             (5V out)     side    side
                 │
        ┌────────┴──────── ISO PSU ✓ 5 V
        │
   ┌────┴──────┐     SSR-25DA ×4     J1  GPIO
   │ ESP32     │  ────┐              │   2x14
   │ DevKit V1 │      │  GPIO25..32  │
   └───────────┘      ▼              ┘
           K1..K4 switches    ●

Where to buy relay (SSR) parts from Ghana

✅ Production choice · 4× Fotek SSR-25DA (~$3 each)

4 channels = 4× SSR-25DA panel modules, ~$3 each at LCSC/AliExpress — ~$12 total for the relay stage of a whole board.

ModuleInput +Input −LOAD inLOAD out
SSR-25DA #1J1 GPIO25GNDJ8.2 AC_L_FJ9.1 L1
SSR-25DA #2J1 GPIO26GNDJ8.2 AC_L_FJ9.2 L2
SSR-25DA #3J1 GPIO27GNDJ8.2 AC_L_FJ9.3 L3
SSR-25DA #4J1 GPIO32GNDJ8.2 AC_L_FJ9.4 L4
Mounted on the printed relay holder (Rev A v3) — chainable bay cells in patress_3x6.scad: either the room-side hub plate (part="hub", 224 × 103 mm, any number of cells) or the in-can bank (part="canbank" requires the deep can, relay_in_can=true). Any relay clips in — each bay has solder combs on both ends, an M3 boss for screw-mount boards and a zip-tie window for anything else. The SSR_K1..K4 pads on the carrier stay unpopulated. At 2 A/channel the switch heat is under 1 W per module (thermal paste to the holder/can floor, no heatsink). Honest caveat: many clone "25 A" modules really handle ~10–20 A continuous — that is still 5× headroom over the 2 A per channel this board switches.

Option 1 · LCSC ✅ best price

PartBrand~Price
SSR-25DAFotek / clone~$3
CPC1709YIXYS~$8
S202S02Sharp / Kagoshima~$5
DHL Express in 2–4 days, easy to pick the value, ships straight to Accra. Account needed.

Option 2 · Mouser / DigiKey

PartBrand~Price
CPC1709YIXYS / Littelfuse~$12
ODN2225Crydom / Sensata~$45
ODN2410Crydom / Sensata~$38
Big-brand SSRs, fully authentic, gentle lead times. Best for a certification/reference prototype. Ships DHL/FedEx in 5–10 days.

Option 3 · RS Components

PartBrand~Price
SSR-25DAFotek / clone~$15
747-8327Sharp / Kagoshima~$8
ODN2225Sensata~$55
4–10 days at customs (GCT accepted). For a prototype this is a solid choice.

Option 4 · AliExpress ⚠️

PartBrand~Price
SSR-25DAFotek / clone~$3
Generic 100A
250V SSR board
noname~$6
2–4 weeks shipping. Fine for this design — at 2 A per channel, the clone's derating doesn't bite. Test each module's input trigger at 3.3 V before closing the can.

⚠️ The SSR-25DA is a panel module — it does not sit on the PCB

Four screw terminals (2 × control: +DC −DC, 3–32 V DC input · 2 × mains: LOAD in / LOAD out) and a base that foots on the enclosure floor or 35 mm DIN rail. The carrier's SSR_Kx in-line pads are therefore left unpopulated in production:

SSR_Kx pads (carrier, unpopulated):  1 · SSR_Kx_AN   2 · SSR_Kx_CAT
                                     3 · AC_N        4 · Lx
Production wiring instead:           J1 rows 13/14  → +DC / −DC
                                     J8.2 (AC_L_F)  → LOAD in
                                     J9.1..J9.4     → LOAD out

Wire the mains side with 1.5 mm² PVC or 1.0 mm² wire into the M4 screw terminals. Keep an 8 mm clearance between the modules' mains side and any SELV wiring (same creepage rule as the PCB — see the installer leaflet).

DIY: how to edit the layout JSONs to fit the SSR-25DA yourself

First: which file is the real one?

FileRole
FirebaseOTA_3x6_RevA_master.jsonCanonical Pro-format layout (repo master). DRC-audited. Edit this one.
PCB_..._v2_1_plus_connected.jsonYour own EasyEDA working copy — win on divergence, then re-export back.
generate_easyeda_v2.pyThe generator. Editing this and re-regenerating is the safest path.
check_board_v2.pyRe-runs the 8 mm creepage / pad-vs-hole / overlap audit after any edit.

Units cheat-sheet (never get these wrong)

1. Pro JSON scale:      3.937 units = 1 mm          (1 unit = 0.254 mm)
2. PAD drill:           written as RADIUS in units  → hole dia (mm) = value / 3.937 × 2
3. HOLE~x~y~D~id~0:     D is DIAMETER in units      → hole dia (mm) = D / 3.937
4. Board outline:       x = 0 … 511.811 units  (0…130 mm); same for 0…275.59 on the 70 mm Y axis.
5. Net ids:             the small int (like ~11~) is the net table index; when adding a pad, reuse an existing net id or the named net.

A PAD token looks like this in the file: PAD~ELLIPSE~53.937~242.126~5.906~5.906~11~SSR_K1_AN~1~1.969~~0~gge… → x, y, w, h (units), net id, net name, pad number, drill radius (units).

Recipe A ✅ safest — edit the generator

Open generate_easyeda_v2.py. The SSR row is built around line 276 (ssr_info, refs SSR_K1..SSR_K4):

# change the printed value / label, keep the pad grid
d.footprint(ref, "SSR-25DA", "SOLID-STATE-RELAY",
            bx + 3.75, y_sel, ...)

Run it, then audit:

python3 generate_easyeda_v2.py
python3 check_board_v2.py        # 8 mm rules must re-pass

Then File → Import → EasyEDA in Pro. Do NOT hand-edit 109 KB of coordinates you can instead regenerate in one line — past conversion bugs (39.37 vs 3.937) came from exactly that.

Recipe B — surgical JSON patch

Rename the footprint value in-place with json (round-trip safe), never a text stream sed:

python3 - <<'EOF'
import json
d = json.load(open("FirebaseOTA_3x6_RevA_master.json"))
for i, s in enumerate(d["shape"]):
    if not s.startswith("LIB~"):    continue
    old_head = s.split("#@$")[0]
    if "package`SOLID-STATE-RELAY" not in old_head: continue
    new_head = old_head.replace(
        "value`SSR-ODN2225", "value`SSR-25DA")
    d["shape"][i] = new_head + "#@$" + s.split("#@$", 1)[1]
json.dump(d, open("…out.json", "w"), separators = (',', ':'))
EOF

Bonus: while you are in there, the matching TEXT~N~…SSR-ODN2225 blob sits inside the same LIB entry — patch both, or the silkscreen will show the old part name.

Recipe C ⚡ zero-work (canonical)

Because the SSR-25DA mounts on the can floor, not the PCB, the shipped master needs no edit at all: the SSR_Kx in-line pads simply stay unpopulated and act as wire anchors / test points.

Move the modules with M3 screws + thermal paste and connect exactly as the wiring table above says. Add 4 × 2 spare M3 pilot holes (Ø 2.8 mm) to the enclosure patress_3x6.scad only if you want a DIN strip.

🔎 After every edit — the must-pass audit

$ python3 check_board_v2.py
rule-A  mains↔SELV worst pad-gap . . . ≥ 8.00 mm   ← currently 8.36 mm
rule-B  mains-track→SELV-pad gap . . . ≥ 8.00 mm   ← currently 9.11 mm
pad-hole clearance  . . . . . . . . . . ≤/≥ 0.3 mm   ← currently 2.64 mm
component body overlaps  . . . . . . .       0

In EasyEDA Pro itself, put the mains nets in a MAINS net class with the 8 mm clearance — the Pro default DRC only enforces 0.7 mm, which will not catch a creepage regression on the SSR row.

Full BOM (per one board · includes relay, all the rest)

#RefPartQtySupplierNote
1U1ESP32 DevKit V1 (30-pin)1Amazon / Jumia / LCSCNecessary
2U2HLK-PM01 (5 V 3 W)1LCSC · Mouser · Ghana marketCE-certified · ~₵53–₵55 · 600 mA · 34.0×20.2×15.0 mm
3SSR_K1..K4Fotek SSR-25DA panel SSR (remote in can)4LCSC / AliExpress~$3 ea · pads unpopulated
4R2..R90.25 W resistor (2.2k, 1k)8LCSC · Any2.2k input · 1k shunt
5LED13 mm LED (red)1Local marketPower light
6R11 kΩ · 0.25 W1Local marketLED series
7C1470 µF · 16 V1LCSC / AnyElectrolytic
8D1SS34 Schottky1LCSC · AnyReverse-protect
9F15×20 mm fuse holder1Local / ECO+ T500 mA fuse
10MOV1275 VAC MOV1LCSC / any14 mm · 10 kA surge class
11J1..J3, J22.54 pin header~28 pinsLCSC / localBreaks
12J8, J95.08mm terminal2 (4-pin)LCSC / AnyMains, loads
13J3SSD1306 OLED 0.96"1LCSC · AliExpressGPIO21/22.
14J4
(PZEM)
PZEM-004T v31AliExpress / LCSCMust be 80–260 V version
15—3.4 mm drilled tray post1(mechanical only)not PCB, note

Total cost ≈ $25–30 excluding the DevKit and OLED when you buy in quantities of 5. Known caveat: many "25 DA" Fotek-style modules sold online really handle ~10 A continuous regardless of the printed rating — buy genuine Sensata/IXYS from a franchised distributor for the product build.

Power module options

ModulePowerCurrentSize (L × W × H)
HLK-PM01 (most common at ~₵53–₵55)3 W600 mA (0.6 A)34.0 × 20.2 × 15.0 mm
HLK-5M055 W1000 mA (1 A)38.0 × 23.0 × 18.0 mm
HLK-10M0510 W2000 mA (2 A)46.9 × 27.8 × 21.8 mm

The PCB carries land patterns for two of these — populate one at a time (never wire mains modules in parallel): the HLK-PM01 (BOM part, footprint drawn to its datasheet dimensions 34 × 20.2 × 15 mm) or the HLK-5M05 (38 × 23 × 18 mm, 1 A — check the enclosure, it is 3 mm taller). The HLK-10M05 does not fit this board: between the top-right mounting hole and J9's 8 mm mains keep-out there is not enough room for its 22.8 mm output-pin row, and its input pins cannot clear J8 and U2 (an exhaustive placement scan misses by 0.008 mm). Needing the 10 W part means a board revision — ask for it before ordering PCBs.

Order plan for a 5-board pilot

🇬🇭 What to ship

TimeframeChannel
1–2 wkLCSC.com — resistors, housing parts, PZEM-004T v3, terminal caps, headers
3–5 dMouser — CPC1709Y ×5, spares ×2, DigiKey backup
3–6 wkAliExpress — spare DevKits, other modules

Ghana logistics info

Customs — electronics enter at Tema Port / KIA; expect import duty + 15 % VAT (Get Fund levy) using your Tax Identification Number (TIN) and a clearing agent.
DHL duties — Dim weight counts for cylinders; group orders → GH₵ cleared once.
Local stores — Accra carries terminals, wire, fuses and MOVs (Melcom Plus, Tudu electronics row), but not the SSR-25DA panel modules — order those online.
Delivery — Tema port or Kotoka; use DHL's "Duty Tax Paid" to skip the Tema paperwork.

Already in the repo (Ready to buy list)

# BOM / Pick&Place, one line per part — ready for JLC and LCSC CSV import
hardware/patress_3x6/pcb/BOM_RevA.csv        # 25 rows
hardware/patress_3x6/pcb/CPL_RevA.csv        # 122 rows, SMT-ready (JLC)
hardware/patress_3x6/pcb/NETLIST_RevA.md     # full wiring reference
hardware/patress_3x6/pcb/FirebaseOTA_3x6_RevA_master.json
hardware/patress_3x6/pcb/FirebaseOTA_3x6_RevA_v2_1_plus.json  # your live copy
hardware/patress_3x6/enclosure/patress_3x6.scad              # + parts cell / hub / canbank (relay holder v3)
hardware/patress_3x6/stl/patress_3x6_relay_{cell,hub,canbank}.stl
hardware/patress_3x6/preview/preview_relay_*.png

3. Safety great steps (EN reminder)

SSR picks:
MAIN SELV 2.5mm pitch net class 8mm

EN 60730-1 standards → and note: Changing the footprint to fit a selected brand SSR means the DRC has to be re-checked for the 8 mm rule again (main point of our check_board runs). Also keep an eye on the MAINS net class 8 mm from EasyEDA's rules reviewer.