Magnetic Sound Control.

 

Introduction:

Zimo decoders include a feature that enables a sound sequence to be initiated by connecting a decoder pin to ground.  This feature can be used in conjunction with a miniature Hall-Effect device and strategically positioned track magnets, to automatically initiate locomotive sounds.  Even in a computer controlled environment, this can be useful, particularly if the scheduling enables the trains to take alternative routes. An obvious application would be to trigger the horn at appropriate locations on the layout, but my objective is to initiate wheel flanges scraping noises on the layout's tighter curves.

 

Suitable Components:

My first searches for Hall Effect devices at Maplins, Digitrains and DCC Supplies drew a blank. So more out of curiosity than expectation, I tried Amazon. Surprisingly, they had several types available. After checking the data sheets on the web, I settled on a pack of five OH44E, a 3 lead device that operates happily from typical DCC supply voltages & acts purely as a switch (latch types were also available). The only down-side was a long delivery time of several weeks as the parts came from Hong Kong. Also on Amazon was a UK source for small very powerful pill shaped magnets. I selected a 6mm diam, 1mm thick N42 Neodymium type from Magnet Expert. These are small enough to fit between the rails with plenty of clearance.

 

 

The Circuit:

The Hall Effect device is in fact a small integrated circuit. It includes a Hall sensor that detects the magnetic field, a high gain amplifier and a Schmidt trigger to provide hysteresis. (This prevents the output "flickering" between on and off when the magnetic field is only just strong enough to trigger the device.)  Despite the internal complexity, only 3 leads interface with the outside world. The output is an open collector transistor, so a load resistor is required between the output and the positive supply. When the device detects a magnetic field, the output voltage switches from supply voltage potential to ground potential, providing the correct input for the Zimo switched input pin. So the circuit simply consists of the Hall device and its load resistor. Indeed, the input circuit of the Zimo decoder may well provide the necessary pull up resistor, in which case, the load resistor may well be redundant......but I'll leave it in place to be safe!

 

 

Compatibility between the Hall Effect Device and the Magnet...... a simple experiment:

The Hall Effect device and load resistor were connected to a bench power supply at 14 Volts. An LED (and series resistor) were connected across the load, to provide a visual indication that the device output had switched on. The magnet was then brought across the device at varying distances to see if the magnetic field was detected at useable distances.

The first findings revealed that the polarity of the magnet has to be correct for this device to work. The Hall Effect switch detects one magnetic pole on its curved side and the opposite pole on its flat side. (So that's what a "Unipolar Device" means.....   :-)

The parts look good for model rail use: The magnet was detected reliably out to approximately 5mm from the device. Once the field was detected, the magnet could be withdrawn approximately 1mm further, before the device switched off. This illustrates the hysteresis in action.

 

7mm & closing (off)

 

5.5mm & closing (off)

 

5mm & closing (on)

 

3mm (on)

 

5mm & separating (on)

6mm & separating (still on, but went off a shade further away.)

 

With the Hall Effect device mounted on the underside of an OO scale Class 66 bogie, a distance of 2mm to 3mm between device and magnet should easily be achievable:

 

 

Relevant Zimo CVs:

To select the sound clip activated by the magnet transit:  Use Pseudo programming routine after setting CV300 to 111 then use the normal sound selection procedure to identify the clip required, followed by F8 to save the choice.

Then:

CV341      0-255     Time in seconds sound is played back;   except 0=play sample back once.

CV739      0-255     Volume of sound triggered by Switch input 1  0=255=max   1-254 proportional.

 

 

Fitting the sensor circuit to a Zimo equipped Class 66 Locomotive:

The Hall Effect device is glued to a plasticard pad fixed immediately behind the lead axle of the lead bogie. The three wires from the device are routed in parallel with the bogie wheel contact wires, up to the top of the chassis assembly. A plasticard insulating plate is fitted behind the leading cab and the 4k7 load resistor is glued to this. The new wires from the bogie are looped to provide free movement to the bogie, then glued to the insulating plasticard plate. Separate wires connect between the 21 pin connector plus a common positive supply pad on the main PCB, to the new plasticard plate.

Hall Effect device on the bogie underside.

 

Two new wires to the 21 Pin Decoder Connector

 

Showing the new anchor point plasticard plate behind the cab and the interconnect wiring.

 

 

Testing:

For test purposes, I selected a single horn toot via the CV300=111 pseudo-programming process.  I set 3 magnets on the test track.

With the magnet blu-tacked to the sleeper tops, the system works reliably.

With the magnets set so that the top surface is flush with the sleeper tops...... it works most of the time, but not always.....

I measured the actual sensor distance from the sleeper tops by squashing a piece of blu-tac under the loco and leaving an impression:  The distance is actually around 5mm.

From the earlier work, this explained the occasional failure to trigger the sound.

When I re-checked my original measurements it was apparent that the sensor is further above the railhead than I had expected. The mounting pad was around 0.5mm thick but needed to be about 1.4mm to give 1mm clearance above the rail tops,  and the height of the railhead above the central sleeper tops is about 2.4mm, not 2mm, due to the sleeper shape.

Correcting the diagram:

Improving Performance:

The original sensor device pad was carefully removed using the trusty Stanley knife and the device remounted on a thicker spacer, closer to the track. Its no surprise to find that triggering is now entirely reliable with the magnet's top surface flush with the sleeper tops!

Horn toot imminent!

Conclusions:

It all works fine as long as the distance between the magnet and the sensor is kept to a maximum of around 4mm and of course the sensor must always be above the rail head!

 

 

 

Click to move to Model Rail Index Page