Skip to main content

Reply to "Arduino TMCC Serial Communication Library"

AmeenTrainGuy posted:

So what do I need to do to make it work on my cab 1? From what your saying I am understanding that the wires are half duplex and not full duplex right?

 

Thanks

Same thing for CAB-1 as Legacy except that the pinout from the command base has pins 2 and 3 crossed.  Legacy listens to the Command Base on one of the pin and talks on the other and vice-versa.

Here's what you need to make it go:

1) Get an Arduino (I use Nanos mostly)

2) Get a Converter (type this into Google: "rs232 to ttl converter")  New Egg has these for less than $4.

3) Wire up the converter to the Arduino as I previously posted

4) Load up the library into the Arduino dev tool and load my example sketch

5) Get a couple of DB-9 connectors or a serial cable.  You need pin 5 and either pin 2 or pin 3 on the Command Base (sorry, I don't know which because I didn't try it).  Wire those pins to the converter you bought as I indicated before in my earlier post.

6) If the pins are correct, the receive light will flash on the converter when the CAB sends commands to it.  If it doesn't light, use the other pin (if you're using pin 2, try pin 3 or vice-versa).

 

That's it.  If the RS-232 thing is confusing, try searching for info on the standards for  a 9 pin RS232.  It's super common / tons of details online about it.  Lionel did nothing secret or odd except maybe the voltage range....

 

The earlier comment about the +-5V signal from the Legacy Base, I think is correct according to the research I did.  I am using the converter because it uses optocouplers to isolate the signal completely and converts the 5V or whatever is coming in to 3.3V TTL.  This ensures that the Arduino lives a long and happy life.  It may otherwise without the converter, but I am staying within the specs that I've read.  And, beyond that, I am planning to use a signal booster very soon.  That converter will be happy with that signal which will be +- 12V.  Try going direct to the Arduino without the converter if you feel adventurous, but note that the Arduino might respond unfavorably / be damaged.  I have a number of Nanos onhand.  Maybe I'll give it a go when I get done with more pressing tasks.

 

I hope this helps!  Good luck!

 

-Randy

 

 

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

×
×
×
×
×