Terry Chamberlain jterryc

Following a number of comments from modellers who built Quad Servo DCC Decoders (QSDD), as published in the  February and  March 2020 issues of MRH Magazine, an improved version is now available. Full details can be found on my website at https://www.a-train-systems.co.uk/download.htm#Projects, but here are the main features  –

Handling Multiple Servo Commands

The published version of the software (4.6) only allowed one of the four attached servos to move at any time, which was a bit of a limitation when setting layout routes involving a number of turnouts. So I set about adding some code to allow all servos to be operated simultaneously – only to discover that Geoff Bunza, who wrote the original code on which the QSDD is based, had already incorporated exactly that facility. The problem lay in the incorrect way I had modified and then called Geoff’s routines. I have now fixed this so that all servos can respond simultaneously to DCC commands.

Programmable via JMRI Decoder Pro

While investigating the multi-command problem, I was contacted by another QSDD builder, Drew Aldridge from California, who wanted to be able to access the QSDD Configuration Variables using JMRI Decoder Pro. In my original article I had suggested that the reason this failed was that JMRI didn’t recognise that accessory decoders could have CVs, since most commercial accessory decoders don’t use them. However, Drew pointed out that he could read and write CVs from other accessory decoders which did use them, so I investigated properly this time. The real problem lay with my QSDD initialisation – which took far too long to complete after power was applied to the programming track. Because Decoder Pro was not getting a timely response, it legitimately cycled power to the track and the QSDD – which just repeated the failure cycle ad infinitum . . .

The solution, now implemented, was to speed up QSDD initialisation – which now takes a maximum of 0.15 seconds. As soon as power is applied, instead of leisurely switching all of the QSDD Keypad LEDs on, one by one, and then switching them off again, you will now see only a brief flash of the red Select LED before the QSDD is ready for JMRI Decoder Pro on your programming track, allowing you to read and write all of the QSDD CVs (as listed in Part 2 of the original article, or in copy available on my website at https://www.a-train-systems.co.uk/download.htm#Projects). When adding the QSDD to your roster in Decoder Pro, by clicking New Loco, select NMRA as the manufacturer (at the top of the list) and ‘NMRA accessory decoders’ as the decoder type.

The updated software for the Arduino Nano ( QuadServo_DCC-Decoder_5-2.ino) can also be downloaded from the website page referenced above.

Powered from External Supply

Several users were not keen on the QSDD drawing all of its power, including that for the attached servos, from the track DCC supply, since the stall current taken by a servo can be in excess of 600mA. A minor change has, therefore, been made to the QSDD hardware to provide separate power input terminals which will accept any supply from 9 to 15 Volts AC or DC. The DCC input from the track then has only to supply the 10mA or so taken by the optoisolator.

If you are happy to power everything from the DCC track bus then simply connect both sets of terminals to the DCC supply.

New PCB Available

To support use of an external power supply, a revised printed-circuit board for the QSDD is available from OSH Park at https://oshpark.com/shared_projects/zMo5jegR where you can order a set of PCBs, or download the board file to send to any other PCB manufacturer of your choice. The QSDD-2 PCB is 0.1” longer than the original version so costs a few cents more – but, as an added bonus, it now includes a single 3.2mm dia. hole to assist in mounting the assembled unit wherever required around your layout.

191641-1.png 

The parts list and assembly details for the QSDD remain essentially as before, with the single addition of a second 2-way terminal block for the independent external power supply. Both versions use the same unchanged Keypad (PCB from OSH Park at https://oshpark.com/shared_projects/7ATX5aqB) and run the same updated (Version 5.2) software. The manual setup procedures and operation via the Keypad remain exactly the same as described in the original article (and in the accompanying MRH video at

).

191642-2.png 

Accessing Configuration Variables

Note that, if you do wish to connect your QSDD to the programming track in order to access its CVs using JMRI Decoder Pro or my own A-Track application, you need to disconnect the external power supply (and any USB cable) from the QSDD, and connect both sets of terminals (DCC and external power) to the programming track. This ensures that the Command Station receives proper feedback from the QSDD, and its attached Keypad, when reading or writing CVs, in the form of a small current surge when all of the Keypad LEDs are briefly switched on.

Terry Chamberlain

191642-3.png 

A Free Windows application for NCE Systems

https://www.a-train-systems.co.uk/atrack

Terry Chamberlain

Back_320.png     A Free Windows application for NCE Systems

https://www.a-train-systems.co.uk/atrack.htm

Reply 0
Reply