Skip to main content

This is a post about ways to control smoke units, electrocouplers, and other high current loads with a DCC decoder. No decoder that I'm aware of does those things 'out of the box', at least with the typical O-scale locos, so a little creativity is required. This will be based on what has worked well for me with the hardware I use. I'll cover the electrical hardware and configuration first, then discuss ways to configure an ESU Loksound decoder to achieve various results. I'll also provide a few examples showing different implementations with specific hardware. I'll probably end up doing this in a few sections, as time permits...

(Sneak preview though... One of the examples will show how to achieve fully functional smoke unit and electrocoupler control, with synchronized chuffing, speed sensitive diesel smoke, etc. using about $10 in commercially available parts.)

Hardware Overview

Most DCC decoders are not designed to drive high current loads other than the motors. 'High current' in this context simply means anything greater than the rated capability of the decoder's function outputs. For a lot of smaller decoders, this is around 100mA. For the Loksound decoders I use, they are rated as follows:

  • Loksound V4 (HO): 250mA per output, 500mA total
  • Loksound L: 500mA per output
  • Loksound XL: 250mA per output

The typical loads in an O-scale locomotive are:

  • Smoke fan motor: roughly 30mA continuous, a few tenths of an amp peak
  • Smoke heater: 0.5A to 0.75A (around 2.5W to 3.5W output at 5V)
  • Electrocouplers: 1 to 2 amps while actuating

So apart from the smoke fan motor, some additional hardware is required to allow a decoder to drive the usual O-scale doodads. This hardware needs to provide three main functions - getting DC power from the track DCC signal, efficiently converting that to a usable voltage (typically 5V) for the loads, and controlling it in some way from the low level outputs on the decoder.

The diagram below shows a general approach for making this happen. The items in orange - the rectifier, regulator, and power switches, will be discussed in detail below. The motor, speaker, and lighting control are all pretty standard, so I won't get into those items.

block1

Decoder Function Outputs

DCC decoders for the most part use a 'low side switch' configuration for their function outputs, with the load connected to the supply voltage and the switch between it and ground. So when the function is 'on', the physical function output is grounded, or 'low'. When the function output is 'off', it is open, or floating. This has a couple of implications.

First, it influences the selection of the power switch. To keep things simple, it's useful if the logic of the power switch matches the logic of the decoder. That is, the power switch should be 'on' and providing power to the load when the function output is 'on'. There are a lot of devices that can be controlled by a microprocessor to switch larger loads, but many of them are configured such that they are 'off' when their control input goes low. However, it turns out that a p-channel MOSFET is well suited for this, as it is 'on' and conducting when it's input goes low. It's what I'll call 'logic compatible' with the decoder function outputs - 'on' at the decoder means 'on' at the power switch.

Another useful feature of the 'low side switch' configuration is that it is possible to combine multiple function outputs to control a single power switch. Because the function outputs simply provide a path to ground, they can effectively be superimposed to combine multiple effects. This allows for a lot of flexibility and some neat combinations of effects. I'll detail this approach in one of the examples.

DC Power

So, back to the diagram above, the first step is to get DC voltage from the track power. One of the really clever features of DCC is how easy it is to get DC output from it. A simple bridge rectifier gets you 95% of the way there. Ideally add a small cap (5uF to 10uF) and resistor and you have DC voltage more than smooth enough for model train purposes.

For a simple installation using cheap off the shelf parts, just about any bridge rectifier with a continuous current capacity over 1A will do the job. Wire the rectifier output to the regulator input and put a 10uF cap across it. The regulators below make it easy to do this. Then just wire the track input to the A/C inputs of the rectifier. The output voltage will be 1-2VDC below the DCC track voltage, depending on the rectifier.

For my installations, I designed a small PCB that I refer to as the power inlet board. It has a rectifier, cap and resistor circuit for providing DC output. It also has a TVS diode on it for a little extra protection for the decoder, as well as provisions for screw terminals in cases where they are handy for wiring up the track pickups. I can post details on this at some point, if anyone is interested.

Both of these approaches will feature in the examples.

Regulators

The rectified track voltage is going to be around 14-15VDC. In most cases, this will need to be reduced, typically to 5 or 6 volts. A linear regulator will generate a lot of heat with that kind of reduction, so I use a switching regulator. There are a ton of them available to choose from. Here are three that I've used.

  • eboot MP1584 converter: This is my go-to in most cases. It's adjustable, with an input voltage of 4.5V to 28V and an output voltage of 0.8V to 20V, and rated for 3A output current. The adjustability makes these usable for just about any brand or era of smoke/coupler/whatever. Components are mounted only on one side, so it's easy to stick just about anywhere with some kapton and double sided tape. It's not the smallest of the ones I've used (22x17 mm), but it fits anywhere I've needed it so far. Available in packs of six for less than $10. This one will be used in various ways in all the examples.
  • Murata 5V/1.5A converter: I used this one extensively in my arduino turnout project, and it's a good candidate for mobile installations as well. 5V and 1.5A output is more than adequate for most purposes. It is smaller than the eboot one, particularly if you remove the pin header. It has components on both sides of the board, however, so mounting it isn't quite as elegant.
  • Pololu regulators: Pololu makes a bunch of regulators in various voltages and current capacities. In most cases 5V is what is needed, so something like this 5V/1A unit is a good choice. They are compact and have the components on one side, so they are easy to mount. They are a bit more expensive, however.

 

Power Switching

Now, to enable the decoder to actually control the load, a switch of some sort is needed. It needs a high output current capacity, and low control current demands. Ideally, it should also have a switching time fast enough for use with a PWM input, and should be compatible with inductive loads, although these features are not required in all cases. There are a lot of ways to do this.

  • Mechanical relay: A mechanical relay could be used in the case where a simple on/off function is acceptable. I don't recommend this, however, as they are big, slow, and difficult to wire up nicely. There are many better options.
  • Commercial MOSFET boards: Pololu makes a nice line of MOSFET power switches. Here is one that I've used. It's small and cheap, has a 3A current capacity, and is easy to wire up.  It's a p-channel MOSFET, so it is 'logic compatible' with the decoder. It is not suitable for PWM use, as the on/off times are around 10-20ms. It does not have a freewheel diode for inductive loads, but it is easy to add one, as the board has two solder pads each for the output power and ground.
  • Custom MOSFET board: Since I anticipated doing a lot of this in various decoder installations, I designed a simple 2-channel MOSFET power switch board. It has two independent control channels, so it can be used for heater/fan control for a smoke unit, or for powering a pair of front/rear electrocouplers. It uses a p-channel MOSFET, so it is naturally 'logic compatible' with decoder outputs. It is very fast, so it's PWM compatible, and incorporates freewheel diodes for use with inductive loads. I'll post some details on this in a separate topic.
  • Regulator enable: Not strictly a switch, but there is an easy way to provide on/off functionality on the eboot regulator described above. The MP1584 chip has an enable pin. If it is left floating, the regulator output is enabled. This is the default configuration. But if it is grounded, the regulator output is disabled. To use the enable, I solder a small wire directly to the enable pin on the chip. The control logic will be reversed, unfortunately - the regulator will be on when the function output is 'off', and vice versa, but this can be accommodated to an extent with the Loksound configuration. This is a really cheap and easy way to provide a controllable, fixed-voltage output.

 

So that covers the general idea, as well as some specific hardware components, that can be used to drive larger O-scale loads. These can be configured in a lot of ways, of course, depending on the specific installation, so I'll go over a few examples in a later post.

Up next, decoder configuration...

Attachments

Images (1)
  • block1
Original Post

Replies sorted oldest to newest

Decoder Configuration

Getting all of the above hardware working nicely requires that the decoder be configured correctly to use it. The Loksound decoders are very configurable, so they work really well for an install with a bunch of extras like this. Getting them set up falls into two main areas:

  • Configuring the function outputs, that is, how the decoder interacts physically with the attached hardware.
  • Configuring the function mapping, or the logic of when and how the function outputs are controlled.

There are a few other items needed as well, in certain cases.

Configuring Function Outputs

Decoder function outputs have a lot of different effects available (dimmable headlight, ditch light, firebox, etc.), but for the most part, the actual output is simply a PWM signal. It's either on (100% duty cycle), off (0% duty cycle), or somewhere in between (dimmed, flashing, etc.). So a lot of getting the decoder set up right is just a matter of getting the PWM output needed to control a load in the desired manner.

1. Basic On/Off

This is the simplest function output configuration - simply 100% duty cycle, so that the output is fully on or off. This is the setup to use for controlling a smoke unit heater or some other load that you want to just turn on and off. Use the 'dimmable headlight' output mode, set it to full brightness (100% duty cycle), and disable all 'special functions' in the Lokprammer, like so:

output1

This will work to control any of the power switches described previously.

2. Electrocouplers

The setup for electrocouplers is basically just an on/off output, but with a timeout, so that the couplers are pulsed briefly when the output is turned on, rather than being powered continuously. Configure as in (1), and then enable the function timeout and set it to the minimum, as shown below:

output2

 3. Smoke heater

Now things get a little more interesting. A smoke heater can be controlled in an on/off manner, operating at a fixed voltage, or it can be controlled with a variable PWM duty cycle, so that the heating can be varied by the decoder during operation.

3.a. For on/off control, simply configure the output as described in (1) above. This is the approach to use with non-PWM compatible power switches. The voltage applied to the heater can be altered by adjusting the regulator output during installation. Electrocouplers will fire on anything from around 3V and up, so there is room to tweak the heater voltage if you are using a common regulator for both.

3.b. For variable control, a good option in the Lokprogrammer is the 'Seuthe smoke unit'. This provides three heat (PWM duty cycle) settings - an idle setting and min and max operational settings. You will want duty cycles around 60% and up for decent smoke output. Use this setup with a PWM compatible MOSFET switch. Here is an example from one of mine:

output3b

4. Smoke fan (diesel)

For the fan control for diesel smoke, the 'Seuth smoke unit' effect also works well, providing idle, min and max settings for driving the fan motor. This works well with either of the heater configurations described in (3). Since the decoder can drive the fan directly, there is no need for a power switch, and any PWM output can be used. As opposed to the heater, the duty cycles for the fan will likely be pretty small. See this pic for settings that work well for one of mine:

output4

Keep in mind that, although the settings all refer to 'heat', it's really just setting the duty cycle of the PWM output, and that it can be used to run a fan motor just as well as a heater.

5. Smoke fan (steam)

Now for the fun one! Steam engine smoke is the most involved to configure, but also the most fun, because the options available and the effects you can achieve are pretty amazing.

5.a. Configure the chuff output using the 'trigger smoke chuff' output mode in the Lokprogrammer. The only setting that I have observed making any difference is the 'chuff power', which sets the speed of the fan while chuffing (it would be nice if the 'fan power' setting set the fan speed in between chuffs, but it does not appear to do so).

output5a

But, this is not enough by itself! There is a 'Smoke Unit' tab in the decoder settings list. For the chuff to work, the settings for 'smoke chuffs' on this tab must be non-zero. The settings control how long the chuff lasts as a percentage of the time between chuffs, as well as min and max chuff durations for setting limits at low and high speeds. For example:

 smoke chuffs

If you don't set these, the chuff will not work regardless of the function output setting.

Note that the settings shown here do not have anything to do with syncing the sound (and hence chuffs) to the wheel rotation. That is set elsewhere in the Lokprogrammer, and is well documented in the manual, so I won't detail that here. Also note, the chuff signal for the deocder must be included in the sound file. Although I have not run into this, is it possible that older sound files may not have the correct flag in the sound file, in which case the chuff will not work.

5.b. To add some smoke while the loco is idle, or to add some smoke in between chuffs, configure another function output and wire it to the same physical output used for the chuff signal. As discussed previously, this will superimpose the effects of the two function outputs, which allows for some real flexibility. For example, to add in some smoke fan at idle, and just a little bit in between chuffs while running, configure this output as a 'Seuthe smoke unit' with settings like so:

output5b2

Alternatively, configure it as 'ventilator', with ramp up and ramp down times when it is turned on and off, or just configure it as 'dimmable headlight' for a fixed, low output. Lots of options here!

Configuring Function Mapping

Having configured the function outputs, the next step is to set up the decoder logic to control them. In most cases, this consists of simply mapping an F-key to one or more function outputs. The options for mapping in the Loksound offer a lot of flexibility, so I'll show a few cases here, using F5 for the mapping.

Uncoupler: Map the function output created in (2) above to the F5 key. One keypress will trigger the uncoupler, and the next will reset it, as with MTH PS3 decoders.

mapping1

Smoke, diesel: For diesel smoke with the fan and heater on simultaneously, map the heater and fan function outputs created in (3) and (4) above to the F5 key. Pressing the key once will turn them both on, pressing it again will turn them off. The fan (and heater, if using a PWM power switch) will both vary in conjunction with engine speed.

mapping2

Smoke, steam (option 1): For steam engine smoke with chuffs, map the heater output from (3) and the fan output from (5a) to the F5 key. Pressing the key once will turn on the chuffs, synchronized with the sound and wheel rotation. Pressing it again will turn it off.

mapping3

Smoke, steam (option 2): For chuffs with additional smoke, either at idle or in between chuffs, map the heater output (3), the fan output (5a), and the second fan output (5b) to the F5 key.

mapping4

Smoke, steam (option 3): As a final example, here is how to configure steam engine smoke for chuffs while running, with smoke while idle, but without any smoke in between chuffs. Note the use of the additional conditions 'Drive' and 'Stop', in conjunction with the 'F5' condition.

mapping5

As you can see, the combination of the effects available for the function outputs, the flexible logic of the function mapping, and the ability to superimpose the physical function outputs, gives you nearly limitless options for creating cool smoke effects.

In the next post, I'll show some specific examples of how this all comes together in the locomotive.

Attachments

Images (12)
  • output1
  • output2
  • output3b
  • output4
  • output5a
  • smoke chuffs
  • output5b2
  • mapping1
  • mapping2
  • mapping3
  • mapping4
  • mapping5
Last edited by thor73

Now for the actual installations! I'll start with a general purpose installation that should work to provide fully functional smoke and couplers for just about any locomotive. I'll eventually show a couple of my specific installations as well, to show various other ways to do things, but that may be later, as I have a vacation coming up...

Basic Installation for Smoke and Couplers

For this example, I'll assume a Loksound L decoder is already installed and operating in the locomotive. It's a good idea to get the basic motor, sound, and lighting set up before proceeding to the smoke and couplers. For the purposes of this example, I'll use decoder function outputs Aux3 through Aux7. Adjust accordingly for your specific installation, of course.

Parts List

Here is a suggested parts list for the installation. For the discrete components, any equivalent part will work fine, these are just suggestions.

 

Rectifier and Regulator

The regulator can be assembled with both the bridge rectifier and capacitor soldered to the inputs of the regulator. The + and - leads of the rectifier get soldered to the positive and negative regulator inputs, leaving the A/C inputs of the rectifier for the track pickups. The capacitor can also be soldered across the regulator inputs. Note the polarity of the capacitor as well. The inputs to the rectifier then just get wired to the track pickups, in parallel with the decoder.

install1

Here is a way to combine the rectifier, cap, and regulator into a pretty tidy assembly:

IMG_7397 [2)IMG_7398 [2)

Be sure shrink wrap or otherwise insulate the A/C leads of the rectifier after you wire them to the track pickups.

At this point, power up the engine on the dcc booster. Hook a voltmeter across the regulator outputs and adjust the potentiometer on the regulator until you get the desired voltage (5V, typically). Now you have a DC power source ready to drive heavy loads.

Smoke Unit

For the smoke unit heater, wire power and ground from the regulator output to the power and ground inputs of the power switch. Wire the outputs of the power switch to the heater element on the smoke unit. Polarity does not matter. Wire the heater control from Aux5 to the 'SW' pin on the power switch. Configure this decoder output as described in (3) in the previous post.

install2

The decoder can drive the smoke unit fan directly, but it still makes sense to power it from the regulator. Test the fan beforehand if you're not sure which polarity results in the correct direction. Wire a power lead from the positive output of the regulator to the fan positive. Wire the fan ground to Aux3 on the decoder. Configure this decoder output as described in (4) or (5a).

Optionally wire Aux3 and Aux4 together on the decoder in the case of a steam engine installation. Configure the Aux4 decoder output as described in (5b).

Electrocouplers

For the electrocouplers, start by installing the diodes on the power switches. These act as freewheel diodes and protect the switch when used with inductive loads. Note the polarity of the diodes - the band goes toward the positive output of the power switch.

IMG_7399 [2)

Now wire power and ground from the regulator output to the power and ground inputs on each of two power switches. Wire the controls from Aux6 and Aux7 to the 'SW' pins on the power switches. Configure the decoder outputs as described in (2) in the previous post.

install3

At this point, it's a good idea to test the output of the power switches. If they are wired wrong, or if the decoder is configured wrong, the couplers could overheat and be damaged. Put a voltmeter, test lamp, or some other indicator across the power switch outputs, and make sure that they only activate for about half a second when you press the button on the remote.

After confirming things are operating as intended, wire the outputs of the power switches to the couplers. Polarity does not matter.

Done!

Here is the complete wiring diagram:

install4

Now go run it, see if the smoke works the way you like, and tweak accordingly.

Attachments

Images (7)
  • IMG_7397 (2)
  • IMG_7398 (2)
  • install1
  • install2
  • IMG_7399 (2)
  • install3
  • install4
Last edited by thor73

Thanks for the detailed explanations and details on your DCC conversions and the parts you have used for them. I am saving all this for reference as well as your future threads and posts. Really great info to have.

It's really nice to have the knowledgeable folks we have here on the forum. You all are great folks to learn from and I appreciate you all sharing your knowledge. Thanks again!

Last edited by rtr12

This is awesome, thanks so much!  But I can't see any of the photos in your 2nd post.  I get a permission error when I try to view them.  I would be interested in your board that converts the AC of DCC to DC, as well as your custom MOSFET board.  But I do have a question, is there an advantage to have the rectifier and regulator separate?  I believe a lot of guys use a AC to DC combo board when they add LED lights to their passenger cars.  And John even sells one he has designed that is adjustable for those lighting projects.  Do these not provide the current wee need for smoke and couplers?  As for programing the decoder for the couplers, is there a way to do it so you don't have to hit the button again to reset it?  I look forward to your posts showing it all coming together.  My next two projects are converting MTH PS-1 equipped DL-109 and  Railking Cab Forward locomotives.

One nifty option for compact DC supplies is this Recom switcher.  I use the Recom R-78E5.0-0.5 for a couple of my projects, it's good for half an amp.  It's a PC mount unit that measures 11.6mm x 8.5mm x 10.4mm.

The Recom R-78E5.0-1.0 is good for an amp and it's the same size.

You can also jump up to the Recom R-78B5.0-2.0 and go for two amps, it measures 11.5mm x 8.5mm x 17.5mm.

The cool thing with these is you could lay out a circuit board and package them with the remaining components you needed for a nice compact package.

Attachments

Images (1)
  • mceclip0
sinclair posted:

But I do have a question, is there an advantage to have the rectifier and regulator separate?  I believe a lot of guys use a AC to DC combo board when they add LED lights to their passenger cars.  And John even sells one he has designed that is adjustable for those lighting projects.  Do these not provide the current wee need for smoke and couplers?

John would have to confirm for that specific board, but with a linear regulator like that at the voltage drop and current we're talking about, you probably wouldn't need a separate smoke unit... 

It would dissipate 4-5 watts just powering the smoke heater alone.

Thanks so much!  Now I need to start buying parts and trying it out.  I'll start with my DL-109 as it's big (Lots of room inside the body.) and has smoke and couplers.  When I get going I'll make a thread and post as I go.  So please keep an eye out and help me along.

 

@John, now that you've seen so of this, I was wondering if your Super Chuffer and Chuff Generator could be used with DCC at all when used in a steam engine?  Mainly the Chuff Generator used as the input to the decoder to trigger the sound instead of using a reed switch or hall sensor.  But if I could use the Super Chuffer too, that would be awesome.

sinclair posted:

@John, now that you've seen so of this, I was wondering if your Super Chuffer and Chuff Generator could be used with DCC at all when used in a steam engine?  Mainly the Chuff Generator used as the input to the decoder to trigger the sound instead of using a reed switch or hall sensor.  But if I could use the Super Chuffer too, that would be awesome.

You can sync the steam chuffs to the wheel rotation quite accurately with just a couple CVs in the Loksound, so that you always have four chuffs per rev (or however many you like). No hardware needed.

If you want to have the chuffs occur at a specific wheel orientation, then yeah, I think you need hardware for that.

Great information! Very clear and helpful.

Two questions:

  1. You wrote "... I designed a simple 2-channel MOSFET power switch board". Did you ever post this design? I'm interested in PWM of a smoke heater unit as you describe in your post.
  2. Your use of the LokSound AUX outputs to control the smoke heater and fan was critical to me for selecting the LokSound L as the DCC decoder for a dead-rail conversion of a Sunset 3rd Rail UP "Late" Big Boy originally with TMCC. I needed a DCC controller that will operate the fan-driven smoke unit, so your post was decisive for me. Since you mention the LokSound XL in your article, I read the "Reference Manual for LokProgrammer" downloaded from here, and under section "11.2. Special Settings for LokSound XL" it states "…The function „Smoke Generator“ cannot be connected to the AUX outputs.”  I was warned off using the XL version because of this, and the L version seems well-suited O, but others might want to use the XL version. Do you have any experience/info that the XL's AUX output can be used for fan-driven smoke units as you describe in your post? It might be I am misinterpreting the manual's statement, and you can set me straight.

 

Again, thanks for a fabulous post!

Newbie here - first post. Please forgive any protocol errors!

It's best to look at the manual for the LokSound XL and not the LokProgrammer for how to wire the decoder.  If I remember correctly (Been a while since looking at the XL manual.) when the ESU manuals talk about smoke, they speak of the ESU smoke units, which are not at all like the ones we find in our O gauge locomotives.  Unless you are using an ESU smoke unit, I would follow the instructions kindly provided to us by THOR73.

I have run HO and O scale smoke units on a QSI Titan Magnum. I have also run an HO smoke unit on a Loksound L. It's only 4 wires then program in the software. The Loksound XL also supports the Loksound plug and play O scale sized smoke unit. The 21pin Loksound HO decoders have an aux I/O board that you can purchase that allow them to control smoke units with 4 wires as well (2 for heater, 2 for fan) Doesn't have to be so complex really. There are lots of choices.

Example:

 

Last edited by jonnyspeed

Sinclair and Jonathan,

Thanks for the informative and knowledgeable replies. 

Sinclair: I did as you suggested and digested more ESU documentation, and I have calmed myself down a bit about "4-wire" fan-driven smoke-unit compatibility issues with the L.

Jonathan: Your statement ".. I have also run an HO smoke unit on a Loksound L. It's only four wires then program in the software." is flat-out the "proof in the pudding"! 

In regards to my first question regarding the PWM-compatible "relay," I came across some Omron Solid State Relays G3MC-202PL-DC5 (w/o zero crossing) and G3MC-202P-DC5 (w zero crossing), and MOS Trigger Switch Driver Module FET PWM Regulator High Power Electronic Switch Control Board (cheap, $2.94). The latter claims a PWM bandwidth of 0 to 20kHz. I have purchased all of these for testing, but I would, of course, welcome anyone's comments on the suitability of the devices for PWM of the smoke heater. The zero-crossing capability of an "AC Relay" is discussed at this site, where the relay is controlled by the "ESU Version 4" to modulate AC power to the smoke heater. I suppose the zero crossing capability is useful for preventing output surge currents on the heater, but it would not work if the power to the smoke heater was DC, as it might be for dead-rail applications.

Again, thanks to Sinclair and Jonathan.

-Darrell

DarrellR posted:

  1. You wrote "... I designed a simple 2-channel MOSFET power switch board". Did you ever post this design? I'm interested in PWM of a smoke heater unit as you describe in your post.

No, I haven't posted that yet. I'll see if I can get something put together.

Your use of the LokSound AUX outputs to control the smoke heater and fan was critical to me for selecting the LokSound L as the DCC decoder for a dead-rail conversion of a Sunset 3rd Rail UP "Late" Big Boy originally with TMCC. I needed a DCC controller that will operate the fan-driven smoke unit, so your post was decisive for me. Since you mention the LokSound XL in your article, I read the "Reference Manual for LokProgrammer" downloaded from here, and under section "11.2. Special Settings for LokSound XL" it states "…The function „Smoke Generator“ cannot be connected to the AUX outputs.”  I was warned off using the XL version because of this, and the L version seems well-suited O, but others might want to use the XL version. Do you have any experience/info that the XL's AUX output can be used for fan-driven smoke units as you describe in your post? It might be I am misinterpreting the manual's statement, and you can set me straight.

Smoke setup is one area where the otherwise outstanding ESU documentation is woefully lacking. A lot of what is written appears to assume you are exclusively using one of their smoke units. I had to basically reverse engineer all of the decoder configuration steps I describe above, especially for the steam chuffs. So it's awfully hard to say if a specific smoke-related function can be assigned to a given output on a particular decoder.

That said, I use the XL in a couple engines, and have them configured to drive the smoke outputs as I describe. They are both diesels, however, so they don't need the chuff. The project setup for the XL in the Lokprogrammer does have the same smoke unit settings and function outputs as the L, though, so I imagine it would work.

DarrellR posted:
In regards to my first question regarding the PWM-compatible "relay," I came across some Omron Solid State Relays G3MC-202PL-DC5 (w/o zero crossing) and G3MC-202P-DC5 (w zero crossing), and MOS Trigger Switch Driver Module FET PWM Regulator High Power Electronic Switch Control Board (cheap, $2.94). The latter claims a PWM bandwidth of 0 to 20kHz. I have purchased all of these for testing, but I would, of course, welcome anyone's comments on the suitability of the devices for PWM of the smoke heater. The zero-crossing capability of an "AC Relay" is discussed at this site, where the relay is controlled by the "ESU Version 4" to modulate AC power to the smoke heater. I suppose the zero crossing capability is useful for preventing output surge currents on the heater, but it would not work if the power to the smoke heater was DC, as it might be for dead-rail applications.

Again, thanks to Sinclair and Jonathan.

Hate to be the bearer of bad news, but...

The data sheets for those SSRs suggest switching times of around 1ms. This is far too slow for typical PWM use.

Consider: 20kHz PWM means a full duty cycle takes 50us. If you want, say 10% duty cycle, like for a dim light, that means the on-time of the signal is 5us. For that 5us pulse to be meaningful, the switching times need to be a small fraction of that. So the max switching times that will be feasible in that case will be less than 1us. (For comparison, the switching times of the MOSFET I use on my boards are around 10ns.)

The FET driver module is triggered by a high logic input. This is not readily compatible with the decoder output, which will float when off, and be low when on, as I describe above. If you can find a p-channel version of it, you may be in luck.

These are just the sorts of issues that led me to cook up my own board.  

Last edited by thor73

Thanks for the detailed and helpful reply, THOR32. I very much look forward to seeing your post on the MOSFET power switch since I've been noodling around methods for the PWM-compatible switching myself, but you clearly have thought about this longer and more deeply than I have.

Perhaps you could take a look at the link I provided earlier (MOS Trigger Switch Driver Module FET PWM Regulator High Power Electronic Switch Control Board  to determine if it would work as a PWM-compatible switch for our application, especially since it's pretty cheap ($2.94). My main doubt about this device is that its control inputs are "signal PWM+" and "signal GND". The open circuit operation (for off) of the AUX outputs gives me pause for our application, since floating input conditions may not be accounted for in the device's design.

I think ESU would LIKE for us to use their smoke generators using the specialized outputs/input on the L and XL, so your reverse engineering is very valuable for simpler smoke generators.

I may do a little reverse engineering of my own of an ESU smoke generator with temperature sensor to determine how it's producing the "temperature" output, be it a thermocouple, resistance temperature detector (RTD), etc. It might even be a good idea to put a simple, low-cost temperature sensor on simpler smoke generators anyway. Of course, calibration is the bear and may not be worth the trouble. 

Thanks again for your original post and follow-up answers.

-Darrell

DarrellR posted:

Perhaps you could take a look at the link I provided earlier (MOS Trigger Switch Driver Module FET PWM Regulator High Power Electronic Switch Control Board&nbsp to determine if it would work as a PWM-compatible switch for our application

I wasn't real clear above - the following was referring to that module:

The FET driver module is triggered by a high logic input. This is not readily compatible with the decoder output, which will float when off, and be low when on, as I describe above. If you can find a p-channel version of it, you may be in luck.

Well, I did the reverse engineering I mentioned. Here is a longish post:

It is possible to modify a non-ESU smoke unit so that it connects to the LokSound L or XL decoders just as an ESU smoke unit does by connecting the smoke unit to the specialized ESU smoke unit terminals: HTR+/-, MOT+/-, and TMP+/-. This capability allows you to take direct advantage of all the LokSound capabilities provided for ESU smoke units. The missing component in some smoke units is a Negative Temperature Coefficient (NTC) thermistor.

What started me down this road was a “deadrail” conversion of a Sunset 3rd Rail Big Boy (3-rail, “Late Version”) originally outfitted with TMCC and a nice Lionel smoke unit with dual output (photo below).

IMG_5130.JPG

 

I wanted to retain this beauty and use a LokSound L V4.0 decoder that is controlled by an Airwire CONVRTR-60. THOR73’s posts inspired me to work through using this smoke unit with the LokSound L V4.0 decoder. I thought that if I could figure out how the ESU smoke units created their “temperature” inputs to the LokSound decoder, then I could retrofit the Lionel smoke unit so that it would be “input compatible” with an ESU smoke unit. This retrofit turned out to be simple.

I reverse-engineered an ESU 54678 smoke unit by measuring the resistance between the heater resistor leads (HTR+/-): ~23 ohms; motor leads (MOT+/-): ~16 ohms; and thermistor leads (TMP+/-): ~100K ohm at room temperature. Each of these components is electrically-isolated from the others. When powered by a 14.8V LiPo battery, the LokSound L V4.0 decoder I had on hand produced the following results on the ESU Profi board using the LokProgrammer (with ground measured at the Profi board's ground terminal):

Terminal

Smoke off

Smoke on (Throttle=10)

HTR+ (not connected to heater resistor*)

13.4V

13.2V

HTR-

Open

Switched open/ground @500Hz ~30% duty-cycle PWM

Fan+

0V

Pulsed <= 5V (difficult to determine with low Frequency chuffs)

Fan-

0V

0V

TMP+

5.1V

5.1V

TMP-

1.3V

3.7V

* Battery+ (14.2V) connected to heater resistor + input

 

 

The difference in TMP- between unheated and heated conditions suggests, but does not prove, that the thermistor’s decrease in resistance with increased temperature is manifested by a voltage increase at TMP- as part of a voltage divider where the thermistor is in series with a fixed resistor resident in the decoder, possibly with a low-side voltage offset:

thermistor_circuit.png

So right off the bat, the ESU smoke unit’s heater resistance (23 ohms) is similar to Lionel’s (27 ohms), and both smoke units use 5V fan motors. The Lionel was missing only the thermistor. Lower resistance smoke units (around 8 ohms) might be problematic to convert unless retrofitted with a heater resistor in the 20 ohm neighborhood or use an externally-supplied, lower HTR+ voltage. The heater and fan motor similarity between the ESU and Lionel smoke units seemed to make this particular Lionel smoke unit an excellent surrogate candidate.

Thermistors with 100K ohm resistance at 25 Celsius are commonly-available, usually with a “B” parameter of around 3900 Kelvin. You can Google what this parameter means (simplified Steinhart-Hart Equation: R(T in Kelvin)=R@TRef*(exp(B/T-B/TRef)) ). While I was not able to verify that the ESU smoke unit used precisely this type of thermistor, testing described later supports this selection.

The photo below is the Lionel 27 ohm smoke unit PCB, part #610-PCB1-045, Rev C (Lionel replacement part #691PCB1045), that was retrofitted with an “axial,” glass-coated 100K NTC thermistor with a B of 3892 Kelvin. (Well, it’s actually a Lionel replacement PCB since I cut some traces retrofitting on the original PCB that I regret doing. Interestingly, the original PCB did not have the mangled lettering of the replacement PCB that some like GUNRUNNERJOHN have noted.)

The 3-pin power plug on the PCB can be used to power the heater resistor since the outputs from the rectifier/5V converter on the PCB do not connect to anything after removing the fan motor plug. The ground on the PCB MUST be isolated from the heater unit metal case since the PCB’s “ground” wire will be connected to the LokSound L’s HTR- terminal that regulates the heating resistor’s current path to ground! Electrical measurements revealed good electrical isolation of the metal case from the heating element.

IMG_5160.JPG

Two holes were drilled in the smoke unit’s PCB board, and the thermistor was inserted and soldered to two wire leads that connect to the LokSound L’s TMP+/- terminals. High melting-point solder was used in the off chance that conventional solder might melt at the high operating temperatures of the heater resistor and thermistor (max around 250 Celsius according to documentation for the ESU smoke unit). 

The two heater wires from the three-pin PCB plug connect to the LokSound L’s HTR+/- terminals. (Pins 1 and 3 are shorted together on the PCB and connect to one side of the heater resistor. Pin 2 is ground and connects to the other side of the heater resistor.)

The motor wires directly connect to the MOT+/- terminals. Out of sheer luck, when the red motor lead from the smoke unit is connected to MOT+, and it’s black lead to MOT-, the fan motor spins in the “correct” direction.

As GUNRUNNERJOHN has suggested, I also replaced the original 27 ohm ceramic resistor with a Lionel 27 ohm replacement #6008141055. 

Once the smoke unit’s six outputs were connected to the LokSound L’s ESU smoke unit terminals, there were some modifications needed in the ESU sound files and decoder set-up, since they did not originally activate the ESU smoke unit. First, follow THOR73’s directions regarding the connection between sound and smoke chuffing under the “Smoke unit” menu. Note especially that the smoke unit’s automatic power-off time should be reset since the default is 0 seconds. I don’t know if 0 means never turn off, but a non-zero setting seemed like a good idea to me.

unknown.png

What differs from THOR73’s discussion is the sound-file set-up for an ESU smoke unit. Editing the sound files reveals that most “nodes” have an option to set the “ESU Smoke Unit” parameters. Frequently these settings are turned off, but there are some useful “presets” you can select and experiment with.  An especially interesting preset is the “preheating” preset that is available in the stopped state.

Mute State:

unknown_1.png

Here are the other states I modified, but I am by no means expert or knowledgeable about these settings. Usually, I chose a “Preset” and then selected the “Steam Chuff” checkbox, which preserves the parameters of the preset (unless you change them), but turns off the Preset name.

Stop State:

unknown_2.png

DCX State:

unknown_3.png

Coast State:

unknown_4.png

After editing these sound nodes, the next step is to set an “F#” to turn the smoke unit on/off on the “Function mappings” menu. The “logical” outputs column provides an “ESU Smoke Unit” selection, so I selected F23 as the ESU Smoke Unit on/off toggle.

unknown_5.png

A TESTING WARNING: The ESU 53900 Profi Decoder Tester does not appear able to provide adequate power to either an actual ESU Smoke Unit or surrogates described here! In actual operation, the LokSound L is perfectly capable of providing sufficient power, but the Profi board is, in my experience (or inexperience), NOT able to do so. I initially thought the culprit was the puny AC to DC converter provided to power the Proof board, but power connection to a very hefty 14.8V LiPo battery did not solve the problem. The workaround is to use either THOR73’s high-side MOSFET switch mentioned in this thread or use the low-side MOSFET switch described in the same thread. Either way, you will need to take power (about +14V DC) from the source providing power to the Profi board and use the Profi board’s HTR- output to control the MOSFET switch that will, in turn, control the smoke unit’s heater. If using THOR73’s high-side switch, then you connect the smoke heater as he describes. If using the low-side switch I presented, the smoke unit’s HTR- connects to the switch control input, and the switch’s ground connects to power ground. 

 

Reiterating, THIS SPECIALIZED MOSFET SWITCH IS ONLY NEEDED FOR TESTING WITH THE Profi BOARD! In actual operation, the LokSound L is designed to adequately power an ESU smoke unit by direct connection to the decoder’s ESU smoke unit terminals, as is the modified smoke unit described here. 

Here's the "proof in the pudding" video:

 

Please forgive the disassembled state. I haven’t finished the deadrail conversion, but this video does demonstrate battery power with the LokSound L V4.0 controlled by an Airwire CONVRTR-60 wireless receiver.

Attachments

Images (9)
  • blobid0
  • blobid1
  • blobid6
  • blobid4
  • blobid7
  • blobid3
  • blobid2
  • blobid8
  • blobid5
Videos (1)
_SurrogateESU_SmokeUnit
Last edited by DarrellR

Hey Darrell, great investigation and write up! More fodder for fun mods... 

Looking at your numbers (13.2V, 23-27 ohms, and 30% duty cycle), I see the ESU and Lionel smoke unit heaters are running around 2W to 2.25W, which is pretty consistent with where the MTH ones end up - usually around 2.25 to 2.5 W. So the decoder seems ok with that power output at a current around 0.6A. Tempting to try it on an MTH unit (at a lower duty cycle, to get the same average power), but I'm guessing it might choke on the ~8 ohm element, as that would be in the neighborhood of 1.5A while powered on.

Nice hack with the thermistor on the heater board! It makes a lot of sense that the ESU smoke unit has that built in. Were you able to tell while experimenting if the temp sensor is actually in the control loop for the heater? For instance, does the heater run near 100% duty cycle while first heating up, and then drop to the 30% steady state once hot? That would suggest the thermistor is actually used to control the heating, which makes a lot of sense. If not that, maybe it's just there for overtemp protection or something. The wording in the manual is a little vague.

I'm a little surprised you had to dig into the sound file like you did. That option is not available on the Loksound Selects, and they clearly are supposed to support the smoke unit as well. Here's the text from the Loksound Select supplement:

The decoder reads the data from the temperature sensor and controls the heater based on the desired settings, so the smoke unit could never burn out. Please note that the settings for the smoke unit need to be included in the sound project file. While you could easily change these settings on LokSound L V4.0 decoders, the settings in LokSound Select L decoders could not be altered by yourself. ESU will do the conversion of the LokSound Select files to be compatible with the Smoke units.

I wonder if that particular sound file just wasn't updated recently or something?

Thanks, THOR73 for reading my post. 

On to your questions/comments:

Tempting to try it on an MTH unit (at a lower duty cycle, to get the same average power), but I'm guessing it might choke on the ~8 ohm element, as that would be in the neighborhood of 1.5A while powered on.

I think you can do this by using the 5V powering scheme you described in your post and use the HTR- as the MOSFET switch control: "high-side" as you posted or "low-side" as I have used. That was what happened when I had to power the heater resistor when testing with the Profi board. 

Were you able to tell while experimenting if the temp sensor is actually in the control loop for the heater? For instance, does the heater run near 100% duty cycle while first heating up, and then drop to the 30% steady state once hot?

The duty cycle did indeed change with time. For instance, on first power-up, the duty cycle appeared to be 50% and then changed to the roughly 30% I mentioned. I never saw the duty cycle exceed 50%, but I noticed some slight jitter on the steady-state duty cycle, suggesting feedback. It's difficult to know if the cheap digital scope I used was doing a credible job of estimating the duty cycle. I have no real way of knowing if that was feedback, but since the sound file setting for the ESU smoke unit list temperatures, I surmise the decoder must be measuring the TMP- voltage and converting the voltage to temperature.

If you set Rfixed and Voffset well in the voltage divider, then the T vs. V curve is approximately linear over a limited range, say from 100C to 250C. I won't bore anyone with the quantitative details (which I have) unless there is interest.

I'm a little surprised you had to dig into the sound file like you did. That option is not available on the Loksound Selects, and they clearly are supposed to support the smoke unit as well.

Funny you should mention that. I was just on the phone with Tony's Trains, where I purchase the LokSound L's, in regards to a Cab Forward sound file. It's only available as a Select file, but they were concerned that it might not have the ESU smoke activated. I indicated that they should go ahead and send me a LokSound L Select loaded with the Select version of the Cab Forward, and I will determine if smoke is activated. If not, then I will contact ESU USA to get that corrected.

Thanks, THOR73, again for taking the time to read my original post.

Attachments

Images (1)
  • mceclip3
DarrellR posted:
Funny you should mention that. I was just on the phone with Tony's Trains, where I purchase the LokSound L's, in regards to a Cab Forward sound file. It's only available as a Select file, but they were concerned that it might not have the ESU smoke activated. I indicated that they should go ahead and send me a LokSound L Select loaded with the Select version of the Cab Forward, and I will determine if smoke is activated. If not, then I will contact ESU USA to get that corrected.

Perhaps you could have ESU make a non-select version of the Cab Forward.  If you want someone else to join you in making the request, let me know.  My MTH PS-1 equipped RailKing Cab Forward is in my queue for DCC conversion and I was concerned that they only had the sounds for Select decoders.

Perhaps you could have ESU make a non-select version of the Cab Forward.  If you want someone else to join you in making the request, let me know.  My MTH PS-1 equipped RailKing Cab Forward is in my queue for DCC conversion and I was concerned that they only had the sounds for Select decoders.

If you look at the following link at the ESU website, you will find project 74409, which links to an "HO" version of the Cab Forward sound file 74409-LSV4.0-Steam-Cab_Forward-R1.esux. I have not examined this file yet, but I doubt is has ESU smoke activated, but since it's a V4.0 sound file, it can be edited to add ESU smoke. Editing this file is possible because the link specifically states:

ANY LokSound V4.0 Sound file can be written to ANY LokSound V4.0 decoder. This means you can write a Micro(N Scale) 748xx file to an 8 pin or 21MTC V4.0, and alternately a 744xx(HO Scale) file to a Micro or V4.0 Direct decoder. The ESU LokProgrammer software will recognize the difference and ask you to proceed. By Accepting you are giving the permission needed for the LokProgrammer to automatically make the conversion needed.

Maybe after I/you/we edit it, it can be submitted it back to ESU.

I will ask ESU to make an "L/LX" version of the V4.0 sound file with ESU smoke added. I have five KTM/Sunset cab forwards to convert...

My MTH PS-1 equipped RailKing Cab Forward is in my queue for DCC conversion and I was concerned that they only had the sounds for Select decoders.

Maybe you already know that if you convert your PS-1 to PS-3, you can set the DCS/DCC pin on the PS-3 board to "DCC," and you get DCC control. I used this recently on a Sunset 3rd Rail Allegheny that I converted to PS-3 so that I could then connect the PS-3 board to an Airwire CONVRTR-60 that provides DCC to the PS-3 via an Airwire T5000 wireless throttle. Here is a specific link to Ray's Electric Trainworks where I got my PS-3 board since the Allegheny as originally received was PS-2, which is harness-compatible with PS-3 (saving me some work because all I had to do was remove the PS-2 board and replace it with the PS-3 board with NO wiring harness mods). Ray is a great guy.

The MTH instructions for PS-1 to PS-2/3 conversion are very highly detailed and seem to be well-done. The PS-3 has pretty good sound, but I did not check the smoke (yet)... 

Perhaps you could have ESU make a non-select version of the Cab Forward.  If you want someone else to join you in making the request, let me know.  My MTH PS-1 equipped RailKing Cab Forward is in my queue for DCC conversion and I was concerned that they only had the sounds for Select decoders.

Just to follow up, I made a request at the ESU website: 

Topic:          L/XL Conversion for sound project 74409
Your question:  
Would it be possible for you to make conversions to project 74409 (V4.0 version for Cab Forward) so that it supports smoke and any other features of the LokSound L/XL V4.0 decoder? There are several of us who would like to use it in the O gauge community.

I will post if I get a response.

Wow, you found one, I never did come across that sound file when I searched.  It's downloaded now for future reference.  Please do let me know if they reply to you.

As for converting it to PS-3, A LokSound L costs less, and allows for customizing.  Plus it'll let me keep all my DCC conversions under one brand.  I do plan on buying new MTH PS3 locomotives going forward once I have DCC fully setup.  If Lionel would just add DCC to their O Legacy locomotives like they do for S gauge, then I'd be all set.

Wow, you found one, I never did come across that sound file when I searched.  It's downloaded now for future reference.  Please do let me know if they reply to you.

I will definitely let you know if ESU responds. They are somewhat slow responding. The current file has no ESU smoke activated, but you can activate it.

@thor73 posted:

Now for the actual installations! I'll start with a general purpose installation that should work to provide fully functional smoke and couplers for just about any locomotive. I'll eventually show a couple of my specific installations as well, to show various other ways to do things, but that may be later, as I have a vacation coming up...

Basic Installation for Smoke and Couplers

For this example, I'll assume a Loksound L decoder is already installed and operating in the locomotive. It's a good idea to get the basic motor, sound, and lighting set up before proceeding to the smoke and couplers. For the purposes of this example, I'll use decoder function outputs Aux3 through Aux7. Adjust accordingly for your specific installation, of course.

Parts List

Here is a suggested parts list for the installation. For the discrete components, any equivalent part will work fine, these are just suggestions.



Rectifier and Regulator

The regulator can be assembled with both the bridge rectifier and capacitor soldered to the inputs of the regulator. The + and - leads of the rectifier get soldered to the positive and negative regulator inputs, leaving the A/C inputs of the rectifier for the track pickups. The capacitor can also be soldered across the regulator inputs. Note the polarity of the capacitor as well. The inputs to the rectifier then just get wired to the track pickups, in parallel with the decoder.

install1

Here is a way to combine the rectifier, cap, and regulator into a pretty tidy assembly:

IMG_7397 [2)IMG_7398 [2)

Be sure shrink wrap or otherwise insulate the A/C leads of the rectifier after you wire them to the track pickups.

At this point, power up the engine on the dcc booster. Hook a voltmeter across the regulator outputs and adjust the potentiometer on the regulator until you get the desired voltage (5V, typically). Now you have a DC power source ready to drive heavy loads.

Smoke Unit

For the smoke unit heater, wire power and ground from the regulator output to the power and ground inputs of the power switch. Wire the outputs of the power switch to the heater element on the smoke unit. Polarity does not matter. Wire the heater control from Aux5 to the 'SW' pin on the power switch. Configure this decoder output as described in (3) in the previous post.

install2

The decoder can drive the smoke unit fan directly, but it still makes sense to power it from the regulator. Test the fan beforehand if you're not sure which polarity results in the correct direction. Wire a power lead from the positive output of the regulator to the fan positive. Wire the fan ground to Aux3 on the decoder. Configure this decoder output as described in (4) or (5a).

Optionally wire Aux3 and Aux4 together on the decoder in the case of a steam engine installation. Configure the Aux4 decoder output as described in (5b).

Electrocouplers

For the electrocouplers, start by installing the diodes on the power switches. These act as freewheel diodes and protect the switch when used with inductive loads. Note the polarity of the diodes - the band goes toward the positive output of the power switch.

IMG_7399 [2)

Now wire power and ground from the regulator output to the power and ground inputs on each of two power switches. Wire the controls from Aux6 and Aux7 to the 'SW' pins on the power switches. Configure the decoder outputs as described in (2) in the previous post.

install3

At this point, it's a good idea to test the output of the power switches. If they are wired wrong, or if the decoder is configured wrong, the couplers could overheat and be damaged. Put a voltmeter, test lamp, or some other indicator across the power switch outputs, and make sure that they only activate for about half a second when you press the button on the remote.

After confirming things are operating as intended, wire the outputs of the power switches to the couplers. Polarity does not matter.

Done!

Here is the complete wiring diagram:

install4

Now go run it, see if the smoke works the way you like, and tweak accordingly.

This is awesome!!



Would you be willing to post the gerber files for the board by any chance? I'm looking to try this with an MTH diesel.



Thanks!

Dan

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Ste 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×