M&K Junction Railroad

M&K Junction Railroad
Another train of eastbound coal crosses the Cheat River

Friday, June 29, 2012

Stuff You Might Not Need to Know

For some time now, I have been working on a way to adapt typical HO decoders to run large and power-hungry O scale locomotives.  Recently, I abandoned my original approach and have adopted a simpler, more obvious technique and the results so far are very promising. The payoff in this is the ability to adapt HO sound decoders to run in O Scale locos. I have written up part of this work into an article for "O Scale Trains" that will be published in the March/April 2013 issue, so look for it.

Continuing my investigation, I had need to look into the way decoders drive motors.  In particular I wanted to determine the duty cycle of the Pulse Width Modulation (PWM) used by several decoders.

*** WARNING - GEEK ALERT ***  

If the paragraph above is causing you discomfort, you may want to stop reading now. This post is going to go a lot deeper into electronic esoterica than the series I am writing about practical electronics projects for model railroaders.  So if you are feeling queasy, stop reading now before your head hurts or explodes :-).  However, if you are interested in electronics or are an intrepid adventurer, read on.  I will explain all of this as best that I can and there will be pictures along the way and a video to help explain the concepts.


Ever since the introduction of the transistor throttle, model trains have not been run on pure DC.  In fact, the cheap "train set" power packs of my youth used a half-wave rectifier to run the trains which is a crude and ineffective form of pulse power.


The early transistor throttles each had its own way of applying pulses to the train to improve performance; and some brands, like MRC, introduced different techniques into their products as time went on.  These techniques are not at issue here except to mention some of them.  Pulses could be introduced on top of the steady DC to help break the motor's inertia.  Eventually throttles were introduced that produced only pulses that increased in frequency as the throttle was advanced.  This technique is called Pulse Frequency Modulation (PFM) or Pulse Space Modulation (PSM).  Another technique used pulse at a fixed frequency and varied the width of the pulses with the throttle setting.  This is called Pulse Width Modulation (PWM).  And, if memory serves me, at least one power pack combined the two techniques using both PSM and PWM.  You can look up all of these techniques on the Internet to find fuller descriptions.


Today, almost all decoders utilize PWM to control the motor speed.  This is, in part, because the popular lines of microcontrollers used in decoders have built-in PWM generators and partly because many decoders are following published circuits for motor control which also use PWM.


The next series of photos shows how PWM works.  These pictures are the output of an NCE D13SRJ decoder shown on an oscilloscope.




In the photo above, the decoder has just begun to drive the motor.  The decoder is being controlled by a Lenz Compact DCC system which has a knob throttle.  A Lenz LH-100 throttle might have been better as the push button throttle would allow for increasing/decreasing speed in discrete units of a single speed step.

As the oscilloscope is set-up for this measurement, the two pulses shown on the screen rise from zero (the horizontal line at the center of the screen), up to the full voltage (about 12V). From the edge of one pulse to the similar edge of the other pulse (either left edge to left edge or right edge to right edge) is 56 micro-seconds which is (I'll do the math for you) about 17,900 Hz.

The motor connected to the decoder is running slowly at this setting because each pulse is only 5-6 micro-seconds wide.  17,900 pulses at 5 micro-seconds each means that the motor sees only 89,500 micro-seconds out of every 1 second (1,000,000 micro-sceonds).  And, doing the math again, it's only powered about 9% of the time - that's the duty cycle, the time that the motor is on versus the time that the motor is off.  The only reason that the motor runs at all at this low duty cycle is that each pulse is a full 12V and gives the motor a short "kick" to get it turning.




Several steps of the throttle later, the waveform looks like this.  The edge-to-edge measurement is still 56 micro-seconds and the height of the pulses is still 12V; but, as you can see, the width of the pulses have increased.  The duty cycle has increased.  Now the motor connected to the decoder is running faster becasue the power is on for a longer time.








Increase the throttle some more and the pulses continue to widen.  They will eventually merge into a single waveform and, essentially, become almost pure DC.  The next video shows the progression from minimum to max throttle and back again so you can see how the waveform varies.








Now I had my information about the duty cycle and how it increases from minimum to maximum throttle; and now you know too.









Friday, June 8, 2012

More Progress

Lately, I've taken the opportunity to write several articles for the various magazines and so far one, and I hope more, will be published.  In the meantime I have been making some small progress on the railroad.

The Cheat River Grade backdrop has been painted a sky blue while I decide on a photo backdrop for this location.  I've also spray and brush painted the rails on the grade as you can see from the following photos.



I spray painted the entire flex track, rails and all , with Floquil Rail Tie Brown to kill the unnatural chocolate-brown color of the Atlas O flex track..  The rail tie brown has good adhesion to the nickle silver rails and prepares then for the next step.  After a couple of days for through drying, I went back and brush painted the rail using the technique that I have described previously in this blog see Weathering Track.

I think that the rail looks great with its tops painted in this realistic rust color, but the trains will not run on it in this condition.  Rather than sand the tops of the rails clean as I have done in the past, I wrapped a towel around a piece of 2x3 and wetted it with a product called "Goof Off".  Goof Off is a remover for dried-on paint.  I then rubbed the tops of the rail with this pad to remove the paint from the tops of the rail. 

The advantage of this technique over sanding is less dust and the rail is not scored by the sandpaper, thereby keeping it smoother and less likely to pick up dirt.






Thursday, May 31, 2012

Update on PC Power Supplies

Text and Photos © 2011-2012 by Terry Terrance



If you haven't already done so, please read the original post on How to Convert Used PC Power Supplies for Your Model Railroad.

Since making that post I have been unhappy about the fact that these power supplies cannot be connected in series to produce sufficient voltage to run a DCC system. There are circuits that can convert DC at one voltage to DC at another voltage, either up-convert (boost) or down-convert (buck). These are called DC-to-DC Converters. DC-DC down-converters are fairly common but, even when you find them on the electronic surplus market, they are not inexpensive; and they usually do not have capacities in the multi-amp range. DC-DC up-converters are harder still to find and suffer from the same high cost and low capacity just like the down-converters.

There are many integrated circuits (IC) on the market that can be used to easily design an up-converter. However, doing so and building the circuit is beyond the abilities of some model railroaders.

A few weeks ago, I came across this circuit board being offered on e-bay from a vendor in China. Before the red flags go up (pun intended), I've ordered from Chinese vendors before and all of the transactions have gone smoothly by using Pay Pal.




This board is exactly what I was looking for. It will boost DC input voltages from 10-32 volts and produce an output voltage between 12-35V DC. The maximum output current is 6 amps. This is item number 090421 from a vendor whose handle is "jennyear".  Cost is $13 with free (albeit slow) shipping.

The four screw-terminals on the end is for the inputs and outputs.  Connecting the wires is straightforward.

I proceeded to test the circuit. I connected 12VDC to the inputs and a voltmeter to the outputs. I adjusted the potentiometer (the blue component with the screw on top) on the board to get an output of 19V, as you can see in the next photo.




Notice that right behind the terminal strip there is an LED which is illuminated when the board is powered up.  19V is sufficient to run most DCC systems; besides if you keep the input voltage to your DCC system as low as practical, you'll get the maximum DCC current output, plus you'll minimize the generation of heat in this circuit. So far, so good.

Next I connected a power resistor (measured 20.2 ohms) to the output and put the meter in current mode to test for the output current. With an expected output of an amp at 19V, you cannot use an ordinary resistor for this, it will go up in smoke.




The power resistor is the device at the center. The 0.94 amps shown on the meter is the proper output for the voltage and the value of the resistor. After a few seconds of this output, the resistor became uncomfortable to handle, however the circuit board was still cool; very promising.

The next photo shows the trade-off for getting a higher voltage output from a lower voltage input.  The power supply providing the 12V input is supplying 1.62 amps to get the 0.94 amp at 19V out.


This will not generally be a problem as your PC power supply can likely provide more than enough amps at 12V to get a 5 amp output at the 16-22V required to run a DCC system.

Next I took two 10 ohm power resistors and connected them in parallel to produce an approx 5 ohm resistance (I measured this at 5.5 ohms but this cheap multimeter is known unreliable at measuring small resistance values).  This time I connected it to a PC power supply as the bench supply that I used in the first test would not supply enough current. As expected, the circuit output more current into this lower resistance; 3.6 amps as shown in the next photo.


At 19V/3.6 amps output the heatsinks on the circuit were warm and not excessively hot. I do not have any resistors of high wattage and low  resistance to test this circuit further.  However, I believe that an output of 19V/5 amps (95 watts) can be achieved.

Without further testing, here are some suggestions for finishing this circuit for use with a DCC system.  First and foremost you must fuse the output.  Even a momentary short circuit will fry the ICs that comprise this boost converter.  I'd use a fast-acting 6 amp glass fuse (GMA-6A) and matching fuse holder.  That may be hard to come by locally (although Home Depot does list these fuses on their website), so the fall back would be to use a 5 amp automotive blade fuse and fuse holder which you can find at your local auto parts store.

Use heavy wiring when wiring this circuit to your PC power supply and to your DCC system.  You'll be carrying heavy current out of this circuit and even heavier currents will be feeding into it (probably in excess of 12 amps).  14 gauge would be a minimum.  Be sure to heed my admonition in the article on converting PC power supplies to aggregate several distinct black (ground) and yellow (12V) wires from the power supply for the inputs to this circuit.

House this circuit in a metal project box; and a ventilated one would be much better as the circuit will produce heat during operation.

Adjust the circuit for a voltage a 2-3 volts above the minimal voltage needed to run your DCC system.  The output of this circuit may sag under load (however, it was a stable at 19V with the 3.6 amp load) and you want it to stay above the minimum for your DCC system.  Do not exceed the maximum input voltage for your DCC system.

Once connected to your DCC system, test that the circuit can supply sufficient output to allow the fast-acting DCC circuit breaker in your system to operate.  Put a dead short on the tracks and test that the DCC output goes to zero instantly.  If not, the circuit cannot handle the current surge and should not be used.

That's about it.  At some point in the future I will use this set-up to power a Lenz Compact DCC system for my bench.  At that point I'll write another blog post with the results.  If you get around to doing something first, let me know the results.







Roster Shot


Some time back, I wrote a post about an old school "box of sticks" boxcar kit that I had nearing completion after starting it more than 20 years previous (see Oldie But Goodie?). Well it's taken a couple of more years to finally get it done but, as you can see, it's on the layout, painted and operational. 

There was a great sense of satisfaction in finally finishing this project.  This is in spite of the fact that I could have purchased an Atlas O Trainman model of essentially the same prototype for about $42, taken it out of the box, put it on the rails and have been done with it.  Arguably my model is inferior to the Trainman RTR.  My model is missing a few details (most notably some of the grabs and the brake staff and wheel, which I will remedy); however, my brake rigging (borrowed from an Intermountain kit) is freestanding rather than the cast on blobs of the Trainman.

Where a kit like this really shines is in confidence building.  It probably took me as long or longer to build this kit as it would have taken to scratch build it.  However, faced with the terra incognita of scratch building this prototype, I might never have started.  The kit gave me a road map, however sketchy, for turning a box of sticks into a boxcar; and the confidence that someone, somewhere at some time thought that this could be done, therefore I should be able to do it as well.

It's a shame that these types of kits are no longer available as I have found that they can be great builders of proficiency.  But wooden kits have long been relegated to ancient history and the more recent cast-resin kits are on their way out as the makers of resin kits retire. 

Speaking of cast resin, I have a bunch of these kits and one is under construction and is next up for completion after I finish a Red Caboose tank car kit.  Stay tuned.

Monday, May 7, 2012

On Grades and Helpers

For starters, here's a quick video that I shot entitled "The Cheat River Grade Helper":




After shooting this video, I realized that I should do something about the bare backdrop on the Cheat River Grade. I cannot make a photo backdrop right now, but maybe I can at least paint the backdrop a sky blue.

 In my previous post, I remarked on the necessity for using helpers (or more head-end power) on the Cheat River Grade. This grade is 2% and nearly matches the prototype. In building my model railroad I have used Charles Roberts' book: "West End" as my "bible". My experience with needing helpers on the grade caused me to review the section in Roberts' book on equipment. Roberts compiled statistics on how many cars the prototype could pull up the grades. He used an interesting metric, number of cars puled per powered axle. Using this as a metric eliminates the differences in wheel diameter, steam vs. diesel, etc. What he found was that over the period of time from 1850 to 1991, the B&O could haul between 2.1 and 2.4 cars per powered axle up the grades. That is essentially the same result that I have obtained after testing with several model steam and diesel locomotives; between 2 and 2.5 cars per powered axle (and the latter number with a lot of wheel slip).

I believe that John Armstrong observed in one of his books on layout design that given needle-point axles model locomotives will pull more on the grades and less on the flats than prototype locomotives. He further observed that to create a helper grade that would seriously challenge model locos, 3% was about right.  I would certainly never dispute John Armstrong, but in my particular case the grades and, especially, for the combination of curves and grades, 2% seems to be about right.

It will help that most of the hoppers going up the Cheat River Grade will be empty (unlike the video above, which was just for fun) and I can arrange that most of those will be plastic models.  But the loaded hoppers coming down the Cheat will have to go up Cranberry Grade, also 2%; and these hoppers will be loaded.

During the period 1949-1952, the B&O used A-B-B-A sets of F7 diesels as pushers to help trains headed by, typically, a 2-8-8-4 articulated up both of these grades.  Assorted 2-8-8-0s and Q4 2-8-2s (as seen in the video above) were also used as pushers.  I intended to use A-A sets of diesels and Q4s as pushers.  The eight powered axles on the diesel pushers would be about 16 cars capacity, that should be OK.  The four powered axles on the Q4 would only be 8 car capacity - that might not be enough.  Matching the pusher to the train length could make the operating game more interesting.

Sunday, April 29, 2012

Open House Recap

On Saturday April 28 I held my third open house. Nine people attended and, I believe, that a good time was had by all. Five of the nine were new guests. Two came down from Gettysburg, PA and one came up from the Richmond, VA area. I do live out in the sticks and getting here is a bit of a chore which, unfortunately, tends to keep turnout down.

On Tuesday the 24th, I stopped new work on the layout. I could have laid about another 10-15 feet of track, but it became obvious that I would not be able to connect the two ends of the mainline by Saturday; so I decided not to push it any further and begin the cleanup of the layout and check-out of equipment prior to Saturday.

It's a good thing that I did. I have only one lighting circuit in the basement.  There are a lot of lights in the basement.  During construction, I usually have all of the lights over the aisles on and only those lights over the layout in the area where I am working.  I was not sure that if all of the lights were on at once, it would not pop the circuit breaker.  The total load is not easily calculated as you can add up the wattage of all of the florescent tubes, but it's not easy to determine the current consumed by the electronic ballasts.  I suspected that I was near the limits.  Friday night I deliberately turned on all of the lights and waited to see what would happen.  The lights stayed on and, after a while, I forgot about it and went on testing rolling stock.  Unexpectedly, I was involuntarily plunged into "night operations" as the breaker opened (the loco headlights and control panel lights were cool!).  The solution, at least temporarily, was to turn off all of the aisle lights when all of the layout lights are on.  Since I still have more layout lights to install, long-term, I'll have to move some lights to another circuit.

I resolved a tight-gauge problem with a curved turnout that I laid in one of the helix tracks to make up for the over sized scissors crossover (Unfortunately due to time pressure I did not document the construction of this turnout, but let me say that it runs very well).

With insufficient time to thoroughly wring-out the track on the helix, I decided to make up two trains to run up the helix and check out these trains for proper operation on the helix.  One train was a mixed freight made up of 8 plastic cars plus caboose and pulled by a plastic Weaver RS-3 (still in Rock Island paint).  The other was a 7 (later 8) car train of coal hoppers made up of five die-cast hoppers and three plastic hoppers (filled with coal loads).  This latter train was pulled by a die-cast Weaver Pacific steamer.

Now that I had a lot more track to run trains on, these trains began to tax the capabilities of the locomotives.  As the trains pulled the grade approaching the helix and, especially, once the trains were entirely on the curve of the helix, the motors were really straining, as indicated by their noise.  This was particularly noticeable with the BEMF decoder in the steamer, it was really pulsing the motor.

There was some minor wheel slip on the coal train with 7 cars (5 of which were heavy die-cast), when the 8th car was added Saturday morning, wheel slip was very noticeable.  Engineers had to actually work this train using techniques like making a "run for the hill" and managing the throttle to minimize wheel slip.  Now I had an answer for a long-standing question of mine, would the grades be sufficient to actually require helpers?  The answer, of course, is yes.  I will add some weight to all of my locomotives and, once I have helpers running, no "five-finger assists" will be allowed.

The old-hand attendees remarked on how much progress had been made since September's open house.  New guests had a lot of questions about the layout's design and construction.

Saturday was gloomy and overcast here in Northern VA, so the planned cook-out was scrubbed and we had an indoor sandwich buffet.  My good wife made several dozen (must have been 4-5 dozen) homemade chocolate chip cookies (her best batch yet!) and they were almost all eaten during the course of the day.

After lunch ended a few stayed on and the topic turned almost entirely to operations.  I outlined my concept of operations, based on actual B&O helper operations out of M&K junction including a couple of ideas I had to make the game slightly more realistic.  I believe that my concepts were well-received and, since one of the guests was an actual brakeman, I consider that high praise.

No group picture this time since we were not outside to take one.  But while the layout is reasonably presentable, I took the following pictures as a tour for those who could not attend.


M&K Junction (still unfinished) above.


On Cranberry Grade (above).


The curve through Rowlesburg, WV (no, the track is not actually super elevated, I did that with the camera).


Further up Cheat River Grade (done in the style of the railroad publicity photos of old)


Entering the helix.


Climbing the helix.


About to penetrate the backdrop


Through the backdrop. Entrance to the helix is below. (this view will eventually be covered by scenery)


Second turn of the helix.


End of track on the helix.

Friday night before the open house I put together a movie.  I must apologize for the quality of the sound.  The sound is from a older Soundtraxx DSX decoder recorded separately and dubbed onto the video; therefore synchronization is not the best.  Also I did not turn off the air pump, which comes on at inappropriate times.  But you can always turn off the sound; it's too loud too, so you'll probably want to turn it down in any event..  Click in the play bar to turn on HD, if you have the computer and connection to support it.




Wednesday, April 18, 2012

The Hole In The Wall

Well, not in the wall precisely, but in the backdrop. For some time I've known that the second turn of the helix would have to pass through the backdrop on the Cheat River Grade. I've been putting off the job of cutting the hole, but it can be put off no longer.

One reason for dreading this task is it will intrude on what is a nice alcove at the end of the Cheat River Grade. I will be able to camouflage it, and do so in a way that is true to the prototype entrance to the Kingwood Tunnel. The other reason for putting this off was the actual job of how to measure and cut the opening.

The helix sub roadbed has been built to a point just short of the backside of the backdrop for some time while I figured out a way to accurately measure where it will penetrate the backdrop. I solved this problem by clamping a laser pointer to the sub-roadbed and marking the backdrop where the pointer indicated. From that datum, I measured out the dimensions on the opening. This worked well and I only had to widen the opening by about an inch to make everything fit and align.

Here's what the opening looked like just after cutting.



This is the backside of the backdrop and the hole opens into the alcove at the top of the Cheat River Grade. The next shot shows the hole from inside the alcove.



That's the end on the Cheat River Grade in the lower foreground; one track (of two) is laid and enters the helix to the right.

Here's the sub-roadbed being extended through the backside of the backdrop.



And from inside the alcove:



From this angle you can see how the track enters the helix at the bottom; the second turn of the helix is, of course, penetrating the backdrop. You can also see how the track snakes between the lolly column (the red column), and various parts of the support for the basement stairs. A lot of track is squeezed in here on two levels.

Speaking of the helix, here's one track entering the helix.



Here's that same track as it begins to wind it's way up the first level of the helix (the second level is yet to be constructed at this point).



More helix to build and a lot of track to lay before the 28th of April.