Locomotive Interface Pinout

NEM651 (6 pins)

    Signal Color Pin
    motor right orange 1
    motor left grey 2
    track right red 3
    track left black 4
    light front white 5
    light rear yellow 6
    Note: The light can either be connected against the right track or common (+). Common is unfortunately not on the interface, you can either use the rectifier on the decoder (with an extra cable) or create it externally with two diodes from the track signals.

    Plug: round or rectangular pins, 1.27 mm grid

NEM652 (8 pins)

    Signal Color Pin Color Signal
    motor right (+) orange 1 8 red track right (+)
    light rear (-) yellow 2 7 blue Common, (+)
    F1 (may be open) green 3 6 white light front (-)
    track left (-) black 4 5 grey motor left
Plug: round pins, 2.54 mm grid

21 pin interface (not normed, referred as MTX)

    In 2005 a 21-pin interface was introduced by Märklin / ESU. The extensions were made mainly to interface brushless motors (in term of Märklin called: 'super soft drive sinus'). Unfortunately, a number of manufacturers of DC locomotives implemented this interface as well - even if no brushless motor is used, but a smooth running motor with 5 poles.
    Signal Color Pin Color Signal
    hall sensor 1 - 1 22 red track right (+)
    hall sensor 2 - 2 21 black track left (-)
    AUX6 (or sense 3) - 3 20 black-white Decoder GND
    F4 (Aux) - 4 19 orange motor left (+) (or phase 1)
    TB Clock - 5 18 grey motor right (+) (or phase 2)
    TB Data - 6 17 - AUX5 (or phase 3)
    light rear (-) yellow 7 16 blue common, (+)
    light front (-) white 8 15 green F1
    speaker 1 brown 9 14 violet F2
    speaker 2 brown 10 13 - F3
    connector coding 11 12 - Decoder VCC (1V8, 3V3 or 5V)
    ...decoder PCB...

    F4 (Auxiliary) comes directly from the controller, normally a MOSFET stage is required.
    The plugs on the pcb inside the locomotive, jack on the decoder.

PluX22 / PluX16 / PluX12 / PluX8

    A new standardized interface (09-2007), which is scalable for differently sized decoders and features of these decoders.
    Signal Color Pin Color Signal
    GPIO C - 1 2 - F3 (Aux3)
    GPIO B, TB Clock, SUSI - 3 4 - GPIO A, TB Data, SUSI
    Decoder GND black-white 5 6 blue CAP (+)
    light front (-) white 7 8 orange motor right (+)
    common, (+) blau 9 10 grau motor left (-)
    connector coding <none> 11 12 red track right (+)
    light rear (-) gelb 13 14 black track left (-)
    speaker 1 brown 15 16 green F1 (or light front)
    speaker 2 brown 17 18 violet F2 (or light rear)
    F4 - 19 20 - F5
    F6 (other) - 21 22 - F7 (other)
    ...decoder PCB...
    Legend: dark grey: Plux8, dotted border: Plux12, middle grey: Plux16, all pins: Plux22
    The pin on the right side are so arranged that a NEM651 decoder can be fitted.
    Pitch: 1.27 mm, Inside the locomotive is the jack, on the decoder are the pins.

Links: