Skip to content

How to control turnouts with bi-directional solenoids (Kato, Tomix and other turnouts/switches with 2 wires)

What you need

  • Loco.Engineering accessory decoder (a train decoder can be used as well if you want to install a decoder inside a turnout) or custom made SimpleDCC/WCC decoder
  • A DC motor driver
  • A turnout
  • Track with DCC/AC/DC or power source

Schematic

Here is a schematic example demonstrating how to connect a decoder, motor driver, and turnout (Right-click on an image and select "Open image in new tab" to view it full-size). The wires from the track are optional if you prefer to control the turnout using WCC or directly through the web browser.

Schematic - Wireless DCC decoder - Web App Screenshot

Connections:

  • "+" (accessory decoder) -> VM (motor driver)
  • GND (accessory decoder) -> GND (motor driver)
  • +5V (accessory decoder) -> +5V (motor driver)
  • IO7 (accessory decoder) -> ENA (motor driver)
  • IO6 (accessory decoder) -> IN1 (motor driver)
  • IO5 (accessory decoder) -> IN2 (motor driver)
  • OUT1 (motor driver) -> Wire 1 (turnout)
  • OUT2 (motor driver) -> Wire 2 (turnout)

Once everything is connected:

  1. Power the decoder using a USB Type-C cable or from the track. A red light should illuminate on the decoder.
  2. On your mobile device, tablet, or computer, open the list of Wi-Fi networks and connect to the network named loco-xxxxxx, where xxxxxx is the serial number of the decoder. If only one powered decoder is nearby, this should be the only network with the loco-xxxxxx name, so you won’t need to verify the serial number.
  3. Open a browser and navigate to http://loco.local or http://192.168.4.1.
  4. Scroll to the "States" section and click "Add state." A "State" defines the actions the decoder should perform when it receives a DCC packet, a WCC message, or when a button in the web app is pressed.
  5. In the popup, you’ll find various settings for the new state. To change the turnout direction, current must flow through the turnout’s wires in two different directions, similar to reversing a brushed DC motor with two wires. This is why two states are needed—one to send current from wire A to B and the other from wire B to A. Configure both states as shown in the screenshots below and save them. In the DCC Packet settings, use the DCC address you intend to use with your command station. The decoder can utilize any DCC address.

Schematic 1 - Control a model railway turnout with DCC/WCC

Schematic 2 - Control a model railway turnout with DCC/WCC
That's it—now it's time to test if it works!

How to Control

Using DCC: If you're utilizing DCC, simply send a turnout DCC packet from your command station to the address you specified in the State settings.

Without DCC: If you're not using DCC, scroll to the WCC Events section, click on "Send Event," enter the WCC Event ID from the State configuration screen, or select it from the dropdown, and click "Send."

Your turnout should switch directions. Depending on the initial position, you may need to send both DCC packets or WCC events to observe the change.

Possible Issues

Turnout doesn’t fully switch: If the turnout isn't switching completely, try increasing the duration in the State configuration screen. Avoid setting it too high, as this could damage the turnout. Start by adding 20 to the duration, then test again. If it still doesn't work, increase the duration by another 20, and repeat as needed.

Voltage too high: The voltage supplied to the track or power source might be too high for the DC motor driver you're using.

Turnout doesn’t respond to DCC packets or WCC events: - Double-check all connections to ensure they are secure and correctly aligned according to the schematic. - Ensure the decoder is powered and the voltage is sufficient to switch the turnout. For example, if you're powering the decoder with USB-C, some turnouts may not operate if they require more than 5V. - Confirm that you're using the correct DCC address in both your command station and the State configuration screen when sending a DCC turnout packet. The same applies to WCC Event IDs.

If problems persist, contact us at hey@loco.engineering. Please include screenshots of your state configurations and a description of your testing process.

Can I Install a Decoder Inside a Turnout?

Yes, you can install the tiny Loco.Engineering train decoder with a built-in DC motor driver as an internal accessory decoder. This guide applies to the train decoder as well, with the only difference being that you should solder the turnout wires to the M1 and M2 outputs and connect the power wires to the track. Additionally, in the State configurations, select "DC Motor" instead of IO outputs. All other steps remain the same.

Questions?

Contact us at hey@loco.engineering