DCC issue with Heljan Turntable

Discussion in 'DCC Control' started by Brian A, Jul 2, 2020.

  1. Jim Freight

    Jim Freight Full Member

    Messages:
    1,128
    Likes Received:
    915
    Joined:
    Sep 9, 2019
    Hi Brian

    My opinion at this stage from what you have described and the YouTube video is as follows.

    It is very likely that the TT bridge motor is a stepper motor and is told to step a number of times in a particular direction by the control panel.
    The control panel holds the user data on where each entry/exit track position is relative to the zero datum as a number of steps.

    The TT bridge PCB would have no knowledge of where the entry/exit tracks are.

    I see no evidence that the TT well, pit or bridge incorporates any absolute position feedback, also it would cost too much for a £200 TT.

    The only feedback that appears to be fitted is the IR emitter in the well side used to zero datum the motor controller in the TT bridge.

    Every other movement is open loop and relies on the stepper motor not missing a step. For example if the bridge was to jam for a few steps it would stay out of alignment with the tracks until the the IR emitter was passed again. Small missteps would be accommodated by the chamfered track ends on the TT bridge and the entry/exit tracks.

    The Tx/Rx interface between the control panel is a possibility, electrical interference, connector at the TT PCB or an interface component on the TT PCB but this would not explain how the track number on the control panel is correct without feedback from the TT PCB, which as I believe from above it cannot provide.

    Given that the DCC sniffer detects no rogue commands and the track# on the control panel matches the TT position my next point of investigation would be to apply a digital scope to analyse the Tx/Rx connection between the control panel and the TT bridge and decode the communications which I would expect are simple in format.

    Quite a mystery, I would be interested to know what the issue turns out to be when you solve it.

    Jim
     
  2. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    Jim,

    Good synopsis, however not quite correct. From the MERG article and my own physical inspection, all the logic is on the PCB in the bridge. There is a chopper in the bridge which is what it uses for tracking its position. The IR is only used to give a reference point for the bridge to know its start position.

    If you change the control box, the bridge retains the knowledge of the positions of the tracks. I believe all the control box does is manage the user controls, update the display, change the voltage and read the DCC commands/user input and send them to the Bridge.

    The MERG article in December 2018 edition has put a digital scope and has deciphered a lot of the messages. He then used an Arduino to interface it with the MERG CANBus. I was considering doing something similar with an Arduino to filter the DCC commands, but its a bit above my skill level. Not sure that would fix the problem either.

    I also thought the interference could be on the cable, so I wrapped it in foil.

    Ill keep scratching.

    Brian
     
  3. Jim Freight

    Jim Freight Full Member

    Messages:
    1,128
    Likes Received:
    915
    Joined:
    Sep 9, 2019
    Hi Brian
    Right, I stand, or rather, sit corrected :avatar:

    What is a 'chopper' in the context of this TT?
    All this seems a lot of work, oh, and don't forget to enjoy your trains, I forget occasionally :facepalm:

    Jim
     
  4. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    Jim, thanks for your inputs, you have got me to try some different things, no joy thou :-(

    The chopper is like a small propellor that the motor drives, the blades cut a beam and the PCB uses that to track the movement of the TT.

    To install and setup the TT was pretty easy and it works really well EXCEPT for these bloody unannounced movements. Apart from that I am enjoying my trains, have two layouts and currently building a garden railway.

    Cheers
    Brian
     
  5. Jim Freight

    Jim Freight Full Member

    Messages:
    1,128
    Likes Received:
    915
    Joined:
    Sep 9, 2019
    Right Brian, as fitted to early optical computer mice.

    What scale and standards are you building your garden railway to?

    Jim
     
  6. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    Jim Freight likes this.
  7. Jim Freight

    Jim Freight Full Member

    Messages:
    1,128
    Likes Received:
    915
    Joined:
    Sep 9, 2019
  8. Geoff-Lousy

    Geoff-Lousy Full Member

    Messages:
    1
    Likes Received:
    0
    Joined:
    Oct 28, 2020
    Hi Brian,
    I have the same issue with RR@co and my Walthers (Heljan) turntable (- weird random movements). I was just wondering if you ever found the cause of the problem and/or a solution?
    Cheers.
    Geoff
     
  9. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    Geoff,

    No I haven't been able to fix the problem. Currently I have no further avenues of investigation. I have proven that it is internal to the blue box, but what causes it I haven't been able to establish.

    I am moving my RR&Co onto a O gauge garden railway and turning my OO into an On30 layout. The heljan TT will be used on the On30 layout but I will wire it up with 13-16VAC for TT operation and DCC only to the tracks.

    Cheers
    Brian
     
    jakesdad13 likes this.
  10. M Reed

    M Reed Full Member

    Messages:
    3
    Likes Received:
    1
    Joined:
    Nov 21, 2020
    Dear "Brian A",

    I joined this forum specifically to add to your extensive and detailed post about DCC problems with your Heljan 89121 turntable. I also have this model (in fact 2 - 1 as a spare as the first one blew up with the usual Err1 power issue), it also suddenly produces random movements and I have also gone through many of the same tests that you have. I run a Digitrax DCC setup and like you, use Railroad & Co.'s Traincontroller software (V8 Gold). I agree that these random movements at any time in an operating session ruin any chance of properly using the TT with Traincontroller, schedules, Autotrain etc. because half the time the TT is unlikely to be where TC was last told it was. As you say - "engine in pit" is the usual result!

    There is one important diagnostic that you could check although I appreciate that you may no longer be using your #89121 with DCC - partly because of this seemingly intractable issue. I first read about this on an RMWEB post by "westaust55", who posted this discovery back in 2017.

    Using the default base address of 57, my first DCC Track 1 address is accessed using ID=225, 'closed' or 'thrown'. My registered Track 2 address would therefore be 226, Track 3 = 227, and so on. I have 12 tracks orientated in pairs, so my twelfth and final position would be accessed using ID= 236. As for you, all this works fine with the Heljan's blue controller, calling Go/Set 1-12, or DCC "points" 225-236, or calling 225-236 'c' or 't' in TC's macros, push-button actions etc.

    However, if I ADD 256 to these numbers, I get the same movements - as suggested by "westaust55". So, if I call, say, 227+256 = 483, the TT will ALSO move to Track 3. If I add another multiple of 256, so (228 (Track 4) + 2*256) = 740, the Heljan TT will move to Track 4 !! If I add 3*256 to my actual track IDs, I will get the same movements. I haven't tested it beyond ID=999, but the sequence of erroneous moves may well be infinite.

    You could test this theory of adding one or more multiples of 256 to your range of TT DCC track position addresses and see if you get the same movements. To my mind this explains the seemingly random and uncalled-for Turntable movements. In my case, my actual points number 1 to 124, my TT should be restricted to the low 200's - where absolutely nothing else is used, but above about 400, I have several Digitrax SE8c boards which are switching signals. So, the switch of some signal on the other side of the layout from amber to green may call ID 742, and that will ALSO cause the Heljan #89121 to move to Track 5 - and so on. There is no range of accessible Heljan Turntable base addresses that, when multiples of 256 are added, do not result in conflict with signal boards etc. on my layout.

    So, your observation that the DCC sniffer showed no untoward calls in the desired TT address range is correct - I found the same thing. In your conversation, the suggestion that one might use an Arduino interface to limit/filter the addresses that the TT controller sees is an excellent one, but is also a bit above my skill level. You use a Lenz DCC system, I'm using Digitrax, and 'Westaust55' was using NCE, so this is nothing to do with Command Station models or manufacturers.

    It is quite simply, a big bug in the address handling firmware in the Heljan blue control box. When contacted by both you and Westaust55, they seemed to prevaricate or blame other vendors' equipment. I have now written to them too and even sent them the pictures they requested etc. If you can reproduce this specific behaviour of wrongly also interpreting/acting upon your correct addresses + multiples of 256, then the bug will be very well confirmed.

    I hope that this has been interesting or helpful for you - please let me know what you think.

    Martin Reed
     
  11. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    Martin,

    Thanks for posting your findings, I still run my Heljan TT on DCC but I only use it with TC when I am not running trains etc, just doing shunting.

    I am away until the end of the month, but I will do the test as soon as I am back. I will let you know the results.

    I do have my spreadsheet with the point and signal allocations so I can look to see if I have numbers in the +256 range.

    Cheers

    Brian
     
  12. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    Martin,

    I looked at my spreadsheet and because of the problem I set my TT to 60 = DCC addresses 237-262. I then reprogrammed all my signals and points (Over 100 of them) to be less than 237. So the +256 bug isn’t causing my movements.

    Once I changed to the above scenario the number of random movements reduced significantly. I still get movements but like 3-4 an operating session rather than almost constant movement I was getting earlier.

    This does however give me something to work on. I suspect that there may be another number that may be causing issues. As 256 is a significant number in binary maybe a lower number may also be causing the problems. It may be a binary interpretation issue.

    I will test the +256 bug when I get home and do some more testing to see if I can get to the bottom of the issue.

    Cheers

    Brian
     
  13. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    So I tried something different today. I got my mate, who is pet sitting for us, to boot up the trains and test the TT. I had to walk him though using the Lenz hand controller over the phone.

    Results were the +256, and +512 bug were confirmed. Ie with Heljan accessory address set to 60, DCC addresses 243, 499 and 755 all moved the TT to track 7. 256 and 512 are the next two binary digits above the DCC address ie 243 = 11110011, 499 = 111110011 and 755 = 1111110011.

    What these means is that Heljan are only reading the first 8 binary digits of the address. Which explains why they limit the accessory address to 60.

    Still doesn’t explain why mine still does unexpected movements with all my accessory addresses below the TT addresses. I need to do some more sniffing. The issue is that there is normally about 2-3 commands around when the TT movement starts. But with this new knowledge I may be able to see what code is causing the movement.

    I will do some more testing when I get home.

    Cheers

    Brian
     
    gkennedy likes this.
  14. M Reed

    M Reed Full Member

    Messages:
    3
    Likes Received:
    1
    Joined:
    Nov 21, 2020
    Dear Brian (and your Pet-sitting mate!),

    Your confirmation is excellent news and really explains not only what the Heljan blue control box is doing, but also what they need to do to fix this bug. I agree that there may be higher addresses (i.e. above the last Heljan registered track DCC ID) that are being called or switched that I'm not aware of. On my system, all the Digitrax boards also support "Routes" which may well involve these higher IDs. I never use these Digitrax routes and leave all of that to TC, but that doesn't mean that some of these IDs aren't being changed/called as points or signals are switched.

    I too can do some more tests and 'sniffing', and am happy to report back on this forum. However, I feel that with your detailed contribution, Heljan now have plenty to work with - basically if they read the whole address in binary, rather than just the first 8 digits, the problem should go away and the resultant turntable action would be restricted to only exactly the registered addresses desired and called.

    Thank you for your contribution to this. Heljan haven't got back to me with a course of action yet, but I can send them a synopsis of this confirmation too.

    Cheers
    Martin
     
  15. M Reed

    M Reed Full Member

    Messages:
    3
    Likes Received:
    1
    Joined:
    Nov 21, 2020
    Dear Brian (again),

    I briefly tested the theory that other 'significant' binary numbers could also cause extraneous movements, but I only get the unwanted turntable moves with multiples of 256 added. Here are my quick results, as far as they go (using Base Address = 57 as before) :-

    Correct/desired address Track 03 Track 04 Action
    227 228 Turntable moves Trk 3 <-> 4 desired movement
    add 256 to these No. 483 484 Turntable moves Trk 3 <-> 4 unwanted movement.
    add 128 to these No. 355 356 No movement
    add 64 to these No. 291 292 No movement
    add 256 + 32 to these No. 515 516 No movement
    add 256 + 128 to these 616 612 No movement
    add 256 + 256 to these 739 740 Turntable moves Trk 3 <-> 4 unwanted movement.

    Like you, I'll still try and understand exactly what is calling or changing these higher IDs on my layout - i.e. (in my case) Digitrax's unused "Routes" or something else.

    Cheers
    Martin
     
    gkennedy likes this.
  16. gkennedy

    gkennedy Full Member

    Messages:
    8
    Likes Received:
    4
    Joined:
    Dec 9, 2020
    Gentlemen, this is very interesting to me. I had given up on using my Heljan TT dcc control but your posts have encouraged me to do some experimentation. I have a #81921 HO 90' turntable. My Command station is a Digitrax DCS100, I have a number of BDL168 occupancy detectors, DS64 accessory decoders, a DT402 controller and some arduino based accessory decoders and occupancy detectors. I also run Train Controller v8 Gold.
    My TT is programmed with the default address of 57 and has 26 track positions. The address range is therefore 225 to 250. I have wired the blue box controller in accordance with the instruction manual in that a track feed supplies terminals 3 & 4, bridged to terminals 1 & 2. Using the blue box controller, everything works perfectly. Issuing switch commands from the DT402 or from Train Controller in the range 225 to 250 works perfectly. I tested your idea that issuing a switch command which is the address + 256 or 512 would activate the turntable and found that I could replicate your results exactly. I also tested switch addresses from 1 to 224 and 251 to 480 and found that there was only one anomaly, which I will come back to. From 481 onwards of course, I was back to the accessory address + 256 problem so I went no further. I can confirm that accessory addresses higher than 999 continue to cause the +256 problem as all of my signals have addresses starting at 1000.
    Now to the anomaly. I found that issuing switch command 17 (My turnouts are in the range 1 to 40) sent the TT to position TR8. This doesn't fit into the binary number solution at all. TR8 has the address 232 which is 11101000 and 17 is 00010001 (Assuming my decimal to binary calculation is correct!!!). Perhaps someone can try and replicate this to check if the same thing happens?
    I also experimented by changing the connections to the blue box. I left 1&2 connected to the dcc track supply and connected 3&4 to an independent 15v ac supply. The +256 issue remained, however the switch 17 anomaly disappeared. Again, perhaps someone might care to replicate that.
    I made one final observation and that was when the track power is switched on, either using the DT402 or by starting Train Controller, the TT moved to TR25. This happened regardless of whether the power supply came from the DCC bus or the independent supply.
    OK, so in reality, all that I have done is verified the results of others and posed a couple of extra questions. There is no doubt that there is a problem with the decoder on the TT and Heljan need to sort out the hardware or the firmware. In the meantime, my TT is set up as a test rig so I am happy to run tests if anyone wishes, the more information that we have, the better, I guess.
    George
     
    Brian A and SMR CHRIS like this.
  17. gkennedy

    gkennedy Full Member

    Messages:
    8
    Likes Received:
    4
    Joined:
    Dec 9, 2020
    Evening All, I've been doing a bit more playing around with this with the following, disturbing observations. First of all, going back to my previous post, the anomaly that I had with switch 17 causing the TT to move to track 8 was being caused in Train controller. I have a signal with dcc address 1000 which was conditional on the position of turnout 17. Track 8 has address 232, when T17 changed position, the signal changed aspect. Address 1000 is 232 + 256 + 256 + 256 so that is why the turntable moved to track 8. Although that question now seemed to be resolved, a new problem arose. Issuing the switch command 17 now moved the turntable to Track 25 most times but not every time. I did some more investigating and this is what I found, I would be interested to find out whether other members can replicate this.
    Brian mentions in Post #33 that he gets random movements with addresses below the range used by his TT and this fits in with what I have found.

    I only had my DCS100 and DT402 throttle connected for this experiment (i.e. no other accessory decoders and no Train controller running)

    I found that 1 or any multiple of 4 plus 1 moved the TT to track 25 (e.g. 1,5,9,13,17....101,201,401 etc)
    I also found that 2 or any multiple of 4 plus 2 moved the TT to track 26 (e.g. 2,6,10,14...202 etc)

    Sometimes this involves sending the same command twice, say Sw 001 c followed by Sw 001 c. In normal practise, it would be unusual to do this but it can happen which adds to the impression of random behaviour from the TT.

    You might be wondering why I have programmed 26 tracks, it does seem a lot but in actual fact there are only 13 real tracks, the other 13 are simply the same positions with the bridge at 180 degrees. This allows me to program Train controller to not only move the bridge to the correct track but to keep the engine orientation how I want it to be.

    So what happens if I just remove 1 track and therefore have 24 positions (12 tracks)? Well, this particular problem goes away although the +256 bug remains. The TT which moved to TR25 when track power was switched on has also disappeared.

    If I shift the base address down from 057 to 056 and re-instate tracks 25 and 26, the problem doesn't manifest itself, suggesting that the problem lies with addresses 249 and 250 (Tracks 25 & 26 with a base address of 057)

    If I then shift the base address to 058, all of the issues listed above return except that instead of tracks 25 and 26, the TT moves to tracks 21 and 22.

    What are my conclusions from all of this?
    1. The +256 bug is real and can be reproduced by anyone.
    2. There is something special about addresses 249 and 250.
    3. The Heljan decoder is fatally flawed and needs to be corrected.
    4. In the event that Heljan do not rectify the decoder problem, it may be possible to programme other accessory decoders to avoid the addresses within the range used by the TT plus multiples of 256.
    5. If there are other "special" addresses other than 249 and 250, the previous conclusion will be become more difficult to achieve!

    Like others, I too have emailed Heljan but as yet have had no reply, if and when I do get one, I will post back here.

    In the meantime, as I said in my previous post, I am very happy to conduct experiments with my turntable here.

    All the best,

    George
     
    Brian A and SMR CHRIS like this.
  18. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    George, Thank you for your contribution, Since coming home I hadn't got around to doing any testing. Interestingly with my TT set to 60 and with 10 tracks I don't have any addresses 249 and 250. So you got me to power up the layout and try some things. 249 and 250 do not make my turntable operate.

    All my points are programmed from 113 to 235. I have removed all the signals from the layout.

    With my TT set to 60, It randomly picks tracks 7 and 8 (243 and 244).

    I set my TT to 61, so that 249 and 250 were in the range of iDs and guess what it went to track 8 again (now 248)

    So I set my TT to 16 (61-70) well below first point number, It randomly picked tracks 3 and 4 (63, 64).

    I am starting to think it is purely random. Doing my head in!!!!

    Cheers

    Brian
     
  19. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    Ok more testing done, and I have a new theory.

    So with TT set to 16 (61-70) the number of random movements increased markedly. In a one hour operating session using TC with 6 trains running I had tracks 1,2,3,4,6,7,8,9, and 10 randomly selected.

    I had the sniffer running and very inconsistent results!

    However after that session I was manually (in TC) changing my double slips and three way points, which have two motors. So operating two double slips 132/133 and 151/152, I would get tracks 8 and 9 from either set.

    According to my sniffer TC fires off both the requests at the same time:

    17:09:10.886 -> Acc 133 34:0 1 Off 10100010 11111000
    17:09:10.886 -> Acc 132 33:3 1 On 10100001 11111111

    17:09:27.350 -> Acc 152 38:3 1 Off 10100110 11111110
    17:09:27.350 -> Acc 151 38:2 1 On 10100110 11111101

    I think what is happening is that the TT can't read the inputs that fast, possibly the processor isn't fast enough. Also when TC is operating trains it will fire off multiple requests in quick succession:

    16:23:07.170 -> Acc 232 58:3 1 On 10111010 11111111
    16:23:07.418 -> Acc 221 56:0 1 Off 10111000 11111000
    16:23:07.708 -> Acc 231 58:2 1 On 10111010 11111101
    16:23:08.000 -> Acc 230 58:1 1 Off 10111010 11111010

    So when I was getting changes I couldn't relate one movement to one request.

    The problem isn't as bad but still exists at the higher addresses.

    So the next thing is can we get TC to slow down the requests?

    Cheers

    Brian
     
  20. Brian A

    Brian A Full Member

    Messages:
    91
    Likes Received:
    135
    Joined:
    Jun 12, 2019
    Ok you can set the Turnout Interval in Setup Digital Systems, I set mine to 2000, which is 2 seconds. Each Turnout also has Switch Time under its properties, if you change that I was just getting multiple transmissions of the request which was making it worse.

    I also changed the TT address back to 60 so for me that equals 237 to 246.

    I ran my trains again and had NO random movements.

    I don't think we have solved the problem but this may be a good workaround. So please guys change the Turnout Interval and give it a test. Also use as high an address block as possible to reduce errors.

    Cheers

    Brian
     

Share This Page