ULTRA SIMPLE, GOOF RESISTANT

TRAIN CONTROL FOR VISITORS

ON THE TETON SHORT LINE

Wayne Roderick, 3rd Division, PNR, NMRA (life)

02/20/00 rev 02/20/07

ULTRA SIMPLE CAB (USC1)

When we started having grandchildren, it was time to get the next generation involved in our model railroading hobby. I've always felt that this needs to be done early, about age two, (months) in order to capture their lifelong interest. I built the town of GRAND and populated it with industries whose names reflect interests of the kids- The interests change leaving us a little humorous history. I developed the ultra simple cab control (USC1) for the town of Grand so they could have limited operation on Grandpa's empire without the need to repeatedly ask for assistance or permission. The integration theory is that they can switch and play with the few cars endlessly and not mess up the weekly operation session, because the cars remain in the same Town, if not at the proper industry.

East Grand is patterned after John Allens classic "timesaver" except that the tracks extend to nearby industries. The tracks are marked at spots where we can put end-of-track barricades and make it an operational replica. An old doggy diesel acquired from the Sunshine Mine on the Salmon River Railway is equipped with slow, but powerful Ernst gearing that makes it ideal for switching. It has a very pleasing gear grinding sound.

The code 70 turnouts, like the rest on the TSL are homemade, but in this case have no fragile mechanisms projecting above the terrain. The points are connected to a simple slide switch at the layout edge, just behind the facia. The switch contacts insures hot frogs.

The kids plug in a little old TYCO toy power supply that is set for a restricted safe speed and wired through the USC and then to the track. The USC is built into a six-inch piece of 3/4" light weight (200#) PVC sprinkler pipe at the end of a four foot, four wire tether. The tether plugs into the facia with a Jones connector that simply pulls out when you get too exuberant. You hold it in one hand, the uncoupling tool in the other and switch cars. The two control devices are 1/4" x 1" microswitches. Pressing one makes the engine go left, the other makes it go right. When you release pressure, the engine stops. Pressing both at once does nothing. Could it be any simpler?

USCpix1.gif

Well--- it didn't work. I must of left something out-?-? My four beautiful grandkids are growing fast, have zero interest in trains- :-( They are all girls- is that a factor? Can't be- not allowed in Americas current political climate- sigh :-(

Never-the-less, our visitors love it. Instant gratification with less than one minute of training. As the TSL version of the Digital Command Control (DCC) was being developed, I decided to keep four small yards or industrial areas running on the old simple analog DC. The small switch engines in these areas have no need to share trackage with the rest of the TSL and the task of converting them to DCC was undesirable. One of these yards is worked with a GE steeple cab under catenary- Another, West Grand, is worked with a detailed 0-6-0 and the third, the Termite Timber Line, is worked with a Shay or a narrow guage K-36, and it runs an automated doodlebug for continuous action. I can always park the local switcher on a spur and temporarily switch the rest of the yard to DCC when a road engine makes pickups or setouts.

ULTRA SIMPLE CAB, PHASE 2

The USC1 was just a little too simple;-) OK for the kids but us guys want more. It needed momentum effects and separate brakes as well as pulse power, overload protection and short circuit alarm while retaining the one handed operation, so we added a third BRAKE button between the original EAST and WEST and just a little bit lower on the PVC pipe so you can still just roll your thumb around. The three controls needed a little bit of wizardry to generate the pulse power and add the desired features, so we had to depart just a little from the pure "battery and ground" design of the USC1. Called on the TSL signal & comm' department and had the engineers build a circuit card for each cab that includes an embedded controller and H-bridge for pulse switching and direction control. The controller receives the operator commands from his four-wire tethered PVC pipe cab, processes them and ouputs the necessary info to the H-bridge and the loco does what we want it to do. Long ago, I determined that PRF of 40 pulse/sec works well with the old motors and that was easy to program into the stamp with the free PBASIC programming language from Parallax. Holding either EAST or WEST buttons will gradually accelerate the engine through 20 steps. Hitting the other direction button will first slow the engine to a stop before changing direction in case you're too lazy to use the BRAKE properly. The circuitry includes overcurrent protection and a warning LED in case of shorts. The circuit card has some option switches if you want to get creative in the programming.

USCpix2.gif

Sorry, I don't have circuit cards or layouts available because I usually handwire small projects on prototyping plugin cards, or re-use some old card from the junk box. This card is probably 30 years old and been re-used several times.

USCpix4.jpg

HOW IT WORKS: I used a Parallax Stamp, a neat little controller built on a 24 pin DIP that can be easily programmed to do great things with a PBASIC code. You connect it to your computers serial port and use the free software and documentation from Parallax to write the programs. It's great way for us old dogs to do some not-so-simple tasks. Todays design engineer will grab a microcontroller chip, AKA PIC, and write some assembly code in it, to make it behave any way he wants and that requires a learning curve that I'm too busy to undertake. Because things usually move fairly slow on the model railroad, we can compromise and use the much friendlier interpretive BASIC language even though it runs much slower.

YardCab Schematic

I actually use a "homebrew BS2" design from Peter Anderson to cut the costs a bit where I'm making multiple copies. The PBASIC code editing and loading is still the same. The tradeoff is three chips, a voltage regulator and a few discrete parts instead of one compact 24 pin DIP. Obviously, more board is required. I compromised that a bit, by moving the MAX232 chip off of the circuit board as I only needed one such RS232 interface to service them all. A compact 0.10 inch header with one pin hole blocked for keying makes it easy to connect.

Check out our rotary dumper for an application using the true Parallax Stamp. It's a little pricier, but very compact.

You'll see a #1156, 12volt auto bulb used as a current limiter. This is an old trick from way back. The bulb has about 1.3 ohms resistance at 0.5 amps causing only 0.65 volt loss. Under a full short, the full 12.6 volts will only push about 2.1 amps thru it because the hot resistance goes up to about 6.0 ohms- I include it so you can mess around with the code and accidently turn both sides of the H-bridge on without releasing the magic smoke from the transistors ;-) It also makes a convenient current metering resistor to sense overloads and tell the controller to shut of the juice. Important- Solder the bulb connections- Sockets won't do for the small voltages we need to sense. You can taylor the limit current by changing the ratio of R1/R2, but if you want to go much more than designed 0.7 amp, parallel another bulb. You lose 1.3 volts at 0.7 amps (typical Athearn motor) and nearly 4 volts at 1.0 amp.

The husky 12,000 ufd capacitor is included to isolate the pulsating motor load from the main 12.6 volt bus that is used for many devices on the TSL. It also averages the current load so you can start a stalled motor without causing an overcurrent fault. Nothing critical about the size, I had the 12,000 in the junk box, use anything in the thousands.

addendum 02/28/00- Added series resistors to the inputs to reduce risk of ESD (the spark from walking on the carpet) when plugging the control in.

addendum 03/05/00- I'm having too much fun with this USC-2 gadget! Because it's so easily programmable, I brought out some of the I/O where I could tie it to three occupancy detectors and a MANUAL/ AUTO switch and greatly improve the automated operation on the Termite Timber Line branch. We have a doodle-bug that runs up and down the mountain making a Station stop enroute simply to put action on the trackage between the extra freight run(s) that usually occur only once, or less, during an operating session . It's desirable to tailor the speed in certain sections depending on up, down, grade etc, and that's duck soup with this device.

addendum 11/01/05- This thing justs gets better. I relocated a branch line to serve the new Spotted Owl Timber and Mithril Mine operations in the high country . The branch has limited access, three working points where human interface is needed. Rather than moving the UCS-2 cab, I just whipped up three of them, one at each work area, A scrap of PVC pipe and three push buttons is pretty cheap and they work very nicely in parallel.

INTEGRATION WITH DCC

Elsewhere on this site, I present the case for "home wiring" and against "common rail" for modern, DCC powered layouts, so I won't repeat it here except to recommend that that conventional cabs/power supplies, such as out USC, should not be mixed with DCC unless home wiring is used. In a nutshell, the safest wiring for the DCC environment will require that every DC power supply shall have it's NEGATIVE terminal tied to a common point, preferably true GROUND. This will eliminate the risk, however slight, of having power supplies sum their voltages and put decoders at risk. Others will argue that common rail wiring is perfectly safe IF blah-blah is done. The IFs are where the risks enter into our high tech model railroads.

The sketch below is a typical integration where the switch from the mainline automatically changes the yard power from the USC local cab to the mainline DCC when its moved into the reverse position. The switch shown, like all others on the TSL is a solid frog, power routing type so it's convenient to use that feature- just rectify the DCC power to activate the relay. If you use insulated frog or other toy type switches, then you can use switch machine contacts to activate the relay.

West Grand Schematic

Here is a minimal version of our PBASIC coding. If the following BS2 Stamp code causes your browser to hickup, it's probably do to the LEFT arrow in my Stamp code, that means LESS THAN. If you have a problem just e-mail me and I'll send you a copy. It doesn't seem to affect my Netscape or MSExplorer but Netmechanic.com says it is incompatible with 99% of the browsers. Why- darned if I know?



'YrdCab04.bs2  02/16/00.  Using PULSOUT and PAUSE works faster.  A 25msec period is possible
'with a minimum Off time of about 5 msec and 20 steps. Direction and fault is working.
'Options are yet to be explored. 

SpeedSet        var     byte:           Speedset=0                      
Btn1wrk 	var   byte:		Btn1wrk=0
Btn2wrk   	var	byte:		Btn2wrk=0	
West		var	bit
East		var	bit
Option1	var	bit		'pin 3
Option2	var	bit		'pin 4
Option3	var	bit		'pin 5
Option4	var	bit		'pin 6
StrtSpd	var	byte: 	StrtSpd=1	'must not be zero
n		var	byte
Period	var	byte:		Period = 20

'Input Pins 0 & 1 are West/Accel & East/Accel.  When both are low=brake.
'Input Pin 4 goes HI when overcurrent is sensed. 
'Output Pin 11 goes HI for fault light. 
'Output Pins 14 & 15 drive the H-bridge.  Never HI at same time!!
'Unused Pins are set as output.   

DIRS= %1111111110000000		'pins 0-6 are inputs (0), others out (1)

Exec:
	'debug  bin West,bin East, dec ? SpeedSet
	gosub RunLoco				'update track pwm

GoWest:	
	button 0,0,10,10,btn1wrk,0,GoEast	'read West button
	'debug "West"
	If (SpeedSet => StrtSpd) & East then decel
      West=1:East=0 
 	if IN1=0 then decel			'brake is on- both buttons pressed
	goto Accel

GoEast:
	button 1,0,10,10,btn2wrk,0,Exec	'read East button
      'debug "East"
      If (SpeedSet => StrtSpd) & West then decel
	East=1: West=0
      if IN0=0 then decel			'brake is on- both buttons pressed
	goto Accel 

Accel:
	'debug "Accel"	
	if SpeedSet < strtspd="" then="" speedstart="" if="" speedset="Period" then="" exec="" 'at="" full="" speed="" speedset="SpeedSet" +="" 1="" 'increase="" track="" 1="" speed="" goto="" exec="" speedstart:="" 'min="" to="" get="" things="" moving="" speedset="StrtSpd" goto="" exec="" decel:="" 'debug="" "brake"="" if="" speedset=""><= strtspd="" then="" speedmin="" speedset="SpeedSet" -="" 1="" 'reduce="" track="" 1="" speed="" goto="" exec="" speedmin:="" 'too="" slow-="" stop="" it="" speedset="0" goto="" exec="" runloco:="" out13="0:" out14="0:" out15="0:" if="" in2="" then="" fault="" 'overcurrent="" sense="" if="" west="" then="" runlocowest="" if="" east="" then="" runlocoeast="" return="" fault:="" out13="1" 'fault="" light="" is="" on="" return="" runlocowest:="" 'debug="" "runwest"="" pulsout="" 14,="" speedset*500="" pause="" (period-speedset)="" return="" runlocoeast:="" 'debug="" "runeast"="" pulsout="" 15,="" speedset*500="" pause="" (period-speedset)="" return="">

ULTRA SIMPLE CAB, PHASE 3 11/12/04

TSLs USC is turning out to be a real handy device for simple dedicated operations. We needed to free up a mainline cab from the staging yard. The yard had no need for all the nice 2-way features of our mainline cabs, so it was a waste of resources. They just needed to go left, right and stop to assemble trains. The stickler is that the yard must work with DCC and the USC was not originally intended for that. .

Why not just use another USC, call it USC3, and run the simple commands into the computer. The computer can tailor them as needed and pass onto the EasyDCC system just as it does with the mainline cabs. Used only three bits of INPUT and a few minutes of programming and we're done. The schematic tells all there is to know about the wiring. If you're using Bruce Chubbs CMRI, or doing your own thing then you know what an INPUT is.

USCpix3.gif

Gotta love this marriage of computer and DCC! Once set up, everything is so simple.

The computer will see one bit as an indicator that the USC3 is plugged in. Two more will tell it which direction to go and to accelerate. When used together, the same two bits will set brakes. How simple. The computer sets offsets, acceleration and braking rates that are suitable for working the staging yards.

It works nicely and is displayed on the graphics as the Blue Cab where DCC loco and MU assignments can be easily made. To avoid making unique versions of the USCab, I retained the fault light LED, using it as an "on-line" indicator to the computer. Problem is that the nominal 1.7 volt drop across the LED does not insure a good solid logic LOW. The simple fix was a transistor buffer as shown.

02/20/07 USC3 has worked so nicely in the staging yard that I decided to make another for the West Belt line. This is single track that serves the town of Togwotee. The lone loco does not need the sophistication of our mainline cabs, so another cab is made available. This is the Green Cab on the graphic.

Return to Teton Short Line Home Page