Jump to content

How to produce a Loco Detection Module emulator?


Recommended Posts

@37

We both asked them similar questions and were both given the assurances posted, but like everything these days they seem to be using the Hornby clock, which has months not hours on the dial. HRMS talk of frustrations, which were likely not in their bailiwick to resolve.

Link to comment
Share on other sites

Fishmanoz,

Unlike some of this forum I do read previous posts and you obviously had read the HMRS reply to Idle but it makes no mention of "year end" which is why I asked 96RAF if he had received other news. Given that it is 7 (?) years since Loco Detection was first mentioned I personally take the HMRS "update" as worthless, albeit I will be delighted if further news regarding a release date comes to light. The absence of any updates has been appalling.

Link to comment
Share on other sites

Again I don't think I am breaking any confidences by showing the response to my follow up question to RM Support about "when":

"It is difficult to say exactly when this will be released as several things are going on, which will become apparent when we do announce the availability of the loco detection hardware. You will understand the problems we have experienced when this happens. Nobody more that our team, want to see this system on the market as it would immediately elevate RailMaster to being probably the best model control system on the market, certainly the best value system, without a doubt. Hold tight and await the announcement."

So make of that what you will. Lots of hyperbole and scant detail. Given the public silence on this from Hornby for so many years it would be right to be skeptical. As @96RAF says the "techies" may want this to go ahead but the "suits" will be looking at the likely sales. It costs money to produce, launch and support a product even if it has been developed and there will be many calls on that money from competing Hornby products. Having said that I am the eternal optimist.

In the meantime I will continue with my efforts. How successful this will be I don't know but at least progress is in my hands! In answer to @96RAF I will be happy to publish details of what I have done once I have something vaguely working, with suitable warnings. From my investigations so far, there are two kinds of sensors supported by the loco detection module, what they call "Optical" and "Magnetic". My assumption is the Optical is the barcode reader, the Magnetic is the magnet/reed switch reader. I am focussing on the latter for now.

Link to comment
Share on other sites

The beauty of Dave’s investigation is that he is not reverse engineering anything in breach of the RM licence, simply using what is already there with seemingly compatible kit even if such kit is not listed. Similar to the way some alien accessory decoders work if set up as R8247.

Optical would also include IR sensing, again like magnetic a simple on-off reporting logic with no Intelligence about a loco ID.


Link to comment
Share on other sites

I have just been having a look at barcode reading tech and how it could be applied to our loco detection.

It seems in its simplest terms a diode or laser beam is reflected from the barcode (on our loco), picked up by a photocell and turned into a binary code. I.e the black stripes represent binary zero and the white stripes represent binary one. Each number in a barcode is represented by seven stripes, each with a unique pattern, as told of here. . . https://www.explainthatstuff.com/barcodescanners.html

The binary code is then converted to decimal for our loco ID.

We can see this is not too far divorced from the binary code used by DCC and for which there is already an Arduino library file that converts the DCC signal binary into text we can read.

By using an Arduino or RasPi as our collector box which talks to the PC, it may be possible to write a similar program that would take the simple rapid toggling on-off of an IR beam or magnetic sensor and translate those pulses to binary, thence to decimal for use by RM LD. The problem I can see is latency in reading these pulses quick enough.

Link to comment
Share on other sites

  • 3 weeks later...

i've just been catching up on this thread - just when i completely give up on LD there is a flicker of hope from Hornby.

The LD module emulator is a cracking idea - if this could work & just send messages back to RM indicating when a digital input is active/inactive i could ditch all the logic in my current arduino based decoder & just use my block detection modules. Any joy since you established the initial handshake?

Link to comment
Share on other sites

Sadly no. I have been trying various combinations of commands but none seem to be of interest to RM. We have no idea of the format, length or structure of the command from the sensor. We don't really know if the loco detection works at all with the shipped code. Rumour has it that LDM was demonstrated but that may have been on a development version of the code. I will keep trying with fingers crossed!

Link to comment
Share on other sites

  • 3 months later...

It has been some time since I updated this thread. I have been trying on and off for some months now to get this working and I have to admit defeat and will be trying no longer. For new readers I have been trying to "crack the code" between RM and loco detection equipment. I made some early progress but I have been trying "trial and error" as there is no information available on the protocol used between components. Without such information from HRMS or a sample device to monitor I am stumped. I don't know if @zeroOneman has made any progress but I'm sure he would have told me/us if he had. As mentioned in previous posts we can't be sure the current version of RM even contains the loco detection code. There were some vague hints in my email exchanges with HMRS that the very long overdue loco detection might eventually appear, but that was back in September and nothing has happened. Sorry but there we are.

Link to comment
Share on other sites

In the background I have also tried to ‘fool’ RM into thinking an alien module is the pucka RM kit, but to no good end.

I tried the IR sensor shown earlier, but it was incompatible with the ‘switch-box’ I used to talk to the PC, so I have installed magnet operated reed switches around the layout instead which do work with it.

The USB powered switch-box is a simple button switch interface device (see Leo Bodnar BBI-32) that is recognised by Windows as a Game Controller. When an external switch connected to the device is closed it drains the 5v standing voltage on a port to ground and that LO signal is passed to the PC by the PIC chip onboard the switch-box.

RM can be set up to have optical or magnetic sensors designated to the ports of this device, but as the device does not use a comm port for communications there is no way of telling RM it is there, hence the trial stalls.

If the RM LD40 module is selected in RM LD setup screen, clicking the adjacent blue button brings up a sensor diagnostic status screen, which is almost identical to the windows Game Controller button diagnostics screen, so it appears to be of similar protocol, but still gets us nowhere.

This has led to the development of an RM like software package that can use the BBI-32 switch-box and reed switches to talk to a PC and use an Elite and/or eLink to auto-control trains. The software was not written by me I hasten to add, but another forum member, who may / may not choose to elaborate upon his excellent work.

It is fascinating to watch a loco startup on its own, switch on lights, play sounds, alter speed and stop at designated places on the layout, wait, points change, then it proceeds to the next stop. If traffic is conflicting one train books its place and the other waits for its route to be cleared. The advantages of sensor based programmed operations over timed based events is evident the first time you run a sensor based program.

I post this to emphasise what RM needs sooner rather than seven years later.


Link to comment
Share on other sites

  • 4 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
  • Create New...