M&K Junction Railroad

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

Thursday, November 24, 2011

Track Templates

This story starts a few years back. On one of the layout tours associated with the 2008 O Scale National convention, I was at a huge P48 layout when I spotted some curved track-laying and turnout templates done in bright yellow acrylic. The templates had cutouts for the individual ties as well as gauge lines for the rails. They were marked Canter Rail Services and I thought that it was a neat tool; but since this was a very busy open house, and I did not even know who the host was, I could not ask about them.

After the convention I searched for a "Canter Rail Services", but I could not find any reference to them. Fast forward a couple of years to a O Scale train show in 2010 where I saw some of these templates lying on one of the sales tables. I inquired of the vendor and it was Jim Canter himself. It seems that he was not going to make these any longer and the stock on the table were all that was left. There were two templates for radii that I was using, so I bought those.



The Canter Rail Services templates for 68" (top) and 64" radii


They saw little use in building my railroad as I was still laying-out my curves using a beam compass; and I came to realize that unless I was actually hand-laying track these were less useful than I had first thought. That is, until I was building the part of the Cheat River Grade beyond the Tray Run Viaduct. In that area, I could not use the beam compass to lay out the curves as the pivot point of the beam would have had to be located on the other side of a stud wall. I pressed the little-used Canter templates into service and, although they were not perfect for this task, they worked well enough to make me consider giving up the beam compass.

So as I contemplated laying out the last two mainline curves on the layout I determined to make some more templates to facilitate this task. I decided on using a laser cutting service to cut the templates out of acrylic, just like the originals. However, I would redesign the templates to facilitate laying flex track as I was doing.

The first task was to design the templates in CAD. I used TurboCAD Delux. I've had various versions of TurboCAD since about version 5. It's not the easiest CAD program in the world to use, but it has the virtue of being cheap if you buy an older version. Google Sketch-Up would probably suffice and it's free.

I began by laying out a 72" radius template similar to the Canter ones. The Canter templates have the outer edge 2" longer than the marked radius and the inner edge 2" shorter than the marked radius so that when two templates of different radii are butted adjacent to one another the track center spacing is set for the nominal 4" for O scale. I followed suit on my 72' radius template.

I did not need the slots for the individual ties and cutting them on the laser cutter would be very expensive. What I did need was a slot down the middle, on the track radius, to mark the track center line. I layed-out a 0.080 inch slot down the center of the template on the 72" radius. The 80 thousandths slot would accommodate a pencil, pen or a Sharpie marker. In the corners of the Canter templates are four holes to allow the template to be fastened down; I replicated these holes. I sized the template to fit one of the standard sized sheets of acrylic that the laser cutting service provided. The result is shown below.



I sent this design to the laser cutting service to obtain a price. The cost of cutting this template was reasonable, less than the cost of the original Canter templates. That caused me to think about the large two-turn helix in the center of my layout.

I had been contemplating how I was going to cut each segment of the sub roadbed of this large spiral. I had wanted to have the sections cut on a CNC router, but I could not find such a service near enough to where I live to make it economically feasible; and shipping 20 or so sections made of 3/4" plywood would be very expensive. I could make a template and cut the sections out myself. However, besides being very time-consuming, I did not think that I could make a template accurate enough that it would result in a accurate two-turn helix.

Laser cutting the template would remove that last consideration. There are two tracks on my helix so I had to lay out a double-wide template with center lines for two tracks. I increased the track center-to-center distance to 4.5 inches to allow for the boiler swing of the articulated locomotives that I will be running. While I was at it, I increased the width of the template to 9.5 inches, 2.5 inches beyond the outer track center line and 2.5 inches inside the inner track center line - also for boiler swing. I sized the template to fit the short dimension of a 4x8 sheet of plywood to maximize the number of segments that I could cut from a single sheet.

Now, I would have to buy a larger sheet of acrylic at the laser cutter's so I decided to design one more template to fill up the sheet. I had 64" & 68" Canter templates, I had designed a 72" radius template, so I designed a 60" radius one for a curve that I had. That would give me a complete set from 60" to 72" plus the template for the helix. Since I was now cutting a larger sheet of plastic, there was no reason to make the 60" template the same size as the others and I made this one considerably longer. Here's the drawing for all three of the templates that I had laser cut:



These are, from the top, the double track helix template, the 60" radius template and the 72" radius template.

As this was my first foray into designing for laser cutting I was anxious to see how these templates came out. The three templates as they came from the cutter are show below.



I was impressed with the finish on the cut edges, they are almost polished by the laser. In the next picture, I have fitted the 72" and 60" to the 64" and 68" Canter templates; they fit together perfectly.



I had removed the protective paper from the 72" template before I realized that it would photograph poorly without it. Today I bought some lumber to begin using the helix template to cut the sections for the helix. Hopefully, I'll be ready to begin building the helix by Christmas.

Sunday, November 20, 2011

Fun with LEDs II

This is a continuation of the original post "Fun with LEDs"

The original post was linked to a forum and I solicited and received feedback to simplify the photos of a simple LED setup, that is, without the alligator clips. So I put on my thinking cap and tried to come up with the simplest way to light up an LED. Here's what I came up with.

Take an LED (color of your choice), a resistor (any value around 300 ohms) and a 9 volt battery. Then do the following:

1) Cut the anode of the LED (positive terminal) off to about 1/4 to 3/8 inch long.
2) Now cut off one wire from the resistor to about 1/4 to 3/8 inch.
3) Overlap and solder the cut end of the resistor to the cut anode.
4) Cut the other wire coming out of the resistor to the same length as the cathode (the outer wire coming out of the LED).

What you have now should look like this:



Your resistor might not match the one that you see here; yours may be one of the little 'dog bones' rather than the old school resistor you see in the photo.

Now:

5) Spread the cathode and anode as you see in the picture.
6) Wedge LED into the terminals of the 9 volt battery. BE SURE TO PLACE THE ANODE ON THE POSITIVE TERMINAL AND THE CATHODE ON THE NEGATIVE TERMINAL OF THE BATTERY!

You should now have a lit-up LED atop the battery like this:



The posters in the forum made a big deal about determining the proper value for the resistor. The calculated value for a resistor for 9V is 330 ohms; but if you know the resistor color code, the resistor that I used is 220 ohms (Red-Red-Brown). This resistor should be allowing 40 ma to pass; that's well above the published recommendations for most LEDs. It just illustrates that there is some latitude in the current that an LED can handle, but any time you go above 25 ma you are taking a risk.

Now that you can light-up an LED using DC of a known polarity and voltage what do you do if you want to light an LED with AC or DCC (DCC is a form of AC)? Or if you want to light an LED with DC that can change polarity each time direction is changed like an LED mounted in a caboose, passenger car or locomotive?

The simplest way is to add a rectifier to convert the AC, DCC or reversing DC to a constant and unchanging polarity DC for the LED. The process of "rectification" converts an AC signal which changes polarity many times a second to DC. Today's rectifiers are devices that combine four diodes in a 'bridge' arrangement that convert AC to DC. They will also take DC which switches polarity and convert it to constant polarity.

Bridge rectifiers come in a variety of shapes, sizes and capacity; see the photo below:



The little guy on the left is a 1 amp rectifier in a 'mini-dip' package; it's the one that we will be using. 1 amp is more than is necessary, but it's about as small as rectifiers come. Next to it is a button with four leads; this is a 1.4 amp bridge rectifier. This size/form factor could be used for our next design as well. To illustrate the other extreme in rectifiers, the rectifier on the right is a 35 amp unit used in the larger power supplies.

Here's a close up of the mini-dip rectifier:



You'll notice the two pins marked with a 'squiggle' (or tilde, ~ , if you prefer). These are the pins where the AC, DCC, or switching DC are applied. It does not matter which wire is applied to which pin. On the far side of the device, are two pins marked with a '-' and a '+'. These are the pins where the rectified, constant DC comes out.

This rectifier is All Electronics part number #FWB-11 (35 cents as of this writing). Other similar parts are: Digikey DF01MDI-ND (49 cents)and DB102-BPMS-ND (73 cents).

The first step in preparing the rectifier for use with the LED is to flatten out the pins as shown in the following picture:



Now take the diode/resistor assembly that you made above and solder the resistor side to the positive terminal and the cathode side to the negative terminal. What you wind up with is an assembly that looks like this:



If you have sharp eyes, you'll notice two things about this set-up. First I've changed the resistor to 1500 Ohms (Brown-Green-Red). Second, my soldering skills are poor; therefore if I can do it you can too.

I've changed the resistor because I'm going to run this circuit off of a higher voltage and I did not want to blow out the LED. 1500 Ohms is a lot better value to use for all-around use at track voltage or at DCC voltages. Again this is not critical, any value above about 680 Ohms should work. Ordinarily, I'd cover this circuit with heat-shrink tubing to insulate and protect the circuit, but I've left it exposed to show how it's constructed.

In the next photo, I'm running this circuit from 12V DC as you would if this were running off of DC track voltage:



To demonstrate that the rectifier will take care of polarity changes, in the next photo I've reversed the polarity of the incoming current:



You can see that the red and black wires have been interchanged. In the next photo, the circuit is running on DCC track output.



If you wanted to, you could replace the single LED with a series string of 2 or more LEDs, as was done in section 1. Since rectifiers are relatively expensive, this makes sense to do. Light an entire passenger car or structure from a single rectifier/resistor set-up.

Evans Designs makes a similar unit, with the heat-shrink tubing attached, in three sizes and several colors for $3.25 each. The Evans Designs LEDs have wire between the rectifier and the LED and wires for the incoming current; this makes them convenient to install. Evans Designs Universal LEDs Here's a photo a 3mm size LED running on 12V below:

From 2-Rail O Scale Railroading


Although these are somewhat more expensive than rolling your own, I use them extensively in locomotives and rolling stock.

To be continued...

Tuesday, November 8, 2011

Fun with LEDs

The following is an unfinished chapter in an e-book that I intend to write about practical projects for model railroaders. I'm publishing it now because on one of the forums the participants asked for an LED primer. Stay tuned for the complete chapter:

Fun with LEDs
Text and Photos (c) 2011 T. Terrance

Light Emitting Diodes (LED) are ubiquitous in the modern world. They have all but replaced the miniature incandescent lamp. In the hobby of Model Railroading it is hardly any different. Most recent locomotives come equipped with LEDs for lights; as do some signals, accessories and structures. LEDs are available in a wide range of colors and sizes. If you are planning to illuminate anything on your railroad, you might want to consider LEDs. This chapter will give you the knowledge to do so. If you are an old hand with LEDs you may want to skip what follows.

An LED is simply a small chip of semiconductor material that can emit light. It does this very efficiently and therefore uses very little current and emits little heat. The chip is encapsulated in a dome-like housing with a flange made of clear or translucent epoxy resin. Two leads protrude from the housing, a positive one called the anode and a negative one called the cathode. The following figures shows a typical LED, and the arrangement of its internal components and its schematic symbol (don’t worry, you don’t really need to know the latter two).





Schematic diagram of an LED:




The epoxy covering can be clear (sometimes referred to as “water clear”) or in one of many colors: red, green, yellow, blue and white being the most common; but amber, orange, pink, violet, warm white as well as invisible infrared and ultraviolet are available. The covering can be frosted (called diffused). The color of the LED is inherent in the chip, not in the coloring of the epoxy. The brightness of LEDs is usually measured in millicandellas; the more millicandellas the brighter the LED is.

Specialty LEDs that flash, flicker and alternate between colors are also available (more on those in another chapter).

LEDs come in a variety of sizes and shapes but in this chapter we will concentrate on the 5mm round (T 1 3/4 size), 3mm round (T1 size), 2mm round and square (T ¾ size) and below as the most useful for model railroads. These are readily available sizes. We will talk about “chip” LEDs in another chapter.

Nowadays LEDs are commodity items and many times you do not know who the manufacturer is; as in the LEDs bought from Radio Shack (no, Radio Shack does not manufacture them). This chapter will use commodity LEDs except where a special characteristic is required, then I will call out a manufacture’s part number and a supplier.

Enough of this background information, let’s get down to what makes LEDs different from regular bulbs.

1. LED’s must be powered with DC; bulbs don’t care.
2. LEDs must be hooked up properly to the positive and negative voltage; bulbs don’t care.
3. LEDs are sensitive to current and will fail rapidly and suddenly above a certain current.
4. Strings of multiple bulbs should be wired in parallel, stings of LEDs should be wired in series.
5. Regular bulbs get brighter with higher voltage until they burn out; LEDs get brighter with more current up until the current where they fail.
6. LEDs can last in excess of 50,000 hours.
7. LEDs can be switched on and off repeatedly without decreasing their life.
8. Small LEDs do not generate significant heat.

Items 1 - 4 are the key characteristics for working with LEDs. 5, 6 and 7 are nice to know, but do not affect how you work with LEDs. If you are lighting a wood or cardboard structure, knowing 8 comes in handy.

Characteristic 1 – LEDs must be powered by DC because they are a semiconductor device and not a glowing filament. There are ways to power an LED from AC with the addition of external components, but they have the net effect of rectifying the AC to DC for the LED. Remember, DCC is a form of AC so an LED cannot be connected directly to a DCC track output either.

Characteristic 2 – LEDs must be connected correctly to the positive and negative voltage to work properly. Not only to work properly, but even to survive. If an LED is hooked up backwards, and the voltage is high enough (say, above 6V) failure of the LED can be instantaneous. The following figure shows how to identify the anode (positive terminal) and cathode (negative terminal) of a typical LED.




The cathode (negative) is the shorter wire and the epoxy housing has a flat edge on the flange next to the cathode (rarely it’s not a flat edge but a notch in the flange). The longer wire is the anode (positive). The flat in the flange allows you to identify the cathode even after the leads are cut short to install the LED. But you cannot just hook up a battery to the LED which brings us to...

Characteristic 3 – LEDs are sensitive to current and will fail above a certain current. OK, we have to talk about some theory here. When a diode, any diode including LEDs, is hooked up with the positive terminal attached to positive voltage and the negative supplied with negative voltage a current will flow through the diode. That’s what diodes are designed to do, they are a one-way valve for electricity. A diode will allow a LOT of current to flow, in fact, it appears as almost a dead short. Some diodes can handle large currents, as in the diodes used in rectifiers. The small LEDs we are dealing with here, however, can only pass a very small amount of current without burning up; typically 20-25 milliamps (25 thousandths of an amp). If you just hook up an LED to a voltage source a LOT of current will flow and the LED's life will be VERY short indeed.

To prevent burnout we need to limit the current flowing through the LED to a safe level. This is accomplished with a resistor. A resistor, as the name implies, restricts (resists) the flow of current. A resistor in a series circuit (i.e. in line with) with another device will limit the current flow through the device. To choose the value of the resistor we use one of the fundamental relations in electronics – Ohms Law.

V/I = R

In the equation above, I have written Ohms Law to find the resistance (R) for a voltage (V) and current (I). For example, if we are using 12 V, and desire a current of 25 milliamps (0.025 amps) then...

12/0.025 = 480

So a resistor of 480 Ohms will result in a current or 25 milliamps (ma) at 12V.

If you don’t care for the math, or just want a quick reference, here is a table of common values to produce 25 ma.

Voltage

Calculated Resistor

Value (Ohms)

Nearest “Standard”

Resistor Value




3 V/3.3V

120

150

5/6V

240

270

9V

360

390

12V

480

470

15/16V

640

680

18V

720

1000

24V

960

1000




The calculated resistor values are not readily available as ‘standard’ resistor values, so column 3 has the closest resistor that you are liable to find in an electronics store. In almost all cases the resistance value is higher, therefore the current will be lower; but this will not significantly effect the output of the LED. If this table is still too much to comprehend, use this rule of thumb: for most model railroad applications use a 680 ohm resistor – you won’t be too far off.

Drawings of small resistors and the resistor’s schematic symbol are reproduced below.






Notice the color stripes on the resistors. They tell you the value of the resistor. Rather than go into a tutorial on the resistor color code, I will call out the stripes on any resistors that we will use. If you are interested in the resistor color code you can look it up using on-line resources. Here’s a particularly good resource that has tables of resistor values and their corresponding color codes: Resistor Col
or Charts

Now we can begin lighting up some LEDs. We’ll build the following test circuit using an LED (any color will do), a 270 Ohm resistor (Radio Shack 271-1112 or similar), a 5-6VDC power source (5V power supply, 6V battery pack, or power pack track output [DC] set for 6V) and 3 alligator-clip test leads. The 270 Ohm resistor will have red-violet-brown stripes on it, in that order.

A schematic diagram of the circuit would look like this;



The end of the LED symbol with the vertical bar indicates the cathode (negative) end; and the side with the arrow head indicates the anode (positive) end. The circuit operates because electricity flows from the positive voltage (V+) through the resistor, which limits the current, thence through the LED causing it to illuminate and returns to the source of the electricity through the negative return line.

Here is a picture of the circuit laid out on my workbench.



Power is coming in from a 5V power source located off-camera to the left; red is positive. Next it’s connected to the resistor, which can be connected from either end, as it has no polarity. The positive current is then connected to the anode lead under the LED at the right. The black alligator-clip test lead is clipped on to the cathode of the LED (the one next to the flat). Thereupon it returns to the negative terminal of the power source. As you can see, the LED lights up

If your eyes are really sharp, you’ll notice that the color code on the resistor is red-red-brown, which makes it a 220 ohm resistor; since this is a 5V source, the current should be about 23 ma, so it’s safe.

This circuit, or one like it, can be used to illuminate structures, street lamps, car headlights, any stationary object where you can be sure what the polarity of the current is.

What if you need the light of more than 1 LED? LEDs can be connected in series strings, as shown in the next photo.



Power still comes in from the left on the red and black wires. But the circuit has been reworked to connect the cathode of the first LED to the anode of the next and so on, cathode to anode, until the last cathode is connected back to the power source. The single resistor limits the current flowing through the entire string.

The schematic diagram for this circuit looks like this:



This brings us around to characteristic 4 from the list at the beginning of this chapter.

Characteristic 4 – LEDs should be wired in series. When you wire bulbs, they are wired in parallel, that is, one wire from each bulb is connected to the positive and the other wire is connected to the negative. In this way, if any bulb burns out all of the rest stay lit. LEDs could be wired in this way, but each LED would require its own resistor to limit the current. Since LEDs with the proper current limit are unlikely to burn out, there is no reason not to wire them in series and use a single resistor for the whole string. That’s what I did above.

However, to pull off this trick we have to make an adjustment in the circuit. Each LED uses a little of the electricity as it passes through the device and this use of electricity results in a voltage drop. The voltage drop is about 2V for each LED; a little more for white LEDs and a little less for other colors, but 2V is a good approximation when you do not have the specific parameters of the LED. Therefore the string of LEDs in the photo above is not running on 5V, 5V would not be ‘strong’ enough to cause current to flow if each LED used 2V (4 x 2V = 8V drop). So I upped the voltage on the circuit to 12V.


Continued in Fun with LEDs II