Model Train-related Notes Blog -- these are personal notes and musings on the subject of model train control, automation, electronics, or whatever I find interesting. I also have more posts in a blog dedicated to the maintenance of the Randall Museum Model Railroad.
2016-09-26 - Direct Access to NCE Q-Snap Mk2
Category NCE
From both the NCE USB v7 doc (see NCE website) or from
http://jmri.sourceforge.net/help/en/package/jmri/jmrix/nce/packetgen/NcePacketGenFrame.shtml
Example: 0xAD is for switching an Accy/Signal. There is no provision to read the state.
- E.g. 0xAD 0x00 0x03 0x03 0x00 ⇒ throw 0x0003 in normal direction
- E.g. 0xAD 0x00 0x03 0x04 0x00 ⇒ throw 0x0003 in reverse direction
- 0 is an invalid address.
- Max address is 2044 (0x7FC) which is a broadcast address for Accy.
Note: when trying in JMRI > NCE Command, "Binary" means hex without x, seriously \o/ ?
Lockout CV 556:
- Use on Address of input #1, which is 4 for my home one.
- 556 = 0x022C
- 0xAF is Ops ACCY programming.
- AF 00 04 02 2C [0=unlocked | 1=locked]
- This works. It locks buttons out.
- ACCY on controller can still be used to throw turnouts.
That means I can trivially command that from an Arduino and bypass JMRI if needed.
2016-08-25 - NCE Q-Snap and EZTrack #6 Crossovers
Category NCE
Experiment from tonight: control the EZTrack #6 crossovers using the NCE Q-Snap. ⇒ Failed.
I have 2 EZTrack #6 turnouts mounted in cross-over configuration. The idea was to power them from a single Q-Snap output to save one output for each cross-over.
The Q-Snap has no problem driving a single #6. But ever the largest timing I tried does not make the crossover (2 turnouts in parallel) toggle properly. They either bounce or switch half-way.
I also tried using a 9V DC power brick instead of the DCC power. That didn't help. Supposedly that way the turnout should get 9x2-2 = 16 VDC. However from experience I remember I always failed to trigger them in DC, which is why I previously used the AC from the EZTrack ACC power brick.
2016-08-22 - Home Control Panel
Category TrainDigiX: 11 x 6 in
NCE Q-Snap: 4 x 3 in (DCC bus)
NCE AIU01: 4 x 3 (2 RJ12, comes with one cable)
XminiLab scope + board: 2 x 3 // 3.5 x 3 in
NCE UTP: 3 x 2 x 2 in deep
Notes:
- Q-Snap really needs 3 outputs per turnouts, it carries its own common per twin-coil. It's not clear whether I can share the commons since each one has its own capacitor.
- The DigiX relays OTOH work by sharing the AC common so I have 2 outputs per turnouts plus one common.
2016-08-04 - Yard Design Links
Category Train
Yard Design 10 Rules: http://www.housatonicrr.com/yard_des.html very good intro.
Somewhat unrelated, very interesting read on Housatonic Railroad Design Philosophy.
Tips of Freight Yard design: http://www.featherrivertrains.com/documents/kal_12248.pdf
Yard Operations and Design: https://www.x2011west.org/handouts/ldBootcamp-YardOps.pdf
Many LayoutVision pages relevant: http://www.layoutvision.com/id18.html
Love for the yard: http://www.layoutvision.com/id19.html
How to classification yard: http://www.layoutvision.com/id20.html
Ops on a classic 4x8: http://www.layoutvision.com/id39.html
Beware of CAD: http://www.layoutvision.com/id40.html (agreed on the S curves!)
Interesting design. Note that according to LayoutVison, typical west yards don't have an A/D.
2016-04-09 - Use an NCE AIU and IR sensors
Category NCE
Since I have IR reflective sensors, the idea would be to connect them to an NCE AIU01 to detect position in 2 or 3 spots for speed control and automation.
(Also I got an NCE Q-Snap to control 4 twin-coils, This would cover the front cross-over (2 turnouts), the yard entrance Y1 and the Y1/Y2 yard turnout. Really the point is learning and see what it’s good for since I can already control these turnouts with the Arduino/DigiX).
One idea is for speed matching, using one NCE AIU and 2 sensors.
- Embed the sensors in the EZTrack pointing up rather than side mounted.
- Use these directly using JMRI/jython.
- This leaves 12 unused inputs on the AIU.
Click here to continue reading...
2014-09-07 - JMRI WiThrottle protocol
Category Jmri
This is my own understanding of the JMRI WiThrottle protocol based on reading the JMRI source code and connecting to a local JMRI server. I apologize in advance for the highly condensed notation style. I originally started looking into this to create my own python program; then back in 2014/2015 I used this to create a Python extension of Scratch running on a Raspberry Pi to control JMRI. It was pointless yet it was absolutely cool and totally worth it. Eventually I used that same information to create my own Cab Engineer: DCC Throttle android app.
-- (start of info dump) --
JRMI WiThrottle protocol in action using [WiThrottle protocol doc].
Server code:
- DeviceServer.java for main codes (old sourceforge link: DeviceServer.java).
- ThrottleController.java for single throttle (T and S codes) (old sourceforge link: ThrottleController.java):
[2020 update: code now at https://github.com/JMRI/JMRI. Also note that all T/S throttle commands are now considered obsolete, using the MT multi-throttle commands is pretty much a given.]
Click here to continue reading...