Model Railroad Infrared Sensor Install On Existing Track

  Рет қаралды 34,912

DIY and Digital Railroad

DIY and Digital Railroad

Күн бұрын

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

Пікірлер: 52
@williamj3843
@williamj3843 8 күн бұрын
Amazing tool control making the slot through the track one-handed so that your support hand didn't block the shot. I just purchased a later version of that IR detector that should mount perpendicular to the rails on N gauge track.
@tomd6900
@tomd6900 4 жыл бұрын
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.
@robertschworm6036
@robertschworm6036 4 жыл бұрын
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
@InvertLogic
@InvertLogic 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.
@donmartin9567
@donmartin9567 8 ай бұрын
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.
@nesr8786
@nesr8786 5 жыл бұрын
brilliant tutorial Jimmy thank you, keep em coming my friend.
@DIYDigitalRailroad
@DIYDigitalRailroad 5 жыл бұрын
john mcintosh Thank you!
@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!!!!
@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
@dukesnyder3607
@dukesnyder3607 5 жыл бұрын
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.
@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
@DIYDigitalRailroad
@DIYDigitalRailroad 5 жыл бұрын
😄Thank you!
@ThePwcj
@ThePwcj 5 жыл бұрын
Good job! Thank you and take care.. Paul.
@DIYDigitalRailroad
@DIYDigitalRailroad 5 жыл бұрын
ThePwcj Thank you!
@dacuzzz
@dacuzzz 5 жыл бұрын
great how to Jimmy... thanks for sharing... vinny
@DIYDigitalRailroad
@DIYDigitalRailroad 5 жыл бұрын
Thanks Vinny!
@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...
@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.
@mjtunstall1976
@mjtunstall1976 2 жыл бұрын
great idea! never thought of that hey quick question, can it be used to operate switch machines to change points?
@michaelmorgan7893
@michaelmorgan7893 Жыл бұрын
I run in only DC. Will that infrared sensor work with the Atlas signal system?
@techisgod
@techisgod 5 жыл бұрын
Is the IR Emitter modulated?
@OPS_GUY2023
@OPS_GUY2023 8 ай бұрын
Question so the infrared sensor is supposed to go between the rails?
@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.
@DIYDigitalRailroad
@DIYDigitalRailroad 5 жыл бұрын
I'm glad that this will help!
@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 жыл бұрын
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.
@joepawlak9280
@joepawlak9280 5 жыл бұрын
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
@robertschworm6036
@robertschworm6036 5 жыл бұрын
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.
@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 жыл бұрын
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!
@chazco
@chazco 5 жыл бұрын
Excellant
@DIYDigitalRailroad
@DIYDigitalRailroad 5 жыл бұрын
Chazco Thank you!
@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 жыл бұрын
One more thing....I may have missed it, but is this HO or N scale?
@DIYDigitalRailroad
@DIYDigitalRailroad 5 жыл бұрын
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 жыл бұрын
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 2 жыл бұрын
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.
How to Master Track Laying on Modular Model Layouts
17:30
Boulder Creek Railroad
Рет қаралды 222 М.
Block Detection For Your Model Railroad (269)
22:00
Model Railroading
Рет қаралды 22 М.
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 8 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН
NANO Precision Detector Update
19:37
Model Train Technology
Рет қаралды 6 М.
32. Block Detection on McKinley Railway.
12:51
McKinley Railway
Рет қаралды 99 М.
Easy Grade Crossing Flasher Circuits For Your Model Railroad
13:50
Toms Trains and Things
Рет қаралды 15 М.
Model Railroad Arduino Block Signal Upgraded!
27:54
DIY and Digital Railroad
Рет қаралды 15 М.
How does DCC Work and how do I wire my Model Railroad for it?
15:09
DIY and Digital Railroad
Рет қаралды 148 М.
JMRI- Arduino Infrared Sensor Install
8:52
Fred E Model Railroad
Рет қаралды 1,4 М.
Automated Colour Light Signals on a Budget
22:15
Station Road Model Railway
Рет қаралды 59 М.
BALLASTING, the GRITTY TRUTH at Chadwick Model Railway | 190.
26:20
Chadwick Model Railway
Рет қаралды 44 М.
Wiring My Model Railroad
20:33
White River Line
Рет қаралды 9 М.
Easy Arduino Current Sensing for Occupancy Detection
14:08
DIY and Digital Railroad
Рет қаралды 21 М.
When Brother Refuses to Listen #shorts #funny #fypシ゚viral
0:19
Javi’s Family Adventures
Рет қаралды 6 МЛН
Вот так и помогай людям … #корейскоекафе #корейцы
0:19
CHICKO — Вкус Кореи
Рет қаралды 4,1 МЛН
ОРЕЛ который 20 ЛЕТ летал с GPS трекером 😱 #Shorts
0:28
Это Сделает Вас Миллионером 🤯
0:23
MovieLuvsky
Рет қаралды 13 МЛН