Model railroad turntable ?

Hi forum

I will try the best I can in English, otherwise, the question is also in danish :slight_smile:

I am a complete newbie to Arduino.
I have seen different examples of turntables controlled by Arduino, but not in the way I would like it to work.

My project is as follows: I want to be able to turn the turntable to 3 points (0° - 15° - 30°) via 3 pushbuttons, one for each position. And a LED to light up, when the turntable has arrived at the chosen position.

Hardware: Arduino uno, 28BYJ-48 steppermotor and ULN2003 Driver Board.

Question is: Is it possible?

Kind regards Klaus.

Hej forum

Ja, jeg er helt ny i dette univers. Jeg har hørt om Arduinos mange fortræffeligheder, så jeg går og pusler med et lille projekt til modelbanen. Men jeg ved ikke om det kan lade sig gøre. Derfor spørger jeg her.

Projekt: Styring af en drejeskive ved hjælp af Arduino uno, 28BYJ-48 steppermotor og
ULN2003 Driver Board.

Drejeskive skal kunne køre til 3 stillinger, 0° -15° - 30° ved tryk på en af tre trykknapper (knap 1 = 0°, knap 2 = 15°, knap 2 = 30°), og så gerne en LED ved trykknapperne, der viser i hvilken position drejeskiven står på.

Kan det lade sig gøre? Eller skal mere/anden hardware til? (udover ledninger, modstande osv)

Pft Klaus

It's plausible, people have done similar projects.

The specifics are a question though. You will need to find out whether the stepper is powerful enough to turn your particular turntable, also whether it is precise enough to line track up well enough for your needs.

You will need some kind of sensor to permit you to zero the table at startup.

I have seen different examples of turntables controlled by Arduino, but not in the way I would like it to work.

My project is as follows: I want to be able to turn the turntable to 3 points (0° - 15° - 30°) via 3 pushbuttons, one for each position. And a LED to light up, when the turntable has arrived at the chosen position.

Really? This sounds almost exactly like the projects that I've read about on this forum. Or else, so close that it's a minor change to make it work like this. In fact, there is no complicated logic and the hardware is very well known, so it should be easy to code from scratch. What problem are you having exactly?

Hi, and thanks for reply.

As mentioned, I am all new to this, so there questions about everything :frowning:

But for starters, the hardware. besides the Uno, steppermotor and driver, I think I will need pushbuttons, and some resistors to make it work. But what else is missing? I have searched around in the forum, but I couldn't find anything related to this topic, do you have any pointers where to look?

And then, when the hardware is in place, I probbably will be needing assistance with the coding..
I have fiddled around with HTML, but never these commands used for Arduino (not yet) :smiley:

You need pushbuttons, sure. No resistors are necessary - you can use the internal pull-ups.

The stepper doesn't know where the turntable is at startup so you need something that indicates a zero position. At the start, it will need to rotate the table until it finds that zero position and then when you press the buttons it can go to the appropriate place.

People commonly use a microswitch for this purpose, but you could go with a hall sensor and magnet or a slotted light detector. The only thing that matters is that whatever you choose gives you enough accuracy that the track lines up.

The 28BYJ-48 stepper motor has the disadvantage of a lot of backlash in its gear box. That is likely to make it difficult to align tracks with sufficient precision.

Because of the gearbox I suspect it will have ample torque if the turntable has good quality bearings.

You could experiment with always driving the motor in the same direction and having a small amount of friction to ensure the turntable cannot move a little ahead of the motor.

It may also be possible to add a number of extra steps to adjust for the backlash if the motor changes direction. I think you would still need to introduce some friction to keep the slack in the mechanism in one direction.

...R

Here's a recent thread on the topic: Arduino Forum.

To Robin's point (and illustrated in that other thread), stepper motor projects often end up using a different motor than the one initially planned for. In a recent project I was involved in, we went through three or four before we got the power and accuracy necessary.

how large will the turntable be ?
there are many ways to move a large object with small motors. If the table is well balanced and has little friction, then a small motor could work.

My first thoughts are to use a worm gear with a motor (any motor) and rotate until your are lined up.
once you are close, you can have a small servo push a pin so that the alignment is perfect.
that way, there is no need for highly accurate sensors or switches.

My second thought about a stepper would be to use a belt, like an MXL you would find in an old scanner.
the motor would have a small pulley, the table would have a much larger pulley. This would allow a smaller motor and keep the speed of the table low.

I think that real turntables have small motors with spur gears and the turntable has a large ring gear.

What is the scale, N, H0, 0, 1 ?
I wouldn't try applying the turning torque to the center. Play, friction might cause a crappy movement, stopping precision will not be good enough.
Solutions I have seen all apply the turning torque using ether a large tooth wheel under the table or one like the old Maerklin metall turntable.

If You have a chance to visit Sweden You can try this link: www.GMJS.se. Those people have knowledge....

Really, a stepper motor is not the most appropriate for this project. The temptation is to imagine that since the steps are precise, you can position something that way, but then you need the "zero" sensor because you will lose the knowledge of the position anyway when the power is off and you cannot really trust the mechanics.

Far better to use a microswitch or optical "vane" sensor to determine (separately) when the turntable is aligned in each of the three required positions. Using just a geared motor (and yes, you most certainly do not ever drive a turntable from the centre), the software can account for backlash when approached from a given direction but you really need a detent to hold the table in alignment.

Since you will generally power off with the table in one of the preferred positions, the sensor will tell you on power-up which it is, and only if for some reason it is not, will it need to "hunt". :grinning:

looking at the application.
to me, it would seem that the detent at each posistion is the key.
I can think of a few ways to use a single servo to hold the postion, but even 3 separate ones would not be expensive or too hard.

the motor is really not as important. since the DC motor would have lost any position with power off, the stepper and DC motor are equal in that respect. No advantage to either and no disadvantage to either.
You just drive till it hits the stop/switch/detent/sensor, etc

The only advantage the stepper would offer is more power at slow speeds. but that too is meaningless. A tiny stepper may have less power than a small DC motor.

Since the project will be driven by a gear or a belt or a worm. All of these speed reducers will be the driving factor in what motor is best.

IMHO, if you use a worm, the DC motor would move the turntable at a decent speed.
if you used a belt/gear, the stepper would offer a slower speed to get that look and feel of the real thing.

In order of importance is the design, the drive, the detent and last, pretty far down the list is the motor.

The only advantage I can see is using a stepper for finite positioning when using only switches
By using one switch for each position, you can run at full speed, then pass the switch, then return at slow speed till it trips and that could be the exact position.

The DC motor on a worm would have decent hold-in-place due to the worm.
The stepper would offer decent hold-in-place if belt driven.

Thanks for all your replys :smiley:

I can see, that I have to do some more figuering out before I proceed. And maybe my first idea, is too advanced for my skill-level. :drooling_face:
A former colleague, came by earlier today, and suggested to skip the pushbuttons, and instead use a rotary encoder to control it manually.
It is still my plan to use a steppermotor, and a recuction gear (belt drive/pulleys). But for now, I have to wait for some parts/boards to arrive :wink:

Use some kind of mechanical key that directs the turntable, and locks it, in the proper position as the final part. Of course a microcontroller and some stuff can contribute to a beautifully working turntable.

Know that a real turntable has a hughe weight, some 10 tons for 891 mm, 20(?) tons for a 1435 mm railroad. Then add 50 resp. 120 tons of weight of the locomotive. I assure You that acceleration as well as retardation are very important factors. All in order to make a nicely working modell, not a toy.

if you take your platter and put a hole in the center and the board below it, then put in a pin/nail, etc it couuld be the center of rotation. use a nylon plastic sheet to reduce friction.

take 3 rollers and mount them so the platter is held in place.

you can get a worm and ring gear
use a MXL belt (old scanner/printer)
pretty much whatever you find you can use.

it is not hard to turn the platter. it is not hard to adapt a motor.
what are your strengths ? wood working ? metal working ? whatever ?

dave-in-nj:
if you take your platter and put a hole in the center and the board below it, ....

It's possible the OP is motorizing a proprietary scale locomotive turntable.

...R

birkla:
I want to be able to turn the turntable to 3 points (0° - 15° - 30°) via 3 pushbuttons, one for each position. And a LED to light up, when the turntable has arrived at the chosen position.

Another thought ...

I suggest you position the tracks after you have the turntable motor working. That will allow you a little flexibility to locate the tracks where the motor chooses to stop. For example 15.35° or 16° might work more easily than an exact 15°.

I think the suggestions to use detents hold the 'table precisely in position is a good idea and, again, I would position the tracks as the last thing.

...R

Robin2:
I suggest you position the tracks after you have the turntable motor working. That will allow you a little flexibility to locate the tracks where the motor chooses to stop. For example 15.35° or 16° might work more easily than an exact 15°.

Brrrr Robin. No modell railroader would even consider that and "toy" railroaders would have large difficulties to make the tracks match. That could possible work for one track connected to the turntable, but not for more tracks. OP is mentioning 3 tracks being possible to select. I doubt he only uses 1 track switching to 2 other tracks. Than a point would be the choice.

Railroader:
Brrrr Robin. No modell railroader would even consider that and "toy" railroaders would have large difficulties to make the tracks match. That could possible work for one track connected to the turntable, but not for more tracks. OP is mentioning 3 tracks being possible to select. I doubt he only uses 1 track switching to 2 other tracks. Than a point would be the choice.

I think you missed what Robin said.
If you make the detent and the THEN install the track, it would line up the first time and be easy to do.
If you laid the track then tried to make the turn-table detent match, it could takes days to get that half mm perfect.
I don't think he is saying more than the width of a rail.

I'll wait for a comment from Robin, and OP.