bogobit Logo

The 29855 E40 sound module

Table of Contents

Preface

End of 2001 märklin offered their second Premium Digital Starter Set, number 29855, that contains a class 18.4 steam loco, and a class E 40 electric loco. Both locos have sound modules built in.

On this page, the sound module of the E 40 is analysed in detail. In its original form this sound module produces two different horn sounds. They are triggered in an unusual way: The digital function f2 acts like a selector, and f3 starts the selected sound. Below you will find a schematics plan, audio samples to listen to, and ideas on how to modify the module to make use of other sounds available.

Technical Details

The sound board is separate from the decoder. It is made using modern advanced production technology. The printed circuit board is a 4-layer board, the outer layers are used for signal routing, the inner two layers are a ground layer and a positive voltage (that of the sound IC) layer. This allows for good shielding and high component density. SMD components are used throughout, with resistor and capacitor sizes down to 0603. That is very tiny. The board is populated on both sides, but the SMD components are not glued to the board. Three components have an unusual marking: R10, R14, and R24 are marked "310" or "OIC", but they are very likely 10k resistors.

The size of the sound board is: 58 mm × 22 mm × 4 mm.

The decoder is clipped on the back of the sound board into a plastic holder. It is identical to the 60902, but apart from f1 and f2 it has an additional third function output f3. Function f1 is unused and available. Functions f2 and f3 are connected to the sound board.

Here is a photo of the sound board's "component side":
photo of sound pcb side 1,
32kB

And a photo of the "solder side":
photo of sound pcb side 2, 29kB

The Schematic

Here is a schematic of the 29855 E40 sound module:
schematic of 
29855 E40, 36kB
The schematic is also available as PDF-File.

The component side placeplan
placeplan side 1, 44kB

The solder side placeplan
placeplan side 2, 37kB

The circuit is principally identical to the sound module of the V160, 602749. I repeat it here, with amendments to pin numbers and component values:

Supply comes from J1(Vcc) via diode D1 into buffer capacitor C5. The components T1, R15, IC4, R20, R16 build a voltage regulator. IC4 is a "configurable zener diode". It adapts its cathode voltage such that the control pin (to the right) has 2.5 Volt, i.e. the voltage divider R20, R16 provides 2.5 Volt, which is the case if T1's emitter output is 3.9 Volt. IC1 is a threshold switch. If voltage divider R8, R9 delivers a voltage below 1.3 V to pin 6, the output pin 7 goes low, which activates the audio amplifier via the shutdown pin 1 of IC3. So, if the supply voltage rises too high, the audio output is shut off (probably to avoid thermal damage of T1). Similarly, if voltage divider R11, R12 delivers a voltage above 1.3 V to pin 3, the output pin 1 goes low, which lets T2 close the path from emitter to collector to deliver supply to the soundchip, IC2. The feedback via R13 introduces some hysteresis to make it a schmitt trigger.

IC2 is märklin's sound IC. Pin 7 is the audio output which is not lowpass filtered but outputs a "staircase" signal. The sound goes through the potentiometer P1, decoupling cap C7, through a lowpass R17, C11, to the amplifier IC3 which provides bridge outputs to the speaker. Compared to single-ended amplifiers this increases the power by a factor of 4 (that is 6 dB), and eliminates any caps at the output. The components R18, R19, C8 form another lowpass filter. This becomes clear by considering that IC3 is an inverting op-amp from input pin 4 to output pin 5.

The soundchip, IC2, produces audio output at pin 7 after it has been triggered by an appropriate trigger input, t1 to t8, pins 13-20. Some of these pins act not as trigger, but as configuration input. Details follow below. These pins are pulled high, and activated by driving them low, i.e. applying zero (ground) voltage. As you see, not all of the inputs are used here, they are externally pulled high via 47k resistors.

Pin 12 of IC2 seems to be an output indicating a "power good" condition. After power on, this pin briefly goes high but then switches low within a fraction of a second. After playing an effect sound (horn or door-closing) this output may be either high or low. The PCB suggests its use: if the component X2 would be used as a zero ohm resistor, the low output of PG would trigger t5, pin 17, thus starting a diesel motor sound.

All sounds, including those not used in this loco, are listed in a table below with listening examples. If you want to quickly check the possible sounds on your own module, simply take an ordinary resistor, value in the range 3k - 22k, hold one end with your finger (or better connect it to ground J2), and with the other end touch the appropriate pin of IC2 or equivalently the solder pad of the appropriate pull-up resistor. Your body capacity will pull the pin to low voltage. Of course, the loco must be on powered track.

Some of the trigger input pins, t4, t6, t7, and t8, are routed through a zero ohm resistor, marked in the schematic with a thicker connection and labeled "0". Their purpose is unclear to me. The input t7, pin 19, is routed via R2 to the decoder's function output F3. A cap to Vcc, C2, filters the trigger voltage to prevent false triggering from spurious voltage spikes potentially occurring on the line. The input t1, pin 13, is pulled high via R26, and switched low by T3, whose base is connected to the decoder's function output F2. Hence, the decoder function output can toggle the state of t1.

Resistor R21 sets the sampling rate (i.e. playback rate). Lowering the value increases the sampling rate and all sounds will come in a higher tone, higher pitch, and vice versa. It is as if you were accelerating a vinyl record on the turntable. Audio examples indicate that märklin also uses the trick of playing sounds at slightly different rates to offer basically identical sounds in different models.

X1 is a not connected component. It offers a circuit variant: Populating X1 with 3.3k, omitting R2, putting a capacitor on R3's place, and 47k on C2's place. This allows to route the input pad J4 to input t8 instead of input t7. X3 is a not connected component. It allows to tie t1 low, if the input pad J3 is not used.

Audio Bits

The following table lists all sounds stored in this particular IC, i.e. the sound IC labeled MKL 502 602 V1.0. Sound examples are available as WAV- or MP3-files from my own recordings, and from märklin's German website. The available sounds can be grouped into two categories: effect sounds, and the diesel sound.

This first table lists the effect sounds:

trigger
input
config
input
sound sampling
rate
märklin WAV my
recording
mode märklin model märklin number
t7   two-tone horn 8.0 kHz E-HO_01.WAV
E-HO_02.WAV
t7.wav one-shot E40, many other el. locos 29855, many others
t7 t1 single-tone horn 8.0 kHz - t7t1.wav one-shot E40 29855
t8   door closing (noisy) 8.0 kHz E-HO_03.WAV t8.mp3 one-shot ICE 43747
t8 t1 door closing (faster) 8.0 kHz - t8t1.mp3 one-shot - -

This second table lists the diesel sound with all its options and variants.

trigger
input
config
input
diesel variant sampling
rate
märklin WAV my
recording
mode märklin model märklin number
t5   long start, 2 motors 10.0 kHz V-MO_06.WAV 2dieselstd.mp3 continuous V188, V200 37284, 37803, 39821
t5 t6, t3 short start, 1 motor 10.0 kHz - 1dieselkurz.mp3 state
t5 t6, t3, t2 under load;
accelerated
10.0 kHz - 1diesellast.mp3
dieselspeed.mp3
continuous

Meaning of the table entries:

The trigger input specifies which input has to be lowered to trigger the sound. All other inputs are assumed to be high.

The config input specifies which input has to be at low level when the trigger input is activated. The not listed inputs are assumed to be high.

The mode says how the function is activated. Generally, when you press a function button on your control unit, you activate the function output of the decoder; pressing again, you deactivate the function output. Those sounds with the one-shot mode only play once and in full length when the function is activated. Deactivating the function does not play anything. Sounds with continuous mode play as long as the function is kept activated. Deactivating the function lets the sound come to an end.

Comments on the trigger inputs:

t7 is a trigger input and t1 is a corresponding configuration input. t7 does not work, if a diesel (t5) has been played before. It plays a horn.

t8 is a trigger input and t1 is a corresponding configuration input. t8 does not work, if a diesel (t5) has been played before. It plays a door-closing siren.

t5 is a trigger input and t2, t3, t4, t6 are corresponding configuration inputs. It plays a diesel-motor sound as known from the V200. The meaning of all inputs is illustrated in a table:

input level effect
t5 low turn on the diesel after initial lubrication
high turn off the diesel
t2 low motor under load. If motor is off, immediate start with one motor (t6, t3 ignored)
high motor idle. see also t4
t3 low start with 1 motor
high start with 2 motors
t4 low if diesel is idle (t2 = high), turn off diesel automatically after about 10 seconds.
high no automatic turn off of diesel
t6 low initial lubrication for 1 second
high initial lubrication for 3 seconds

The option to have a 1-motor or 2-motor diesel is offered by t3. The difference, however, lies only in the motor start-up, there is no difference in the idle or running diesel, or turn-off!

t4 allows to automatically turn off the motor if the loco is standing for more than 10 seconds. t2 specifies whether the loco is standing (t2 = high) or running (t2 = low). If the loco changes from standing to running, after the diesel has turned off automatically, the diesel is immediately started, without any pre-lubrication, and only 1-motor start-up.

The running diesel sound is made from the idle sound. The pitch is gradually lowered (to about 91 % of idle pitch) and the volume is raised by 6 dB. To avoid a too regular motor sound, there are several sound sections recorded on the chip which are played in a random order.

The diesel sound on the MKL 502 601 sound chip, which can be found, for example, on the V160 sound module, or the class 18.4 sound module, is basically identical to this diesel sound, but without any initial lubrication sound , 1-motor startup, no transition from idle to running state, and without motor turn-off.

Modification to Door Closing Sound

The sound module can simply be modified / extended to produce the sound of a door closing siren, as it can be found in all modern (German) passenger cars and ICEs. This is done by connecting the trigger input t8, pin 20, to a decoder function output, like it is done with t7, pin 19. Connect the decoder function output via a 3.3k resistor to the soundchip trigger pin 20, or equivalently to the solder pad of the pull-up resistor R3. If you want to be really perfect you can insert a 10 - 100 nF smoothing capacitor which replaces the pull-up resistor, or leave the resistor and solder the cap in parallel, i.e. on top of the resistor. Usually it also works without the cap, as it does in my case. The input pad J3 allows to select one of the two door sirens.

The door closing sound can co-exist with the horns. It does not work together with the diesel. Once the diesel has been played, triggering any effect sound is ignored, until power supply is shut off.

It is also possible to modify the sound module "on-board" from horn to door sound, but you will need one (or two for desoldering) very fine tip soldering iron(s)! Desolder R2 and solder it in at position X1. Exchange R3 with C2 (i.e. remove R3, remove C2 and solder it where R3 was, solder R3 where C2 was). By these means you have routed the input pad J4 to input t8 instead of input t7.

If the configuration pin t1 (input pad J3) is not required, either leave J3 unconnected, or connect it permanently to ground (J2, violet cable).

You can experiment with the tone of any effect sound by (slightly!) changing the value of oscillator resistor R21.

You can also build the sound module in a passenger car or railcar. A 60960 function decoder offers remote control of the closing door signal and makes you independent from the loco.

Modification to Turn on the Diesel Motor

To activate the diesel motor sound, the steps listed below must be considered. Keep in mind that the horn will not work any more (until power supply is turned off) if the diesel sound has been played in the meantime. Here is a schematic illustrating the modification: schematic of 
E40 modification, 21kB
The schematic is also available as PDF-File.

power supply

The diesel is a permanently running sound. This will significantly heat up transistor T1, which has no reasonable heatsink. I therefore recommend to put a 47 Ohm (or less), 1 Watt, resistor in the orange supply cable to J1, see R91 in the schematic. Heat dissipation is then transferred from T1 to R91, it will not change the total heat dissipation.

activating the diesel motor sound

The diesel motor is controlled by the input t5, pin 17. This pin can be connected to a function output, which allows to remotely turn on and off the diesel. Take a look at how t7, pin 19 is wired. This has to be done with t5 now. Connect the decoder function output via a 3.3k resistor either to the soundchip trigger pin 17, or equivalently to the solder pad of the pull-up resistor R5. If you want to be really perfect you can insert a 10 - 100 nF smoothing capacitor which replaces the pull-up resistor R5, or leave the resistor and solder the cap in parallel, i.e. on top of the resistor. Normally it works without the cap. See R92 in the schematic.

Alternatively you may run the diesel as soon as the sound module is powered. This is achieved by directly connecting the PG output, pin 12, to the input t7, pin 17. To do this, put a low-ohm (less than, say, 50 Ohm) or zero ohm resistor on the X2 position, or bridge the two X2 pads with a piece of wire. Compare with the top schematic.

configuring the sound

With the configuration inputs t3, t4, and t6 the behaviour can be customized. By default each of these inputs is at high level due to their 47k pull-up resistors. t3 offers the 1- or 2-motor variant. If you want the 1-motor type you need to tie t3 to ground, i.e. connect pin 15 to ground. Ground voltage can be taken from pad J2 of the violet cable. t4 offers the automatic turn-off variant. If you want to have that, you need to tie t4 to ground, i.e. either connect pin 16 to ground, or instead of soldering to pin 16, use pad J8 and connect it to ground. t6 offers different lubrication times. If you want the short variant, you need to tie t6 to ground, i.e. either connect pin 18 to ground, or instead of soldering to pin 18, use pad J9 and connect it to ground. This is illustrated by the three switches in the schematic.

setting the motor revolutions

now comes the most difficult step, which can be divided into two parts. First, we need to tell the sound module, whether the loco is standing or driving, and control input t2, pin 14, appropriately. This information must be derived from the motor outputs of the decoder. A possible solution suitable for märklin 60901, 60902, 60904, and equivalent decoders is illustrated in the schematic, components D91-92, R96-98, C91, and T91. The positive pulses from the motor output charge C91 and thus close T91, pulling t2 low.

Secondly, the pitch of the diesel sound must be raised in relation to the speed. For this, resistor R21 determining the sampling (playback) rate needs to be varied. By connecting a light dependent resistor (LDR) in parallel to it, the total resistance decreases with increasing amount of light on the LDR. The light comes from a märklin 610080 light bulb (a 610040 should do as well), L91, connected to the decoder's motor outputs via resistors R95 and P91. P91 allows adjustment of the "sensitivity". The right side comprises a LDR, R94, in series with R93. This resistor network is parallel to R21. Faster speed will make L91 brighter, which lowers the resistance of R94 from near infinite resistance to very small resistance, which lowers the overall resistance to IC2's Rosc, pin 23. R93 allows adjustment of the "maximum speed". If R93 is too low, IC2 can be "confused" and stop working - in this case interrupt the power to the sound module for a moment to reset, and replace R93 by some higher value, e.g. 91k - 100k. For testing purpose, I recommend to short the LDR R94, so that the sound runs a maximum speed. The wiring between sound module and R93, R94 should be kept as short and compact as possible, because the sound IC is very sensitive to induced interference (e.g. from motor wiring)!

To build the optocoupler, you may take a rubber shrink hose, put LDR and lamp inside so that the lamp shines on the LDR surface, shrink the hose with heat, and close the open ends light-tight, e. g. with coloured rubber silicone, plasticine, or putty. Make sure that your optocoupler construction is light-tight. The LDR is very sensitive even to a very small amount of light!

Hint: Before you adapt the sound to the loco speed with P91, I recommend to reduce the model's maximum speed to a realistic level by appropriately setting the poti on the decoder (nearly minimal position).

Picture (Scan) of conversion

photo diesel conversion, 33kB

Here I have converted a Märklin BR 216 (precisely speaking a 218). R95 is omitted, P91 is a precision poti at the rear side of the experiment board. The poti's brass screw can just be seen. The optocoupler is not visible, it is placed on the other side of the loco. The components are placed on the solder side of the experiment board.