Skip to main content

Reply to "TMCC Control With Arduino"

Thanks Leo for the info.  I'm ready to dive into the Arduino - TMCC communications serial interface with gusto the week.  For religious purposes that are beyond the scope of this post my major C programming efforts predate C++ and while I intellectually understand it's somewhat convoluted elegance I just refuse to get immersed in it.  Subsequently I'm poring over Prof Chaos TMCC class libraries and I will write a conventional C function this week called "outputToTMCC" which will be a bool function returning "true" if successful, providing that the TMCC Base Unit can provide that.  This should be educational and fun.  Looks looks I'm going to need a Mega, not a Uno since I need multiple serial ports.  One for the TMCC base unit, one for the RFID reader (engine identification) and my programming laptop and a mul-line LCD readout display. 

Wish I knew more about the TMCC Action Controller which has a 3-wire connection to the TMCC Base, I assume TX, RX and GND!  I don't use the Action Recorder but I do have the 3-wire cables. All the other TMCC controllers  use only TX from the base (the controllers RX) and ground, hence two wires, ("Data" and "Comm") as they are "simplex" devices which only send data to the TMCC controllers (I use 18 ASCs and 6 BPCs, and 6 TPCs) but get no dialog back except maybe an ACK of NAK.  The Action Recorder seems to be the exception.  I want to ( and am determined to) build my own virtual Action Recorder that I can command with the Arduino.  It would be neat to have complete specs on the Action Recorder.

Can I just connect the TMCC Base Unit to the Tx and Rx and ground pins on the Ardrino and avoid taking up DB9 serial connector?  Can I just create (assimilate/concatenate) the HEX command string to the TMCC base unit and just send it out?  I see the the raw commands on page 36 of the original TMCC manual  but it doesn't tell me timing quirks.  Just what packets need to be sent out and what timing anomalies will I incur.  Any hints would be helpful.

Now time to decipher Professor Chaos TMCC classes and write me C function to do successful TMCC output without the entanglements associated with his specific train control philosophy.  I will devise my own train control philosophy to suit our specific layout needs - as I know exactly how I want to run it but just don't have the software yet.  That's the fun part.  So creating the operating paradigm is as fun (sometimes more) than watching the finished product drive trains around out layout.  I want to savor both!

Please wish me luck and send me any TMCC quirks that I may get trapped with along the way.  I'll keep you posted on my project and publicly share my code when I'm done.  I'll prototype on the Uno and move to the Mega for final integration.  Remember that I must also interface with the RFID reader and small LCD display, plus other assorted digital I/O, such as current-sensing track occupancy detectors, which are all ready in place.  Should be fun!

And I agree with Randy, the journey is as much fun as the goal!

 

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

×
×
×
×
×