Just heard about Arduino and Railroad modelers using Arduino Uno for stepper motors on model rail road turntable stepper motors. I know nothing about Arduino and writing a program for a model railroad turn table. Where can I learn how to writer a program. What parts I will need and how to use simple push buttons as a setup button and how to set up various buttons for tail and head set points for roundhouse points.
A quick google search for "arduino model railroad turntable" produced a lot of results including several youtube videos on the subject.
Maybe have a watch of the youtube videos to see how their setups are controlled and the components they used.
You posted in the Tutorials section. Where is the tutorial?
Have you searched this forum using the search box in the upper right?
This guy "steps" you through the process. His links are dead. You should get an Arduino starter kit (I suggest from Elegoo (US$50)) which has these parts. Elegoo and BV3D (youtube) have good-enough tutorial PDFs and videos. Have fun! Be sure to treat yourself to a micro-rc-helicopter (US$40) for your train hospital. : )
Saw what you did there.
Lots of traps in direct drive turntables and 200 step motors, many modelers bring their tracks to the turntable at 15 or 30 degree angles only to discover that a 200 step motor can't stop at 15 degree intervals, only 9, 18, 27, etc. Build the turntable first, then bring the tracks to the points it can stop.
Where can I find more info on a stepper motor that has a much tighter rotation pattern that will line up with a Walthers N scale roundhouse. Also where and how can I learn to program an Arduino using a program button and end point buttons for head and tail stop/end points on the roundhouse spurs and mainline spurs.
The "stops" can use limit switches (physical contact), or hall effect (magnetic) sensors. Precision motors... there are steppers that will do 72k steps per revolution, probably more than you want. My guess is you seek 2k steps per rev., powered by your standard model rail p.s.
Programming an Arduino... is everywhere. Get a kit. Learn it chunk by chunk. You are on the right path.
Be thorough in your research. Don't assume Uno is the best type of arduino for your project. Don't assume a stepper is the best kind of motor for your project.
Standard low cost steppers are mainly 200 steps/rev though 400 steps/rev are available. Two things help you to get finer positioning. First is a reduction gear which also helps with torque. The second is microstepping which divides the natural 200 steps into 400, 800 or more, using standard low cost drivers. A reduction gear could easily be made using toothed belt and pulleys. With say 3:1 reduction and 800 microsteps you could position your turntable to 0.15 degrees. You also need an index sensor so you know the start point, that could be a cheap opto interrupter (often available free from scrapped printers).
Have you done any programming or electronics before?
Don't underestimate how much you will need to learn for your project.
First off I have found your YouTube video's the most helpful and informative. So far though every one on this forum tells me Arduino programs are on the internet. Well they may be on the internet but I can't find them. I actually need to see turntable programs written so I can learn to write my own. That is my problem not seeing the type of programs I'm looking for that are written and go step by step like you do in your vlogs on YouTube. I saw your vlog on sensing track and it was educational. Just wondering more specific questions like were and how you powered up your insulated rail to run your locomotive and how your sensing device was hooked up to the sensing rail. All I need is a more detailed photo especially if you can pull your sensing device out away from your test track so I can see exactly how you had your wires hooked up. You don't need to explain the hook up all I need to do is see more details as far as the wiring and I should be able to figure it out. Which ever way I go weather I use hall effect switch's or different stepper motors I would like to see actual programs for both applications so I can learn. Also been told through this forum that Arduino UNO's may not be the best for what I'm looking for. Just need a bit of guidance to look for hall effect switch's and the type of stepper motors you recommended and if there is a better system of control weather its Arduino UNO or something else .
Thanks for all your info
Wagoneer
Just thought of something. Is it possible to expand on your turntable video to include head and tail stops so you can move your locomotive to either a roundhouse spur or main line spur or different main line spur using push buttons for entering set up and other push buttons for your head and tail stop points. I know its a lot but is it possible?
Once again Thanks
Wagoneer
Stepper motors (with the round table) can be commanded to move a known number of steps. Add a magnet to the round table edge, and a Hall Effect sensor at your "stops" to make the table point exactly where you want it. You could add any number of buttons or a rotary encoder to select your preferred stop.
Halll Effect sensor (at 3:24)
Rotary encoder:
https://dronebotworkshop.com/rotary-encoders-arduino/
Pushbuttons:
I disagree. Software is like a tool kit. Learning to write is learning how to use tools, not learning how to achieve limited, specific targets.
In the end you can easily surpass the quality of 95% of what is published, by:
- learning how to code, generally
- studying similar hardware and the software that drives it (regardless of the non-modelrailroad application).
- defining the problem, designing a solution method
- coding that method
Else, you may as well find a project online that is close enough, and clone it exactly.
Lastly, there have been several threads on this subject on this forum, over the years. If you use the search window at the upper right, you might find some useful information.
Here you can find an initial version of a turntable control using a rotary encoder, a potentiometer, DCC commands and commands through the serial monitor:
It works fine with stepper motors with and without gear. I use it for a Fleischmann H0 scale turntable with a 400 steps motor and microstepping through a TMC2208 driver.
The reference point (zero point) is detected by a hall sensor.
There is an OLED display available and integration of sounds via a JQ6500 sound module.
Currently, I am adding some more features like signal and light control for some illumination.
Next year I will publish a new version.
Further information is available in German:
https://www.stummiforum.de/t188668f7-MobaLedLib-Hard-und-Software-zur-Steuerung-einer-Drehscheibe-per-Schrittmotor.html#msg2229825
I agree with everything @anon57585045 says. But note "Clone it exactly" means what it says ... even the slightest change may require you to get really quite deep understanding of the code .... and its rare we want to the same thing twice in these sorts of environments.
I agree with what has been said here - actually this isn't a very difficult project once you get started. A while back there was actually a thread on this forum from someone asking about issues with their design - worth trying the search facility.
I would say that Hall Effect switches, though they are extremely useful, can be a little finicky to set up because the trigger point isn't that well defined. This is because magnetic fields of course extend in space - the trigger point will vary with the "closest approach" distance between the magnet and the sensor, and also will be different depending on the direction the turntable approaches it. A photo-interrupter can be precise to much less than a micron detecting a "blade" projecting from the moving element. Slightly more costly than a Hall. I generally use the Sharp device from Sparkfun Photo Interrupter - GP1A57HRJ00F - SEN-09299 - SparkFun Electronics for which they also sell a little breakout board.
I want to thank every one for there help especially DIY and Digital Railroad and Rudy's Hobby Channel ( who wasn't a member of this forum). I found what I was looking for. I will continue to look for information I need. Just as a FYI anyone making YouTube video's like, DIY and Digital Railroad PLEASE show ALL actual wiring from your Arduino's, project boards (breadboards, circuit boards and so on) so some one like me can see and figure out how things are to be wired up.
THANKS for everyone's information
Wagoneer
Most of the model railroad electronics projects on the internet, but not on those "show off" sites, already do provide all that stuff. YT can get you pointed in some direction, and get ideas, but it's a shallow mine for help.
Some aspects of projects benefit from video, I've used it for some home renovation questions. That is fine for things like that. But electronics and computers aren't so "monkey see, monkey do". I go there as a last resort, when I can't find anything else at all.