Trains.com

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!

DCC CV 3,5 and 6

15754 views
23 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    February 2017
  • 59 posts
DCC CV 3,5 and 6
Posted by originaldirtguy on Friday, March 17, 2017 11:49 PM

I am wondering what the purpose/advantage is to setting a low, mid, and top voltage using CVS 3, 5 and 6. I thought the max voltage was always sent to the motor via PWM. Can someone offer a little insight on this? Thanks. 

On YouTube at It's My Railroad

Moderator
  • Member since
    June 2003
  • From: Northeast OH
  • 17,205 posts
Posted by tstage on Saturday, March 18, 2017 12:26 AM

It's just a quick 3-step method for setting the start voltage (CV3 CV2), maximum voltage (CV5), and mid-voltage (CV6) to any DCC-equipped locomotive.

Prototype locomotives had different top speeds.  For example, an SW1 switcher would never go as fast as a EMD E8; nor an 0-8-0 switcher as fast as a 4-6-4.  By adjusting the value of the maximum voltage (CV5) from, say - "255" to "128", you've quickly cut your top speed roughly in 1/2 so that the switcher will never exceed it's maximum prototype speed with the DCC throttle at speed step 128 (open wide).

The value for start voltage (CV3 CV2) can be raised or lowered so that the switcher just starts to crawl at speed step 001.  Mid-voltage or mid-range adjusts how quickly or slowly the speed of the locomotive increases between speed steps AND where between start voltage and maximum voltage it will increase the quickest or slowest.

The other method is to add values to what's called a speed table.  This requires you to add a value for 28 individual CVs, or CV67-CV94.  So, CV67 would be your start voltage, CV94 your maximum voltage, and CV68-C93 would increase either linearally or exponentially; depend on what values you entered for those CVs.  This method allows for more fine tuning of a locomotive's speed by adjusting the individual voltages between start voltage and maximum voltage.

Unless you use Decoder Pro, it's somewhat laborious to set up a speed table.  So, setting CVs 3 2, 6, and 5 (not all decoders offer mid-range) makes this a much easier and quicker method to accomplish the same thing.

Does that sorta make sense?

Tom

https://tstage9.wixsite.com/nyc-modeling

Time...It marches on...without ever turning around to see if anyone is even keeping in step.

  • Member since
    January 2009
  • From: Zagreb / Croatia /Europe
  • 259 posts
Posted by Spalato68 on Saturday, March 18, 2017 1:49 AM

Tom,

just one small correction to your excellent explanation: CV 3 is not used for adjusting starting voltage, it is used for acceleration. Starting voltage is adjusted with CV 2. 

Hrvoje

  • Member since
    February 2017
  • 59 posts
Posted by originaldirtguy on Saturday, March 18, 2017 9:51 AM

Actually, I wrote that wrong. CV2 is start voltage. 

So, what is the purpose of PWM if it is only a change in voltage that changes the motor speed?

Or, am I over thinking this?

On YouTube at It's My Railroad

  • Member since
    March 2012
  • 63 posts
Posted by crusader27529 on Saturday, March 18, 2017 10:06 AM

PWM IS used to control the motor......think of setting the voltages as the AVERAGE voltage that the motor sees.

 

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, March 18, 2017 11:04 AM

 The CVs do not change the PWM voltage PEAK. At least for CV5, max voltage, you can think of it like a physical stop on the throttle knob - you can't turn it any higher than that.

 As you start from speed step 1, the pulse being sent to the motor is very narrow. Motors are inductive, thus they react to the average voltage, not the peak. The average of a very narrow pulse of say 15 volts is very low. As you increase the throttle, the pulse gets wider and wider. As it gets wider, the average increases, and the motor responds by speeding up. The peak is always the same 15 volts or whatever. Setting CV2 controls how wide the pulse is on speed step 1. Setting CV5 controls how wide the pulse is on the highest speed step, 28 or 127. Setting CV6 controls how wide the pulse is at the middle position, 14 or 64.

 Say you have a loco that at full throttle runs at 100 mph, but the prototype should only go 60. As you turn the throttle from stop to max, you have a range of 0-100mph. You adjust CV5 until the loco goes 60 at full throttle. Now as you turn the throttle from stop to full, you are controlling a speed range of 0-60mph. With the same number of speed steps. So each step is a smaller increment.

CV2 is alittle more tricky. This is more dependent on physical characteristics of the loco than any conformance to prototype operation. A motor will require some minimal voltage to turn. Depending on the motor, that may not be reached until you are on step 10 out of 127. This manifests as a 'dead' area in the control where you turn the knob and nothing happens. By adjusting CV2, you can set the decoder so that the motor sees the bare minimum it needs to run on the very first step of the throttle. Again this also expands the granularity of the controls - before adjusting, steps 1-9 did nothing, the loco started moving at step 10. Now, the loco starts moving at step 1, and 1-9 all control the speed.

CV6 is of more use to matching multiple locos across the entire speed range (once you have the start and maximum speeds matched). Or configuring a loco by its use. FOr example, back in first gen diesel days, a lot of railroads used the massic FM Trainmaster for commuter trains. Not because a 3 or 4 car passenger train needed 2400HP to pull it, but because commuter trains by nature stop at every station and they need to get moving after each stop. The faster they can accelerate, the tighter schedule they can keep. If you make no adjustment to CV6, the mid throttle position will result in an average voltage to the motor that is exactly in the middle of the voltage at step 1 and the voltage at the top step as set by CV5. Speed increments as you turn the knob will be in a perfectly straight line between stop and top speed. If for example CV2 is 10 and CV5 is 210, the range is 200, and CV6, if not programmed, will behave as if it is set to 100. Right in the middle. If you set CV6 to something higher than 100 in this case, then the first half of the throttle will result in a greater change in speed than the second half. Say you set it to 160. 160 is about what 3/4 of the throttle would have been (keeping with the example numbers - if it goes from 10-210, the range is 200, 75% is 150, and there is that offset of 10 for the starting voltage, this is how I am coming up with 160). SO now when the throttle is at half way, the loco will be going 75% of its top speed, not 50%. This is more like that commuter train loco, picking up speed quickly after it stops. Likewise, you can do the opposite for say a switcher. With the same settings in CV2 and CV5, it may accurately represent a 60mph top speed, but even if capable, a switcher would rarely tun that fast. so you might set CV6 to 60. 25% of 200 is 50, plus the 10 offset again. Now, when the knob is at half, the loco will only be moving at 25% of its top speed instead of 50%. You still have half the steps on the throttle to get from 0-25% speed so you have very fine control over the loco at the lower speeds, perfect for coupling to cars without smashing them down the track.

 That is about the best I can explain CV2-5-6.

                               --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    February 2017
  • 59 posts
Posted by originaldirtguy on Saturday, March 18, 2017 12:38 PM

Thanks Randy. That helps alot and makes sense. I've got 5 nscale locos all responding very differently. I think this info will get me where i am going. Thanks again. 

On YouTube at It's My Railroad

  • Member since
    July 2006
  • From: Southern Quebec, Canada
  • 868 posts
Posted by Guy Papillon on Saturday, March 18, 2017 2:33 PM

rrinker

 That is about the best I can explain CV2-5-6.

                               --Randy

Very good explanation here Randy.

Can someone explain me the meaning of PWM?

Guy

Modeling CNR in the 50's

Moderator
  • Member since
    June 2003
  • From: Northeast OH
  • 17,205 posts
Posted by tstage on Saturday, March 18, 2017 2:45 PM

Spalato68

Tom,

just one small correction to your excellent explanation: CV 3 is not used for adjusting starting voltage, it is used for acceleration. Starting voltage is adjusted with CV 2. 

Hrvoje

You're absolutely right, Hrvoje - Thanks!  And I've corrected my response above to reflect that.  I guess that's what I get for trying to write something late at night. Tongue Tied

Tom

https://tstage9.wixsite.com/nyc-modeling

Time...It marches on...without ever turning around to see if anyone is even keeping in step.

  • Member since
    February 2017
  • 59 posts
Posted by originaldirtguy on Saturday, March 18, 2017 5:19 PM

Okay, so, I set CV 2 to 1, and 6 to 0, and no matter WHAT I set 5 to, the loco goes to warp speed at max steps. Using a TCS decoder, no sound. What am I missing?

On YouTube at It's My Railroad

  • Member since
    February 2005
  • From: Vancouver Island, BC
  • 23,321 posts
Posted by selector on Saturday, March 18, 2017 7:50 PM

Try setting CV 29 to 34.  Conventionally, that disallows the decoder from taking any signal on the track as DC voltage...which is the common culprit with runaway decoders whose owners wonder why they run away like that.

PWM is short form for pulse-width modulation.  It's the decoder's way of metering voltage in DCC form to make the motor behave more smoothly.

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, March 18, 2017 9:48 PM

 The neat thing about a lot of engineerign acronyms - the mean exactly what they say. Pulse Width Modulation means you vary (modulate) the width of a pulse.

 Back to the beginning - DC motor vary speed based on the voltage applied. Your traditional DC power pack varies the voltage applied to the rails and hence the motor. The problem is, no matter how you do this, a rheostat or a transistor, the voltage NOT going to the motor has to be dissipated, usually as heat. So (I will assume ideal compontns to make it understandable) if you have a 12V source, and the throttle is at full throttle, there is no voltage being cut, and no heat. But at half throttle, you have 6V going to the motor and the other 6V being dissipated as heat. This is no big deal when you consider the size of a typical DC power pack. Even those crappy train set ones are bigger than an HO loco. Try to make that circuit small enough to fit in a loco and you will have a hard time getting rid of the excess heat - the components would be too big.

 Enter PWM. With PWM, the controlling transistors are either fully on, or fully off - both cases where the transistor is most efficient and generates the least amount of heat. PWM uses a square wave and take advantage of the fact that the average voltage is dependent on both the peak (which never changes) and the width of the pulse - thus pulse width modulation. A short pulse has a low average voltage, a long pulse has a higher average voltage approaching the peak. By cnaging the pulse width you cnage the voltage the motor sees.

                                   --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

Moderator
  • Member since
    June 2003
  • From: Northeast OH
  • 17,205 posts
Posted by tstage on Saturday, March 18, 2017 10:03 PM

Thanks for the great explanation about PWM, Randy.  That's quite helpful.

So, is it fair to say that the DCC signal mimics PWM (DC) with it being either fully on or full off and the duration of each of those square waves?

Tom

https://tstage9.wixsite.com/nyc-modeling

Time...It marches on...without ever turning around to see if anyone is even keeping in step.

  • Member since
    December 2001
  • 1,932 posts
Posted by Stevert on Saturday, March 18, 2017 10:21 PM

tstage

So, is it fair to say that the DCC signal mimics PWM (DC) with it being either fully on or full off and the duration of each of those square waves?

Tom

Tom,

The PWM typically used in a decoder motor drive circuit is DC, because the pulses are either positive OR negative with respect to the decoder's common.  That's what gives you forward and reverse direction.  So for example, the orange motor wire will have positive pulses while the gray will be at zero potential (common or "ground").

OTOH, the DCC signal is square-wave AC, so either rail at any given point in the cycle can be either positive or negative, while the opposite rail will always be 180 degrees out of phase.  So when Rail A is at +15v, Rail B will be at -15v with respect to common or "ground".

EDIT:  Fixed typo.

  • Member since
    April 2004
  • From: Ontario Canada
  • 3,571 posts
Posted by Mark R. on Saturday, March 18, 2017 11:05 PM

originaldirtguy

Okay, so, I set CV 2 to 1, and 6 to 0, and no matter WHAT I set 5 to, the loco goes to warp speed at max steps. Using a TCS decoder, no sound. What am I missing?

You've got you MID speed set lower than your START speed - it's probably confusing the decoder. Your mid speed CV6 should be a value around half way between CV2 (start) and CV5 (top speed).

Mark.

¡ uʍop ǝpısdn sı ǝɹnʇɐuƃıs ʎɯ 'dlǝɥ

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, March 18, 2017 11:15 PM

 And that's how zero stretching works to run a DC loco on DCC track. A pulse under a certain threshold is a 1 bit, anything over that threshold (plus a bit extra to allow for overshoot and so forth) is a 0. If you make the zero bits wider on one half of the DCC signal (stretching the duration), the average voltage on that rail relative to the other one goes up and a DC motor will see an applied DC voltage.

 I suppose you could call it PWM, in this case it's using the PWM to convey a digital signal, rather than drive power. One of the first components after the track pickups in a decoder is a full wave bridge rectifier, which converts the DCC signal into DC. A regulator drops the voltage to run the microcontroller, but the rectified track power is directly used by the functions and also feeds the H bridge that drives the motor. That's why a stay alive gets connected to the decoder negative common, which menas soldering to the board for those not equipped to just plug in a stay alive, and the system positive common, which is the blue wire.

H bridge? Glad you asked. AN H bridge is 4 transistors in an H shape - one on each of the 4 corners of the H. The motor (or other load) is in the middle of the crossbar of the H. Top left and top right switch to positive, bottom left and bottom right switch to negative. Turn on top left and bottom right, and the left side of the motor gets + and the right side -, and the motor spins one way. change this so the top right is on and the bottom left is on, and now the right side of the motor gets + and the left side is -, and the motor spins the other way. It's like an electronic DPDT switch with the crossed wires to make a reversing switch. Yes, switch on two on the left or two ont he right at the same time and it's a dead short. The microcontroller prevents this, unless there is a bug in the code. The transistors of the H bridge are driven with PWM, that means that even rather small (physically) transistor can switch loads like 1.5 or 2 amps and not fry.

                          --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    July 2006
  • From: Southern Quebec, Canada
  • 868 posts
Posted by Guy Papillon on Sunday, March 19, 2017 7:27 AM

Randy,

Thank you for those comprehensive explanations of the more complex aspects of this wonderful hobby. Beer

Guy

Modeling CNR in the 50's

  • Member since
    September 2014
  • 1 posts
Posted by johnbarr on Sunday, December 3, 2017 10:23 PM

 

[/quote]The value for start voltage (CV3 CV2) can be raised or lowered so that the switcher just starts to crawl at speed step 001.  [quote user="tstage"]

So WHAT VALUE do I enter to get it to crawl? 0? 12? 

What does it do if I enter 0 or 1? 

 

Currently, there is a delay before it starts to move, and then it moves too fast.

Tags: CV2
  • Member since
    February 2005
  • From: Vancouver Island, BC
  • 23,321 posts
Posted by selector on Monday, December 4, 2017 10:18 AM

Ask your locomotive.  I'm not being facetious.

Each drive train has its own ideosynchracies. Each has a specific voltage requirement to get it to begin to move the locomotive.  So, this is very much an iterative process where you apply speed step "01" to the throttle, and if the locomotive doesn't begin to creep along, you enter 'programming on the main', with the correct address acquired (that of the locomotive in question), and enter CV3. You begin to enter successively higher values until you see the locomotive begin to nudge.  Exit programming, and that is where you drivetrain seems to be happiest.  When cold.  After it has been running the locomotive for a few minutes, it may move somewhat faster as soon as you enter speed step "01".  That is, a warmed drive needs less voltage to make the locomotive respond to initial throttle values.  We have to live with that.  If you don't like that performance, back off on the 'cold' value and live with just another speed step or two on the throttle to get a cold locomotive to begin to move.

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Monday, December 4, 2017 3:50 PM

 If there is a delay, then you may have too much momentum in CV4. If CV2 is already 0 or 1, the loco won't go any slower on step 1. If your system uses 28 steps by default, set it to 128 - you'll find the start speed drops dramatically.

                                  --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    July 2006
  • 39 posts
Posted by akriggm on Saturday, August 18, 2018 10:16 AM

Randy,

How do you go about switching a loco from 28 speed steps to 128?

Thanks,

akriggm

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, August 18, 2018 10:48 AM

 That depends on your DCC system. With my Digitrax, it defaults to 128, but I can change the command station to default all new selected locos to 28, or I cna so what they call 'status edit' to set an individual loco on my throttle to 28. NCE defaults to 28 but you can push the 28/128 button to switch to 128 and it remembers that loco address's setting. No clue what the others do.

Thee's no change required on the decoder side. If CV29 is set for 28/128 steps, the decoder will do one or the other depending on the signal it gets from the command station. 

                                       --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    January 2015
  • 257 posts
Posted by RR Baron on Saturday, August 18, 2018 11:08 AM

akriggm,

In another post you stated you are using Prodigy Advance2 DCC system

 "Prodigy Advance will set 28 speed steps as the default setting for that address. In order to operate your loco properly, you may need to change the speed steps setting to match the decoder’s speed steps.

To select other speed steps settings, press SPD STEP repeatedly until you see your desired speed steps setting. Then press ENTER. The selected speed steps setting will apply only to that address."

 Quote from MRC Prodigy Advance2 User’s Manual,  Page 2-2

RR Baron

 

  • Member since
    July 2006
  • 39 posts
Posted by akriggm on Saturday, August 18, 2018 11:23 AM
Randy, I'm using an MRC Prodigy Advance 2 system and it also has a button for changing the speed steps; I just never remembered/used that button before. Thanks for the reminder!! akriggm

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!

Users Online

There are no community member online

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!