Jump to content
 

Stepper-motor turntable drive?


JeffP

Recommended Posts

I assume your Arduino solution is not the one costing £395 which is being referenced above!

The electronics build is just soldering basic through hole components on a properly made board with detailed instructions, the firmware is all ready and loaded. The motor and gearbox are from Rapid electronics, no Meccano involved. The motor and gearbox account for most of the cost, quality at this point is a good idea. Whilst an Arduino will save a bit of electronics construction it needs firmware producing, preference there clearly depends on individual skills.

DCC control is not a standard feature of the MERG design, it can be set up to work by switches or via a MERG CBUS interface, the MERG DCC controls can drive the CBUS interface but there would not be much involved in interfacing directly to DCC accessory decoder outputs if required.

Regards

Keith

Link to post
Share on other sites

The cost of @tender's Arduino solution could be reduced further by using a standalone Atmega328 chip (less than £3) and a Pololu A4988 stepper motor driver (less than £10). That way the Arduino Uno could be released for other projects.

 

You could probably also use the same Arduino (or Atmega chip) to control several cheap servos for point or signal control.

 

...R

Link to post
Share on other sites

I assume your Arduino solution is not the one costing £395 which is being referenced above!

The electronics build is just soldering basic through hole components on a properly made board with detailed instructions, the firmware is all ready and loaded. The motor and gearbox are from Rapid electronics, no Meccano involved. The motor and gearbox account for most of the cost, quality at this point is a good idea. Whilst an Arduino will save a bit of electronics construction it needs firmware producing, preference there clearly depends on individual skills.

DCC control is not a standard feature of the MERG design, it can be set up to work by switches or via a MERG CBUS interface, the MERG DCC controls can drive the CBUS interface but there would not be much involved in interfacing directly to DCC accessory decoder outputs if required.

Regards

Keith

The total cost of my project is £120 inculding £40 for the PECO Turntable and the DCC interface. I dare say it could be done cheaper by shopping around for the bits. (also see Robin2 post).

 

The cost of @tender's Arduino solution could be reduced further by using a standalone Atmega328 chip (less than £3) and a Pololu A4988 stepper motor driver (less than £10). That way the Arduino Uno could be released for other projects.

 

You could probably also use the same Arduino (or Atmega chip) to control several cheap servos for point or signal control.

 

...R

Thanks Robin, I will have a look at those products and see if the code is compatible.

I've just had a look on the Technobots web site at geared motors, eg. 100;1 37mm dia. motor and gearbox less than £20.

The Stepper Motor is £16, no gearbox required.

 

I'll be putting up a full description in the DCC Topics thread over the next few days if anybody want to try and replicate (and improve on) this project.

 

Keith - I'm a member of MERG, (although i've never posted anything on the forum, just bought a few bits through the shop) is there any value of putting this project on the MERG site? If so where's the best place?

 

Ray.

 

Edit:

Doh, just realised that the Atmega328 chip is the chip on the Arduino Uno.

The Adafruit Stepper Shield uses a I2C interface so to use the Pololu A4988 would require a significant rewrite of the code. Not worth the effort just to save a few quid.

Link to post
Share on other sites

@tender, I wasn't suggesting you should change to the Pololu A4988 driver as you have already put in the effort to get the other one to work (unless you could find another use for the motor shield).

 

What do you mean by the "DCC interface" - it sounds like something you bought. I had assumed you had just programmed the Arduino to interpret the DCC code?

 

The idea with the Atmega328 is to develop the project on the Uno and when it is complete install the same code on a standalone chip.

 

...R

Link to post
Share on other sites

What do you mean by the "DCC interface" - it sounds like something you bought. I had assumed you had just programmed the Arduino to interpret the DCC code?

The DCC interface is just an opto isolator circuit between the layout and pin2 of the ARDUINO board. The Arduino is programmed to interpret the DCC code.

 

Ray.

Link to post
Share on other sites

Keith - I'm a member of MERG, (although i've never posted anything on the forum, just bought a few bits through the shop) is there any value of putting this project on the MERG site? If so where's the best place?

Ray,

People are always interested in other ways of doing things. The forum has a section on turntables and also a section on Arduino applications so take your pick. maybe depending on whether the write up is biased towards firmware or the mechanics. Either way it can be arranged to show up in both section headers.

Regards

Keith

Link to post
Share on other sites

Eeee, I am miffed!

 

Got home yesterday after a business trip, and the urethane drive belt had arrived (Chronos .co.uk)

 

Cut and welded a length of belt, shaved the flash off, and the drive worked fine even without a v-pulley on the motor. Promising!

 

Assembled the t/t and discovered to my great frustration that in the two years or so that it has sat on a corner of my workbench, the basic mdf structure of the well & baseboard has warped by about 2 or 3 mm - this in a centrally heated room! I know it was flat when I built it because I laminated the layers on the kitchen work tops, which are very solid Norwegian granite.

 

Of course this means that for at least part of the rotation, it's trying to push a couple of kgs of loco uphill, and slips, and, just as bad, if you try to drive the loco onto the table,I tricks, and the wheels at the far end stop collecting current, so the bridge track is dead.

 

So I'm not happy. Now planning to build a frame to support the t/t baseboard & well and pull it back flat. That'll be popular - using the kitchen granite again!

 

SD

Link to post
Share on other sites

It got worse. Having fixed the warped base with a frame of planed 80 x 20 mm timber, half a tube of aliphatic glue and a dozen 1"number 6's, I discovered that the table still jerked and stuttered as it turned. I decided that running the stepper motor from the Arduino's 5V supply from the laptop's USB port was probably to blame and more waft would improve matters. Connecting a higher voltage supply to the H bridge showed me in the clearest way possible that I had made a fairly fundamental mistake in wiring the bridge.

 

Happily the Arduino was undamaged, but progress on Sunday came to an abrupt halt.

 

A better day today - Hobbytronics delivered two new H bridges and some other toys this morning, and I made a new driver board. It works, and despite a bit of grunting and stick-slip, it now runs much better, and it doesn't lose its position.

 

I need to find out why the stick-slip is happening, but we are making progress again!

 

SD

Link to post
Share on other sites

Never drive motors, servos or anything requiring a significant amount of power from the Arduino power supply - it can't supply enough current and the power supply could be damaged. Even if the power supply is not damaged the Arduino probably won't work properly.

 

@Simond, what voltage is your stepper motor being powered with? They usually perform best with a voltage well above their nominal voltage but, of course, the stepper driver must limit the current or the high voltage/current will damage the motor. With the Pololu A4988 stepper driver there is a small potentiometer that can be adjusted to set the maximum current.

 

 

...R

Link to post
Share on other sites

Robin

 

Thanks for the note - I had intended to use a separate power supply to drive the motor, and had purchased, and wired the H bridge with that in mind, but "playing safe" had used the Arduino 5V pin out as the supply. It all "worked", and proved the motor drive connections, and I could play with the Arduino programming.

 

When I had the first issues with the warped baseboard, I thought that correcting this would be enough. It wasn't, so I connected a 15V supply, with unintended consequences. It looks like I had wired one of the 5V "enable" lines to the 15V input... Fizz... Pop! Fortunately, no damage to the Arduino.

 

I spent Tuesday evening being rather more careful about my wiring, with the result that it runs off a nominal 13V wall-wart supply, that actually outputs about 21V! I put a bridge rectifier and a 65V47uF cap across the input, and a Pololu voltage reg which feeds the 5V pins, and the Arduino, so the whole beastie can run independently of the laptop, when I finally get the software written. And if I accidentally connect it to a wall-wart with opposite polarity, nothing gets fried - the cost of 4 diodes seemed like a good investment.

 

It is much better with this supply, and in the brief trials I did, it did not lose its position or mis-step, so some useful progress, however, it is a little more noisy, which is a shame.

 

The thing that continues to bug me is the stick-slip: the table turns smoothly for some of the rotation, then judders, then goes smooth again. I can't see the reason for this at all, but I guess it is binding, slightly stretching the belt and then catching up with itself. It doesn't look nice!

 

It's a Metalsmiths O gauge GWR 65' over girder t/t and the pit& baseboards are now pretty much flat. The rail is well-laid, concentric and flat as far as I can measure. The carrying wheels spin freely, and the centre pivot does not appear to bind anywhere. The stepper drives via a v-pulley with an effective diameter of around 7 or 8 mm, and the driven pulley is the original that comes with the t/t kit, it has a root diameter of 440mm and the groove is around 4 mm wide. This gives a ratio of about 55:1 and therefore 11000 steps for a full turn. The drive belt is urethane, 3mm round, and its free length is about 10% shorter than the fitted length. Ideas and suggestions are very welcome!!!

 

So far my working theory is that somehow the axis of the main axle and the plane of the support rail are not perpendicular to one another. Given that I can't put it in my lathe ( ! ) I need to work out another good way of checking this. It will probably involve a piece of silver steel and a dial gauge, and some of the weekend...

 

I've been away on business since Tuesday, but am on my way home now - hopefully the weekend will lead to a satisfactory outcome.

 

Thanks again for your thoughts

SD

Link to post
Share on other sites

You could probably check your sticktion theory by temporarily adding a washer on the main shaft to lift the turntable a little bit.

 

You don't say what went pop - but if it was the H-bridge I strongly suggest replacing it with a proper stepper driver - it would make life a lot easier, including the programming.

 

I presume you are aware of @tender's other current thread about turntables.

 

...R

Link to post
Share on other sites

Robin

 

Thanks for your note

 

I have a spacer under the centre pivot, but need the bridge deck wheels to touch the rail for power pick up.

 

Of course, I can use a washer "experimentally" to check the deck / well alignment

 

You've just saved me a lot of time & effort by stating the b****y obvious!!!

 

SD

Link to post
Share on other sites

Robin,

 

Further to your suggestion, I placed a spacer on the shaft to lift the deck slightly and the judder disappears, and if I replace the deck without the spacer, it reappears. This confirms that the drive is ok, and leads me to conclude that despite the carrying wheels turning freely, there is some appreciable friction somewhere, which is related to the deck / well rail interface.

 

Two solutions spring to mind, keep the spacer, and arrange that the deck rails are fed by the well rail and the centre pivot - with the advantage of the sound decoders hissing merrily as I turn, but the disadvantage of having to change the connections on the deck and the cost of buying a reversing module, or alternatively, to tweak and fettle until it turns as smoothly on its wheels as it does with the centre pivot taking most of the weight, and live with the sound going off as it crosses the dead band.

 

I shall get it programmed today, and consider my options. Reversing module does sound favourite at the moment!

 

I did look at tender's other thread and found it very interesting and helpful - we had discussed direct drive before Ray started the new thread, I think, and he had kindly pointed me at the micro stepping approach which is pretty much necessary in a direct drive arrangement - so far, I still think that for the sizes & weights in O gauge, an indirect drive makes more sense, but it has its disadvantages too.

 

Time will tell!

 

Thanks once again for saving me hours of facing with dial gauges!

Kind regards

SD

Link to post
Share on other sites

Rather than changing your pick up arrangements you could add a spring pick up shoe at each end to supplement pick up through the wheels. If the wheel pick up is not good enough with the split ring would it be good enough with a single ring? You will still need good contact. If you do decide to go that way a reversing module need only be a relay switched by the arduino at an appropriate position.

Regards

Keith

Link to post
Share on other sites

On reflection, the relay is a very good solution - I suspect that an ebay special might be the simplest - although two microswitches and a cam on the shaft would achieve the same result.

 

This would work for less than a quid!

 

http://www.ebay.co.uk/itm/Hot-5V-10A-2-Channel-Relay-Module-Shield-for-Arduino-Electronic-ARM-PIC-AVR-DSP/141124299536?rt=nc&_trksid=p2047675.m1851&_trkparms=aid%3D222002%26algo%3DSIC.FIT%26ao%3D1%26asc%3D74%26meid%3D2959821774683293482%26pid%3D100005%26prg%3D1048%26rk%3D3%26rkt%3D4%26sd%3D370946911424%26

 

Just don't know that my impatience will last until Christmas!!!

 

Kind regards

SD

Link to post
Share on other sites

Hi all,

 

I made some progress today on the programming of the Arduino, but I'm still not there. Got fed up with it this afternoon, but I thought you may like a couple of photos.

 

First is obviously the thing itself, I want to do a bit more on the well, particularly the brick wall, and add the raised bricks that the enginemen would have pushed against, and tidy up a few bits & pieces, particularly the big hole that you can just see in one corner, where the non-stepper motor used to be. I feel a bit more weathering on the deck and side girders would improve it a bit. Grass with a Noch grassmaster, courtesy of Tony "the tree" Hill, will need a bit of trimming and restoring once I have the mechanical bits working satisfactorily.

 

Second is the driver board I made, comprising a centre pin jack socket for the wall-wart, a bridge rectifier (4 diodes) just in case, a voltage regulator to provide 5V for the Arduino, and a dual H bridge to drive the stepper.

 

I'll post a circuit diagram if anyone wants it

 

BR

SD

post-20369-0-69711400-1385932925_thumb.jpg

post-20369-0-76935500-1385932956.jpg

Link to post
Share on other sites

Hi all, I'm about to start looking into an Arduino and stepper motor to drive a traverser for my Oswestry works project.  I'm new to Ardunio's but have done some programming years back - does anyone have any code samples that have been used for turntables? I'm sure it shouldn't be too hard to adapt for a traverser.  

 

Thanks for posting so much information, it's given me a good head start on getting my head around things.  I'll have a look on the MERG forum now too,

 

Cheers

Link to post
Share on other sites

Welcome to the wonderful world of Arduino.

 

I presume you are familiar with the Arduino forum which is a great source of advice.

 

How is your stepper motor going to move the traverser?

 

The best (by far) way to control a stepper motor with an Arduino is with a proper stepper motor driver board such as the Pololu A4988. It just needs two connections to the Arduino - step and direction. It is also possible to select microstepping with the A4988 and similar boards - which may be a good idea for precise positioning of the traverser.

 

I am in the middle of connecting some stepper motors to a small lathe and I have written my own code to move them. Basically set the step pin high for a short period - I have used 800 micro seconds - to get the motor to advance one step. Repeat as needed.

 

...R

Link to post
Share on other sites

Hi all, I'm about to start looking into an Arduino and stepper motor to drive a traverser for my Oswestry works project.  I'm new to Ardunio's but have done some programming years back - does anyone have any code samples that have been used for turntables? I'm sure it shouldn't be too hard to adapt for a traverser.  

 

Thanks for posting so much information, it's given me a good head start on getting my head around things.  I'll have a look on the MERG forum now too,

 

Cheers

Hi Alan,

 

Have a look here http://www.rmweb.co.uk/community/index.php?/topic/78578-dcc-controlled-peco-turntable-project/?p=1223686

 

Ray.

Link to post
Share on other sites

Hi, if yiour bridge is still experiencing stiction, can you eliminate any of the bearings?

 

My 7mm Metalsmiths will be driven off the stepper motor via toothed pulleys, they will support the centre, THEIR bearings become it's bearing, the wheels pick up, and the centre shaft returns current.

 

Or what about using miniature ball-races? You can also get miniature bearing thrust bearings.

Link to post
Share on other sites

Archived

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


×
×
  • Create New...