DIY Arduino Model Railroad Multiple Block Signal System

Тәжірибелік нұсқаулар және стиль

Welcome back everybody! Make sure that you subscribe so that you are eligible for the 5K giveaway! Today we are tackling something that a lot of you have been waiting for! The Arduino Multiblock Signal System! This is a full and expandable system for automatic 3 position signals for a model railroad. The system uses any arduino that can handle the proper inputs and outputs that are designated.
www.factorydirecttrains.com
UPDATE! Check out the upgraded signal system!
• Model Railroad Arduino...
How to enter the contest
• 5,000 Subscriber Conte...
System Schematic
photos.app.goo.gl/ji8ighaDx4M...
Complete Sketch
github.com/DIYandDigitalRR/Mu...
ARDUINO STARTER KIT
amzn.to/2xhv4SE
ARDUINO UNO
amzn.to/31ljLHe
ARDUINO NANO
amzn.to/2MBE7sB
ARDUINO MEGA
amzn.to/2IA3q8S
INFRARED SENSORS
amzn.to/2QuKKuv
ADDITIONAL WIRES (OPTIONAL; COMES WITH STARTER KIT)
amzn.to/2xhMhLL
ADDITIONAL LEDs (OPTIONAL; COMES WITH STARTER KIT)
amzn.to/2CU4t3S
BREAD BOARD (OPTIONAL; COMES WITH STARTER KIT)
amzn.to/2NbHJBt
BLOCK SIGNAL (N Scale)
amzn.to/2CVm0J0
BLOCK SIGNAL (HO Scale)
amzn.to/2xga3I5
DC POWER SUPPLY (FOR AFTER PROGRAMMING)
amzn.to/2xaq3Mb
Support the channel with some Merchandise!
teespring.com/shop/diy-digita...
You can contact me at diyanddigitalrr@gmail.com

Пікірлер: 139

  • @DIYDigitalRailroad
    @DIYDigitalRailroad2 жыл бұрын

    Hey everyone! I've done a pretty significant upgrade to this project. You can check it out here! kzread.info/dash/bejne/pJeHrc2Pk8bPZKg.html

  • @joang9171
    @joang91715 жыл бұрын

    This is incredible! First off let me compliment you on presenting a comprehensive, understandable tutorial. I've watched other tutorials on Arduinos and came away numbed to the max. For several years now I've been toying with designing a signaling system with discrete components and boards and not having much luck at it. Meeting all the various conditions with discrete components was way above me. That project became very complicated very fast. This approach on the other hand is so simple its unbelievable. Programming the Uno reminds me of the old Commodore Basic (I'm dating myself here). I used to be very good at that but now all I remember is that I USED to be very good at that. LOL Now I feel confident I can get a system up and running with minimum effort. Thank you.

  • @ThePeejRR
    @ThePeejRR5 жыл бұрын

    Now this is modern Model Railroading content!!! Great stuff and very informative.

  • @vaughanratahi9035
    @vaughanratahi90355 жыл бұрын

    awesome job Jimmy, I have been waiting for this and it was well worth the wait.

  • @johnmarshall2660
    @johnmarshall26604 жыл бұрын

    Hi Jimmy, watched this till after mdinight, brilliant, going to breadboard up today, just got to find a way of coming into Platform to a Red signal..Thanks again for your hard work..

  • @rickgould8832
    @rickgould88325 жыл бұрын

    Good job Jimmy, this is what I was looking to do, but you did it. Congrats

  • @SATODEN
    @SATODEN3 жыл бұрын

    I had an issue with IR sensor not detecting darker colored cars. So I placed receiver and transmitter sandwiching the track. Then I reversed the IR reading of >

  • @bobu8739
    @bobu87395 жыл бұрын

    Jimmy, This is great, exactly what I am looking for. Thank you for sharing this information.

  • @joseflavallee8577
    @joseflavallee85775 жыл бұрын

    Wow. Best arduino video ever. I will down load the "Sketch" as soon as it is posted. Thank you.

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    Josef Lavallee Thank you!

  • @johnbellavich3063
    @johnbellavich30635 жыл бұрын

    Another great video and very instructive. Anxious to see it working on your layout!

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    John Bellavich Thank you!

  • @newsletterman
    @newsletterman5 жыл бұрын

    Great Video Jimmy! Thanks for publishing!

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    Tim Ouimet Thank you!

  • @martinezjm6666
    @martinezjm66664 жыл бұрын

    Espectacular y simple video de como armar un bloque de señales! Muchas gracias por ser tan simple e instructivo en las explicaciones! Saludos

  • @jayzo
    @jayzo4 жыл бұрын

    I watched the previous video last night and was thinking about this very same method of chaining them. You can use Digital Pins as inputs, although to make it work over longer distances you might need to use either a pull up or a pull down resistor at the inputs to make sure the Arduino distinctly detects the HIGH and LOW states.

  • @toddsvalley716
    @toddsvalley7165 жыл бұрын

    Best video i seen... i can actually understand... well think i can... How about a possible way to cut and paste all programming.... How much does it cost to set up each block... Can it some how read state of a turnout... to create a interlock... with kato unitrack turnout.... Very inyerested.... best video i seen.... Thank you very much for sharing

  • @davidrt9999
    @davidrt99995 жыл бұрын

    I really enjoyed this one!!

  • @brianw8433
    @brianw84335 жыл бұрын

    great video -- I use Jeff Bunza's sketches for sensors and outputs. The sensors are added to jmri - as they are tripped the logix will change the outputs [signals] heads to the appropriate lighting. This includes flashing yellows etc. The whole systems runs on 2 megas with 2 sensor shields. My layout is and "E" shaped design with each peninsula at 50x30 and the long back at 18x16. 2 arduinos for the entire signaling - 53 sensors available and 20+ signals - add more arduinos if needed.

  • @JohntheTrainman

    @JohntheTrainman

    5 жыл бұрын

    Any chance you could do a video showing how you accomplished this?

  • @brianw8433

    @brianw8433

    5 жыл бұрын

    @@JohntheTrainman sure but it will take a couple of days to put together

  • @brianw8433

    @brianw8433

    5 жыл бұрын

    @@JohntheTrainman read this thread in its entirety....it explains how to install the sensors and outputs using JMRI.....producing videos is not my strength....outputs sensors model-railroad-hobbyist.com/node/34417 input sensors model-railroad-hobbyist.com/node/34392

  • @southern207hobbies
    @southern207hobbies5 жыл бұрын

    I'm using unos with screwshield very handy as there are additional vin and ground connections on the shields

  • @steveweatherly1965
    @steveweatherly19654 жыл бұрын

    I'm playing around with hooking simple signalling and found a very simple to build kit off the internet that uses 555 timer to flip from Green to red and back to green. I've incorporated small concealed Reed switches to trip from Green to red and in turn trip the next one to green. Once I've got it set up better in more than happy to show it working. To build the electronic circuit cost around $5 AUD and I've built 8, my 14yr old who knew nothing about electronics Built the other 2.

  • @richardgarrison7987
    @richardgarrison79875 жыл бұрын

    Looking forward to seeing this on a layout now :)

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    Richard Garrison Thank you!

  • @JoeG-firehousewhiskey
    @JoeG-firehousewhiskey5 жыл бұрын

    I absolutely loved your first video on block signing, and have it working on my layout. This is an awesome addition that Ill also be using on my layout. I have almost the same setup as you have shown at the end of your video. One question, I have my layout in a shed, and when I open the doors or when light goes though the window it messes with the infrared sensors. I was wondering if it would be easy to change those sensors over to ultrasonic sensors or even doable to use those instead of the infrared sensors? Thank you again.

  • @napkin62
    @napkin622 жыл бұрын

    Fantastic....your code writing...it will help us..... thankyou buddy.....

  • @wroommy1251
    @wroommy12515 жыл бұрын

    Thank you for the great video and useful schematic and sketch. Hope you show us in further videos how to connect this system to DCC++ command station using JMRI or RocRail. And do you ever think about building a block detection system using arduino and current sensors?

  • @scentgrasslakerailway
    @scentgrasslakerailway Жыл бұрын

    Excellent effort!

  • @chriswisselo4329
    @chriswisselo43295 жыл бұрын

    I would definitely use Arduino Nano's for this. A 5 pack of them you can get for 17$ on Amazon. Plus 10$ for 5 IR sensors means you can setup 5 blocks for around 30$. 6$/ block is a decent price. You do have to solder the header pins on the arduinos though. So if soldering is not your thing, you might need to spend a few bucks more on assembled ones. But great video, thanks for sharing!

  • @No_no83
    @No_no832 ай бұрын

    Your videos are awesome. Thank you for so much dedication to the hobby. Your work is an example. I am totally new to Arduino programming and I tried programming a relay and traffic signals coupled with an IR sensor. I never succeeded. My aim is to detect a train entering a block, signal block occupancy and at the same time use this system to cut power off the preceding block so that the train that is following stops and enters the block when the latter is no longer occupied. Could you please do such a system?

  • @bobsinclair9886
    @bobsinclair9886 Жыл бұрын

    thank for a great lesson

  • @Luke-20-OLT
    @Luke-20-OLT3 жыл бұрын

    thanks for this video ,is super!!

  • @peterkrause5187
    @peterkrause51873 жыл бұрын

    Hi Jimmy. Great video and Arduino tutorial! 1. Did you implement on your layout 2. How reliably are the original detection. I have read a lot of people's experience that they have had to white or silver under the trains for reliably detection. Cheers Peter

  • @nateshon3eastbroadtoprailr448
    @nateshon3eastbroadtoprailr4485 жыл бұрын

    Thank goodness I model 30's narrow gauge using TT&TO

  • @Fa-qd8ji
    @Fa-qd8ji5 жыл бұрын

    great video... thank you

  • @johnmarshall2660
    @johnmarshall26604 жыл бұрын

    Hi Jimmy, Had another look at your block detection and I think its just what I will use, one question are the 2 sensors for bi-Direction running one 1 track as I have Up Line and Down Line plus 4 tracks through a station and then splitting through a 4 track crossing i.e 4 going Left and 4 going Right ... but this is certainly a start for me ... maybe look at modifying program to run more than 1 track direction ... think this may be a nightmare.. Regards john

  • @williamvelchoff9295
    @williamvelchoff92955 жыл бұрын

    Very interesting! I'm new to block signals and don't have a clear understanding of how the finished product is supposed to work. Where are the sensors placed with respect to the lights? What happens when a train is longer than a block? Any explanation of the intended logic would be helpful! Thanks.

  • @l.rod2827
    @l.rod2827 Жыл бұрын

    Thats awesome, how are the wiring and coding if running dual main lines?

  • @robertschworm6036
    @robertschworm60364 жыл бұрын

    Jimmy, Very interesting. My solution is to use an arduino 5260 mega with a digital input shield. All channels are set to produce 68 digital inputs for a combination of sensors. The sketch sees a change and sends a serial message to a jython script in jmri that decodes this message into a sensor channel number in the sensor table. This is tied to a block number assigned to the track sections around the layout. When a IR detector goes low, a message arrives at jmri and either sets a sensor...or a turnout..to a configured state. Block channels read the sensors and turn the block red for occupancy. The turnout table sets a turnout channel if a message for that arrives and throws the turnout. A contact off a tortoise machine arrives as a sensor input and confirms the turnout changed with a "light" icon tied to this turnout channel. So on a jmri panel, the track lights up by block, switchs throw based on sensor input, and "light: buttons activate to indicate feedback from the tortoises. All sensors are wired up together with common anode (+5 volts) and only the signal wires are brought back to the mega. One serial channel brings it all back to the jmri. The turnout table state can be sent out to the arduino as digital bits. Then in turn can throw a relay or solenoid to the tortoise motor to throw it. Combinations of sensors and states can be configured thru Logix. You can set signaling icons on the panel around the track and configure 3 aspect heads for block 1,2,3 down the line to drive the different aspects for red, yellow, green. Another aspect of red or green can indicate the upcoming turnout to the first block. Mostly jmri configuration and a minimum of wiring and no hard wired panels. Panels are either monitors or tablets in place of the panels...showing jmri panels instead. Throttle is either a phone or a tablet. Now throw switches from tabet panels of from your cell hone throttle. All this on wifi. Jmri is free and the raspberry pi was under $ 50.00. Bob S

  • @TheOriginalBadger
    @TheOriginalBadger5 жыл бұрын

    Is this the system you are going to be using on your new layout for block signalling? If so, will you be showing us how you do the wiring for it?

  • @Peabody1929
    @Peabody19295 жыл бұрын

    Nice design! Would you do a segment on how the block signaling system works on a layout? I am new to this idea. I would like to learn how/where to place the sensors and LED indicators in a block. Imagine a linear track with 3 blocks. Where are the sensors and indicators? As a train proceeds east to west, what happens? Same for a train west to east. This would help me understand how the system works.

  • @denversrailroads5566
    @denversrailroads55665 жыл бұрын

    Couple of questions: (1) Any idea as to the cost per block, excluding sensors and the signals themselves. (2) Could you use an NCE BD-20 block detector as the sensor? Dennis

  • @davidrobinson8224
    @davidrobinson82242 жыл бұрын

    Hi Jimmy, Just found this video on Block Signalling, and it's very informative. One question though, and this may be a dumb one so please bear with me. The infra-red sensor activates when the train goes past it, but will it keep switching when each passenger car goes past it?

  • @YalcinTuzmen
    @YalcinTuzmen4 жыл бұрын

    It is good video and set up? Can't we use the same IR sensors for in and out of the consecutive blocks (i.e. the out sensor shall be in sensor of the next coming block)? In the skecth it is not possible to go back from a block entered in the reverse direction (for the endless tracks), can we add this possibility?

  • @rjl110919581
    @rjl1109195813 жыл бұрын

    wow great video

  • @edeptula2992
    @edeptula29924 жыл бұрын

    Have you done a detection setup for sidings on the main as well??

  • @fretlessproductionscalifor4854
    @fretlessproductionscalifor48543 жыл бұрын

    Never played with Arduino bit am giving this a shot! Was able to duplicate this, using your code without knowing why it works, and am wondering if it would be easy to adapt to neopixels? I have a bunch of WS2812Bs that id like to utilize.

  • @brianbittner4006
    @brianbittner40065 жыл бұрын

    Thanks for the video Jimmy! Looking forward to reading the sketch later today, but one question why did you use analog pins for the comms to the bordering blocks instead of digital? From what I saw in the video you just turned the analog pins "on" or kept them "off", a digital high or low would accomplish the same thing.

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    That's a great question, when I originally designed the system, I used digital pins 8 to 11 for the send and receive functions. The issue that I ran into is that it would output either a 1 or a 0 which led to more errors when there was an occasional hiccup. Since the communication is so simple. I just needed to register the change and by outputing the maximum value and having the analog pin read it. There were fewer errors from little hiccups in current or whatever would happen. As for using analog pins for outputs. I want to keep those free for future updates so that I can add more things to change the signal like turnouts.

  • @kellbruce
    @kellbruce2 жыл бұрын

    so I am working on a project for this but the arduino is checking exit of one block and entry to next block the signals ar for the the 2 blocks. also using wireless coms so a modular layout can just have 1 per signal stand and blocks can be multi modules. If you want more info PM me.

  • @robjones9691
    @robjones96913 жыл бұрын

    Nice video. A question that is off the video topic, How do I a Booster to DCC++EX and How do I wire DCC++EX for Ntrak modules?? Thank you

  • @williamsmith1671
    @williamsmith16715 жыл бұрын

    will this work with ct sensors great information

  • @gregkendall2019
    @gregkendall20194 жыл бұрын

    Great tutorial video. I have the code running and driving one block on a breadboard so next step is to install 2 or 3 blocks on my layout. I have purchased 10 IR detectors from Ebay and they all seem to work well. I'd really like to change the IR emitter and detector diodes over to 3mm size for smaller installation footprint. Has anyone here done this and could you provide diode part numbers and source?

  • @johnmarshall2660
    @johnmarshall26604 жыл бұрын

    Hi Jimmy, Ive been tearing my hair out trying to get a 6 set signal to work and as I use Delay if I press another button it wont work till other button finished so tried Millis() and couldnt get that to work, also tried IR Avoidance sensor and found worked but wont stop on green till block is triggered ... So your videos on block signal I think will be my answer but i want to addapt for 6 signals so maybe multiple Arduinos may be the answer so will watch all you Block signalling with interest...Regards John UK

  • @KiwiSteve49
    @KiwiSteve494 жыл бұрын

    Hi Jimmy. How do you connect three Ardunios in a loop using this system please?

  • @mikebuick2332
    @mikebuick23324 жыл бұрын

    Hi Jimmy, have you tried this using ACS712 current sensors? I have a garden railway in the UK and I can't use IR as the detection method. I also need to sequence the signals in a similar fashion - green, yellow, then red. Any tips would be great, Cheers Mike

  • @joseraya3867
    @joseraya38674 жыл бұрын

    how would you incorporate a flashing yellow. The signals around my area are, block 1 green, block 2 flashing yellow, block 3 yellow and block 4 red. I'm really excited to incorporate this in to my layout. Thanks

  • @jimbarclay7248
    @jimbarclay72485 жыл бұрын

    Nice video Jimmy! Can you post a link of where you bought your IR Sensors? I've bought a few off of Amazon but am not getting good results with them. I've tinkered quite a bit with the sensitivity pots and even tried shrink tube to cover the sides of the clear diode to cut down on interference but, they still do not trigger the change of state each and every time. Hoping you found a brand of IR Sensors that work really well that you can share with the rest of us. Thank you and keep your videos coming! They are enjoyable and informative. Jim

  • @kenmoordigian1738

    @kenmoordigian1738

    5 жыл бұрын

    I use these: www.ebay.com/itm/5pcs-IR-Infrared-Obstacle-Avoidance-Sensor-Module-for-Arduino-Smart-Car-Robot/382651642321?epid=14007020647&_trkparms=ispr%3D1&hash=item5917d0b1d1:g:ojAAAOSwg05cAHU-&enc=AQADAAAB0KX%2FKt4E1xf3SDqEdBclaYZvdvv5KRx32NaouQWcvxxubQ%2Ba0eSACoK9XX4HQlSG%2FPRK%2BfYlgd1DWupLCRlfBesSr1uSr0hKNbJGvh%2FrTPkfuN0Fhkl44%2BChTSWNy0fuuOmMxYpR2UpRfXx94gmQ%2BA2w5Pg5jvSDk9wz2ZOahsAuT8%2FiZKIaxLrvUdDglYtmwdtY8ay7nEDXtJgwrNWQRb6xm4foXovQT8njQyUUlR%2BX5Vf%2BRMYFqqO9PrfQzr2XYFvtaUqtheg%2F2HKat4MnIrYbzhehZdJetJyjhylJ89FuFmIRvv7NtXR5ilMe8lJ1Bq57p3ppy%2BURm63SKlMTs8ctj%2F67VZOpoPfDdhcn2BwUuzUxVGhks0zcR50cv%2BO1YkOlPaxn6ObndwDmN79AtXpAHprfgHeHzpARLHCB2ZIDBT6gRAB%2F0OC%2BQ6%2FckbO%2F8JN44lZtqVfjy7d44vo3HTV0aUy10svwnTbA9jcONHY0exAnSGC833f%2BSjAvlRhGmSecpwYp%2FCjsfwz1HlnC%2Fd6lsGd2RgKoJqjUjyD90Igx6qBMZDJok0CT0VcJgAiklcGHuDb0uHaoXh3y3GlwnEBmhsoEuZcy9JOVquvP2qbi&checksum=3826516423219bc542dca2744afab97f5a7197568e28

  • @TheR5
    @TheR54 жыл бұрын

    Hi Jimmy, is there any reason you couldn't put 2 blocks on each Arduino?

  • @darylroe9929
    @darylroe99294 жыл бұрын

    Hi Jimmy, I think this tutorial is fantastic and I am trying to adapt it for my signal system which is 2 aspect, red and green. I have copied you sketch with required changes but have hit a snag regarding compiling the sketch. I Know you are a busy Man but would you be willing to have a look at it and even advise if it is possible or not? Best wishes, Daryl.

  • @ClinchfieldModelRailroad
    @ClinchfieldModelRailroad5 жыл бұрын

    Hi, you asked, I use Team Digital's CSCe boards for my signalling. They are also loconet devices so they can give feedback throughout the layout. Also can be setup as a standalone system and do not require a computer to run. I also have been testing MGP's www.mollehem.se/index.php/en/control-and-electronics/loconet-components/signaldecoder-sv10-detail they have a US version. Here you tell the decoder the blocks and turnouts and signals associated and it figures out what colour the signal should be.

  • @marcusc3463
    @marcusc34635 жыл бұрын

    I was curious why did you choose IR instead of the current sensing modules

  • @graemewilson4126
    @graemewilson4126 Жыл бұрын

    I am wondering if this done by WIRELESS or WIFI, all I can see a lot of wires that will run around a large HO scale Layout, I would like to see a Cabinet behind the 3 Aspect Signal with something inside and to be power by the BUSS WIRES

  • @ariegt
    @ariegt5 жыл бұрын

    i had so much troubles with sunlight with these sensors. Now i use GP2S700HCP in between the track and this works awesome. But the best tip i've got is to use 2 sensors instead of 1 , this way you'll get more data for fail save and more important... direction or maybe speed. i even want to use a third one for slowing down a train far before a switchpoint , a sensor on the switch and a sensor after the switchpoint so the arduino knows where the end of the train is and when to switch. Next step is to let the arduino (feel) know with just a resistor if there is a train on the track. Last tip , arduino's can easily talk and also listen to eachother or whatever dcc , jmri or rail system with no problems

  • @rparks9607

    @rparks9607

    5 жыл бұрын

    Can you share more on these sensors? I have the same issue with sunlight on those sensors as well.

  • @ariegt

    @ariegt

    5 жыл бұрын

    @@rparks9607 well the first thing i tried is doing a arduino remote control setup ( you can do this with any ir sensor ) . The trick is to feed the ir led with 33khz power and let the ir sensor only regonize the 33khz modulation. This helps a lot to block the sunlight.Some of the little ir sensors has this 33khz modulation already built in and is a lot easier to use. If you put " pdf " after the part number you find more info at google

  • @ariegt

    @ariegt

    5 жыл бұрын

    P.s differences between sensors in sensitivity at distance and the beam angle.

  • @rparks9607

    @rparks9607

    5 жыл бұрын

    @@ariegt Thanks, very helpful

  • @geesharp6637
    @geesharp66375 жыл бұрын

    OK, noob Arduino question here. Sometimes in your tests, you use a resistor with the LED and sometimes not. Why and when do you do this? Which resistor?

  • @peterbudd1803
    @peterbudd18033 жыл бұрын

    How do you overcome the problem that the signals you link to are 12-18v working? I cannot find any that are 3 or 5v. The Arduinos will not drive 12v you would need some extra circuitry to do that such as a ULN2003 DIP.

  • @martinezjm6666
    @martinezjm66662 жыл бұрын

    Would it be possible to slow down or stop a train automatically if the signal is red with an NCE Power Pro R or any other power plant?

  • @perrypollino456
    @perrypollino4564 жыл бұрын

    Just stumbled on this. Have not worked with an arduino. The signal system is appealing to me and I would like to try my hand. Would it be advisable to use all Arduino Uno's or One arduino Uno and the rest Arduino Nanos.

  • @ModelSceneryTutorials
    @ModelSceneryTutorials3 жыл бұрын

    What happens when a train enters a block and reverses direction exiting the block the same way it entered.

  • @donh8833
    @donh8833Ай бұрын

    Ya did it the hard way. Mqtt using esp32 or master slave i2C with pull up resistors. 48 digital oins on mega give me 16 signals or 8 blocks (2 signal heads each block)

  • @davidwayneprins
    @davidwayneprins5 жыл бұрын

    From having a strong computer programming background (30+ years as a hobby, IS degree, and can program CNC), and a good understanding how train signals work, you would think I could understand this. My head hurts trying to understand this code!

  • @TechBuild
    @TechBuild5 жыл бұрын

    Why don't you make the full documentation of your projects on Instructables?

  • @hornblowerkarl1966
    @hornblowerkarl1966 Жыл бұрын

    Hello Jimmy, I find very interesting and helpful your videos and I want to thank you for the good work you do, howeverI seem to have problems finding/downloading the sketches and I wonder if you would be so kind as to put me right or tell me what I'm not doing correctly.thanking you once again, warm greetings.

  • @UPES2018
    @UPES20184 жыл бұрын

    Yeah... I'm going with Atlas.

  • @sagesrunner
    @sagesrunner Жыл бұрын

    I know you put the default to GG, but that could be YY or RR in the SIGNALSTATES signalState = ST_GG; (ST_YY or ST_RR)

  • @bobsinclair9886
    @bobsinclair9886 Жыл бұрын

    where do you buy your parts could you share info with me thanks

  • @doylesouders1228
    @doylesouders12285 жыл бұрын

    I haven't built up the prototypes but everything is on order. Should be working through it in a week. Question has to do with which directions you actual signal posts are facing. Are they facing an oncoming train or an opposing train. from the Video at the beginning it looked like the signals were facing an opposing train. Just trying to understand actual signal placement and direction. One direction track or two.

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    The signals should be facing a train that is entering the block. Check out my latest video for a better illustration of the placement.

  • @ZZR934
    @ZZR9344 жыл бұрын

    Hey jimmy would yo mount the Inferred sensors in the middle of the track but underneath?

  • @ZZR934

    @ZZR934

    4 жыл бұрын

    hey jimmy would this all be the same if i have 4 signals same line same direction on an arduino in double track single direction per line?

  • @railfilm
    @railfilm4 жыл бұрын

    Hi Jimy, thank you for the incredible work, however I have some comments to the whole system. In the reality the block system works slightly differently. The blocks are usually between two stations or hubs and the station master desides the direction - simplified: Eastbound or Westbound. On the real railroad it is confirmed by the next station and also all block between the stations must be empty. On some railways the signals in wrong direction are blacked out or red. This means all blocks in the given segment know the direction and this defines also the conditions. In your case the Arduino will have a bus input defining the train direction. (E-W). Upon this signal you can turn off all signals in wrong direction or change them to red and each block will send just a status (occupation) signal to the pervious block. I will try to modify your code in this way. The direction signal can be a master switch or the exit signal of the station. What do you think?

  • @TheR5

    @TheR5

    4 жыл бұрын

    railfilm, did you manage to get that change working?

  • @railfilm

    @railfilm

    4 жыл бұрын

    @ADaleR1. Yes I did and sent a copy of the code to Jimmy. ( Oct/Nov 2019)

  • @dennisalsancak8488
    @dennisalsancak84884 жыл бұрын

    Hi, great project. Not sure if anyone as already asked. I want to use this on an end to end track system so arduinos will not be looped. Can this be done and if so what changes need to be made?

  • @patrickmaloney6440

    @patrickmaloney6440

    4 жыл бұрын

    Wouldn't it be exactly the same except the first and last block that would not have an input from preceding or output to following blocks respectively? You could use the same code, there just will never be a signal from the preceding block at the start?

  • @geofflarcombe3084
    @geofflarcombe30845 жыл бұрын

    where should the sensors be physically located for each block of track ? cheers

  • @doylesouders1228

    @doylesouders1228

    5 жыл бұрын

    Geoff Larcombe same question I have.

  • @asaprocky8195
    @asaprocky8195 Жыл бұрын

    Error. Should be: int Yellow2 = 6;// Yellow Signal 2 (not 1) is digital pin 6

  • @TheOriginalBadger
    @TheOriginalBadger5 жыл бұрын

    I have a question...probably more will follow as I try to digest this. :) So, there is a sensor at each end of each block,and you need an uno (or nano - could you use a nano?) for each block? Stu.

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    Hey Stu. I'm going to be installing this on my layout using arduino nanos. One cool thing that the nano has for it is the ability to use a "nano shield" which gives you screw terminal ports for the nano which makes wiring a breeze. It is one arduino per block and a sensor at each end of the block. I have already shot the part 1 video of the installation and it will be out next week!

  • @newsletterman

    @newsletterman

    5 жыл бұрын

    @@DIYDigitalRailroad Looking forward to seeing that!

  • @TheOriginalBadger

    @TheOriginalBadger

    5 жыл бұрын

    @@DIYDigitalRailroad I await with bated breath :)

  • @jerrydowell5962
    @jerrydowell59623 жыл бұрын

    Are both infrared sensors in same block connected to one nano?

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    3 жыл бұрын

    Yes they are.

  • @gregkendall2019
    @gregkendall20194 жыл бұрын

    Hi Jimmy, I've studied your code and the schematic which shows a 3 block system and I'm wondering if it can be simplified by having just one sensor module at each block break. The sensor output will be wired to A0 of the Nano for the block the train is entering and also wired to A1 of the Nano for the block the train is leaving. I believe this would work with your existing code without any changes for one direction of travel (say Eastbound). However, I suspect that the code logic will screw-up for a Westbound train. There certainly should be enough logic information in the system (state machine) to get this to work but I haven't figured it out yet. I'm thinking that the D8 and D9 output signal state should provide sufficient information to support a "single sensor per block" solution for both Eastbound and Westbound trains. I might have to set-up a large loop track with three blocks to see what happens to the logic. As I intend to add this system to an existing layout, the saving in sensor installation work makes it worthwhile investigating this alternative. I know you finished this project almost a year ago, but any feedback on my idea would be warmly welcomed.

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    4 жыл бұрын

    I have been studying using just one sensor per block. It is one of my future projects

  • @gregkendall2019

    @gregkendall2019

    4 жыл бұрын

    @@DIYDigitalRailroad Hey Jimmy that's great news. I'll keep experimenting and let you know if I get the one sensor per block working on a test track. Also for reference, I've solved the problem of converting the IR sensor LEDs to 3mm. I'm using Vishay p/n VSLB3940 for the emitter diode and a 3mm IR detector I found on eBay at this site: www.ebay.com.au/itm/100Pcs-3mm-940nm-IR-detector-sensor-Infrared-Phototransistor/231717496771?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649 They come in a 100 pack for about AUD 7. (Seller does not provide a p/n but with 100 pieces it doesn't matter!) By replacing the 5mm LEDs with 3mm I can now mount the sensor directly under my track with two 3mm holes drilled between the track ties (I'm in HO but should still be achievable in N gauge).

  • @barryolson8428
    @barryolson84285 жыл бұрын

    great video. can't find the scamatic. can't spell either. also when u type the code my tv doesn't let me see the far left code u type

  • @MrKWiley918

    @MrKWiley918

    4 жыл бұрын

    The sketch is in the description

  • @billhadden7219
    @billhadden72192 жыл бұрын

    Could this be done with Arduino micro's instead?

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    2 жыл бұрын

    As long as the board has enough I/O pins you can use it. I implemented the actual system using nanos.

  • @scottericcatalano596
    @scottericcatalano5965 жыл бұрын

    One question...why aren't you using digital read and write? That would take the place of the values....as the values will change depending on the light in the room.

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    Hey Scott, Great question. All of the sensor inputs that I am using are analog inputs. Therefore you need the analogRead command to check the sensors. I am using the digitalWrite command to turn the LEDs on and off. The reason I am using the analogWrite command on the transmit command is that it works better with the analog pins that they are connected to. We also do not have to worry about the ambient light level in the room since these are infrared proximity sensors that use an infrared LED and sensor to measure the IR light bounce. If we were using photoresistors, we would then have to worry about ambient light level.

  • @scottericcatalano596

    @scottericcatalano596

    5 жыл бұрын

    Couldn't you just use LOW or HIGH using the digital read instead of using Val & numbers with analogRead?

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    @@scottericcatalano596 You certainly could and that is another way to do it. I use the analog pins because it makes it easier to tweak the system and diagnose problems. I may have to do a video showing the all digital method.

  • @johnprater9522
    @johnprater95223 жыл бұрын

    is there somewhere we can just copy the programing code ?

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    3 жыл бұрын

    Yes there is a link to a google doc in the description.

  • @kenmoordigian1738
    @kenmoordigian17385 жыл бұрын

    Did I miss the arduino code link?

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    I just updated it with a working link

  • @darrenwilliamsrichardsonva394
    @darrenwilliamsrichardsonva3945 жыл бұрын

    I am new to Arduino and I like the video however the link to the sketch shows an old sketch that shows enum statement completely different see below; enum SIGNALSTATES { ST_GREEN, ST_RED1, ST_RED2, ST_YELLOW, }; is this an oversight? Can you post the link to the new sketch please? Another question if I want to create an addition 2 sensors and signals do I duplicate the content of the enum statement adding the extra sensors and signals? Keep up the great work I am learning alot from your videos they have been very helpful. Regards Darren

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    Good catch I think I put the wrong sketch up!

  • @ariegt

    @ariegt

    5 жыл бұрын

    SignalstatesA signalstatesB and red1A red1B red1C etc

  • @darrenwilliamsrichardsonva394

    @darrenwilliamsrichardsonva394

    4 жыл бұрын

    ​@@ariegt Hi Arie gt can you clarify, are you saying the code could be written like: enum SIGNALSTATES A { ST_GREENA, ST_RED1A, ST_RED2A, ST_YELLOWA, }; enum SIGNALSTATES B { ST_GREENB, ST_RED1B, ST_RED2B, ST_YELLOWB, }; then similarly duplicated the states for Sensors 3 & 4? I.E. int valB1, Int valB2? I want to have multiple signals in multiple blocks if I can; rather than just the 2 using on nano for each I would use a Mega 2560 r3 Any advice would be appreciated! Darren

  • @ariegt

    @ariegt

    4 жыл бұрын

    @@darrenwilliamsrichardsonva394 yes you are on the right track. You can als name ST_GREENricht or ST_GREENback or whatever is best for you. Just try it in a sketch copy and save changes everytime in another sketch name so you can go backwards if faulty. A to Z works fine also but what is what , just name your lights and you know better witch is witch if you have 18 of them haha . Next step is a i2c i/o extension board so you go wild in shortcommings of arduino pins. Look for MCP23017. Good luck stay healthy

  • @darrenwilliamsrichardsonva394

    @darrenwilliamsrichardsonva394

    4 жыл бұрын

    @@ariegt Thank you I will try this on the weekend and hopefully will get a test of 4 signals and sensors going. I will check out the MCP23017 and the extension boards too. I am still learning but will get there. I appreciate your help, many thanks Darren.

  • @traincat1
    @traincat15 жыл бұрын

    Is it possible to add a relay to switch off the track power in front of a red signal then the train could be stopped in the section? Before advancing under yellow and green.

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    This is very possible and I have considered it.

  • @larrydayhoff999
    @larrydayhoff9995 жыл бұрын

    is the script ready yet?

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    It should be up now.

  • @thunderbolt8582
    @thunderbolt85825 жыл бұрын

    Why don't you need to use current limiting resistors for the LED's?

  • @DIYDigitalRailroad

    @DIYDigitalRailroad

    5 жыл бұрын

    The vast majority of signals including the ones that I link to buy in my tutorials have built in resistors.

  • @joeraderblackrockcentralrr
    @joeraderblackrockcentralrr5 жыл бұрын

    Am I the only person who has no idea what an Arduino is? Have no idea what they are or what they do or for

  • @darrenwilliamsrichardsonva394

    @darrenwilliamsrichardsonva394

    5 жыл бұрын

    Joe an Arduino is open source hardware! See www.arduino.cc/en/Guide/Introduction explains a bit more about it. It is a great resource for model trains but like you I am learning as I go!

  • @graemewilson4126
    @graemewilson41262 жыл бұрын

    A great Video, but someone's HAND got in the way when adding the WIRES to the Breadboard, WHIS WAS NOT VERY CLEAR or in Focus, sad to say I AM NO EXPERT with this stuff, but learning slowing, wondering if there is a way to get the BREADBOARD CLEARER, to see where the WIRE are. THANKS

  • @MrPvallone
    @MrPvallone3 жыл бұрын

    Love your passion but I think you totally over engineered this. You could use one Arduino mega and a 10th of the code to accomplish a block signal system.

  • @ModelSceneryTutorials

    @ModelSceneryTutorials

    3 жыл бұрын

    Do you have the code for your suggestion?

Келесі