Wireless DC Throttles: It’s a Project, not a Product!

Not everything we develop for Iowa Scaled is destined to be a product.  As part of our demo layout that we take to shows to demonstrate our “Interlocking In A Box” product, we needed a set of throttles – one to control each main line.  There was no particular need for DCC as the two track segments were isolated, and the simplicity of good old DC control would be more reliable anyway.  Wireless would be even better, as then there would be no cords to drag across our display or get yanked and damaged.  However, the only option on the market at the time was the Crest Electronics throttles and used Aristocrafts, which all commanded a hefty price.  As of writing this in September 2017, I’m not aware of anybody manufacturing new wireless DC throttles.

So, we’re electronics guys, why not build our own?  Over the course of a weekend in the spring of 2014, I threw together a prototype, and over the few months before the 2014 St. Louis Railway Prototype Modelers meet, Michael and I turned that prototype into a reasonably polished design.  Since then, we’ve had a number of folks ask where they could get a set of their own, or how to build them, so I thought I’d write a blog post on how they work and how to build your own from our design.

The first and most important thing you need to remember is:  This is a project, not a product.  Don’t look for these to show up in the ISE online store.   They weren’t optimized for cost or manufacturability.  As a finished product we’d need to put them through FCC compliance testing, which is brutally expensive for small run products.  However, given our commitment to open source hardware and software, all the design files are out there on Github, and I’m going to cover the high level details of building your own.  There’s enough DC guys still out there that these may be useful to others as well.

The Overall System

The system consists of three major pieces – a base unit that effectively has two DC pulse throttles on board (MRB-ANT), a radio receiver/access point (MRB-AP) that connects the base to the airwaves, and the wireless handheld throttles themselves (MRBW-SAT).  The system is modular, so you can have up to eight base units and sixteen handhelds if you so choose.  You only need a single access point as long as all the MRB-ANT bases are connected to the same MRBus segment.

Like I said, this is a project, not a product.  I can’t stress this strongly enough.  As such, you’ll be responsible for sourcing the boards and parts, and then assembling and testing the whole get-up.  If there’s enough interest, we may offer kits with the surface mount components already soldered down and the microcontrollers programmed.  I’m working on a series of articles about how to turn our designs into finished products – tentatively titled  “How to Steal Our Stuff” – but for now you’re largely on your own.

MRB-ANT: The Base Station

The core of the system is the base station, known as the MRB-ANT (MRBus-enabled Analog Network Throttle).  It takes MRBus data and power in one side and drives two separate 3A throttles on the output side.  A PDF of the latest schematic can be found here (from the /pg/mrb-ant-v1.2-f22afdd/ directory) if you want to just take a quick look.

Full schematics, PCB layout, source code, and bill of materials can be found in the MRB-ANT Github repository.   As usual, all of our design work is done with the gEDA suite of tools – gschem, pcb, etc.   Schematics are in sch/, PCB layouts in pcb/, production PDF versions of the schematic, board art, and gerbers are in pg/, firmware in src/, and any documentation (including a bill of materials) in doc/.

The whole thing is based around a typical Atmel ATMEGA328, same as many of our products.  While not the most powerful processor around for the money, it’s very well supported by GCC and an open source toolchain, and has more than sufficient CPU power to drive a pair of throttles and talk on MRBus.

Commands Come In…

Commands come into the board via an electrically-isolated wired MRBus interface, provided by RS485 interface U4 and a Silicon Labs isolator U3.  This allows you to have any number of MRB-ANTs connected to the same MRBus network and they won’t short out through the bus.  Without this isolation layer, if you inadvertently drove an engine over a track gap between two different MRB-ANT boards, you could potentially get 3+ amps running back down the MRBus ground lines.  Cat5e wire and connectors are good stuff, but that kind of current can make them start to glow a bit, which isn’t going to end well for anybody.  The isolator makes sure that everybody’s safe no matter what happens on the track.

We considered putting the XBee to receive commands right on the throttle base.  This would have solved all the MRBus isolation issues, as it would only speak wirelessly to the network.  However, throttle base units are often buried in under the layout in places that have very bad radio reception, and you’d need a radio for each throttle base.  We decided it would be better to use our standard MRB-AP MRBus Wireless Access Point to bridge from wireless down to wired.  The MRB-AP could then be mounted high in the middle of a layout to get optimal reception, and any number of throttles and other MRBus-compatible nodes could share a single AP, such as wireless fast clocks or temperature/humidity monitors.

Since the MRBus segment needs to get power from somewhere, there are optionally two jumpers on JP1 (jumper pins 1&2, 3&4) to connect power from the throttle’s power supply over to MRBus.  This should only be turned on at most on a single throttle.  If your MRBus network takes power from elsewhere, omit them.  Also, since all MRBus wired networks require at least one set of biasing resistors, a set is included that can be enabled by jumpering pins 1&2 and 3&4 of JP2.

… and Power Flows Out

In response to throttle commands, the processor directly digitally synthesizes the output waveform (via the dual DAC U6), so all manner of interesting pulse width and DC schemes are possible.  The design started with tried and true waveforms from pulse throttles of the past – particularly taking inspiration from Linn Wescott’s True Action Throttle designs that were published in Model Railroader.  What I arrived at as an optimal waveform is a linear DC component, ramping from 0 to VMAX (nominally set at 13.5V).  On top of that, pulses are introduced when the linear component is between 0-VPWM_CUTOFF (nominally 6V).  These pulses start at VMAX_FULL_PWM (18V or Vin-1.5V or so), and ramp down to meet the linear DC component at VPWM_CUTOFF.  As my use of constants here would suggest, the pulse amplitude and cutoff are adjustable in the firmware.  The result is fantastically good speed control.  As a test, we made one of Michael’s Kato C44-9Ws creep along to the point it took nearly ten minutes to go the 5 foot length of our test track. 

To deal with short circuits, there are two protection mechanisms built in:  a high speed current limiter that will automatically drop the voltage to hold a maximum of 3.3A (done in analog – R9/R10/Q2 on the the A channel, R13/R14/Q4 on the B channel), and a temperature sensor (U8/U9) on each main output transistor to prevent the heatsinks from getting too hot.

Reversing, rather than being done with any solid state wizardry, just uses a good old fashioned relay.   It’s simple and reliable.

To indicate the status of each channel, there’s a red-green status LED on each channel near the output terminals.  The easy version is that green is good, red is bad.  A blinking green indicates that the throttle channel is operational, but no throttle is speaking to it.  If the MRB-ANT hasn’t heard from a throttle in some number of seconds (configurable by the value in EEPROM address 0x12, set in 1/10ths of seconds), it will assume the throttle died or went out of range and will shut off the track output to prevent runaways.  A solid green means the base is receiving commands for that channel from the throttle, and it’s functioning normally.  A solid red light indicates that the output transistor has exceeded its temperature limit and is currently cooling down before the output will be re-enabled.  A flashing red indicates something’s gone seriously wonky.

One novel feature we’ve built in is an accessory relay for each channel.  We don’t exactly know what you’d use it for, but there’s an auxiliary button on each throttle that, when pushed, will cause a relay to close on the throttle board.  Possibly for a horn or other sound effects?

Power comes in through a standard 5.5mm barrel jack, although one rated for 5A.  For the demo layout, I was feeding the system with a 15V, 5V switching laptop supply I found in the junk bin at work, but you ‘re welcome to power it from whatever.   Just keep it under about 20V.

MRB-ANT Assembly Thoughts

None of the surface mount parts on the MRB-ANT are terribly small or hard to mount.  Anyone with a reasonably steady hand, a good solder paste stencil (we would recommend a 3mm polyimide stencil from OSH Stencils), and a decent pair of tweezers should be able to assemble it.  Cost of a single throttle base should be in the $60 range, including PCBs if you order from somewhere like Seeed Studios or DirtyPCBs.  OSH will be quite a bit higher as the base PCB is quite large.

For those not wanting to mess with uploading the gerbers and making sure everything is exactly right, you can order the PCBs for the MRB-ANT from OSHPark directly from this page.

There is one gotcha in the BoM, in case you didn’t notice.  The board uses a pair of CKT-TEMP220 temperature sensors, another creation of ours.  We started out with the Microchip TC74s, but found them to be flaky and unreliable if there was electrical noise on the I2C lines.  We replaced them with our own design, which is little more than a carrier board with an NXP PCT2075 temperature sensor on board.  The Github repository for these can be found here.

MRBW-SAT: The Handhelds

The handhelds are in a different project on Github – MRBW-SAT (MRBus, Wireless – Simple Analog Throttle).  The layout of that project is basically the same as MRB-ANT or any of the rest of our projects.  Again, a PDF of the latest schematic can be found here (from the /pg/mrbw-sat-v1.1-9935337/ directory) if you want to just take a quick look.

The design is straightforward and should be instantly familiar to anybody who’s ever run a train with a knob throttle before.  There’s a direction switch (forward, off, and reverse), a speed knob, an accessory push button under the throttle knob, and an indicator light to show status.  It runs on a pair of AA batteries and fits in a comfortable commercial handheld case.

Note that there’s no on-off switch.  If the throttle direction switch in the “off” position for more than about five minutes, the throttle just goes to sleep.  In sleep mode, it can last years without killing the batteries.  A single set of batteries is good for several days of continuous operation, depending on use, and should last for months or years in regular use.  Even with folks operating the demo layout ~8 hours every day, we rarely changed the batteries during a weekend show.

There’s an indicator light on the throttles to give you some feedback about what’s going on and how your batteries are doing.  A slow blinking green indicates that the throttle is awake, functioning, and in good shape with good batteries, but hasn’t yet linked up to the wireless MRBus network.  Once the light goes green and fast blinking, that’s an  indicates everything is good and it sees the rest of the network.  Red, as usual, is bad.  Red fast blinking indicates that the batteries are getting down to the point you may want to change them, and red slow blinking indicates they may die at any second.  Obviously while the throttle is asleep, the light will be off entirely.

MRBW-SAT Assembly Thoughts

The only part of the handheld that might be a bit tricky for the inexperienced to solder down is the LTC3528, which is a horrid little 3x2mm DFN (dual flat no-leads, aka the dual flat nasty).  With a good stencil and careful pasting, we haven’t had any real problems.

To accurately drill the case, there’s a drill template in the mrbw-sat/pcb directory called “case.pcb”.  The potentiometer and direction switch holes should be ¼”, the accessory pushbutton should be a 3/8”, and the light pipe hole should be 1/8”.

The throttle potentiometer is a Bourns 91A1A-B24-B20L.  While rather expensive (~$6), it’s a very solid, reliable potentiometer that will give years of service while being constantly cranked up and down.  Plus, to my hand, it just has “the right feel”.  The knob I used on our units was from a stock I bought when Radio Shack was clearing out everything, so you’re probably going to need to find an alternate source for those.

Total cost for each throttle in 1x quantities should be around $70, including PCB, components, case, and hardware.  Again, you can get the gerbers and upload them to the board service of your choice, but I would recommend getting them from OSHPark, as the PCB has cutouts, curved edges, and other complexity that the el-cheapo PCB vendors may not do correctly.   I’ve shared the design, and you can order the PCBs directly from this link if you’d like.

Note that if you want to use both channels of the MRB-ANT, you’ll probably want two MRBW-SATs, so budget and purchase accordingly. 

Hopefully for those of you looking for wireless DC throttles (or looking to design your own), this provides a template and a bit of inspiration.  Again, it’s a project not a product, so we don’t officially support it, but if you run into difficulties, drop us an email or leave a comment and we’ll get back to you as time allows.

 

Leave a Reply

Your email address will not be published. Required fields are marked *