Train Wreck
Posts in Year: 2015
  • Software Available

    I’ve added the software that I have been developing to the downloads page. The zip file contains a simple Arduino sketch to send a DCC signal to a booster, a very simple ‘booster tester’ that just flips the port connected to the booster every 5 seconds (basically a modified ‘blink’ sketch) so that you can measure the booster output with a multimeter, and a very early version of my MacDCC Command Station. (Read more)

  • MacDCC Command Station

    Over the last few weeks I have been building an Arduino and Mac based DCC command station and today it all successfully came together with the running of my first locomotive under DCC control!

    The Arduino software is quite simple, just receiving raw bytes from my Mac in a very simple format, which is then converted to DCC and sent out to a booster. The format is just a byte specifying how many further bytes are in the message, followed by the actual DCC bytes including checksum. After the required number of bytes have been received by the Arduino, the message is validated using the checksum, then replaces the oldest of the current two messages being sent. The Arduino software continuously sends out the last two commands that it receives so that no message is sent twice in a row. It is only a slight modification of the code mentioned in this post. (Read more)

  • Thinking About a Command Station

    In the discussion below to keep everything straight as to which code I am talking about:

    Communication from a PC (in my case a Mac) to the Arduino I’ll call a ‘command’.

    Communication from the Arduino to the booster I’ll call a ‘packet’.

    A message or message packet is a ‘command’ packet as distinguished from an idle packet.

    The overriding philosophy of my command station will be to keep the code in the Arduino as simple as possible and have most of the smarts in the software running on the Mac. With this in mind, probably the simplest possible command station for the Arduino would be code to accept a new command from a Mac (or PC) via the serial port, convert this command to a valid DCC packet, and then continuously send this packet to the booster. However, while this would probably work, it would be out of spec because the NMRA standard S 9.2 (line 116) says: (Read more)

  • Sending DCC With An Arduino

    In my last post I mentioned that I now have 2 Arduino controller boards for experimenting with creating my own DCC command station, booster and DCC decoder. However, one of the problems with developing your own software and hardware that works together is that when something doesn’t work it can be difficult to figure out just where the problem is.

    To help get around this I figured that it should be possible to simplify things by hooking two Arduinos directly together and send DCC commands from one to the other. This would at least ensure that the software was working before even having to think about the electronics.

    So that’s what I did, and it worked! (Read more)

  • So It begins...again

    Well that was fun. It seems that sometime over the last year since I updated my blog, wordpress became borked and all my posts are gone. I do have a backup somewhere but for now I am just going to start again.

    So where were we? In my last blog I documented some experiments I made in building my own n scale turnouts, which though time consuming, turned out pretty well. After I’d made a few turnouts I started looking for ways to cheaply and easily activate them. I did some experiments using small rc servos which were successful but I thought they sounded rather noisy. I then tried some ‘muscle wire’ which also worked well though there were some issues.

    At some point in the future I’ll try to recreate some of these posts, but for now I am taking a different direction - I am going to try and build my own DCC command station and booster, then see if I can get my new Bachmann Spectrum N Scale GE 44-Ton Switcher up and running. To that effect I now have two Arduino microcontroller boards, so that is where I’ll begin…