Massoth eMotion XLS and Loksound ESU miniature relays
New or modified article by Eric Timberlake (talk) undergoing review
This article is a response to an issue regarding converting a locomotive from track to battery while retaining the original sound board, but activating it through the decode rather than straight from track reed switches. The actual request is paraphrased here.
The locomotive is an LGB 20892 with on-board sound and 6-conductor plug for connecting to a Massoth Decoder. The decoder is a Massoth eMOTION XL. The receiver is an AirWire900 CONVRTR-60 and I'm using an AirWire T5000 wireless throttle. The object is to convert the locomotive from track power to battery and wireless operation, while retaining the original LGB sound board. The locomotive motion (motor) currently operates correctly using the battery and wireless throttle but I want to implement reed switch operation for the bell and whistle by using two Loksound ESU miniature relays to connect the decoder to the sound board inputs that normally come from track (magnet) activated reed switches, but I'm not actually sure of the connection of #3 and #4 on the relays (include the three files that I attached to the previous email for clarification). Any and all suggestions will be greatly appreciated.
Response
This should be pretty easy to figure out. First thing to do? Consult the manual!
- Massoth eMOTION Xl Manual in PDF format
- Page 9, Section 3.2 is what we are interested in...
- LGB 20892 Sumpter Valley Mallet Manual in PDF format
- Unfortunately, there's not much here in the way of how to hack the sound system?
- Using This Wiring for DCC reference, you should be able to connect the NO outputs of the relays directly to the wires coming from the reed switches that trigger the bell and whistle. I couldn't find anything specific to the Mallet, but this mogul schematic should be very SIMILAR to the Mallet.. Pin order doesn't matter - these are isolated contacts with no polarity requirements.
The answer to the question is basically to attach one side of the relay coil to the +24v contact.. Connect the other side of the coil to one of the four "user choice" programmable outputs, A2 through A6. Connect the NO or Normally Open" contacts to the reed switch input on the OEM LGB sound card input..
Identify the Relay Pins

Looking at a couple of web resources, it appears the pin out is as follows.
- Hold the relay in your hand with the pins facing up.
- Turn it so the center pins are biased to the left.
- The two center pins are the coil.
- The two left hand pins are the common switched connection.
- The bottom right pin is NO or normally open,
- "Normally" refers to the non-energized state of the relay. So the connection between the bottom right pin and either of the two left most pins is NOT CONNECTED with the relay de-energized.
- The top right pin is NC or Normally closed.
Attach Coil Pins
- Attach EITHER of the two "coil" pins to the +24V connection on the Massoth Decoder. This is a good time to read about EMF suppression detailed below!!
- Attach the OTHER pin to the A"x" output you want to control the relay. The illustration is for A2. Any of the A2 through A4 outputs will work.
Beware of Flyback Effect!
You should ALSO install a “back emf suppression diode” on or very near the relay.. When an energized coil (relay!) is DE-ENERGIZED, it’s not unlike the ignition coil in your car motor, it will flash back a very high voltage that is likely destructive to your decoder.. The mechanism follows two basic laws of electricity which can be summed up thus:
- ONE: A moving current in a wire will generate a magnetic field.
- TWO: The REVERSE is also true, a moving magnetic field will cause an electric current in a wire.
Consider: you energize the relay, this causes a magnetic field to build up, attracting a ferrous lever in the relay which activates a switch. This switch opens the NC connection and closes the NO connection. When you release the relay, you remove the current from the wire, which causes the magnetic field to collapse - this counts a "movement" as the field shrinks in size.. For various reasons this collapse happens MUCH faster than the initial build up of the field. This is the equivalent to an INCREDIBLY HIGH SPEED moving magnetic field. This causes a very high voltage to appear for the very brief period of the collapse. Because the field is collapsing, it is in effect moving backwards, so the "reverse" EMF, the voltage that is generated is not only very high, it is in REVERSE POLARITY relative to the voltage that initially energized the relay.
This actually allows for a simple solution to protect that very expensive decoder - attaching a diode to the coil pins such that it is "reverse biased" when the relay is energized, but forward biased during the back EMF event.
- Reverse Bias means the diode is NOT conducting electricity.
- Forward Bias means the diode is "ON" and conducting.
Attach Back EMF Diode

As close to the relay (ideally right ON the relay pins themselves), solder a 1N4007 diode.
- The striped, or "cathode" end should be attached to the +24V terminal..
That's all there is to it.. When you apply voltage to the relay, a positive voltage on the cathode (striped end) causes the diode to "reverse" bias, or turn off, allowing all the current to activate the relay. When voltage is removed, the magnetic field collapses generating a positive voltage on the anode which causes the diode to "forward bias", or turn ON, acting like a wire and shorting all that back EMF through itself.. Because it appears as a short when forward biased, another rule of electricity, Ohm's Law, says the VOLTAGE built up across the diode will be very low - so low that there is no risk of damage to your decoder.
In the image, the bottom left schematic is how your decoder works. The schematic shows a regular BJT transistor, your decoder has a MOSFET, which could easily be damaged (aka DESTROYED!) by the back EMF we've been discussing..
A Simple Diagram
Here's a very simple diagram of how this would look - it DOES NOT include the reverse EMF diode, but again, Striped end to +24V and all is good.
