Different way to do detection....

crusader27529 Mar 10, 2016

  1. Papajohn88

    Papajohn88 TrainBoard Member

    39
    27
    2
    Good Morning, I need a little clarification about setting up your signal system. It appears to me that for a block I will need two IR modules, two sensor modules, one detector module and one counter module. I am a little confused about the detector modules, do I need one or two for each block? I am starting to put a test system together and just want to make sure I have everything straight in my mind about what I need to build. Once I have a test system working then I will order PC boards to build what I need for my layout.

    Thanks
     
  2. crusader27529

    crusader27529 TrainBoard Member

    202
    156
    6
    A block consists of a counter which connects to detector at each entry, so even though it connects to 2 detectors, because each detector connects to 2 counters, the number of modules needed is one counter and one detector per block.

    Each detector connects to one set of sensors, which consists of an IR source module and a sensor module. The sensor is used by the detector module to determine the direction of travel of whatever it sees, and it sends a count up and a count down signal to the appropriate counters based on direction of travel.

    If the motion is to the east, it sends a count up to the counter that's to its east and a count down signal to the counter to the west. The opposite direction causes just the opposite. The biggest issue you'll have is getting the connecting wiring straight in your head......the modules have east and west labeled inputs and outputs, but those labels are only relative to the modules themselves.

    So, a detector east count up signal means that the direction of travel is to the east, so the counter to the east should see that count up signal, AND the west count down signal will be sent to the counter to the west.......clear as mud, but makes perfect sense. Just connect the CUP and CDN signals (east or west) to the next counter in the appropriate direction.
     
  3. Papajohn88

    Papajohn88 TrainBoard Member

    39
    27
    2
    Thanks, that helps a lot. I am going to to try to set up a test system to see how it works and then move on to the real thing for my layout. I am looking for the appropriate connectors for the Arduino Pro Mini boards and the 2.54mm pitch screw terminal. I think I have found sources for both of those. I am also looking for a company to make the circuit boards for me. if I just do the inner and outer loops of my layout I think I will have 8 to 10 blocks.
     
  4. wvgca

    wvgca TrainBoard Member

    54
    22
    11
    For small quantities, OSHpark are decent, just need the gerber and excellon files..
     
  5. Papajohn88

    Papajohn88 TrainBoard Member

    39
    27
    2
    Thanks Warren, I checked them out, uploaded the KiCad files and got a quote, seems reasonable to me. Now I need to either find some inexpensive signal masts or find some plans to build my own. I am looking forward to implementing signaling on my new layout using the system presented here.
     
  6. wvgca

    wvgca TrainBoard Member

    54
    22
    11
    On OSHpark you can set the board files as a 'shared project', and other people will be be able to order duplicat pcb's s .. You can also add a bill of materials to that set of files, if you decide to share
     
  7. Papajohn88

    Papajohn88 TrainBoard Member

    39
    27
    2
    I will check with crusader27529 after I get my first boards since this is his design. He has placed them in the public domain.
     
  8. crusader27529

    crusader27529 TrainBoard Member

    202
    156
    6
    Public domain is free for anyone who wants to use it.......enjoy.
     
  9. Papajohn88

    Papajohn88 TrainBoard Member

    39
    27
    2
    Thank you for your reply, I am really excited about getting the boards made and implementing your signaling design on my layout. As I said earlier I am assembling one set up now on solder less bread boards so I can see how it works. In the mean time I will be looking forward to receiving my first three of each board from OSHpark.
     
  10. Papajohn88

    Papajohn88 TrainBoard Member

    39
    27
    2
    I received my boards yesterday from OSH Park, they all look really nice. I ordered three of each board for a total of $44.35. I suppose I could have gotten them cheaper using an off shore company. It took about 14 days, I ordered them on December 6 and received them on December 19th. Now to start assembly of the first set. I still need to get screw terminals and perhaps female headers to plug the Arduino Pro Mini boards into. Would it be better to use the female headers or just solder the pins on the arduino directly into the board? I am getting anxious to play with them on the layout.
     
  11. crusader27529

    crusader27529 TrainBoard Member

    202
    156
    6
    The headers have an obvious advantage (re-purposing the arduino or replacing a bad board), but they're 'tall', and depending on how you physically set the system up, could be a negative.

    I personally think that the headers are the way you should go.
     
    Papajohn88 likes this.
  12. Papajohn88

    Papajohn88 TrainBoard Member

    39
    27
    2
    Thank you, I was thinking the same thing. I just wanted another opinion. I will order some 12 pin female headers.

    Sent from my SM-N910T3 using Tapatalk
     
  13. v64

    v64 TrainBoard Member

    21
    19
    3
    I see the last entry is dated Dec 22 2016 so ...
    May I ask What is the status of this project, and has anyone set up a system using these ideas?

    I am looking for a way to count cars into position over a (magnetic) decoupler which gives accurate positioning, so that I can decouple anywhere
    within a train.

    Thank-you
     
  14. crusader27529

    crusader27529 TrainBoard Member

    202
    156
    6
    The code keeps track of the number of transitions into or out of a block, and is specifically designed for block occupancy.

    It does NOT report the number of transitions external to the system, but since the code is published, hack away to make it do what you want........
     
  15. Scott Eric Catalano

    Scott Eric Catalano TrainBoard Member

    198
    55
    6
    I'm not looking to count cars/wheelsets I am only looking at standard block occupancy using the IR detectors which I have plenty of and do not want to go the current sensing route.
     
  16. crusader27529

    crusader27529 TrainBoard Member

    202
    156
    6
    Well, you really can't accurately determine block occupancy with IR detectors at t he block boundarieswithout knowing the direction of travel, or limiting the direction of travel, which you already have observed.
     
  17. Bret Kuehn

    Bret Kuehn New Member

    5
    4
    1
    Crusader, I have been following different block detection threads and have a question for you. In your plan you have IR emitters and detectors on either side of the track, could a QRD1114 optical detector be used under the track? If it would work it would make detection inconspicuous... here are a few pictures....
     

    Attached Files:

  18. crusader27529

    crusader27529 TrainBoard Member

    202
    156
    6
    Not really, for two reasons......a reflective sensor isn't accurate enough, and my design uses a sensor that's tuned to 38KHZ frequency to prevent ambient signals from being detected, and second, the system detects and counts either trucks or wheelsets(depending on where and how the sensors are mounted) and a reflective sensor isn't designed for transmissive detection.

    I plan on mounting fiber optic cables in the rails with the IR source between the rails. All I need to do is learn how to do 3-d printing to mount the emitter and detector to the FO cables. It's a steep learning curve, but once mounted, the detctors should be almost invisible. All the electronics would be mounted under the layout, with just some 1mm FO cables above the layout. They're small enough so they can be completely hidden or made to look like objects that 'belong' near the rails. The FO cables need to be mounted into slots in the rails for detection.
     
  19. crusader27529

    crusader27529 TrainBoard Member

    202
    156
    6
    Here is the complete package including the code for all the Arduino(s), and the necessary schematic and files to get the parts manufactured, PLUS a document explaining it all.

    It's actually very simple, and amazingly flexible, and suitable for small layouts up to medium sized club layouts. It will be installed in my club layout which is about 40' X 20'. It has 35(if I remmeber correctly) locomotive slots versus 12 in the original.
     

    Attached Files:

Share This Page