Skip to main content

Reply to "Legacy Cab-2 finally running LionChief Trains"

@BOB WALKER posted:

Very intriguing. What is the signal path from the CAB-2 controller to the loco mounted LC receiver?

Thanks, and I'm actually glad you asked. Grab a seat. It is electrically very simple. Just a max232 Serial converter plugged into the Legacy base with a wire running from the serial converter to a Bluetooth module (more on that below). As a packaged item I am calling it the LC Gateway. Signal then travels through the air to the train. Just like your phone or the real remote. The train just works as intended from there.

(Warning for anyone reading, the following is really nerdy)

That Bluetooth module is then running custom firmware that I wrote from scratch after spending MANY hours re-implementing the (undocumented) LC protocol from scratch. LOTS of binary math. The binary to decimal converter of the windows calculator has been my best friend. Lots of bitwise operations. Lots of ones and zeros, and so far: 1700 lines of code. All written from scratch to do just this much. I will still need to write some more code to discover and save new locomotives to some flash memory on my gateway board but that will be easy by comparison. That part will be easy by comparison.

Here is a bit about about my background:

I'm a software engineer by day. But I also had learned just enough electrical engineering when I was in college to get me literally rolling. A few months ago I designed a basic pullmor motor driver circuit to go with a custom LC receiver I also used to run a postwar loco over LC. ZC detector and all that jazz. I must say electrical engineering for model trains is a quite a lot of fun. A passion of mine is hardware/software integration (embedded circuits basically). Doing this with trains has been a blast. I imagine at least few others here truly understand that feeling too .

Anyway its a good thing I love low level logic, I built a computer processor from scratch using 7400 series chips in between college and high school many years ago, even made my own assembly language and opcode set at the time. All i know about CPUs at the time was that they had memory and a program counter. I took that and ran with it. It was only ever a hobby project and was also before I had any trains.

So in short that's the story behind how it all works, any questions?

Last edited by Ryaninspiron

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

×
×
×
×
×