Turntable controller: finalised project proposed

Erik84750 Feb 12, 2024

  1. Erik84750

    Erik84750 TrainBoard Member

    328
    116
    12
    When looking for a turntable solution for my layout I found a few commercial sites, such as this one. However the customer comments I read were not satisfying, and the response from the provider even less so.

    One of the most common comments was that the indexing system does not work well; creep in the course of usage resulted in tracks not being alligned properly anymore after hours of operation. The comments from the provider were not reassuring: he blamed that the creep was the result of the wooden support frames crimp and expansion due to moisture or whatever.

    So one of the foremost goals in this project is to have flawless indexing, and total-zero creep over the course of usage. For that matter I developed an algorithm that, during calibration, measures the exact amount of stepper moter steps to perform an exact 360° 0' 0" 0.1" etc.. turn.

    Several other requirements were set as goals prior to starting the actual development.

    One of the peculiar and most important hardware parts (besides the stepper motor) is the indexing sensor.
    Some other projects use a Hall effect sensor: this sensor uses the magnetic field of an external object to sense its presence.
    There is however a very big disadvantage to this sensor.
    Since magnetic fields do not have clear on/off boundaries it is virtually impossible to get a magnetic object to approach within a specific distance where the sensor will detect its presence and expect that distance to be over and again to be identical within millimeters, or for the requirement of turntable operation, within tenths of millimeters.
    The decision to use in this project a specific optical detector, with a narrow and highly selective field of view, was taken after hours of testing of its repeatability and repetitivity (statistical terms describing the accuracy of measurements). This detector is described further along with all the other specifics of this project in this Github page.
     
    Last edited: Feb 12, 2024
  2. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    Great project Erik. Have been waiting for an accurate DIY turntable controller after playing with other
    designs which were disappointing in repeatability of accurate positioning.
    Would like to ask if you are using the HC-020K sensor with the slotted disks that usually come with
    the sensor, one having far more slots than the other. I refer to what I see on Ebay. The sensor is
    available as a sensor only or with disks. Thanks.
     
  3. Erik84750

    Erik84750 TrainBoard Member

    328
    116
    12
    Hi Bob, thank you for your kind words.
    The sensor is indeed the HC-020K; no slotted disks required.
    The turntable disk should be equipped with just one small protruding object that passes through the sensor "eye", mounted underneath the framework, out of sight. This object may even be the size of a nail; as long as it passes through the sensor lips.
    The purpose being that this object passes through the sensor eye once every 360 degree rotation of the turntable.
    I updated the github description just now to reflect this clarification.
     
  4. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    Hi Erik, My build is progressing albeit a breadboard bird's nest at this stage. Awaiting the slow boat to
    deliver the sensor. Meantime, have the LCD, encoder and keypad responding as seen from your Github photo's.
    At this point must ask which version of Accelstepper.h should I be using ? My library is currently set at
    version 1.64 most recent apparently. As presented on Github, does the INO file need to have some
    commented lines uncommented to use a NEM17 stepper ? I dare to assume by default the INO is
    currently compiled for the smaller 28BYJ stepper ?

    Apologies for the questions, just not as experienced as others but try to keep the brain cells ticking.

    Thanks again - Bob
     
    Erik84750 likes this.
  5. Erik84750

    Erik84750 TrainBoard Member

    328
    116
    12
    Hi Bob, I am sorry to reply only now: somehow I am not getting notified by Trainboard about new messages.

    Currently the .ino is set for NEM17. That can be checked by viewing the MotorInterfaceType, which has been set at "1": "stepper driver with 2 driver pins required.
    My current version of AccelStepper is 1.64.0
    No comments/uncomments needed in the current .ino setup from Github.

    I dare say that the supplied gerber files for the pcb are really a big advance in user comfort and that I strongly recommend of using them.
    Here in Europe I pay 1 USD for 10 pcb's (even twenty pcb's if you request panelization of the 49x99mm on a 100x100mm manufacturer board).
    Shipping to me is about 10 USD just for the one order.
     
  6. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    Thanks for the feedback Erik. Just needed the clarity after trying the smaller stepper, which was not
    responding. Have since got a NEMA17 stepper wired up and responding. The sensor is still in transit
    so I have to be patient till I can complete the breadboard mock up.

    It is my intention to use the Nema17 option as a final build, reducing some wiring otherwise needed
    for use with a 28BYJ stepper. Your PCB is a great professional approach to allow the end user choice.
    Have looked at the pricing of these as a minimum order, very attractive. However, the shipping cost
    to Australia has to be factored in if ordered from Europe. Forced to use DHL, no choices offered.

    So my final build will be modular, with soldered wiring. Further ahead will be the hardest stage, the
    actual mounting of stepper and sensor to a universal design of frame. Am aware of a very simple
    and functional concept using laser cut plates from an "Instuctables" project. The laser files are
    available to download, the laser cutter is a different matter. Catch 22 as the saying goes.

    For now, thanks again.
    Bob Brockhouse
     
  7. Erik84750

    Erik84750 TrainBoard Member

    328
    116
    12
    Bob, Elecrow is situated in Shenzhen, closer to you than to me :).

    For casing and stepper physical connections I use a Anycubic Vyper 3D printer.
     
  8. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    Will check Elecrow out. I have an Ender 3 printer, giving me many fine prints for a long time
    now. Was looking in "Thingiverse" for suitable stepper mountings for turntables but nothing
    really to suit the requirement of this project, in my view.

    If the previously mentioned laser cut plate design was translated to STL files , what a winner.
    No such luck, I have no experience with cad programs at all or if this is even possible.

    Cheers
     
  9. Sumner

    Sumner TrainBoard Member

    2,766
    5,721
    62
    If you have a NEMA 17 ...

    [​IMG]

    ... my design above might be of help. You can find it here...

    https://www.thingiverse.com/thing:4941391

    .... I still haven't used it myself as...

    [​IMG]

    The stepper is held by the scrap I used above and might stay that way ....

    https://1fatgmc.com/RailRoad/Turntable/page-6.html

    [​IMG]

    .... The Ender did a nice job on my table. More info on it here and all the print files are up for anyone that is interested...

    https://1fatgmc.com/RailRoad/Turntable/Turntable-Index.html

    Sumner
     
    Erik84750 and BNSF FAN like this.
  10. Erik84750

    Erik84750 TrainBoard Member

    328
    116
    12
    Sumner, do you use a reduction gear?

    I provide a 1:72 or something reduction; it greatly increases accuracy; at the expense of speed :).
     
  11. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    Thanks for that Sumner. Always interested to see how others create their projects.
    For me, I will eventually be making up a OO/HO version of the plated mount concept.

    Cheers
     
  12. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    Erik, the reduction is on the 28BYJ or NEMA17 version ? in the INO file ? The 28BYJ itself has an
    internal gearbox reduction , the NEMA17 no gearbox. Your reduction is a physical gearbox mounted
    in the drive train of your turntable ?

    Thanks,Bob
     
  13. Erik84750

    Erik84750 TrainBoard Member

    328
    116
    12
    Hi Bob, indeed the 28BYJ has an internal gear reduction.
    The NEMA17 does not have any internal gears. Yes, the reduction gears I use are those supplied with the turntable (now defunct Diamond Scale; 120 scale foot, +/-42cm diameter); I just read up the doc's here, it's a 1:50 reduction gear.

    However if you are in N-scale the turntable diameter will be small enough to be driven sufficiently precisely without reduction gear. In fact, the current rotation speed in the program might well be exactly what you need without reduction gearing.
     
  14. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    Great news. Had me confused ,"what reduction, where ?" Aiming for the most reliable and accurate
    turntable possible using direct drive between stepper and turntable bridge.

    Thanks again, Bob
     
  15. Erik84750

    Erik84750 TrainBoard Member

    328
    116
    12
    That will work with my setup; even the software should already be configured for your purpose. If any tweaking is needed I would gladly assist, Bob.
     
  16. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    All makes sense , with thanks Erik. Hopefully I will not need further assistance , but who knows ?
    Do appreciate your assistance to date and offer if needed in the future. Really helps a project along.

    Cheers,Bob
     
  17. Sumner

    Sumner TrainBoard Member

    2,766
    5,721
    62
    No I'm running the stepper at 6400 micro steps per revolution. The table is a hair under 7.5 inches (100 N scale ft.) in diameter and running the stepper at 6400 the accuracy per step is .0036" ( .091mm ) per step. A code 55 rail is about .030" ( .762mm ) in width so I believe that is more than enough accuracy. I've read where others have used reduction gears and made it work but then got into problems with the backlash that you have with gears being a problem. Similar to running mill by hand. You always want to end up turning the feed wheel in the same direction before making a cut. A number of them switched to NEMA 17 stepper motors without any reduction. The NEMA 17 stepper motors are not much more and you are only buying one.

    Even with HO and a table twice at large as mine the accuracy would be .0074" ( .187mm ) per step and I'd think that would be fine especially since all the other tolerances are also larger with HO.

    The same with the stepper motor driver. I bought the one ( HERE ) for $10 and it and the stepper motor are quiet. Easy to wire and easy to use the dip switch to change the steps per revolution. I have the amps set at 1 amp for the NEMA 17 and the steps at 6400 and all is working well. You can get the stepper motor and driver both for under $20, well worth it.

    I'm not interested in auto-indexing at this point as I want to be more hands on. If I change my mind later I can still go that route. I do have it setup so that it will auto-index to the home track coming to the table. I used a Hall effect and in testing and it seems plenty accurate but I know that Erik is going with optical. I will switch to that if I have problems or maybe before I install on the layout as it would be very easy to do and I think all the code I wrote would still work just fine. For anyone that is interested in manual indexing I have the code up on my site. Also here are some videos showing where it is now. Just need to get further along with the layout before I install it.







    Sumner
     
  18. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    Sumner, really great insight here with thanks. Introduces the topic of microstepping for accurate
    positioning. Has to be the way to tune out alignment errors, specially for direct drive setups.

    The issue of gearbox backlash is no longer an issue, there is no gearbox.
     
  19. Sumner

    Sumner TrainBoard Member

    2,766
    5,721
    62
    Exactly and these stepper motors are used on 3d printers, small mills and other applications that need a lot percision so are made to do the job.

    Sumner
     
  20. Bob Brockhouse

    Bob Brockhouse TrainBoard Member

    10
    1
    2
    Erik, have my sensor now. Just powered up on 5v. the led is on and goes off when I pass an object
    through the "ears". I believe this is what should be happening. Correct me if this assumption is
    incorrect. Progressing to the calibration procedure, should I position the object before or after the
    "ears" prior to hitting the keypad "C" button. I dare to assume that during the stepping count the
    LCD readout will give a visual readback , and when the object passes through the sensor the count
    will stop ?

    Bob
     

Share This Page