Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Programming an OEM Soundtraxx decoder for chuff

2556 views
9 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    November 2002
  • From: US
  • 4,580 posts
Programming an OEM Soundtraxx decoder for chuff
Posted by jacon12 on Tuesday, October 14, 2014 9:34 PM

A friend has a Bachmann Spectrum 2-8-0 that the sound of the exhaust chuff is starting before the loco has yet moved and would like me to help him program it so that it 'sync's' better.  I was reading up on the subject and I'm hoping the answer is in the following:

"Soundtraxx Hints for Setting Engine Exhaust Chuff Rate

Because most locomotives do not respond linearly (i.e., straight line) to the throttle settings, it can sometimes be difficult finding the magic auto-exhaust
chuff rate setting that works across the locomotive’s full speed range. We
have two procedures for setting the chuff rate that have worked well. The first
method is easy to implement and produces good results that should satisfy
all but the stodgiest of nitpickers. The second method takes more effort but
produces more accurate results.
Method 1
Begin by setting the starting voltage (CV 2) such that the engine begins
to barely move at speed step 1. Then increase the throttle setting until the
engine is moving at 10-15 scale MPH. Then adjust CV 116 up or down until
the chuff rate corresponds to approximately four chuffs per wheel revolution.
Method 2
This procedure uses the loadable speed curve to compensate for the
locomotive’s non-linearities. Begin by setting CV 25 = 16, CV 29 = 18 (50
if you are using a long address- see Table A) and CV 116 to the value
calculated from the formula above. Set your command station to use 28
speed-step mode. Set the throttle to speed step 1 and adjust the first entry
in the speed table, CV 67 until the locomotive speed matches the chuff rate.
Increase the throttle to speed step 2 and adjust the second entry in the speed
table, CV 68 until the locomotive speed once again matches the chuff rate.
Repeat this process until you have adjusted the locomotive speed across all
28 speed steps using CVs 67-94."
Has anyone tried these methods?  Which worked best?  What are " non-linearities"?
Thanks for any suggestions!
Jarrell
 HO Scale DCC Modeler of 1950, give or take 30 years.
  • Member since
    January 2006
  • From: Northeast OH
  • 2,260 posts
Posted by NeO6874 on Tuesday, October 14, 2014 10:16 PM
The "non-linearities" are due to the loco not having a linear speed at each speed step.

For example, worth 28 speed steps, a linear progression world be 1smph at step1 and increasing by 1 smph at each step thereafter (or 2, or3, whatever ends up being x smph * speed step). If you plot the progression on graph paper, you'll see a straight line.

However, your loco (due to mfg processes, break-in/running time, lubrication, etc.), might run 1 smph at step 1, 3 at step 2 ... 30 at 9, 60 at 20, and 100 at 28 ... so plotting the speed at each step, and then connecting the dots will result in a curve.

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    February 2008
  • 6,811 posts
Posted by maxman on Tuesday, October 14, 2014 10:27 PM

jacon12
What are " non-linearities"?

If the locomotive speed increases in equal amounts for every one of the 28 speed steps, then you will have a linear line.  If the chuff rate increases in an equal amount for every one of the 28 speed steps, then that will also have a linear line.  Ideally, the chuff increases and the speed increases will both follow the same straight line.

In the first method, they are trying to match the chuff rate to the speed, or rotation of the driver.  I believe that most of those who have tried to do this end up with a match at only one place of the loco speed curve line.  At other places along the curve, the chuffs are either too soon, or end up as a blur at high speed.

In the second method, it appears that they are trying to adjust the speed curves to match the driver revolutions with the chuff rate.  So theoretically you would watch the driver turn at speed step one and see if you had 4 chuffs per revolution.  If not, you would adjust the speed up/down to match.  Then you would repeat this for all the other speed steps.  Whether or not the resulting speed curve allows the loco to run in the same manner os all your other locos is another question.

(at least that's the way I would interpret what they are saying!!!)

  • Member since
    September 2003
  • 9,996 posts
Posted by mlehman on Tuesday, October 14, 2014 10:33 PM

Those methods will work, but a lot of trial and error involved. They're good generic methods, so don't forget about them if you need them. On the other hand, starting with a known working set of CVs is helpful. I collected info off several lists and sites over the years, so can't take credit for this below other than compiling it and a couple of tweaks here and there. There is some contradiction in the methods, so be sure and start out with one way and stick to it, then try another if that doesn't work so well.

Tsunami Steam CV Settings
 
 
       <CVvalue name="2" value="1" />
       <CVvalue name="3" value="12" /> [range can be as high as 40+]
       <CVvalue name="4" value="12" /> [range can be as high as 40+]
   CV 3 and 4 must be at least 20 for the chuff to work right [not sure about this if CV 116 is adjusted?]
       <CVvalue name="10" value="40" [Use range of 20 to 40]
       <CVvalue name=”116” value=”128” Chuff Rate
       <CVvalue name="128" value="75 to 120" />  (master volume)
       <CVvalue name="131" value="45" />  (chuff volume)
       <CVvalue name="177" value="36" />
       <CVvalue name="178" value="30" />  <-- Chuff adjust ..10 to 90
       <CVvalue name="179" value="156" />
       <CVvalue name="180" value="69" />
       <CVvalue name="181" value="255" />
       <CVvalue name="182" value="255" />
       <CVvalue name="183" value="101" />
       <CVvalue name="184" value="70" />
       <CVvalue name="185" value="11" />
       <CVvalue name="186" value="88" />
       <CVvalue name="187" value="200" />
       <CVvalue name="188" value="90" /> [for slow speed performance]
       <CVvalue name="209" value="25" />
       <CVvalue name="210" value="20" /> [always lower than CV 209]
       <CVvalue name="212" value="100" />   [with BEMF on]
       <CVvalue name=”213” value=”23” [BEMF Measurement Frequency, can vary]
       <CVvalue name=”214” value=”10” [BEMF Window Length, can vary]
       <CVvalue name="217" value="2" /> [enable BEMF]
 
Hatch said:
After you put in these cv's then adjust cv 178.
Turn on about 50 forward. After the loco is at speed, then
press on the loco to slow it down (simulating a load) it should chuff
louder and harder. If it doesn't, then set 178 a little higher (1 or 2)
Keep doing this til it chuffs loud when you press on it.
   If it stays loud after you let go, then lower cv 178 a little.
    CV 178 is any thing from 15 to 90 depending on the loco so
use a little patience and try down to 15 and up to 90 if your not
getting the response.  They are all different so keep trying 178.
    You'll find it.  But little 1 or 2 changes....or you'll pass it.
     Once these are in your decoder, then you can set cv 188
up or down between 90 and 110 to get the smoothest slowest
performance you want.
    The loco will quiet it's chuff almost completely when going down
a hill with cars pushing it.  It will respond to heavier trains.
it will drift quietly (soft chuff) on the flat.
 
Bruce said:
  • Turn Off any speed tables with CV29
  • Set CV2 to 0
  • Shut off momentum 
    (CV3 = 0; CV4 = 0)
  • Go to Programming on the Main (OPs mode for Digitrax), preferably using DecoderPro
  • Set CV 209 to 0
  • Set CV210 to 0
  • Set the loco moving forward on speed step 1
    (128 step mode recommended)
  • Adjust Kp (CV209) until the loco just moves, very slowly - may be jerky
  • Adjust Ki (CV210) until the loco smoothes out
If you want EXTREME low speed control, you can adjust from the above settings. Bruce suggests that you reduce CV210 by 1 and then adjust CV209 up until you get movement.
To view a Windows video of what can be accomplished this way, CLICK HERE or, you can view the HD version on You Tube, just CLICK HERE!
Yes, this loco is moving on speed step 1 in 128 step mode. 
Once you have done the above, you can adjust the steam chuff rate to match the wheel rotation (assuming you aren't using a cam) by:
  • Set a medium slow speed on the loco - about step 10
  • Adjust CV116 for the proper chuff rate
    (4 chuffs per revolution for most rod locos)
The sound will be in sync for this speed step only - if the loco runs slower, it may fall off - much faster and you won't be able to count the chuffs relative to wheel rotation. Bruce finds this provides the best balance!
  • Reset momentum 
    (Bruce recommends CV3 = 40; CV4 = 20)
  • Restore speed tables
Jim Betz said:

Tsunami PID/BEMF CV Tuning Concepts

I spent quite some time on the phone with Soundtraxx today. The following is a write up of what I was told. It includes knowledge I have gained recently in researching the PID process in general and the Tsunami decoders in particular. A PID controller is a well-known method of doing "process control". In our case the "process" is the speed of our Tsunami equipped locomotives. And the task we are working towards is producing a process/procedure that will allow the user to find/discover the best/correct settings for their particular locomotive that will give them the performance they want.

It is also important to understand that the values for a particular locomotive – make and model and scale – may not work for other locomotive … and may not even work for a ‘sister’ locomotive (one that was produced in the same run of the same make and model). And when we are talking about this kind of thing there is an assumption that the decoders are also the same make and model. Yes, certainly if you have two sister locos and you have one of them running the way you like it then you should try the same settings (CVs) for this new one … and at least use them as a starting point. But don’t be surprised if you find you have to change one or more CV values – nor even if the settings for one are significantly different from those that ‘work’ in the other one.

One of the most important aspects of a PID controller is the idea that it is not expected to achieve the "perfect" value on the first pass. It is an iterative process and will reach the targer (in our case target speed) after several successive corrections. And, precisely due to this iterative nature – the formula that is a PID controller uses the history of the past corrections … in addition to the current measurements (in our case the BEMF value that is read during the "off" segments of the PWM. The idea is to "home in" on the correct value for the PWM – and then to keep adjusting the PWM in very tiny adjustments … all with the goal of having the motor turn at a constant RPM for a given speed setting. And also with the goal of changing from any current speed step to a new speed step … smoothly (a nice steady increase or decrease in speed that results in the operator seeing his train moving in a manner that approximates what happens on a real train.

 

CV 209 is the Kp in the PID. It should usually be a low number (25 and below). Kp is the ‘current error’ value. Think of it as the ‘base value’ (size) of the error (difference between the target and the actual). But the value of CV209 is a range from 1 to 255 – so what CV 209 really represents is a "percentage" of the Kp that will be used.

CV 210 is the Ki in the PID. It should usually be a low number – and it will usually be a lower number than 209. Ki is the integral error value – that is to say that it is the sum of the past few changes (corrections). Think of it as an ‘adjustment’ to the Kp – based upon what has happened the past few times the PID value has been computed. Again the value of CV210 is not the actual value of the Ki but rather it is the percentage of the computed Ki that will be used to form the actual correction (final PID output calculation) to the PWM.

There is a "D" in the Tsunami PID controller. It is not "externalized" and Soundtraxx does not think that we, the users, should be messing with the "D" in the PID formula. The Kd in the PID calculation represents the rate of change, over time, of the PID calculation. Think of it as the slope of the curve of the error. The value for the "D" works the same way as the values for 209 and 210 … it is also a range/percent.

Turn off all momentum (CVs 3 and 4) before starting. It is probably even a good idea to just do a decoder reset.

It is highly unlikely that you will be successful in tuning the motor performance CVs correctly – if the locomotive wheels or the test track are not clean. Always start all such procedures with cleaning the wheels and track!

Use 128 speed step mode for all tuning (and running?). It is very hard for the PID controller to do its job – to provide smooth changes of speed and relatively constant RPM when the speed isn’t changing – if you only provide it with 28 steps (because each individual value represents a much larger percentage of the range of the throttle (think PWM).

CV 212 is the "intensity" of the PID calculation that will be used. Think of the PID calculation as a number. That number is actually a ‘correction’ for an error (the result of the PID calculation). If the value of 212 is 255 then 100% of that correction will be used. If the value of 212 is 128 then 50% of the correction will be used. An example will help. Let’s say that the target speed is 100, the current speed is 90. So the "error" is –10. And the PID calculation (for simplicity of this example of how 212 works) is +10. Sooooo, if 212 has a value of 128 then the PID correction, this time around, would be +5. As the value of 212 is reduced the number of iterations of the PID correction process that are required to reach a given target from a given start/error point will take longer and longer. Truly low values of 212 can produce a loco that is very ‘sluggish’ in terms of throttle response.

CV 213 is the specification of how often a BEMF measurement is taken. It is a frequency in a number of milliseconds – if the value in 213 is 23 then it takes a measurement every 23 milliseconds. Let’s use an example from real life … this is "how often does the nurse take your temperature?".

CV 214 is the duration of the BEMF ‘window’ (it is NOT the "D" in PID). It is how long the window is open. This is the "how long does the nurse leave the thermometer under your tongue?".

If you set the BEMF cut off level (CV 10) to a small value then the PID controller will be ‘in use’ over less of the entire speed range. This is, in general, a good thing. Values between 20 and 40 are recommended.

What does "starts moving" mean? Many of the tuning procedures ask you to do something until the locomotive start to move. There are 3 kinds of ‘movement’. There is the first little bit of movement – it may even be a little lurch – but the loco does not move continuously and will spend more time stopped than moving. The second phase is where the loco is moving but it may not be at a steady rate and it may not be "smooth". This is not "tie crawling" speed. The third phase is where the loco is definitely moving and is well above "tie crawling". You would still call it ‘slow’ but you wouldn’t call it very slow. For most PID tuning procedures when it says "until it starts moving" we are talking about the 2nd phase.

Locomotives should be tuned "light" (no train cars behind them). You need to know that the loco will perform well on its own. A loco with a train behind it may require more throttle in order to move at the same speed as it does light – and that’s a good thing and is a better simulation of an actual locomotive (and will sound better).

This is all I’m going to write up at this time. I intend to use this information in order to develop a procedure (or small set of procedures) that will allow you to find the best settings for the motor performance CVs - 209, 210, 212, 213, and 214 primarily … but also the BEMF cutoff, the momentum, and the trim CVs.

- Jim Betz (14 June 2010)"

 
 
Based on Notes from Steve Hatch, Jim Betz, and Bruce Petraarca
 

Mike Lehman

Urbana, IL

  • Member since
    February 2008
  • 6,811 posts
Posted by maxman on Tuesday, October 14, 2014 10:40 PM

mlehman
Those methods will work, but a lot of trial and error involved. They're good generic methods, so don't forget about them if you need them. On the other hand, starting with a known working set of CVs is helpful. I collected info off several lists and sites over the years, so can't take credit for this below other than compiling it and a couple of tweaks here and there.

(Plus a lot of other stuff that I didn't quote)

If all of that is required to get the chuffs/revolutions in sync with each other, I'm glad I'm a diesel person.  There just isn't enough time in any one's life to program more than of those Tsunamis.Smile

  • Member since
    November 2002
  • From: US
  • 4,580 posts
Posted by jacon12 on Wednesday, October 15, 2014 7:43 AM

Whew!!  Thank you all  for the tips and suggestions.  Mike, that is quite an exhaustive (no pun intended) treatise on the subject!  I'll have to print the above replys out and let my friend read them over and see if he really, really wants to delve that deep into getting the chuff rate right.  I think what is getting his goat the most is the chuff sound starting before movement of the loco.  I'll need to talk to him again to see if he cares if he'e getting 4 chuffs per wheel revolution at all speeds. To me it would be ok if you can get close on the slower speeds because I don't think I can count them at medium and high speeds.

Thanks again,

Jarrell

 HO Scale DCC Modeler of 1950, give or take 30 years.
  • Member since
    September 2003
  • 9,996 posts
Posted by mlehman on Wednesday, October 15, 2014 10:29 AM

It does help to have Decoder Pro to manage all those CVs, but just enetering them will usually get you in the ballpark. Then you can adjust CVs individually for effect. It's actually simpler than it sounds -- I know, a bad punSmile -- because you'll likley notice an improvement right away and it may be enough to satisfy the ear. It should also get you within spitting distance of the start issue.

On CVs where a range of values is indicated, start somewhere in the middle or at one end, then keep in mind which way you go in adjusting it across the range. The results can vary a lot depending on the mechanisms involved.

But the result is well worth it once things are dialed in, because you get much more than a realistic start. You'll actually hear the loco dig in on a grade with a load behind it and start drifting once it's going downhill again, all without needing to do anything else. It'll act a lot more like a real loco, because it'll be sensitive to the load you put behind it. Well worth a half hour or so it usually takes to get things done.

Mike Lehman

Urbana, IL

  • Member since
    August 2006
  • 1,224 posts
Posted by trainnut1250 on Thursday, October 16, 2014 2:14 PM

Jarrell,

Speaking to the point of getting 4 chuffs per revolution at all speeds - not gonna happen without wheel wipers.  The Tsunami auto chuff gives an approximation that isn't accurate across the speed ranges.  Most of us pick a medium slow speed and get the chuffs right for that speed and don't sweat the rest of it. (there is a wiper wire included on Tsunamis if you want to use it - don't know about factory installs)

BTW:  you can count 4 chuffs per revolution easier than you might imagine - think uu-gaa-chuck-aa per each wheel revolution and you can get a sense of where it should be (musical training helps - 16th notes).

What Mike is referring to in his posts are methods to fine tune the BEMF and slow start response of the TSUs which has been somewhat lacking in certain instances - mainly to tone down the so called Tsunami lurch at start...

Also included Mike's set up directions are the light load drift, heavy chuff under load and other cool features that change the chuff sounds according to load on the loco - definitely more advanced but worth exploring.

I regularly set up around 30-40 CVs in my TSUs and get good sound and operation from the decoders.  Even with step entry this doesn't take as long as you might think - I have delved much deeper into the sound mixing possibilities and things get too cumbersome using step entry - JMRI is definitely on the horizon.

Have fun,

 

Guy

see stuff at: the Willoughby Line Site

  • Member since
    September 2003
  • 9,996 posts
Posted by mlehman on Thursday, October 16, 2014 3:01 PM

trainnut1250
trainnut1250 wrote the following post 40 minutes ago: Jarrell, Speaking to the point of getting 4 chuffs per revolution at all speeds - not gonna happen without wheel wipers. The Tsunami auto chuff gives an approximation that isn't accurate across the speed ranges. Most of us pick a medium slow speed and get the chuffs right for that speed and don't sweat the rest of it. (there is a wiper wire included on Tsunamis if you want to use it - don't know about factory installs)

Guy,

Thanks for making that point.  I usually don't bother thinking about it, because narrowgauge runs slow enough and fast seems too unnatural, so my throttle stays within a relatively narrow speed range and the auto-chuff works well enough. So if you can get away with picking a sweet spot when the chuffs are working best and stay pretty close you're probably going to be OK with all but the most fastidious observers.

If you do need a coordinated chuff across a wide range of speeds, then adding a physical cam/wiper is the trick.

Yeah, once you have the steaming action down, then there are equallizers and reverb to play with on most of the other sounds, ways to automate some of them, etc. JMRI is on my future projects list to, as I need Decoder Pro.

Mike Lehman

Urbana, IL

  • Member since
    November 2002
  • From: US
  • 4,580 posts
Posted by jacon12 on Thursday, October 16, 2014 9:22 PM

Thanks fellas!  We gave it a try yesterday and yes.. it's easy to get it 'looking' right at about 15 - 20 scale mph but when the speed is notched up it gets way off again.  He's a lot more happy with it though.  I have a Bachmann Spectrum 2-8-0 with Tsunami sound that I'm going to play around with using Decoder Pro and speed tables to see what I can get it to do, but I'll keep in mind I really need the cam to get it correct.

Thanks for all ya'lls advice!

Jarrell

 HO Scale DCC Modeler of 1950, give or take 30 years.

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!