Model Railroad Infrared Sensor Install On Existing Track

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.ค. 2024
  • Welcome back everybody! Be sure to subscribe! Today I am tackling something that honestly made me a bit nervous to try, installing infrared sensors on existing track. I have N scale Kato Unitrack, which would be very difficult to repair if I messed it up. Here is how I did it.
    Arduino Block Signal Video
    • Arduino Block Signal f...
    Harbor Freight Rotary tool
    www.harborfreight.com/96-volt...
    Infrared Sensors
    amzn.to/2QxMrXW
    Drill
    amzn.to/2MxWn0v
    Drill Bit Set
    amzn.to/2p8upiH
    Forstner Bit Set
    amzn.to/2Qxu1Xq
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 51

  • @robertschworm6036
    @robertschworm6036 4 ปีที่แล้ว +2

    Jimmy, I use this same sensor but I installed 3 mm led bulbs with long leads standing up off the pc board at right angles. I then drill 2 side by side holes between a pair of ties. The bulbs are passed up from under the deck, thru the foam base, and to a height where they just show above the subroadbed between the ties. Once this adjustment has been determined, I solder and clip the bulb leads in place to the pc board. The board has a hole, so I lay it flat under the deck and put in one small screw to hold it.
    I use a 12 inich or so - -dupont connector cable with female on one end for the sensor.
    I then daisey chain power and ground from my arduino mega sensor shield to all the sensors and run only the signal line back to the shield. This saves a ton of wire. Think of it like running a sensor buss line of power to all sensors much like your DCC buss.
    If you have a 8 position terminal block close to a grouping of sensors, run all signal lines into this block. Then take a 8 pin cat5 cable and run the one cable back to the arduino shield. Nice and neat - -walla!!
    Bob S

  • @nesr8786
    @nesr8786 5 ปีที่แล้ว +1

    brilliant tutorial Jimmy thank you, keep em coming my friend.

  • @InvertLogic
    @InvertLogic 5 ปีที่แล้ว +5

    IR is good but it is easy to make it trigger with other objects, you can try Hall effects sensor they only trigger when they detect magnetic field, you can use tiny neodymium magnet on the loco or rolling stock to detect the train.

  • @tomd6900
    @tomd6900 3 ปีที่แล้ว

    Thanks Jimmy...Love your videos. They gave some great ideas. I mounted the IRs above the tracks, some 15" or more about. Here are my thoughts, the same ones I expressed on one of your other videos.
    There are glaring deficiencies, in my opinion, with the Osoyoo IR Infrared Obstacle Avoidance Sensor modules including but not limited to:
    • their size makes them difficult to hide, therefore removal of the emitter detector pair is required as these are easier to hide without their printed circuit board;
    • IR emitter detector pairs proximity to the tracks must be close enough in order for the IR beam to reflect off engines and cars;
    • reflectivity varies being reduced due to car color, e.g. white versus black;
    • car configurations vary hampering detection, e.g. flat cars, round tank cars, etc.
    • burying IR pairs between tracks and pointing up are a pain to install, are subject to sunlight and room lights interfering with the detection sensitivity;
    • there is no applicability were a road crosses multiple tracks.
    To solve these issues, I decided to mount the IR pairs in a through beam configuration, similar to what you may have on your garage doors. In this configuration, when the beam is blocked, a train is present. This allows:
    • Mounting the IR pairs facing each other creating a strong signal;
    • it allows them to be up to 15” or more apart increasing the ability to hide the IR pairs;
    • Makes alignment easy, that is, as long as the green LED on the module is lit, the detector is “seeing” the emitter;
    • The IR pairs are less likely to be affect by ambient light;
    • Instead of aligning the IR pair perpendicular to the tracks, they can be mounted diagonally to look up or down a track thus preventing the beam from “seeing” between cars should the train stop;
    • The IR pairs can see across multiple tracks, 3 in my application making the signal system work not matter which track the train is on.
    Solution
    So, the question arises as to what to do now that the signal going to the Arduino A0 & A1 is reversed. In the normal configuration, the green LED off means;
    • no train or car present;
    • the “Out” pin on the IR module going to either A0 or A1 is high (~4.8vdc)
    When the green LED is lit;
    • a car is present;
    • the “Out” pin on the IR module going to either A0 or A1 is low (~120mVdc).
    In the new configuration, just the reverse output happens, e.g. no train present, LED on, “Out” is low, and so on.
    Since I am not a programmer, I had no idea how to modify the Sketch to address this voltage reversal. Since I am proficient in using printed circuit boards (PCBs) and mounting components on them, my solution was to make voltage inverter PCBs made up of 2 resistors, an NPN transistor and an indicator LED for each IR emitter detector pair. This inverts the signals (voltage) going to A0 & A1 in the new configuration to the old configuration so the Sketch works perfectly without modification.

  • @dukesnyder3607
    @dukesnyder3607 5 ปีที่แล้ว +3

    I use the same sensors, however I clip off the 5mm IR LEDs and attach 28 gauge wires to run to 3mm IR LEDs. This way I can have the sensor board on the control panel to monitor &/or adjust it if needed. I have run the IR LEDs 20 feet away from the board with no problems. I can put two between two ties on HO scale using two 3/16 holes. Good video if you don't want to modify the sensor board!!

    • @kenmoordigian1738
      @kenmoordigian1738 5 ปีที่แล้ว

      I agree. I can't see carving that canyon between the rails, then having to mount the sensor board there. My installation is as you describe, very clean, unnoticeable once it's ballasted, and I can easily adjust the sensor any time I want.

  • @terrylangeland9655
    @terrylangeland9655 4 ปีที่แล้ว

    I used a method similar to a later post. I removed the IR led and Sensor and replaced with 3mm longer lead sensor and led from the reverse side of the sensor unit. Then drilled 5/32 holes for the led and sensor. This works well if you drill the holes parallel to the track separated by a single tie

  • @manshedrailroad
    @manshedrailroad 2 ปีที่แล้ว

    If you use a small piece of scrap wood underneath where you are drilling the home it will prevent tear out when the bit cones through. Excellent video!!!!

  • @DruSteel69
    @DruSteel69 5 ปีที่แล้ว

    Wow Jimmy. You made it look so easy. That’s so cool. I think I’m understanding now why you named your railroad “digital “. 😁. Thanks for sharing. - Drew

  • @donmartin9567
    @donmartin9567 7 หลายเดือนก่อน

    Hi Jimmy, for some reason this video came up again and I'd share where I am now. I originally installed the IR detectors but I found that they were not totally reliable. In particular, they reacted to some LED lights I installed. So, I pulled those out and tried photoresistors and that's what I use now (I have 5 speedometers installed).
    Anyway, as part of my Arduino Sketch I sample my PhotoResistors to see what light they are getting and then set the trip value to something like 75% of that value. This way, if it is really bright it works fine and, if it is somewhat dim (not totally black) it still works. So while this doesn't work at night it does work in a dimly lit area.
    For my last install, it is on our club layout which runs in various places as it is transportable so I'm looking forward to see if there are any issues with the speedometer being installed in these different locations all with different lighting.

  • @ThePwcj
    @ThePwcj 5 ปีที่แล้ว

    Good job! Thank you and take care.. Paul.

  • @dacuzzz
    @dacuzzz 5 ปีที่แล้ว

    great how to Jimmy... thanks for sharing... vinny

  • @donmartin9567
    @donmartin9567 5 ปีที่แล้ว

    Thanks Jimmy. I've been waiting for this as I want to do the same thing (to create an Arduino based N Scale speedometer). I'm thinking I'll use Hot Glue so that the sensor is "somewhat" removable and I'm using regular flex track and have ONLY foam as a base - no plywood. I like the idea of using a terminal strip though. I'm also thinking of using Servo Wires as connectors to the sensor as these come as 3-wire sets - I'll need to test fit to make sure.
    Thanks for the Video, gave me some good ideas. Oh and I LOVE my Forstner bit set!

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  5 ปีที่แล้ว

      That's probably a good idea. I think I need to invest in a hot glue gun!

    • @donmartin9567
      @donmartin9567 5 ปีที่แล้ว

      I use a Woodland Scenics, just happens to be brand name but it is a low temp "foam safe" hot glue gun. A high temp one would melt into the foam I have all over the pace. You don't have a lot of working time but if you've test fit what you want to glue AND the way you'll get the surfaces together and "practised" inserting (or whatever) the piece you'll have enough time. Plus, you can use it to fill gaps (not too large) and you can cut it to remove "overglue". You can paint it although it isn't the best surface for that.
      It works REALLY well when you want to take some light foam board and do some mockups.

    • @hansviergever958
      @hansviergever958 5 ปีที่แล้ว

      @@DIYDigitalRailroad Bought one for $4.47 with 10 sticks at Walmart.... not quite a Dollar store, but will check on my next visit.... great videos, just found your site.

  • @JoeG-firehousewhiskey
    @JoeG-firehousewhiskey 5 ปีที่แล้ว

    Very cool, thanks for your help. Im att hat point where I was wandering should I lay the track down or place the sensors in the wood.

  • @mjtunstall1976
    @mjtunstall1976 2 ปีที่แล้ว

    great idea! never thought of that hey quick question, can it be used to operate switch machines to change points?

  • @chazco
    @chazco 5 ปีที่แล้ว

    Excellant

  • @michaelmorgan7893
    @michaelmorgan7893 ปีที่แล้ว

    I run in only DC. Will that infrared sensor work with the Atlas signal system?

  • @robertschworm6036
    @robertschworm6036 5 ปีที่แล้ว +2

    If you had changed out the leds for ones with longer leads, you then could have made 2 small holes, pushed the bulbs up thru, and laid the sensor flat to the baseboard and been able to adjust it as required. Of course the bulbs would have been bent 90 degrees to the pc board so it could lay flat. Bob.

    • @josephtannenbaum8696
      @josephtannenbaum8696 4 ปีที่แล้ว

      Longer leads and 3mm LEDs. drill two 1/8" holes in the track, push up from bottom and a drop of glue to hold it there.

  • @techisgod
    @techisgod 5 ปีที่แล้ว

    Is the IR Emitter modulated?

  • @OPS_GUY2023
    @OPS_GUY2023 7 หลายเดือนก่อน

    Question so the infrared sensor is supposed to go between the rails?

  • @si12volt1
    @si12volt1 2 ปีที่แล้ว

    hi Jimmy ...if The sensor is 3 to 5 v output the signal lights are 12volts well the ones I have are anyway ..how did you get the signal led lights to work I haven't seen any premade in 2 or 3 way n scale signal lights in 3volt to 5volt...

  • @joepawlak9280
    @joepawlak9280 5 ปีที่แล้ว +1

    Ran across a strange problem after installing the 3mm IR detectors. While running a Athearn Trainmaster the IR would not respond until I placed a piece of masking tape under the fuel tank.

    • @SheltonDCruz
      @SheltonDCruz 2 ปีที่แล้ว

      the surface has to be reflective and not black of colour

  • @hansfehlow9657
    @hansfehlow9657 5 ปีที่แล้ว

    Great video thanks for sharing. I'm curious, with this method can you only run 2 block signals per 1 Arduino or do you have a way to run more off of a single Arduino?

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  5 ปีที่แล้ว +1

      My system uses one arduino per block, but you could certainly do more than one. You could connect 5 sensors to the analog inputs, and with some recoding, you could do 3 blocks with that. You would need 12 digital outputs for that to work with the signaling, so you may want to consider an Arduino Mega for that.

  • @playingwithtrains7764
    @playingwithtrains7764 5 ปีที่แล้ว

    This is really helpful and well presented. Because the sensor is light activated, do you encounter problems when you fill in the hole around the detection bulbs?

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  5 ปีที่แล้ว

      So I have not attempted to fill in around just yet and I am trying to figure out the best plan of attack for that. I want a method that isn't permanent so that I can work on the sensors if need be.

    • @playingwithtrains7764
      @playingwithtrains7764 5 ปีที่แล้ว

      Would it be possible to mount the sensor portion (the two bulbs) remotely from the circuit board? That way, you could make adjustments to the pot on the board without having to either have a big hole in your fascia or removing the entire thing.

  • @randomgeminiastronaut46
    @randomgeminiastronaut46 5 ปีที่แล้ว +1

    Hey I'm make a new train board with new pices do you have any advice on grass paper and foam

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  5 ปีที่แล้ว

      I have a couple of scenery tutorials. I would check those out. I do recommend painting the board and using simple household latex paint for that.

    • @randomgeminiastronaut46
      @randomgeminiastronaut46 5 ปีที่แล้ว

      @@DIYDigitalRailroadThanks!

  • @TechBuild
    @TechBuild 5 ปีที่แล้ว

    How much space does your layout occupy?

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  5 ปีที่แล้ว

      My layout is on 2 hollow core doors that are 80"x30" in an L shape

  • @michaelmorgan7893
    @michaelmorgan7893 5 ปีที่แล้ว +1

    One more thing....I may have missed it, but is this HO or N scale?

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  5 ปีที่แล้ว +1

      this layout is N scale but this will work on HO scale as well

  • @michaelmorgan7893
    @michaelmorgan7893 5 ปีที่แล้ว

    Where can you buy the sensors?

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  5 ปีที่แล้ว

      There should be a link in the description to purchase them off amazon.

  • @paulhayden3446
    @paulhayden3446 5 ปีที่แล้ว +2

    Could a guy remove the emitter and sensor from the board and remotely install them in 2 smaller holes with the board under the layout?

    • @DIYDigitalRailroad
      @DIYDigitalRailroad  5 ปีที่แล้ว

      I've actually thought about that and taking a look at the parts, it looks like it could be done.

  • @walshrd
    @walshrd ปีที่แล้ว

    Some comments... The IR sensor you used between the rails is too large. The result is ugly and not realistic. You'd been better off leaving the photo resistor in place. A question...? Why did you choose to use Kato track? If you are modeling North American railroading, the tie spacing used on Kato track is too large. Secondly, Kato track is non-flex which which makes a layout look too rigidly formal and contrived.