Skip to main content

I finally got into TMCC and legacy and successfully upgraded my port of Lionel alco with the mini commander from ERR. For my second project I want to use the ERR cruise commander in my polar express whistle steam Berk. I plan to keep the railsounds in because the chuff works with a reed switch. I have a few questions though. 

 

1. What kind of bulbs do I need for the lights? Can I keep the standard bulb in the headlight and add a backup light to the tender with an Evans designs L.E.D?

 

2. How can I trigger the conventional rail sounds whistle with the commander? The engines whistle stream fan is the same circuit board as the conventional air whistle circuit it takes in offset DC voltage which triggers the fan to blow the whistle smoke.

 

3. Should I leave the smoke unit and light grounded and just attach the hot to the commander?

 

All responses are appreciated, Thanks, Liam 

Original Post

Replies sorted oldest to newest

1. Yes, you can keep the standard bulb for the headlight, and the rear light output puts out a nominal 12 volts, so any bulb that handles that will be fine.  Note that the lighting outputs are DC negative in respect to frame ground.

 

2. The only thing you get with the Cruise Commander is a 5V logic signal when you trigger the whistle from the remote.  There are ways to fool the conventional whistles into thinking they have track power, that will require additional circuitry.

 

2. Yes, the CC documentation recommends you not route the smoke unit common through the board, keep it grounded to the frame of the locomotive.

Originally Posted by gunrunnerjohn:

Well, my plan would probably be to use one of the 10ma 5V coil relays I have on the logic output of the Cruise Commander to power the whistle steam smoke generator.  That presumes it's a separate smoke unit like my T-1 Duplex and K-4 are.

The whistle steam is the same smoke unit. It's a a typical postwar puffer unit with a little hole in the metal. Then the fan sucks the smoke out when the whistle button is hit. Do I attach the RS boards to the logic output to for the whistle? Do you have a diagram with the relay?  

Thanks, Liam 

Here's a relay that handles 1/2A and has the 10ma 5V coil.  This is more than enough for the whistle fan.  Wire the coil direct to the logic output, and note that the relay coil is polarity sensitive.

 

http://www.digikey.com/scripts...&y=0&cur=USD

 

I don't have a diagram, as I haven't actually done this.  I can't see an issue, you simply wire the relay coil to the logic output, and control the fan using the relay contacts.

Pin 3 of the 4 pin RailSounds connector on the Cruise Commander is normally unused.  However, ERR has put a 5V logic signal on this pin that is active when the whistle on the remote is activated.  Given this fact, if you run the whistle fan with this output, you'll get the whistle steam whenever the whistle is sounded.  The relay is just an electronic switch to turn the fan on when the whistle is sounded.

Folks the Cruise Commander does NOT put out a logic signal on pin 3 of the RS connector!  The AC/DC commander does.

 

The best solution for the air whistle is a circuit that can read the RailSounds Serial Data and trigger the Horn/Whistle.  There are two ways to trigger the sounds,

1) create an offset on the power going to the sound circuit already present in the tender

2) create a logic level to close a relay to operate the sounds -or- "tickle" the correct point on the circuit that is used for offset detection.

 

ElectricRR does not have such, but this is not hard to implement.

Originally Posted by SantaFeFan:

Folks the Cruise Commander does NOT put out a logic signal on pin 3 of the RS connector!  The AC/DC commander does.

 

The best solution for the air whistle is a circuit that can read the RailSounds Serial Data and trigger the Horn/Whistle.  There are two ways to trigger the sounds,

1) create an offset on the power going to the sound circuit already present in the tender

2) create a logic level to close a relay to operate the sounds -or- "tickle" the correct point on the circuit that is used for offset detection.

 

ElectricRR does not have such, but this is not hard to implement.

Jon, What would you propose for the circuit to detect the whistle signal on the serial line?  G

Hello, I just found this forum a few weeks ago.  Lot's of good stuff here.

 

You're moving into the realm of microcontroller programming. A couple years back, I did this in my PE which I had upgraded with an ERR Cruise Commander.  I used a small Microchip PIC12F635 (programmed with PIC-Basic) to decode the serial data stream from the CC board.  That seems to basically be the protocol described in the TMCC manual with address headers stripped off. I decoded four signals - Horn, Bell, Aux1-2 and Aux1-7. I fed three of  those signals to some optocouplers and LM317 regulators (wired in pairs as AC regulators) to generate the appropriate DC offsets  for the TrainSounds boards in the tender and PE Announcement car.  This circuit also reduces the AC voltage on the trainsounds boards which get too hot if run continuously at high track voltages typical in TMCC operation. The fourth signal (Aux1-7) I used with another optocoupler to drive the Lantern in the PE Announcement car.  

 

Though it required some upfront familiarity with the microcontroller and serial communications, it was fairly straightforward and actually works quite well.  I have since used the technique in several other engines & operating cars.   

 

Cheers,

Jim

(11-15 Updated schematic to RevA)

 

Here is a PDF of my schematic for the design. Basically datasheet/application note  implementations of the PIC & regulators.  The idea of using the opto isolators with the LM317's to generate  the DC offset I found on another website some years back. It's basically a minor mod to National's early 1970's app note on using the LM317 as an AC regulator.   One caveat - I find this circuit works  better with old traditional transformers like the ZW than modern triac based one's like the CW-80 (it does function, just not as well).

 

I'm leary of posting the code for the microcontroller.  Unlike the some other model railroading & 3D printer communities (which have embraced open source design as a way to benefit the future of the hobby), Lionel & MTH seem old school in that they are patent and lawsuit happy and have not embraced open source design (much to the detriment of the hobby's future, IMHO). It is fairly easy to see what is going on with a scope. Also, the various patents for the hardware (easily found on the US Patent Office and many other websites) describe the structure, timing and decoding of the serial data quite well. It's unfortunate they chose not to document it in the manuals.

 

Though I originally designed this to work with the TMCC CAB-1 system, it does seem to work fine with the newer Legacy/CAB-2 system in TMCC mode.  I haven't made any attempts to make any of this work in Legacy mode yet.

 

Attachments

Last edited by jj1138

I've been looking into doing things with the Arduino & RaspberryPi  boards as well.  Arduino & PIC are pretty comparable and good for most things.  RasberryPi looks really powerful and would be interesting for custom sound or visual effects, but it's just big enough to be inconvenient for O-gauge.

 

Too much fun stuff to play with, too little time to do it. :-)

The TMCC command codes are an openly published standard, not like Legacy.  I can't imagine there's any problem posting code to use it. All sorts of companies have designed stuff to interface with TMCC, and they're actually charging money for their products.

 

The usefulness of the schematic is drastically reduced without the code...

 

Legacy mode is a whole different kettle of fish (and commands), but there is a glimmer of hope that at some point they may be available as well.

 

Good points.  It might take me a day or so to dig up the file - I was using an old parallel port PIC programmer when I did this so I think that code is sitting on my old Windows 98 computer. It needs to get copied to the new computer anyway.

 

It would sure be nice if they publish the data for Legacy - that would be a whole lot easier than reverse engineering it.

That's the document I've been using for the codes - it does a good job describing the data payload (we need the same thing for Legacy).  There was additional information in the patents describing the the more technical details of the data as it's received by the R2LC in the train and, by extension,  what goes out of the R2LC to the other boards. If I remember right, the R2LC seems to strip some of the addressing fields off and just forwards commands. It also described algorithmically how to actually detect and recover the data in the microcontroller.  That's the stuff I was more concerned about.  Now that I went back and looked, it's pretty basic microcontroller stuff and not particularly unique to trains.

 

Cheers,

Jim

Found it.  Here are the files for the code I used. It is written in PicBasic Pro from Microengineering Labs.   The .hex file is the programming file complied for a PIC12F635 

 

Yes, the baud rate was definitely odd.  The timing of the button presses  could be better in this.  I've been meaning to tweak on the order & delays in the routine at the end. Also, it occasionally misses button presses - I think some minor changes could be made to improve noise immunity. 

 

Disclaimer - I'm a hardware engineer, not a programmer.  There may well be better ways of implementing this. :-)

 

Cheers,

Jim

Attachments

If either you, gunrunnerjohn, jj1138, etc. would be interested in adding tmcc to my PE with whistle steam effect (for a fee), contact me via email as I'd like to add it while also being able to utilize my PE conductor announcement car, trainsounds/railsounds in tender, whistle steam effect, bell, etc.

I've been wanting to have this done since purchasing the engine.

(BTW, might adding either PS 1.0, 2.0, or 3.0 be a better way to go rather than attempting to add tmcc? I'm set up to run both tmcc and dcs.)

Thanks for your input and any assistance on this.

Kenn ogaugeguy  

I don't know that you'd be able to get steam whistle effects from PS2/3 any better than from TMCC.  The real issue is you need a digital signal when the whistle blows.  It seem to me the only hope for doing this is by decoding the TMCC data stream, as that's available and documented. 

 

I don't know of any digital signal in a PS2/3 locomotive that is available when the whistle blows, and there's no way I know of to tap the serial data to generate one.

 

 

Thanks Jon, that's good to hear from someone at Lionel. As an design engineer, I have been impressed with the simple, elegant, modular design of TMCC - in my experience it really works quite well. I have tried to follow suit with the electronics I've built and added to my layout.  I wish I could take credit for the clever AC regulator circuit but I actually found that years ago on a website where someone described how they had put a DCC board into a Lionel engine with TrainSounds.

 

I'm curious if you saw my earlier comment where I was somewhat critical of Lionel for not being more open with the technical details of TMCC & Legacy? It would seem to me that encouraging individuals and small companies to build into your command environment would result in more users buying into that environment, yet the O- gauge manufactures seem to be taking the opposite approach. Of course there are plusses and minuses to anything, so I would be interested in hearing someone from Lionel's thoughts on that.

 

Cheers,

Jim

 

 

Originally Posted by ogaugeguy:

If either you, gunrunnerjohn, jj1138, etc. would be interested in adding tmcc to my PE with whistle steam effect (for a fee), contact me via email as I'd like to add it while also being able to utilize my PE conductor announcement car, trainsounds/railsounds in tender, whistle steam effect, bell, etc.

I've been wanting to have this done since purchasing the engine.

(BTW, might adding either PS 1.0, 2.0, or 3.0 be a better way to go rather than attempting to add tmcc? I'm set up to run both tmcc and dcs.)

Thanks for your input and any assistance on this.

Kenn ogaugeguy  

Unfortunately my day job and some volunteer work I'm doing with a First Lego League Robotics competition group doesn't leave me much time for that now.  That's the kind of thin I'm looking forward to doing after retirement someday.  

 

You would be best to stay in the TMCC world for this. While DCS may have some more capabilities, this engineer's opinion is that it is way over complicated for what it does. I haven't near as good of experiences with MTH's electronics as I have with Lionel's.  

Originally Posted by jj1138:

Thanks Jon, that's good to hear from someone at Lionel.

[snip]

I'm curious if you saw my earlier comment where I was somewhat critical of Lionel for not being more open with the technical details of TMCC & Legacy? It would seem to me that encouraging individuals and small companies to build into your command environment would result in more users buying into that environment, yet the O- gauge manufactures seem to be taking the opposite approach. Of course there are plusses and minuses to anything, so I would be interested in hearing someone from Lionel's thoughts on that.

 

Cheers,

Jim

 

 

Jim, We plan to open up the protocols on our products on several items coming to market shortly.  Our WiFi interface to Legacy has been in the field for a year in beta form; and we feel that the WiFi hardware (soon to be generally available), and the protocol we plan to open for folks to use, will promote a unified way for the hobby to work towards a common control system for the good of the Hobby.

 

Originally Posted by SantaFeFan:

 

Jim, We plan to open up the protocols on our products on several items coming to market shortly.  Our WiFi interface to Legacy has been in the field for a year in beta form; and we feel that the WiFi hardware (soon to be generally available), and the protocol we plan to open for folks to use, will promote a unified way for the hobby to work towards a common control system for the good of the Hobby.

 

That's really great news Jon. I look forward to seeing it.

 

Cheersm

Jim

I built it on a piece of perf board using thru hole parts and it came out about 1x1.5".  I thought about a PCB but wasn't building enough to pursue it.  With SMT parts this thing could be on a really tiny PCB. The TO220 package regulators generate some heat but not enough that I needed to heatsink them.  With smaller packages, that may come into play. 

 

Also, the opto isolator driving the lantern is probably not necessary.  A transistor should work. 

 

I also just noticed that optoisolator (U103) is flipped on my schematic. It won't work as shown.  I'll fix it and repost.

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Ste 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×