Bench reference · linear rail pressure sensor

MDrive23 Plus² Connectors

Three connectors on the IMS integrated NEMA 23 stepper driving the THK SKR rail: serial in, logic I/O, and motor power. Pinouts, what to order to mate with each one, and how to get an ESP32 talking to it. Pin data transcribed from the MDrive Motion Control manual, MDrive 23 chapter, revision R042214.

Label reads MDrive 23 Plus Motion Control Variant Plus² (expanded I/O) Motor power +12 to +60 VDC, 3.0 A Rail THK SKR, S/N AR09100999
Two photographs of the MDrive23 stepper. Left: the side face with the ten-pin
  IDC communications header ringed and labelled P2. Right: the end face with the white fourteen-pin JST
  I/O connector labelled P1 and the black two-pin power connector labelled P3 beneath it.
The unit carries three connectors, not two — P3 sits directly beneath P1 on the end face and is easy to read as part of the same housing.

P2 10-pin press-fit IDC RS-422/485 serial

The only way in. Configuration, motion commands, MCode programs — everything the drive does arrives over this port. Pins 6–9 duplicate 1–4 so a multi-drop bus can be daisy-chained through one connector.

12345678910

Face view, per manual

Shell
Samtec TCSD-05-01-N
Ribbon
Tyco 1-57051-9
Pitch
2.00 mm / 1.0 mm ribbon
Mating kit
CK-01
PinFunctionDescription
1TX +Transmit plus
2TX āˆ’Transmit minus
3RX +Receive plus
4RX āˆ’Receive minus
5Aux-Logic+12 to +24 VDC in. Holds the control and feedback logic up when motor power is removed. 194 mA max per drive.
6RX +Receive plus — duplicate, for daisy-chaining the bus
7RX āˆ’Receive minus — duplicate
8TX āˆ’Transmit minus — duplicate
9TX +Transmit plus — duplicate
10Comm GNDCommunication ground only. Do not return aux-logic here.

Where to buy

  • Buy this
    Samtec TCSD-05-D-12.00-01-N · DigiKey

    A finished 12″ cable carrying the exact socket the manual specifies, on both ends. Cut it in half and you have two pigtails with a mating socket and stripped ribbon to solder wherever you like. Other lengths are the same part number with the inches swapped — 2″ up to 27″.

  • No soldering
    MD-CC400-001 · Motion Control Products

    The factory USB-to-RS-422 cable: opto-isolated, 12 ft, socket already fitted. Not a DigiKey line and not cheap, but it is the fastest route to a drive that answers, and the isolation solves the grounding problem described below. Also at Radwell, and it turns up used on eBay.

  • Only if
    Generic 2.00 mm IDC sockets · Amazon

    Twenty-five sockets for the price of one Samtec cable — but you still need 1.0 mm pitch ribbon to put in them, which is the genuinely awkward part to source. Worth it only if you are terminating several. 2.54 mm will not fit.

Pin 1 is the red conductor of the ribbon. And note that the 10-pin friction-lock P2 variant (Hirose DF11-10DS-2C) uses a different pinout — pin 2 is Comm GND there, not TX āˆ’. This unit has the IDC, so use the table above.

P1 14-pin locking wire crimp expanded I/O

Eight general-purpose 24 V I/O points, an analog input, a high-speed capture line, and step/direction inputs. This is also where the rail's end stops land — see below.

1314111291078563412

Face view, per manual

Shell
JST PADP-14V-1-S
Crimps
JST SPH-002T-P0.5L
Pitch
2.00 mm, 2 rows
Mating kit
CK-09
PinFunctionDescriptionPigtail wire
1I/O powerSupply for sourcing inputs or outputs. An input — the drive does not source from it.Red
2I/O GNDNon-isolated I/O ground, common with power groundBlack
3I/O 1Programmable I/O point 1, 0 to +24 VDCOrange
4I/O 2Programmable I/O point 2, 0 to +24 VDCBlack
5I/O 3Programmable I/O point 3, 0 to +24 VDCBrown
6I/O 4Programmable I/O point 4, 0 to +24 VDCBlack
7I/O 9Programmable I/O point 9, 0 to +24 VDCYellow
8I/O 10Programmable I/O point 10, 0 to +24 VDCBlack
9I/O 11Programmable I/O point 11, 0 to +24 VDCBlue
10I/O 12Programmable I/O point 12, 0 to +24 VDCBlack
11Capture / Trip I/OHigh-speed capture input or trip output. +5 VDC maxGreen
12Analog in0 to 10 V, 4 to 20 mA or 0 to 20 mABlack
13Step / Clock I/OStep clock, or quadrature / clock up-down. +5 VDC maxWhite
14Direction / Clock I/ODirection, or quadrature / clock up-down. +5 VDC maxBlack

Where to buy

  • Buy this
    JST PADP-14V-1-S · DigiKey

    The housing. One per cable, cents each, always in stock.

  • And this
    JST ASPHSPH24K305 · DigiKey

    Pre-crimped 24 AWG leads, 12″, contact on both ends — cut in half for two. Seven of them fills all fourteen ways, for about three dollars, and you never touch a crimp tool. DigiKey files these under the PH series, but the contact is the same SPH-002T that JST's own PAD datasheet lists for this housing.

  • If crimping
    JST SPH-002T-P0.5L · DigiKey

    Loose contacts for 28–24 AWG. Use SPH-001T-P0.5L instead for 26–22 AWG. These are small; without a JST-grade tool the pre-crimped leads above are the better trade.

  • Factory
    PD14-2334-FL3

    The 10 ft factory pigtail in twisted pairs, wire colours in the table above. Same industrial suppliers as the MD-CC400-001; no catalogue distributor carries it.

Confirm before wiring: two other builds share this housing. On the Ethernet build pins 7–10 are not connected; on the remote-encoder build they carry CH A± and CH B±, and pins 13–14 carry IDX± instead of step/direction. Pins 1–6, 11 and 12 are identical across all three, so those are safe regardless.

P3 2-pin friction lock DC motor power

Separate from the I/O connector on Plus² units — standard Plus units combine power and I/O onto flying leads or a 7-pin terminal, so the presence of this connector is what identifies this one as a Plus². Budget 3.0 A per drive; the manual wants an unregulated linear supply, ripple within ±5%.

21

Face view, per manual

Shell
TE 794617-2
Crimps
TE 794610-1
Pitch
3.00 mm
Mating kit
CK-04
PinFunctionDescriptionPigtail wire
1+V+12 to +60 VDC motor power, 3.0 A max per driveRed
2GroundPower supply returnBlack

Where to buy

  • Buy this
    TE 794617-2 · DigiKey

    Two-position Micro MATE-N-LOK receptacle housing, 3 mm pitch.

  • And this
    TE 794610-1 · DigiKey

    Socket contacts, 20–24 AWG, two per cable.

  • Watch out
    20 AWG is the ceiling here

    The manual's wire table wants 18 AWG for 3 A over a 10 ft run, and no Micro MATE-N-LOK contact takes 18 AWG. That is a voltage-drop limit, not an ampacity one, so 20 AWG is fine for full current over a couple of feet. For a long run, land the 20 AWG on a terminal block near the drive and go heavier from there. The factory PD02-2300-FL3 pigtail has the same constraint.

Wiring it to a host

Full duplex RS-422 is the default, and the mode you must use for initial setup. The pairs cross over — the drive receives on RX, so the host transmits into it.
HostP2 pinDrive
TX +3RX +
TX −4RX −
RX +1TX +
RX −2TX −
Comm GND10Comm GND

Where to buy

  • Buy this
    NOYITO RS422-to-TTL, 3.3 V · Amazon

    MAX3490-class module with Y/Z/A/B brought out and over-voltage protection on the line side. KNACRO sell the same board. Wires straight to the ESP32 with nothing in between, which is the whole reason to prefer it.

  • Or, +2 parts
    LM YN MAX490 module, 5 V · Amazon

    The same board built around the 5 V MAX490 instead, and usually the one that turns up first in a search. It works, in one direction for free: the driver input needs only 2.0 V to read high, so a 3.3 V ESP32 transmit line drives it fine. Coming back is the problem — RO swings to its 5 V rail and an ESP32 pin is rated to 3.6 V absolute maximum. Put a divider on that one line: 1.8 kΩ in series from RO, 3.3 kΩ from the tap to ground, ESP32 RX on the tap. That lands at 3.24 V, and at 9600 baud the added source impedance is irrelevant.

  • Never
    Running a MAX490 off 3.3 V to dodge the divider

    Its supply spec is 4.75 to 5.25 V. Starved at 3.3 V it will look like it works on the bench, but the driver is no longer guaranteed to make the 2 V differential RS-422 asks for, and you have swapped a two-resistor fix for an intermittent one.

  • Bare chip
    Maxim MAX3490 · DigiKey

    3.3 V, full duplex, no direction pin to drive, which is what a point-to-point 4-wire link wants. ADM3490 is a drop-in. Not a MAX485 — that is 5 V and half duplex.

  • Watch out
    The on-board 120 Ω termination

    Most of these modules fit one permanently. The manual asks for no termination under 15 ft. It is a benign mismatch, well within what the drive's transmitter will push, but it is why a short link can look marginally worse than you expect rather than better.

End stops on the rail

The rail carries two Omron EE-SX671 slot sensors. These belong on the drive's own I/O, not on the ESP32: configured as Limit + and Limit −, the MDrive stops itself in firmware with no round trip through your code, and keeps doing so if the ESP32 hangs, reboots or is unplugged.
Photograph of the Omron EE-SX671 slot sensor rotated so the part marking reads
      upright, with its four solder tabs numbered one to four from left to right and labelled Vcc, L, OUT and GND.

Terminal order is taken from Omron's outline drawing, matched to the photo by the mounting holes, the indicator window and the tabs. Confirm it before you apply power — see the bench check below.

The sensor

Slot-type photomicrosensor, 5 mm slot, L-shaped body. NPN open collector output, 5–24 VDC supply, 35 mA consumption, 100 mA switching capacity, residual voltage 0.8 V max at full load. Response 1 kHz.

Light-ON versus Dark-ON is a wire, not a switch. Short terminal 2 (L) to terminal 1 (Vcc) for Light-ON; leave L open for Dark-ON. That one choice decides whether your end stops fail safe.

Why it needs no interface circuitry

The MDrive's general-purpose inputs are already set up for exactly this. Each one sits behind a 100 kΩ pull-up to an internal 3.3 V rail with 24.9 kΩ to ground, giving Vih = 2.31 V, Vil = 0.99 V and an input current around 100 µA.

So an open-collector output pulling to ground is the native case: no pull-up, no series resistor, no level shifting. At 100 µA the sensor's residual voltage is far below the 0.99 V threshold, and with the transistor off the input floats to 3.3 V, comfortably above 2.31 V.

Wiring

SensorGoes toNote
1 — Vcc+5 V railIts own supply. The MDrive's I/O power pin is an input, not a source — it cannot feed these.
2 — LVcc, or openTied to Vcc = Light-ON. Open = Dark-ON.
3 — OUT3 / 4P1 pin 3 (I/O 1) for one end, pin 4 (I/O 2) for the other.
4 — GND2P1 pin 2, I/O ground. The 5 V supply's return lands here too.

Bench check before you commit. Do not trust the terminal numbering from a photograph. With the sensor off the rail, feed it 5 V from a supply current-limited to about 20 mA on terminals 1 and 4, leave L open, and watch the red indicator: it should light when you put something opaque in the slot. If it does not light either way, kill the supply and re-check the orientation rather than turning the voltage up.

Making them limits

Three MCode lines over the serial link, then a save. S<n> takes type, active state and sink/source: type 2 is Limit +, type 3 is Limit −, and the third parameter 0 means sinking, which is what an NPN output wants.

S1=2,1,0        ' I/O 1 = Limit +, active HIGH, sinking
S2=3,1,0        ' I/O 2 = Limit -, active HIGH, sinking
LM=2            ' any limit decelerates all motion to a stop
S               ' save to NVM

Active HIGH with Light-ON is the fail-safe combination, and it is worth the extra thought. Tie L to Vcc so the output conducts while the slot is clear, holding the drive's input low, meaning “not at the limit”. Now a flag entering the slot releases the input and it floats high, which the drive reads as the limit being hit — and so does a broken wire, a pulled connector or a dead sensor. The lazy wiring (Dark-ON, S1=2,0,0) works exactly as well until something comes loose, at which point the machine cheerfully drives into the end of the rail.

LM picks what happens next: 1 stops only travel in the offending direction, 2 stops all motion including homing, 3 also halts the running program. Modes 4 to 6 are the same three without a deceleration ramp. Note that with a ramp the axis keeps moving past the trip point for the length of the decel, so the flags want to be far enough in from the hard stops to absorb that.

Two things that will catch you

Limits do not exist in clock mode. Setting CM=1 to accept step/direction on P1 pins 13 and 14 disables the limit functions outright. If you go that route the end stops become the ESP32's problem, which is a solid argument for staying on the serial interface.

You now have two ground paths to the drive. I/O ground is non-isolated and common with power ground, so tying your 5 V supply's return to P1 pin 2 bonds the ESP32's ground to the motor supply ground. Comm ground on P2 pin 10 reaches the same place through that internal 100 Ω resistor whose whole job is to stop the loop. Wire both and you short it out. Pick one: with the end stops sharing I/O ground, leave P2 pin 10 unconnected — the grounds are already common, so the RS-422 receiver has its reference. The cleaner alternative is an isolated link (which is what the MD-CC400-001 buys you) and then Comm ground is the only tie.

If you also want the ESP32 to see the end stops, the open-collector output will happily drive a second load: run it to a GPIO with a pull-up to 3.3 V. Pull up to 3.3 V and nothing higher — the sensor can switch 24 V, and the ESP32 cannot survive it.

Before you plug anything in

Documentation

Page numbers are absolute PDF pages in the combined manual, which covers the MDrive 14, 17, 23 and 34 in one file — the printed folios restart per chapter, so the links below are what actually lands you on the right table.

Local copies in Zotero

  • Manual — ~/Zotero/storage/XE4832JK/MDI.pdf
  • Datasheet — ~/Zotero/storage/RMT2NLKS/MDI23Plus.pdf
  • MCode guide — ~/Zotero/storage/56DQMLKB/MCode.pdf