Hey there Jimmy this is exactly what I've been looking for my G scale garden railroad as I want my passenger and freight trains to stopping and going to and from various stations. while at the yards I'd want shunter locomotives to be moving around cars to create either long freight or long passenger trains.
@PCGuru19584 жыл бұрын
Hi Jimmy this project is just what i have been looking for it works very well i run N Scale Kato i have inbeded the sensor in the rails and works well as a non DCC system it solves one of the things i have been looking . thank you i have been watching your video for almost 2 years having health issues your channel it so practical and you made things easy thanks again Greg
@Curious_Skeptic22 күн бұрын
Banging my head into the wall on how I could create a way to slow down a DC loco on isolated track vs. just coming to a quick dead stop. I'm told Capacitors won't work on DC. So, your demo brings another option. I rather an off the shelf option, but I have worked with Arduino and even some custom Microprocessors for light controllers. However, it's such a simple ask, I can't see the need for an Arduino vs some simple timer/relay PCB board off Ebay.
@olivierdamiron7279 Жыл бұрын
That is so awesome. Simple, elegant automation. I was wondering what it would take to bring another level of refinement: Gradual speed up and slow down for each step. I would assume we would need different hardware to achieve this. Relay are ON/OFF devices, wondering if there is something we could use that an arduino could modulate without going full blown DCC, maybe interfacing RC speed controllers (ESCs). Super cool stuff, love your channel, this is my daily Train NetFix!👌
@davidwayneprins4 жыл бұрын
I think this gives me the groundwork for something I had been beating my head against the wall to try to figure out: using Arduino to control a trolley car. Think of the Lionel ones that reversed course when they hit a bumper but with a delay to simulate loading and unloaded of passengers at a station..
@railwayjade4 жыл бұрын
So cool! Love the Arduino vids!
@andymok7945 Жыл бұрын
Nice stuff. For such simple project, you might consider using a smaller micro system like the ESP8266 or ESP32 and use EPSHome for the coding.
@palodurodons8 ай бұрын
hi, in this video at around 5:30, you state "we're going to put the power leads into our relay... the one coming from the track goes in the left connect". I assume you mean this is the positive current connector going to the track enabling power on and off. Then you state "the one coming from the power bus goes in the middle". I assume that is the ground (or common). Are my assumptions correct ?
@caitlainmccarren22864 жыл бұрын
Excellent presentation of the Arduino switch. Not certain why I'd need one, but when I do I'll know where to find the how-to.
@davidsayer3544 жыл бұрын
Sweet Arduino case!!! Definitely interested in procuring!
@TechBuild4 жыл бұрын
Cool project! Great to see more people getting interested in #ModelRailroadAutomation.
@malnadgowda_inusa3734 Жыл бұрын
Instead of relay you could probably use MOSFET. It will help you stop train slowly and then start slowly.
@davidrichter5539 Жыл бұрын
Simple and effective, couldn't someone write a program without delay and with millis? I would be very grateful.
@rodeo_cwboy3 ай бұрын
After loading the program, must you keep the laptop connected? I am planning to run multiple programs across multiple unos.
@brucewinstanley61136 ай бұрын
I would like that Arduino holder.
@AlleghenyMTNRails4 жыл бұрын
Great video Jimmy. I bought a sensor/reverser to do something just like that. Very cool. Keep up the great work.
@No_no837 ай бұрын
Is this train a dcc or a standard Dc? Thank you in advance
@Kiro0ollos3 жыл бұрын
This is amazing, Jimmy! 😍
@melkitson3 жыл бұрын
So simple and yet it has been keeping me awake at nights trying to work out how to do something similar to this. I assume this would work equally well on dcc or analogue?
@maxlindstrom54354 жыл бұрын
I use this to stop train rushing in to the stations. But I start trains again with a push button, when it's clear to enter :) For beginners this small projects is good, you will learn Aarduino little by little and get results at once :)
@dennisedgar3430 Жыл бұрын
I have a “wallwart” that delivers 6.1V DC. Will this be OK for the system?
@ngongoc71034 жыл бұрын
So great, i'm running DCC, please give me wiring diagram of system.Thank you so much
@michaelcorner79382 жыл бұрын
Great video, I'm thinking of using it on a OO gauge layout where I have crossings to hold off one engine while another is passing through.
@RonsTrainsNThings4 жыл бұрын
Hi Jimmy. I'm not big into automating trains on my own layout, but Something like this would be awesome for traction modeling, especially if you also reversed directions when you stopped.
@DIYDigitalRailroad4 жыл бұрын
I actually want to use this combined with a few other things to model a light rail/subway line.
@asaprocky81952 жыл бұрын
The sensor is plugged into A0 (int A0), but the sketch loop is checking int valA1 .... Typo, but it ran?
@lgrfbs4 жыл бұрын
Nice video. Next step is the relay control a ABC module for stop/star the loco.
@johnbennett68702 жыл бұрын
How many feet you have use a other contract for power
@johnsneedma3 жыл бұрын
So if a trolley had 6 stops... do the wires need their own pin on the arduino and line in program or can they be soldered into one circuit? Just planning ahead for a continuous one way loop around three city blocks. Possibly adding another track and stops in the opposite way.
@daveygivens735 Жыл бұрын
Fantastic info but TBH I'm not a coder and watching you plug in command-line entries leaves me in the dust. Is there such a thing as canned Arduino code or maybe a GUI for dumb people like me?
@johnnyrobertson59714 жыл бұрын
Love it and very well done on the instructional teaching. Love anything doing with Arduino. You really do some great video’s and thanks g F or sharing!!
@penem7632 Жыл бұрын
sooo like, where do i buy the rails??? are there special rails for this??? where do i buy the train it self??? are there special trains for it????
@peterkrause51874 жыл бұрын
Hi Jimmy. Excellent tutorial! 😊 Thank you. Is there any to slow the train rather than abrubt top? I have a dc layout.
@GalenA1722 Жыл бұрын
What are those types of trains called????
@sushildamle34492 жыл бұрын
Thanks for short but detailed explanation. I just wanted to know what is the voltage supplied to rail track? My HO scale model train loco needs 12VDC having two motors each. How much external power supply I will have to give to 5VDC Relay module single channel for the loco to run / stop? Will 12VDC adapter 1Amp is suitable for this? If not please give the details. Many thanks.
@DIYDigitalRailroad2 жыл бұрын
Without seeing your setup, I would guess your track voltage is anywhere between 12 and 16 volts. The relay just needs to be wired on your track power feeder. It interrupts your existing track power versus actually supplying it. The relay itself is powered by the arduino and is independent of track power
@TDMan-de6jv Жыл бұрын
How can your solder onto the track ?
@oceancity10424 жыл бұрын
Hi Having this some additional thought. A signal placed to give the train a reason to stop and then on changing from red to green it would then restart would be pretty neat , is this easy to achieve with Arduino programming ?
@swyntopia3 жыл бұрын
Very simple. Best with LED. 5V-->resistor ( about 200 Ohm )-->red LED-->Arduino one digital output. Arduino digital output ( may be the same, and even the same as for the relay )-->green LED-->resistor-->Gnd. Add the new output in the scetch above, copy the logic and change the Pin Nr. into the new output for the LED-->done. Sorry, I´m no native english speaker, I can´t explain better.
@oceancity10424 жыл бұрын
Very informative. Have just purchased my arduino. Raring to get started. Regards Robert
@CM-ARM4 жыл бұрын
Jimmy the wiring I can do the writing of the code my door is open for you. I just don't understand. I have never attempted before.
@amolchopade7649 Жыл бұрын
Is it n scale model train?
@kge4204 жыл бұрын
I’m currently using a 2650 and motor shield running DCC++ through jmri. All is working fine. If I were to do this project will I need another arduino? Thanks for making these interesting videos.
@ariegt4 жыл бұрын
No , and you can also push down DCC to zero ( in x-time ) instead of a relay
@TempoVideo3 жыл бұрын
Yo. Literally about to buy some components for this (or a variation of it!). Did you make the Uni mount/case available to download?
@PHUCLONGHOBBYLAND4 жыл бұрын
So cool, please give me diagram connect to rail, thanks you so much
@1babysag4 жыл бұрын
I think the idea is interesting but I am not an electrician and all of those wires and programming guarantees that I will not do it right. Can’t I just buy plug and play for all of these things?
@betsysummers22274 жыл бұрын
I would be i interested in your Uno case.
@rinjk3a4 жыл бұрын
Jimmy, How much for an Arduino case for my DCC++ basestation? Josh
@edwardaudet83674 жыл бұрын
Jimmy, can this project be used on dcc and dc. I run both types not all at once, I have dcc days and dc days. When my grandsons come over they take over the layout and love Dcc. I have looked at all your Arduino projects. I tried a few but put them on moni pros. Itest them on Uno's but build them on mini pros.
@DIYDigitalRailroad4 жыл бұрын
This project works simply cuts power to a section of track. So theoretically it should work just fine on DC.
@zinethar4 жыл бұрын
Another cool arduino video that I'm sure I will find a use for. Any progress on that modern gas station use were working on? I want one!
@DIYDigitalRailroad4 жыл бұрын
Still working on it. One of my 3D printers is temporarily down so I am working a bit slowly.
@SamixPhotography Жыл бұрын
can i make the train at home
@swyntopia3 жыл бұрын
basic for beginners, :-) Very useful for them. What´s about reed relais, and magnet below the train ? Would that not be cheaper ? Ok, I understand-->in case of more than 1 train, every train must get an own magnet, that´s a disadvantage....isn´it ?
@DIYDigitalRailroad3 жыл бұрын
I think a complex automation setup is going to involve a combination of several detection methods including reed switches as you said, infrared sensors, and current sensing.
@dave33014 жыл бұрын
Fantastic, Love the ideal, Thanks for sharing
@norfolksouthernblackspired81674 жыл бұрын
Hey Jimmy! Awesome vid. I have a complete Noob question. I’m my train is running via DCC and the relay stops the train, will it start again at the same speed it stopped with?
@ariegt4 жыл бұрын
just unplug the wire to the rails and reconnect to try
@DIYDigitalRailroad4 жыл бұрын
Yes it will. In order to control with a slowing down or a speeding up, you would have to slowly increase and decrease the resistance on the rail
@ariegt4 жыл бұрын
@@DIYDigitalRailroad it is much better and more controlable to use PWM control , it goes way down to a loco crawl and with enough torque-power of the motor. Try a L298N H- bridge motor driver for Arduino it works perfect for 2 segments of rails. You can also do the DCC stuff with this module. So it wil work for normal DC and DCC mixed for 2 rails. I like this way with at least 2 sensors each the same distance from the center spot . This way it works from 2 directions and it is works better with signalling so the arduino knows the direction and travel points
@IndyMAB19643 жыл бұрын
I would be interested in the Arduino Uno case as well. It is tall enough to encase the Arduino and the Power Shell board for the DCC++ configuration? I checked the Etsy store and don't see those listed. Do you have them somewhere else?
@DIYDigitalRailroad3 жыл бұрын
So right now I do not have the printing capacity to print my buildings and the arduino cases. I am hoping to change that soon.
@IndyMAB19643 жыл бұрын
@@DIYDigitalRailroad Any idea how much you'll charge for those?
@canadianlocomotivelogistics3 жыл бұрын
What is the IR detector you use?
@falco13794 жыл бұрын
Can you make a smooth stop / start with a motorshield?
@n-scaleunionpacificevansto65694 жыл бұрын
How do you know where to plug all of those wires into the power strip and into the various components? Does all of this come with written instructions saying where to plug the wires in? And are there written instructions explaining how to program all of this? None of this seems to be very intuitive. ...Roy
@DIYDigitalRailroad4 жыл бұрын
Hey Roy. Luckily Arduinos and their components were designed for learning. All the positives are labeled "+", "5V", or "VCC". The negatives are labeled "-" or "GND". The inputs and output are typically labeled "IN" and "OUT" or something similar. There is a learning curve and I am considering doing a second arduino basics series.
@n-scaleunionpacificevansto65694 жыл бұрын
DIY & Digital Railroad Thanks, Jimmy. Like most new things, arduinos intimidate me, but I am willing to learn. ...Roy
@TheSwitchList4 жыл бұрын
Jimmy - curious why you used an analog input for the sensor? I would have thought you would use a digital input (INPUT_PULLUP) and then just checked for HIGH or LOW? Either way works fine - I was just surprised to see you use an anolog input for a incoming signal that is digital. Thanks for another interesting Arduino project video. -Rick
@DIYDigitalRailroad4 жыл бұрын
I've just always done it that way. I've thought about changing it but I worry about the wayward 0, or 1. The analog input gives my system some room for error.
@ariegt4 жыл бұрын
@@DIYDigitalRailroad hi., use a 10k resister to the 3.3v/5v positive to pull up your digital input and use if digitalRead LOW for sensing and save your analog / pwm pins for nicer usage . Good luck
@cousinvinny79904 жыл бұрын
question why are the sensors used different from the ones you have linked to?
@DIYDigitalRailroad4 жыл бұрын
I accidentally dumped out my entire parts bin. The only one I could find after that was the 4 pin one. It works the same.
@Peabody19294 жыл бұрын
@@DIYDigitalRailroad There are 3 and 4 pin versions of the sensor on Amazon. The 3 pin version has only a digital output. The 4 pin version adds analog output. The analog output can be used to adjust for ambient light falling on the IR sensor.
@sonysnapper4 жыл бұрын
Ok, now put this in the Block Signal process to stop and start on the signal state.
@JohnAdams-su3tt3 жыл бұрын
You sure don’t need an Adrino to do something that simple!
@allenbarnes72024 жыл бұрын
I don't use it, still running a D.C. railroad
@DIYDigitalRailroad4 жыл бұрын
You can use this on a DC railroad
@IBOFSGUBK4 жыл бұрын
Is there some way to use the Arduino to slow the train down before it stops to add realism? I have a G scale train layout in the garden and it just does not look right when it skids to a halt.
@ariegt4 жыл бұрын
take a look at a arduino L298N Motor driver and take 2 sensors
@IBOFSGUBK4 жыл бұрын
@@ariegt Great thank you ,I'll look into that.
@ken02723 жыл бұрын
Great, in the old days we did the same thing with a bimetallic strip....which will still work after a EMP nuclear bomb blast, bye the way. ; )