How to make DS-main R4


DS main is an digital model train controller. This hardware includes the feature of DCC/MM2 shield and Arduino, S88 shield.

  • Support DCC and marklin digital motorola 2 format (MM2). Also DCC CV write is available.
  • Desktop Station software supports DSmain.
  • DSmain includes Arduino nano compatible board. You can customize DSmain.
  • Default output current is 1.5A. Maximum current is 3A if heatsink or cooling fan is setteled.
  • Support an external analog PWM controller. You can control DCC and MM2 locomotive via the external analog controller
  • Support S88 decoders which interfaces are S88-N and 6pin.
  • Controllable locomotives and turnouts without PC.
  • Support bluetooth module as microchip's RN42-I/RM.
  • How to connect PC

    Example of soldered PCB

    The followings are soldered photos. Please refer.

    Parts list

    Parts noParts nameNotes and specification
    R1resistor1kOhm, 3mA(typ),LED current limitation
    R2resistor1kOhm, 3mA(typ),LED current limitation
    R3resistor1kOhm, 3mA(typ),LED current limitation
    C1MLCC10V, 0.1uF
    C8MLCC10V, 1uF
    C9MLCC10v, 1uF
    C10MLCC10V 0.1uF
    SW3SwitchTackt switch
    SW4SwitchTackt switch
    SW5SwitchTackt switch
    SW6SwitchTackt switch
    SW7SwitchTackt switch
    SW8SwitchTackt switch
    SW9VRVariable resistor with switch
    CN1Pin header15pin Header
    CN2Pin header15pin Header
    CN4ncUser option for Bluetooth
    CN5Connector2x3pin Long socket header
    CN6Connector2pin terminal block
    CN7DC jackMJ-179P compatible
    CN8S88N RJ45 jackRJ45 jack
    CN9S88 header6pin L connector
    IC1'IC Socket28pin IC socket
    IC2TB6643KQMotor driver
    IC3L7805CVLDO 5V
    F1Resetable fusePoly Switch 2.5A or 3.0A
    X1Ceramic resonatornc

    nc means not connected(unused). Not needed to solder the parts.

    DS main specification

    Please attention the following specification.

  • Recommended voltage range: 10V or more, 19V or less
  • Recommended current range: 1.5A or less (if not cooling fan and heatsink) / 2.5A or less (with heatsink) / 3.0A or less (with cooling fan)
  • Indoor use only.
  • Required items

  • mini USB cable
  • feeder wire
  • DC power supply which is center plus and 2.1mm jack. Please check your model railway specs.

    (Marklin, DCC HO) 12V-16V 2A or more. Akizuki 45WSlim DC power supply15V3A LTE(GFP)451DA-1530.
    (DCC N, Japanese HO) 12V 1A or more. Akizuki DC power supply 12V2A STD-12020U.
  • Soldering procedure

    The kit requires the soldering experience. You need to understand PCB's displayments.

    1. Prepare solder, soldering iron, electric parts, PCB etc.
    2. Solder electric parts.
    3. After soldered, check the soldering result. Attention short pins.
    4. Insert ATMEGA to DIP Socket. Attention the direction and silk pattern.
    5. Insert attached Arduino nano(compatible) board and check.

    Capacitors and diodes and LED has a pole. Attention please.

    Instruction for DSmain's buttons

    Definition of buttons.

    START/STOP: Providing power supply to rail. If Run indicator turns off, power is not providing in rail.
    LOCO: Locomotive mode. You can use volume dial, F0, F1. If you want to change the address, Press SELECT and LOCO buttons. If you want to determine the edited address, Press LOCO button.
    TURNOUT: Accessory mode. F0,F1 buttons are assigned as Straight and Diverse. If you want to change the address, Press SELECT and TURNOUT buttons. If you want to determine the edited address, Press TURNOUT button.
    F0(Straight, +): In case of locotmoive mode, F0, F2 (When press SELECT button). In case of accessory mode, Straight. When address editing mode, Increment(+1).
    F1(Diverse, -): In case of locotmoive mode, F1, F3 (When press SELECT button). In case of accessory mode, Diverse. When address editing mode, Decrement(-1).
    DIR volume:Adjusting locomotive speed. Stuff left side, the direction will change.

    How to control lovomtoives

    You can control locomotives when LOCO button pressed.
    If you want to change the locomtoive address, Press SELECT and LOCO buttons. You can edit locomotive address.
    At locomotive address edit mode, you can adjust the address using +(F0) and -(F1) buttons. If press SELECT buttons 2 seconds or more, you can change the protocol which are DCC and Marklin digital (MM2).
    After edited the address, press LOCO button. You can determine the address. If press the other buttons as TURNOUT or START/STOP, the address will be canceled.
    Volume dial can adjust locomtoive speed.
    If volume dial stuffs left side, you can change the direction of locomtoive.
    F0 and F1 buttons are assinged locomotive's function. Press LOCO and F0 or F1 buttons, you can control F2 and F3.

    How to control turnouts

    アドレス変更画面では、+(F0)と-(F1)でアドレスを切り替えできます。SELECTを押しながら、+(F0)と-(F1)で変化量を調整できます。また、SELECTを長押しすると、DCCまたはMarklin digital(MM2)のいずれかのプロトコルを変更できます。



    Supporting Bluetooth module

    DSmainR4 supports Bluetooth module. CN4 header can connect Bluetooth option board. Bluetooth option board is included in DSmainR4 kit. You can solder microchip's RN42-I/RM to this option board. RN42-I/RM module is not included at DSmainR4 kit. Please order RN42-I/RM module at your country's electronics parts shop. We don't sell this board. In Japan, Akizuki sells RN-42 I/RM Bluetooth module.
    Bluetooth function is automatically worked at DSmainR4. You only need to configure PC's bluetooth connection and assignment of serial port.

    About cooling fan

    DSmain has a FAN connector nearby F1. This connector provide DC power supply to cooling FAN. If you want to supply 3A or more, you need to connect cooling fan.

    Assignment of buttons and connectors

    The following is assignment of buttons and connectors number.


    After soldered, assemble Arduino nano compatible board and acryl case. DC power supply connects to DC jack on the DSmain. The connection between PC and DSmain uses USB port of Arduino nano. Connect a USB cable.

    Wirign feeder cable

    For DCC/DC users:
    The poles doesn't care.
    For Marklin/AC users:

    Ctrack has the pole. The center rail beside is B (red color), the others rail beside is O (brown color).

    Marklin CTrack (H0 gauge) wiring example.

    Tomix Fine Track (N gauge) wiring example.



    Go to top.