Massoth eMotion XLS and Loksound ESU miniature relays
Question
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!
File:991016-BDA-eMOTION-XL-1810.pdf
The answer to the question is to attache one side of the relay coil to the +24v contact.. Connect the other side of the coil to one of the four "user choice" programable outputs, A2 through A6. Connect the NO or Normally Open" contacts to the reed switch input on the OEM LGB sound card input.. Looking at a couple of web resources, it appears the pint out is ass follows.
identify the relay pins
-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.
attache coil pins
- attache EITHER of the two "coil" pins to the +24V connection on the Massoth Decoder. - 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 fly back 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 like the 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 physical 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 colapse - this counts a "movement" as the field shrinks in size.. For various reasons this colapse happens MUCH faster than the initial build up of the field. This is the equivalent to an INCREDIPBLY HIGH SPEED moving magnetic field. This causes a very high voltage to appear for the very brief period of the colapse. 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 conduction.
Attach BackEMF diode
As close to the relay (ideally right ON the relay pins themseles), 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 volage 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 liek 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 VOLATAGE built up across the diode will be very low - so low that there is no risk of damage to your decoder.
https://progeny.co.uk/back-emf-suppression/
back emf suppression using Fly wheel diode circuit diagram
Screen Shot 2023-04-19 at 11.38.12 AM.png