Jump to content
 

Stepper-motor turntable drive?


JeffP

Recommended Posts

Jeff, all,

 

Latest news from the front...

 

I wrote a program for the Arduino that allowed me to calibrate it for each of the six roads. This worked reasonably well, between the roads at one end, but when I turned it round, it was slightly out of position. Within a couple of half turns, the positions were well and truly wrong. Frustrated, I wrote another sketch, to do simple half, and eventually, full turns. I used the calibration bit of the program to work out the steps for a full turn to be about 8500 - which given a 200 step motor, means a pulley ratio of about 43:1, which is a bit higher than I expected, but, ok. So I ran it like this and it was, for example, slightly too few steps - so I adjusted it by a few steps ( in the right direction!) and it was still not right - so a few more steps - and the same again, so LOTS more steps, and then it's too much, so a few less, and it's still too far, the.n not far enough, and, after a short while, I realised that there was no clear relationship between the steps on the motor and the position.

 

This was a bit of a revelation - and of course, as e system is open-loop, a bit of a b, as the whole principle of operation is that I tell the motor to go so far and the table stops where I want it to. This can't work if there isn't a clear and predictable relationship between position and number of steps.

 

Ok - verify - it is not slipping - is it actually too tight? Well, I thought it might be, so I took the old drive band off, and.. (Drum roll...) it has kinks in it! See photo below. Aha, that might explain the issue! So, assuming the belt was too tight, I made a new one, which was much looser, and tried that. Wondrously better for the first five or six goes and then, same problem of unpredictability.

Took that belt off and, Lo, same problem.

 

So then, I tried @tender, Ray's, approach, of direct drive. I don't yet have a stepper controller that allows microstepping, but I concluded that the torque of the motor will not be less without the microstepper than with it,so it set it up to direct drive. Not good - the inertia of a 465mm long metal turntable (even without motor) is so high that the thing make horrid noises - and appears unreasonably violent in operation. Of course the steps and therefore the acceleration will be hugely reduced when the microstepper controller arrives, but I'm still of the opinion that a decent gear ratio will be required between motor and table, and accordingly, the next step will be the purchase of a pair of 120 tooth wheels, a pair of 10 tooth pinions, and a pair of toothed belts to suit. Plus bearings, and a frame on which to mount it all. And then, perhaps, we will have a bit more luck. Haven't yet sorted out which supplier - lots on line.

 

On a more positive note, I have rewired the t/t so that the tracks are powered by the centre pivot and the rail, thus providing permanent supply to the sound equipped locos, and avoiding a short circuit when the t/t commutes from one end to the other. Should have seen that one coming! I need to sort out a relay to do the polarity change as suggested by Grovenor / Keith

 

Some more photos attached,

Off to Reading tomorrow - if you see a fiftyish bearded bloke in a Barbour looking a GW stock (or turntables!) it might be me!

post-20369-0-41418800-1386361035.jpg

post-20369-0-65060700-1386361048.jpg

post-20369-0-53134200-1386361059.jpg

Link to post
Share on other sites

On a more positive note, I have rewired the t/t so that the tracks are powered by the centre pivot and the rail, thus providing permanent supply to the sound equipped locos, and avoiding a short circuit when the t/t commutes from one end to the other. Should have seen that one coming! I need to sort out a relay to do the polarity change as suggested by Grovenor / Keith

 

That's EXACTLY how mine works.

 

One of my small jobs today, as well as struggling, and failing to get 14BA nuts onto the screws in a tight space, has been to get electrical supply to the race rail, for the wheels to pick up.

 

A recent photo on herte of, IIRC Yeovil junction, showed a large-ish spike embedded in the concrete base, adjacent to the ends of the race rails, obviuosly with a view to taking the pressure off and removing it's tendency to move outward(??)

 

Anyway, I replicated it by drillin the baseboard 1.5mm hard up against the fishplate, then force fitting a short length of 1.6mm brass rod, with the head smoothed into a spherical sort of shape.

 

Some flux, and a quick dab with the iron, and I have my connection, which is also prototypical.

 

In regards to the belt, can you not get a neoprene one? it's less likely to kink.

Link to post
Share on other sites

Simon, I suspect if you are not using a toothed belt that there must inevitably be some creep as the belt changes shape around the pulleys. 

 

I am surprised that the motor won't drive the unloaded turntable directly with full steps - although the motion may be too rough for a train and too imprecise. How fast are you "stepping"?

 

The Pololu A4988 which I have can do 1/16th microsteps which would give 3200 steps per revolution. That should be precise enough for track alignment.

 

...R

Link to post
Share on other sites

Robin, Jeff,

 

Went to the Reading show today, had a few words with Dave Smith of Metalsmith fame. His "normal", ie non-stepper t/ts are driven by the same polyurethane belt that I'm using - he obviously designed the "big" pulley with this in mind - and he was surprised by the issues I'm having.

 

My theory for the kinking is that, the stepper motor runs hot, and the pulley that I made for the motor is brass, and quite small diameter, the combination of which is probably perfect for causing thermoplastic deformation of a tight belt!

 

I don't think that creep of belt relative to the pulleys is the issue - although of course I can't be sure. It seems to me that there is little or no chance on the big pulley, but of course, on the little one, this could be the case - the radius is small, and therefore the belt diameter & stiffness are relevant to the effective radius, and this could lead to creep - but how much? And I think it is likely to be very predictable, which is of course exactly not the problem.

 

Dave's solution is a stepper motor with an integral gearbox - I think he said 120:1 ratio - direct drive to the t/t, and this is one option, but a tad expensive at £175 - http://www.metalsmith.co.uk/Turntable_motorising_indexing.htm - but this includes a control board which I don't need.

 

An alternative geared stepper motor is available from Active-Robots.com @ £49.20 - http://www.active-robots.com/3319-42bygh40-m-160-4a-nema-17-bipolar-99-55-1-planetary-gearbox-stepper.html

 

Motionco.co.uk offer a toothed belt solution using MXL belts (two 10:1 reductions using 12 & 120 tooth pulleys, and a pair of 150 tooth belts) would give a 100:1 ratio, and would require an idler shaft & bearings. I reckon this would cost about £40 and take a couple of weekends to make, but be rather satisfying if it works..., and of course uses the motor I already have.

 

Tomorrow's attempt will be to make a drive pulley of about 18mm diameter from nylon, with a brass hub from the pulley I already made. This might alleviate the kinking problems, and as I have everything, will be cheap, and quick.

 

If it doesn't work, I will investigate the other options; I think I might cut to the chase and buy the geared motor from active robots.

 

Watch this space!

SD

Link to post
Share on other sites

If you use microstepping and have 3200 steps per revolution and either direct drive or a toothed belt I can't see any need for a geared stepper motor. The gearing is likely to introduce additional backlash, although you should be able to compensate with your program.

 

I am an inveterate starter of projects that don't get finished past the "I know it will work" stage so I am about to change to a smaller layout with only one train turntable and the present plan is to use a stepper motor to drive it rather than a servo as I now have some steppers that I got for another project. I think the earliest work on the turntable is about a week away, but I will report progress as well as drawing on the experience here.

 

By the way if the turntable only needs to turn less than 360deg (so any loco can be reversed) the turntable tracks can be wired with some flexible wire and with no need for pickups. Just turn the other way for the next movement to unwind the wire. If it's controlled with an Arduino that could be built into the program and does not need to be visible to the operator who just selects the track s/he wants.

 

...R

Link to post
Share on other sites

Hi guys

 

Good modelling Sunday, after a very pleasant trip to the Reading show yesterday, where I caught up with some old pals, and met some new ones.

 

Well, I set about fixing the strimmer first thing (duty before pleasure!) but discovered to my great surprise that the new fuel pipe I had installed last week had undone itself from the little squeezey bulb thingy, and then somehow wormed its way into the fuel tank! It had swollen considerably, and it can only conclude that as it swelled, it pulled a bit more in, which swelled, and did the same - quite extraordinary, particularly as the pipe I used was from some I bought for an old R/C plane many moons ago - apparently ok with nitro, but not unleaded! Ordered new pipes on ebay.

 

Anyway, as the garden wasn't going to get strimmed, I got on with the turntable!

 

I made the new pulley for the motor, and added two stiffeners under the diagonal lower bearing support, and tidied up all the wiring Photos below.

 

I then tried it out, with mixed results; yes, it works better than before - very nearly, but not quite perfect. The photo of the V block shows the misalignment after 4 complete turns - it's about 3 or 4mm - which is clearly not going to work, but at least now it is consistent, which supports the "hot pulley causes kinked drive belt" hypothesis. Strangely, it does keep erring, in one direction, despite being reversed, and trying in each direction first! I guess this gives weight to Robin's suggestion of creep, but why it is unidirectional is beyond me!

 

So what to do? Obviously, it's a hardware problem, so fix it in software!!!

 

The program (which I will post when I have time to tidy and comment it properly) comprises two main sections, a calibration routine, in which the direction switch is used to manually control the table to align it with the exit roads, and a push button is used to record the position. When all 6 roads are recorded the program then goes to "auto" mode, and it should simply go in the selected direction to the next road (I didn't want DCC control, but Ray / tender describes how to do it in his thread), but as described above, it doesn't!!!

 

I therefore added a small sub-module to the auto section of the program, which, when the push-button is pressed, allows the direction switch to be used manually, effectively one-step-at-a-time, to improve the alignment. This is recorded as a separate variable, and added to the position, so all subsequent positions have the same offset.

 

So I have put it all together, and tidied the workbench, so I can get on with the unfinished locos that are still decorating the Greater Windowledge Railway. I'm going to think about it for a while, and odds-on, I'm going to buy the geared motor and a purpose- designed stepper driver board.

 

I shall also write a little sub-module to store the position variables so that calibration is not required every time I turn it on.

 

I think it would also be a good idea to somehow switch off the stepper driver when it isn't needed - but I don't yet know how to do this without losing position, perhaps I can somehow shut the current down to minimise the heat which is only going to wear it out quicker.

 

Jeff, I hope I have at least partially answered your initial question - although I fear I have rather hijacked your thread! I'd like to thank all the contributors, particularly Ray, Robin & Keith for their constructive suggestions

 

Best to all

SD

post-20369-0-58437000-1386539746.jpg

post-20369-0-52476300-1386539787.jpg

post-20369-0-36017500-1386539848.jpg

Link to post
Share on other sites

I doubt if the heat will do the stepper any harm as long as the current is within the specs. I reckon if you want to save energy the power supply to the motor could be switched off with a relay as long as you switch it on again before you try to move the motor.

 

...R

Link to post
Share on other sites

Dave's solution is a stepper motor with an integral gearbox - I think he said 120:1 ratio - direct drive to the t/t, and this is one option, but a tad expensive at £175 - http://www.metalsmit...ng_indexing.htm - but this includes a control board which I don't need.

With the MERG design we are using a motor and gearbox from RS components, parts RS 440-262 and 336-416 respectively. current price with VAT near enough £60 the set. You do need good quality to minimise backlash etc. This motor has 7.5 degree steps and the gearbox is 250:1 so each step at the turntable is 0.03 degrees which we have found very satisfactory in 4mm scale, not sure if anyone has used it in 7mm as yet.

Regards

Keith

Link to post
Share on other sites

The problem with using gearboxes is that you introduce backlash into the system. Looking at the spec for the gearbox Grovenor specified it suggests up to 1 degree of backlash on the output shaft. At a 4mm scale turntable (300mm dia. deck) that equates to about 2.5mm at the end of the deck. I guess its not a problem if you only turn in one direction or maybe it could be 'programmed' out in the software? I don't know how the MERG T/T gets around this. I think a toothed belt arrangement may be preferable.

 

I did have a close look at the ADM Turntable at Warley mentioned earlier in this thread (http://www.rmweb.co.uk/community/index.php?/topic/76732-stepper-motor-turntable-drive/?p=1222249). The bit you don' t see under the baseboard very well engineered and uses a toothed belt and stepper, but if I was paying £395 i'd want to see something a bit better than a PECO T/T sitting on top.

 

Ray.

Link to post
Share on other sites

My control unit ans stepper motor with gearbox uses toothed belts, but gets around backlash by always approaching the required road in the same direction of rotation.

 

It will turn in the quickest direction, unless instructed to do 180 degrees, and so, if it finds it is approaching from the "wrong" direction, it goes a few mm past, then reverses back to the correct road.

 

Very clever solution, imho.

Link to post
Share on other sites

  • 1 month later...

Ladies & Gentlemen

 

Very pleased to report that the geared stepper motor available from Active Robots @

 

http://www.active-robots.com/motors-wheels/bipolar-stepper-motors/3319-42bygh40-m-160-4a-nema-17-bipolar-99-55-1-planetary-gearbox-stepper.html

 

Seems to have done the trick.

 

Installation on the Metalsmiths GW 65' t/t is relatively easy requiring removal of the big wheel, bridge piece, and the centre bearing, and a little easing of the pivot hole to clear the shaft of the motor, which is 8mm diameter.

 

I made a spacer ring from styrene sheet, and drilled this to suit the fixing screws - then used it as a template to drill the base of the well.

 

The drive dog was quickly re bored to suit the shaft and the mechanical part was quickly done.

 

Electrically, I used a Pololu A4988 driver, with regulators, and I re-wrote the sketch - there is backlash in the gearbox, about 125 steps (out of 19912 for a whole turn) which I have "programmed out".

 

I have fitted a 2x 1p2t 5v relay to change the track polarity.

 

Can post the sketch if anyone would like it

 

Very happy!!!

SD

Link to post
Share on other sites

Jeff, all,

 

Herewith some pix

 

Firstly the motor & gearbox. This is fixed directly to the bed of the well, it is about 95mm long, and is unfortunately rather noisy - Not awful, but not quiet enough! I will attach some sound deadening material to the underneath of the well in an attempt to quieten it a bit.

 

post-20369-0-75425000-1391423096_thumb.jpg

 

This is the brain.

On the left is the Pololu A4988 stepper driver, which does get hot! The board is tiny and has no mounting holes. It is fixed down by clamping two 2-pin connectors to the base of the brain with two screws. It provides regulated 5V to drive the Arduino and the relays.

 

Centrally, the relay board which switches the polarity of the turntable tracks when the table is reversed. Didn't use the usual split ring support rail as a) it will short and drop the whole DCC bus as the wheels are in contact with both sides at once, and b) having a dead section would have turned the loco sound off as the table turned. Wish I'd realised this before making the ring support rail in several pieces...

 

On the right is the Arduino. I will replace this with a Pro Mini as they are cheap, and that will release this one for other projects. The Pro Mini has the same pin-out connections as the Uno

 

post-20369-0-85102400-1391423138.jpg

 

View from below

 

post-20369-0-30277300-1391423172.jpg

 

Wiper for bridge track power - the bridge wheels provide the other connection

 

post-20369-0-08486400-1391423200.jpg

 

Hope it helps:

 

For the record, approx costs:

Motor, £50

Driver £15

Pro Mini £5

Relays £ 6

Misc £ 10

 

 

Best

SD

Link to post
Share on other sites

Hi Jeff

 

6 roads on my t/t but you can program as many as you like. The motor has 200 steps per rev and the gearbox is 99.56 :1 for some reason. Which equates to 19912 steps per turn, or about 0.018 degrees. If my trig is any good, it gives a theoretical alignment of 0.07mm per step, and if this is still too much, the stepper driver will go down to one sixteenth steps...

 

It can do 180 degrees, or any other angle you might like, I set it to do a half turn in about 75 seconds, which is the sort of speed Castle said was typical of his efforts at Didcot, but slower or lots faster is also possible.

 

The tests I've done so far have been fine for accuracy - much better than a mm at the rail ends - certainly good enough given GOG 0 F standards

 

I'm still playing with the software, I seem to have inverted the motor direction when I installed it all under the t/t, so I'll sort that out over the next few evenings.

 

When I've sorted it, I'll post the code.

 

Best

SD

Link to post
Share on other sites

Very interesting indeed.

 

Rather than post the code, why not market it? It would be useful in at least 4mm and 7mm scale, maybe 2mm too?

 

What sort of price could you knock it out for? I paid £250 for mine, second hand, but the units on mine are in boxes.

Link to post
Share on other sites

And how to charge for it when it uses lots of stuff released under the Creative Commons? And if you charge and it doesn't work, you have to fix or refund, and you have to pay income tax, and someone else will charge me for what they might have told me for free and, and, and, and...

 

I rather like the "do and share" philosophy that we seem to have on here, so, no I won't charge.

 

I did build a loco for a mate once, a Southern Q, didn't do a bad job (tho not up to Ozzy's standards by a long way) but I preferred my day job, and the hourly rate wasn't attractive enough to push me want to change jobs - there's a few fantastic pro/semi-pro builders around, but I ain't one of them - so strictly for pleasure!!!

 

Ray,

 

I might need to follow your lead for the "self zeroing" function you have implemented. Currently finding an issue with the stepper growling round for a few seconds when it boots up - seems to run a few steps without any control input from the Arduino - have you seen this?

 

Best

SD

Link to post
Share on other sites

And how to charge for it when it uses lots of stuff released under the Creative Commons? And if you charge and it doesn't work, you have to fix or refund, and you have to pay income tax, and someone else will charge me for what they might have told me for free and, and, and, and...

I rather like the "do and share" philosophy that we seem to have on here, so, no I won't charge.

I did build a loco for a mate once, a Southern Q, didn't do a bad job (tho not up to Ozzy's standards by a long way) but I preferred my day job, and the hourly rate wasn't attractive enough to push me want to change jobs - there's a few fantastic pro/semi-pro builders around, but I ain't one of them - so strictly for pleasure!!!

Ray,

I might need to follow your lead for the "self zeroing" function you have implemented. Currently finding an issue with the stepper growling round for a few seconds when it boots up - seems to run a few steps without any control input from the Arduino - have you seen this?

Best

SD

Hi SD, I share your philosophy, for me, turning a hobby into a business is a sure way to turn a pleasurable pastime into a burden. As it stands I do what I do and post my findings/results as and when I feel. As it's freely given I feel under no obligation to 'come up with the goods' as it were.

 

As to your issue with the stepper growling at start up, I can't say I've noticed this, other than for slight twitch as the coils power up in the motor. I'm using the Adafruit driver for the stepper so wonder if it's a function of the Pololu driver you use.

 

Ray.

Link to post
Share on other sites

Jeff,

 

The "thanks"' "like" or other tags on one of my posts is always a nice reward - good to know that others appreciate what you're doing - but thanks for the thought!

 

Ray,

 

I'll investigate further and advise. Perhaps the Adafruit driver is better.

 

Beet

SD

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...