#voron #voroncascade
## Parts
- Delta 20DRGS5 Line Filter (Milo Universal Electronics Box spec)
- Meanwell NDR-480-48 DIN Rail 48V PSU
- Meanwell HDR-30-24 DIN Rail 24V PSU
- Meanwell HDR-30-5 DIN Rail 5V PSU
- Expatria FlexiHAL Rev A7 controller (grblHAL / LinuxCNC)
- Expatria uFlexiNET Ethernet adapter
- StepperOnline YS-series 3-axis closed-loop kit **3-CLYS30-V20**: 3× 23HS40-5004D-E1000 motors (3.0 Nm, 5.0 A, 1000 PPR encoder, ~122 mm long), 3× CL57Y-V20 drivers, 3× CE2-M2-20 motor + encoder cable sets, S-500-48 48 V PSU (spare — NDR-480-48 is the plan)
## Panel wiring
The full panel design — mains, contactor, E-stop/START/STOP latch, door interlock, every FlexiHAL terminal and the bay layout — is in [[Voron Cascade Electronics Wiring]], with three scripted drawings in `media/`; the settings it needs are in [[Voron Cascade Electrical Configuration]]. Rev J (2026-11-10) is drawn to the parts listed above. Changes to the Parts list that came out of it: HDR-30-24 → **SDR-120-24** (the 24 VDC contactor coil needs the headroom), the BOM's WEG contactor → **IronHorse HMC-18B30-11-DS** (24 VDC coil), four Murrelektronik 52003 slimline relays (latch, machine-on, air blast, door), two KN-F10L24DC fuse terminals and McMaster 7641K51 terminal blocks (colour-coded) for XT1 / XT2 / PE on the rear-panel rail and XT3 on the upper rail, in place of the BOM's Wago mounts. The 5 V for the Pi and display now comes from a **Mean Well MDR-60-5** (10 A, McMaster 3718N152, ordered 2026-11-09; Rev F), so the HDR-30-5 is a bench spare too.
- Raspberry Pi 5 (LinuxCNC host — mounts on the FlexiHAL Pi header)
- Pimoroni NVMe Base, single-slot PIM699 ==to order== (Amazon/Platinum Micro $29.99; also PiShop.us, Micro Center)
- NVMe SSD, M-key 2230–2280, PCIe Gen3, 250–500 GB from Pimoroni's tested list ==to order==
- Raspberry Pi Active Cooler + 40-pin female stacking header (riser between FlexiHAL and Pi) ==to order==
- microSD 8 GB+ high-endurance (SanDisk U3 High Endurance) — bootstrap card only
## Powering Raspberry Pi 5
**Cleanest industrial approach for a Pi 5:** skip USB-C entirely, use a standard 5V/8A DIN-rail supply (like the Phoenix UNO-PS/1AC/5DC/40W or Mean Well HDR-60-5), and feed the Pi via the GPIO header with `usb_max_current_enable=1` set in config.txt. Less fiddly, more reliable, and the supplies are mainstream/cheap.
## Pi 5 + FlexiHAL + NVMe (LinuxCNC host setup)
Final host configuration for the LinuxCNC/Remora path: a Raspberry Pi 5 socketed on the FlexiHAL, booting Expatria's Flexi-Pi image from an NVMe SSD on a Pimoroni NVMe Base — no SD card in service. Expatria now recommends the Pi 5 over the Pi 4 (Pi 5 support landed in the flexi component 2024-11-08 via rp1lib) and ships separate Pi 4 / Pi 5 images.
### Decisions
- **Pi 5 Model B + NVMe** instead of CM5 + eMMC
- **Why**: the Pi 5 drops straight onto the FlexiHAL header; NVMe boot is Expatria-documented and the Pimoroni NVMe Base is their tested board. The CM5 4GB/32GB on the shelf stays in the box.
- **Alternative considered**: Waveshare CM5-IO-BASE-B ($28.95, 85 × 56 mm Pi-B footprint, HAT-compatible 40-pin, eMMC flash via BOOT button + USB-C). Viable but untested by Expatria, and it hangs a CAT24C32 EEPROM (0x50) and ATSHA204 (0x64) on I2C1. Fallback if the Pi 5 route disappoints.
- **Single NVMe Base (PIM699), not the Duo** — one drive is all the controller needs; the single is the one Expatria tested
- **Gen2 PCIe, stock** — skip `dtparam=pciex1_gen=3` (Pimoroni calls it experimental); a Gen3 drive is already faster than LinuxCNC can use at Gen2 x1
### Hardware
- **Riser**: a 40-pin female stacking header between the FlexiHAL socket and the Pi — required for the Active Cooler (the Pi's component side faces the FlexiHAL)
- **NVMe Base** mounts on the Pi's underside (the outward-facing side when socketed), on the kit's 7 mm M2.5 standoffs; use the kit's long M2.5 "pass-thru" bolts if standoffs run Pi → FlexiHAL too
- FFC wraps the Pi edge from the PCIe connector; connect the Pi end first, then the Base's flip-tab end; Pi powered off and unplugged
- Never an NVMe HAT that sits on the GPIO pins (Expatria)
- **SSD**: stick to Pimoroni's tested list — Crucial P3 / P3 Plus, Samsung 980, Lexar NM620 / NM710 / NM790, Kioxia Exceria, Kingston KC3000. Avoid WD Green/Blue/Red/Black not on that list (SanDisk controller quirks; their SN350/SN570 stopped the Pi 5 booting)
- **Pi 5 vs Pi 4 differences that touch the box**: Ethernet and USB-A stacks are swapped, there's a power button and a 4-pin fan header — check enclosure cutouts
### Power
- 24 V → FlexiHAL main input (unchanged from the bench jog)
- 5 V/5 A → Pi. Expatria's documented path is the official 27 W USB-C PSU to the Pi; the DIN-rail-via-GPIO idea in [[#Powering Raspberry Pi 5]] above still applies but see the open item below
- **FlexiHAL USB-C stays unplugged** in LinuxCNC operation — the Pi's 5 V rail reaches the isolated MCU domain through the header, so the board's USB-C would be a second 5 V source in parallel. Expatria: nothing on the board's USB-C while flashing over the GPIO header
- Isolation-bypass jumpers stay **off** (same as bench jog)
- NVMe boot does *not* need the 5 A negotiation; only USB boot is gated on it. If powering via GPIO, add `usb_max_current_enable=1` to `/boot/firmware/config.txt` (or `PSU_MAX_CURRENT=5000` in the EEPROM) so the USB ports get full current
- ==If going DIN 5 V → GPIO per the section above: with the Pi socketed on the FlexiHAL every header pin is consumed, so 5 V/GND have to land on the stacking header's exposed pins (or the isolated-domain 5 V near the bypass jumpers). Decide before the harness is made.==
### Software — Flexi-Pi image
- Download the **Pi 5** release (not the Pi 4 one): https://github.com/Expatria-Technologies/Flexi-Pi/releases
- Bookworm + RT kernel, LinuxCNC, the flexi component, remora-spi and remora-eth (as-is), QtDragon_hd default UI (wants a 1080p display)
- Login `expatria` / `expatria`
- Bootstrap once from SD: flash the image to the microSD (Imager / balenaEtcher / dd), boot on the FlexiHAL, filesystem auto-expands
- Pi bootloader must be 2023-12-06 or newer for the NVMe Base to work with no config.txt edits — `sudo rpi-eeprom-update` shows the version; `sudo raspi-config` → Advanced Options → Bootloader Version → Latest if older
- Read the README on the image's desktop — it has the image-specific flashing and start-up notes
### NVMe boot (Expatria procedure)
From the SD-booted Pi, with stable power:
```bash
sudo rpi-eeprom-config --edit
# set: BOOT_ORDER=0xf416 (NVMe first, SD fallback)
# add: PCIE_PROBE=1 (new line under BOOT_ORDER)
```
Resulting EEPROM config:
```
[all]
BOOT_UART=1
POWER_OFF_ON_HALT=0
BOOT_ORDER=0xf416
PCIE_PROBE=1
```
Then write the same Flexi-Pi image to the SSD — either from a PC with a USB NVMe dock, or `dd` it from the SD-booted Pi — pull the SD card and reboot. Keep the SD card in the drawer as a recovery boot.
### FlexiHAL firmware (Remora)
- Remora on the FlexiHAL **replaces the UF2 bootloader** that grblHAL uses. Restore from https://github.com/Expatria-Technologies/tinyuf2/releases if going back to grblHAL/gSender
- Firmware must be the current build (2024-11-08 or later): SPI protocol changed to raw counts, deadband handling reworked — any gains tuned on older firmware need retuning
- Flash from the Pi: `flash_firmware` script on the image detects the board and flashes the STM32F4 over UART through the GPIO header, checking Expatria's releases for updates first
- Requires the default jumpers, specifically the **Pi-UART link** (2×2 near P19) — see the jumper image in the bench-jog section
- Nothing plugged into the FlexiHAL USB-C during flashing
- Pins are fixed-function and named (`board_config.h`); inverted `.not` twins exist for every digital input — visible in halshow
### LinuxCNC config
- Reference config: `~/linuxcnc/configs/flexi-hal/` — `remora-flexi.ini` (travels, limits, scales) and `remora-flexi.hal`. **Edit for the Cascade before any motion**
- VFD: the reference HAL ships with vfdmod configured for a Durapulse GS10 and hy_vfd commented out. For the H100 see [[G-Penny H100 VFD Modbus Integration]] — vfdmod with the H100 register map
- ==Confirm how the Pi reaches the VFD over RS485 in the SPI/Remora setup — USB-RS485 adapter on the Pi vs. the FlexiHAL's onboard RS485 port (the socat virtual-port trick in the Flexi-Pi README is for uFlexiNET/Ethernet)==
- Network: image is DHCP on eth0 with static secondaries 192.168.5.2/24 (FlexiHAL 2350 Ethernet) and 10.10.10.2/24 (uFlexiNET) — harmless to leave; `menu-config` for Wi-Fi
- Autostart: add `linuxcnc -l` to Session and Startup → Application Autostart once the config is settled
- Additional reference configs: https://github.com/Expatria-Technologies/linuxcnc_configs
- Support: Expatria Discord https://discord.gg/bSEXy7GhcZ
### References
- [remora-flexi-hal README (Expatria)](https://github.com/Expatria-Technologies/remora-flexi-hal) — Pi 5 support, firmware/bootloader notes, reference config
- [Flexi-Pi image README](https://github.com/Expatria-Technologies/Flexi-Pi) — Pi 4/5 images, NVMe boot, flashing, jumpers
- [Remora SPI docs](https://remora-docs.readthedocs.io/en/latest/hardware/SPI/rpspi.html)
- [Pimoroni NVMe Base](https://shop.pimoroni.com/products/nvme-base) — kit contents, tested-drive list, boot setup
- [Raspberry Pi — USB Power Delivery on Pi 5 (PDF)](https://pip-assets.raspberrypi.com/categories/685-app-notes-guides-whitepapers/documents/RP-009856-WP-1-USB%20Power%20delivery%20on%20Raspberry%20Pi%205.pdf)
- [Waveshare CM5-IO-BASE-B wiki](https://www.waveshare.com/wiki/CM5-IO-BASE-B) — the CM5 alternative, for the record
## FlexiHAL + CL57Y Bench Jog (Y Axis)
Minimum setup to jog Y using the stock grblHAL firmware that ships on the FlexiHAL, over USB-C to a laptop running gSender. No flashing, no Pi, no Ethernet — the uFlexiNET adapter is only for running gSender/ioSender over the network later. Nothing here commits the build to grblHAL vs. LinuxCNC; see [[RepRapFirmware and MillenniumOS on BTT Scylla]] and [[Duet Web Control vs gSender]] for that decision.
~~Confirm the Y motor has an encoder~~ (resolved 2026-10-15: the kit motors are 23HS40-5004D-E1000 with 1000 PPR encoders; the open-loop 23HS32-4004S from the BOM is not used. The V2.0 driver does have an open-loop mode — SW3 ON — unlike V1.)
==Motor length: the kit motors are ~122 mm long including the encoder cap; the BOM calls for NEMA23 up to 117 mm. Check mount clearance on each axis in CAD before committing.==
### Power
- NDR-480-48: mains L / N / PE in; V+ / V- out → CL57Y V+ / V-
- Trim the pot to **48.0 V** with a meter — the NDR adjusts 48–55 V and the CL57Y ceiling is 50 V
- FlexiHAL main input ("24V + -" plug terminal, bottom edge next to the spindle terminals): 12–24 VDC — HDR-30-24 or any spare 24 V printer PSU. **Never the 48 V.**
- FlexiHAL USB-C → laptop. **Both** are required: USB powers the isolated MCU domain, the 24 V input powers the stepper-output side. With only one, the board lights up but nothing moves.
- Never connect or disconnect motor leads with the driver powered.
### FlexiHAL jumpers
No changes for the bench jog — the board ships with its defaults installed (red in the image). Only check two things:
- The two **isolation-bypass** jumpers (offset pins near the USB-C / P18 area) stay **off** — we run USB + 24 V, which is the intended setup
- The default set is present: Pi-UART link (2×2 near P19), HALT polarity = NO, spindle 0–10 V (P7), spindle section on onboard 12 V (P6), spindle ground tied to board ground (P16), aux relay supply select (top right)
Everything in that list is spindle/pendant/relay plumbing and has no effect on step/dir. Leave it until the VFD and pendant get wired.
![[media/flexihal-default-jumpers.png]]
### CL57Y-V20 (kit driver)
- **5V/24V logic selector → 5V** (new on V2.0; the FlexiHAL step/dir outputs are 5 V RS-422)
- DIP: SW1 OFF (pulse + dir), SW2 either (direction), **SW3 OFF = closed loop** (V2.0: ON = open loop), SW4 OFF (ALM normally open)
- SW5–SW8 = **ON OFF ON ON** → 1600 pulses/rev (confirmed from the V2.0 manual, p.10; factory default is 400 = all ON) — full table below
- Leave MF+ / MF- (enable) unconnected — MF driven = motor *freed*; the manual's own fix for "motor won't turn" is "don't connect MF"
- Leave ALM+ / ALM- unconnected for now — the FlexiHAL treats an open alarm input as "no alarm" (blue MOTOR LED lit)
- Current is automatic (load-based); there is no current DIP on this driver
- Red LED fault codes: 1 flash overcurrent / phase short · 2 overvoltage · 3 undervoltage · 4 motor phase open · 5 out of tolerance · 6 encoder fault
#### DIP switch cheat sheet (CL57Y-V20)
Bench-jog setting: **SW1 OFF · SW2 OFF · SW3 OFF · SW4 OFF · SW5 ON · SW6 OFF · SW7 ON · SW8 ON**, plus the logic-voltage selector on **5V**.
| SW | Function | OFF | ON |
|---|---|---|---|
| 1 | Pulse mode | PU/DR ← use | CW/CCW |
| 2 | Direction | CW ← start here | CCW |
| 3 | Control mode | closed loop ← use | open loop |
| 4 | ALM polarity | normally open ← use | normally closed |
| Pulses/rev | SW5 | SW6 | SW7 | SW8 |
|---|---|---|---|---|
| 400 (default) | ON | ON | ON | ON |
| 800 | OFF | ON | ON | ON |
| **1600** | **ON** | **OFF** | **ON** | **ON** |
| 3200 | OFF | OFF | ON | ON |
| 6400 | ON | ON | OFF | ON |
| 12800 | OFF | ON | OFF | ON |
| 25600 | ON | OFF | OFF | ON |
| 51200 | OFF | OFF | OFF | ON |
| 1000 | ON | ON | ON | OFF |
| 2000 | OFF | ON | ON | OFF |
| 4000 | ON | OFF | ON | OFF |
| 5000 | OFF | OFF | ON | OFF |
| 8000 | ON | ON | OFF | OFF |
| 10000 | OFF | ON | OFF | OFF |
| 20000 | ON | OFF | OFF | OFF |
| 40000 | OFF | OFF | OFF | OFF |
Same table is printed on the driver label. Y steps/mm in grblHAL = pulses/rev ÷ 4 (1204 screw, 1:1 belt).
#### Motor cable (CE2-M2-20, AWG20) → driver A/B terminals
GX16 4-pin aviation plug at the motor, tinned leads at the driver.
| Wire | Driver |
|---|---|
| Black | A+ |
| Green | A- |
| Red | B+ |
| Blue | B- |
#### Encoder cable (CE2-M2-20, AWG26) → driver encoder terminals
DB15 at the motor, tinned leads at the driver. Two blacks: the **thin** black is EA+; the **thick** black is the shield drain — leave it off (land it on EGND only if noise shows up later). Go by the labels printed on the driver; the manual's terminal order is EB+, EB-, EA+, EA-, VCC, EGND.
| Wire | Signal |
|---|---|
| Yellow | EB+ |
| Green | EB- |
| Black (thin) | EA+ |
| Blue | EA- |
| Red | VCC (5 V) |
| White | EGND |
| Black (thick) | shield — not connected |
Motor-end DB15 pinout for reference: 1 EA+, 2 VCC, 3 GND, 11 EB+, 12 EB-, 13 EA-. Encoder is 1000 PPR (4000 CPR) differential, 5 V.
### FlexiHAL Y header → CL57Y (differential, 4 wires)
2×4 box header on 0.1" pitch — female Dupont jumpers are fine for the bench, IDC ribbon for the real harness. Odd pins (S+, D+, 5V, G) are one row, even pins (S-, D-, E-, AL-) the other, matching the "MOTION PINS" silkscreen.
| FlexiHAL Y pin | CL57Y |
|---|---|
| 1 S+ | PU+ |
| 2 S- | PU- |
| 3 D+ | DR+ |
| 4 D- | DR- |
Pins 5 (5V), 6 (E-), 7 (G), 8 (AL-) stay empty.
Header legend as silkscreened on the board (same for X/Y/Z/A/B):
![[media/flexihal-Stepper_Pins.jpg]]
Full board pinout (Expatria README):
![[media/flexihal-Pinout.png]]
### Cabling (FlexiHAL header → driver)
- Header: 2×4 shrouded box header, 2.54 mm pitch, 8 pins — mates with any "FC-8P" style IDC socket
- Expatria doesn't sell driver cables; the jaymis.com package ships 5 generic IDC sockets + 10-conductor ribbon, which is the intended approach
- Proper harness: IDC socket + 1.27 mm-pitch ribbon (28 AWG), four conductors landed on the driver's pluggable terminals (tin them or use 0.08 mm² ferrules). 10-conductor ribbon is cheaper and more common — peel two off
- [Amphenol 71600-008LF](https://uk.rs-online.com/web/p/idc-connectors/1708810) 8-way IDC socket (DigiKey / Mouser / RS)
- Generic FC-8P sockets, e.g. [5-pack on eBay](https://www.ebay.com/itm/166412036700)
- Zero-tool option: buy a pre-made FC-8P-to-FC-8P ribbon extension, cut one end off, strip and tin S+ / S- / D+ / D-
- Bench only: female-to-male Dupont jumpers — female end on the header, male pin clamped in the CL57Y screw terminal
### grblHAL settings (gSender console, 115200 baud)
If it connects in Alarm, hit Unlock (`$X`). If it reports Door or Hold with nothing wired, the fix is the `$14` control-input invert mask.
```
$21=0 hard limits off
$22=0 homing off
$101=400 Y steps/mm (1600 ppr ÷ 4 mm lead SFU1204, 20T:20T HTD-3M belt = 1:1)
$111=2000 Y max rate, mm/min
$121=200 Y accel, mm/s²
$5=31 limit inputs inverted (all 5 axes) — open = idle, NO sensors pull S to G when triggered
$6=1 probe input inverted — NO probe
$14=15 control inputs inverted: Halt/Reset, Feed hold, Cycle start, Door — NO buttons
```
One setting per line, then Ctrl-X (soft reset) and Unlock. As shipped, the board came up `<Alarm|...|Pn:PXYZABDRHS>` — every input reading asserted with nothing connected (12 V and 5 V rails both present) — and `$X` would not clear it because the Halt line was "asserted". `$5` / `$6` / `$14` above fixed it; status went to Idle. The `[MSG:Warning: PicoHAL queue is full.]` spam is the stock firmware's PicoHAL expansion plugin polling an absent module over RS485 — harmless for jogging. ==Find the setting that disables PicoHAL polling, or flash a build without it, before the VFD goes on the RS485 bus.==
- Y moves backwards → `$3=2` (direction invert mask, Y bit) or flip SW2 on the driver
- Board ships as XYYZ, so Y2 lives on the A header — harmless with nothing plugged in
- Steps/mm at other DIP settings = pulses/rev ÷ 4 (e.g. 3200 ppr → 800)
### References
- [Flexi-HAL README (Expatria)](https://github.com/Expatria-Technologies/Flexi-HAL)
- [FlexiHAL Rev A7 product page](https://expatria.myshopify.com/products/flexihal-isolated-cnc-controller-rev-a7-for-grblhal-and-linuxcnc)
- [3-CLYS30-V20 kit page](https://www.omc-stepperonline.com/ys-series-3-axis-closed-loop-stepper-cnc-kit-v2-0-3-00nm-424-83oz-in-nema-23-motor-w-2-0m-cables-power-supply-3-clys30-v20)
- [CL57Y-V20 driver page](https://www.omc-stepperonline.com/y-series-v2-0-closed-loop-stepper-driver-0-7-0a-24-50vdc-for-nema-17-23-24-stepper-motor-cl57y-v20) · [CL57Y V2.0 manual (PDF)](https://files.omc-stepperonline.com/CL57Y_V2.0_pulse_stepper_driver_manual_V1.0.pdf)
- [CL57Y V1 manual (PDF)](https://files.omc-stepperonline.com/CL57Y_MANUAL.pdf) — older driver; has the SW5–SW8 table in text form
- [23HS40-5004D-E1000 datasheet (PDF)](https://files.omc-stepperonline.com/23HS40-5004D-E1000_Full_Datasheet.pdf)
- [CE2-M2-20 cable page](https://www.omc-stepperonline.com/1-7m-67-awg20-motor-and-encoder-extension-cable-kit-for-nema-23-and-24-closed-loop-stepper-motors-ce2-m2-20) · [datasheet (PDF)](https://files.omc-stepperonline.com/CE2-M2-20_Full_Datasheet.pdf)
## Build Log
### 2026-10-15
- Controller hardware in hand: FlexiHAL, uFlexiNET Ethernet adapter, NDR-480-48, StepperOnline 3-CLYS30-V20 closed-loop kit (3× 23HS40-5004D-E1000, 3× CL57Y-V20, cables)
- Next: bench-jog Y per the section above
### 2026-10-16
- FlexiHAL powered (USB-C + 24 V), gSender 1.6.4 (Mac Silicon build) connected over USB
- Came up in Alarm with `Pn:PXYZABDRHS`; confirmed 12 V at Xend V–G and 5 V at the stepper header → set `$5=31`, `$6=1`, `$14=15`, soft reset, unlocked → Idle
- 8-pin IDC ribbon made up for the Y header (red stripe = pin 1 = S+)
## Changelog
### 2026-10-15
- Added FlexiHAL, uFlexiNET, and CL57Y to Parts
- Added "FlexiHAL + CL57Y Bench Jog (Y Axis)" section — wiring, DIP switches, grblHAL settings
- Saved the Expatria stepper-header legend and full board pinout images to `media/` and embedded them
- Added Cabling subsection (IDC connector / ribbon part options)
- Folded in the 3-CLYS30-V20 kit: CL57Y-V20 differences (5V/24V selector, SW3 meaning), motor and encoder cable color tables, resolved the encoder question, flagged motor length vs. BOM
### 2026-10-16
- Added CL57Y-V20 DIP switch cheat sheet, verified against the V2.0 manual
- Added FlexiHAL jumpers subsection with Expatria's default-jumper image
- Recorded the input-invert settings ($5/$6/$14) and the all-inputs-asserted first-power-up symptom; noted the PicoHAL warning
### 2026-11-10
- Panel-wiring pointer updated for Rev K of [[Voron Cascade Electronics Wiring]]: four 52003s, KN-F10L24DC fuse terminals and McMaster 7641K51 terminal blocks.
### 2026-11-09
- Added "Pi 5 + FlexiHAL + NVMe (LinuxCNC host setup)" section — Pi 5 vs CM5 decision, riser/cooler/NVMe Base mounting, power rules, Flexi-Pi Pi 5 image, EEPROM NVMe-boot procedure, Remora flashing and UF2 caveat, LinuxCNC reference config pointers
- Added Pi 5, NVMe Base, SSD, cooler/riser, and bootstrap SD to Parts
- Flagged two open items: where to land 5 V if feeding the Pi via GPIO on the FlexiHAL, and the RS485 path to the VFD under Remora