Arduino Rotary Table for Dummies

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Dave, using micro-stepping from the controller will provide as many step pulses as needed to get a resolution of a few seconds of arc.
The only ones I found was gear driven to give the few seconds.

Do they make one that is not gear driven?

Dave
 
Yours looks like a great project. I built an indexer for my mini lathe completly (almost) with 3D printed parts. It works great and I have made three clocks with it (It is used to make the clock wheels (gears)). It is also driven with an arduino.

mandrel1.jpg

mandrel2.png
mandrel3.png
worm drive 2.png
Worm Drive assy1.png
 
Well, here goes. I built a rotary table some time back, and by following all the excellent instructions here managed to get it to work quite well. A few weeks ago I decided to make a larger version and this is where it all came a gutzer. I purchased a NEMA 23 hybrid stepper motor and 57HS76ES controller, decided to make it closed loop for greater accuracy. Mounted the motor to the table ( 6 inch Vertex knock off, AU$215 delivered, still can't believe it!). I connected it to the Arduino Uno, used the same connections as before but with the additional encoder as well. 24 volt supply. Nothing happened. 24 volt supply, 0.5 amps and the motor was locked solid.
Pulled everything apart, connected the old TB6560 driver but without the encoder wired in, worked perfectly. I decided that the 57 controller might be the problem. In my ratty box I had a new TB6600 Stepper driver, I think this is just a bigger version of the 6560 more current etc, but when I wired it in the same result, nothing. 24 volt supply, 0.17 amps, motor locked.
I have spent one of the most frustrating days of my life with this, I think that I have checked everything I can think of. I don't pretend to be a genius at this stuff but I didn't think I was as stupid as I feel now. Photos that may help, please couch replies as you would to a four year old, right now I don't think I'm even at that level. Cheers, Peter.
 

Attachments

  • 16138848296196805791063086730064.jpg
    16138848296196805791063086730064.jpg
    258.3 KB · Views: 477
  • 16138848816454595095427230727375.jpg
    16138848816454595095427230727375.jpg
    354.6 KB · Views: 486
  • 16138849112443789498633568798128.jpg
    16138849112443789498633568798128.jpg
    476.6 KB · Views: 459
  • 16138849638696673233118475844736.jpg
    16138849638696673233118475844736.jpg
    381 KB · Views: 474
Peter

You can make almost anything work and I am happy to help you. I have helped many people sucessfully with this project over the last couple of years. The original Arduino sketch would only work for 90 to 1. All other ratios were inaccurate because the sketch used integers rather than real's. This means that if the divider was 44.44444 everything past the decimal point was ignored and hence the errors.

Send me an email to [email protected] and let's get it working for you.

Bruce
 
I thought this point had been raised before and the original author answered the question with a satisfactory solution.
 
Bruce, many thanks for your offer to help, I will contact you later today. Xpylonracer, I would be grateful if you could point me in the right direction to the satisfactory solution in this post. I have read all 21 pages through at least twice and still cannot find the reason why the drivers behave differently. Thank you for your post. Cheers, Peter.
 
Last edited:
Well, here goes. I built a rotary table some time back, and by following all the excellent instructions here managed to get it to work quite well.
snip
Mounted the motor to the table ( 6 inch Vertex knock off, AU$215 delivered, still can't believe it!).
snip
Hmmmmmmmm - - - - I'd be curious as to where you found that 'table' - - - please?
 
Bruce, many thanks for your offer to help, I will contact you later today. Xpylonracer, I would be grateful if you could point me in the right direction to the satisfactory solution in this post. I have read all 21 pages through at least twice and still cannot find the reason why the drivers behave differently. Thank you for your post. Cheers, Peter.
Peter, read from here onwards:
Electronic Dividing Head using the Arduino
 
Here is the link to the table: Rotary Table (Horizontal & vertical ) 150mm/6" | eBay
The quality seems OK to me but I haven't stripped it down. I have a Vertex 4" (Taiwan) as well and this looks just as good. One day I may just get to use it if ever I sort out these other problems.
Peter.
Went looking - - - - it seems that our Aussie friends have it much better than us here in the northern hemisphere.
Looked like same product was well over $500 Canuckistani buckeroos and that was without shipping from our cousins south of us - - - - which has become incredibly pricey.

Thanks for the link - - - - - gives me a starting point for looking!
 
Went looking - - - - it seems that our Aussie friends have it much better than us here in the northern hemisphere.
Looked like same product was well over $500 Canuckistani buckeroos and that was without shipping from our cousins south of us - - - - which has become incredibly pricey.

Thanks for the link - - - - - gives me a starting point for looking!
If you do an eBay search with "rotary table HV6", I get the following link with the USA eBay site.
https://www.ebay.com/sch/i.html?_fr...t=0&LH_TitleDesc=0&_osacat=0&_odkw=HT6+rotary
So do you want a 4 slot or 3 slot (there are 6 slot tables available also). I sort on lowest price plus shipping. So you need to scroll down from the early hits (dividing plates and tailstocks), but you can find one from India for less then $200USD with free shipping.
Like this one;
https://www.ebay.com/itm/HV6-Rotary...612534?hash=item2f53c0e1b6:g:-zUAAOSwbLVfTMOe
However, I have a 4" table from India, and I do not like any part of it's poor quality. And my next purchase was a 6 inch that came from China, and again, substandard quality.
 

Attachments

  • HV6 Rotary table 3 SLOTS Horizontal & Vertical Precision Quality.pdf
    853.1 KB · Views: 404
Last edited:
Hi....without basic literacy in Arduino you will find it hard to write a sketch to do much more than those examples.
Understand that you can lift sections from those sketches for your own, modify as needed but make sure that you know how they work and what they do which takes reading the lines, literacy. How much faster did grade school go for you once you could read books, write papers and do math?

You don't have to know everything, just the basics. Variables and arrays, logic structures, how to use and make functions, the input/output functions for pins and serial and know to look things up starting with the Arduino Reference Page.
 
I have managed to sort out most of the frustrating problems that I posted about above, they were due to a faulty power supply. I would like to thank those who helped, in particular Bruce Weir-Smith whose knowledge of Arduino and Steppers greatly exceeds mine. Bruce was kind enough to spend his time emailing me circuit diagrams and instructions that helped track down the problem.
I have taken the advice of Rodw where he maintains that 48 volts is the way to go and I have ordered a Meanwell 500 watt 48VDC power supply, any heat issues I will address as they appear. Cheers, Peter.
20210224_133841[1].jpg
20210224_133812[1].jpg
20210224_160306[1].jpg
 
This is my prototype in C++. It features accumulated error management and regardless of the number of indexing divisions it goes 0 to 360º. My servo motor requires 2048 pulse per revolution so here's the logic:

Seconds in 360º: 1296000
My motor ppr: 2048
My gear ratio: 4:1 low backlash gear head * 90" rotary table gear ratio: 4 * 90 = 360:1
Motor ppr per rotary table revolution: 360 * 2048 ppr = 737280 pulse per rotary table revolution
1296000 / 737280 = 1.7578125 seconds per motor pulse (but we use degrees)
1 degree = 3600 seconds
3600 / 1.7578125 = 2048 The value of the variable, user in my code

(3600 / (1296000 / (motor ppr * gearing))) = user

degrees output are degrees = (degrees + (steps / user))
It does no good to compound (360º / divisions)
accumulated error output is error = (error + ((360º / divisions) - (steps / user)))

I moved up to the 32bit Arduino DUE so the double declaration is for real unlike the UNO that accepts double declaration but remains to be 16 bit. As you can see in the picture this builds and extremely accurate indexer. Picking up the fractional value of the steps keeps the accumulated error down to next to nothing.

C++:
// Visual Studio C++ 2019 w/round function

#include <process.h>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>

int main()
{
    double error = 0;
    double steps = 0;
    double crumbs = 0;
    double divisor = 0;
    double degrees = 0;
    double index_L = 0;
    double user = 2048;

    std::cin >> divisor;

    index_L = (360.0 / divisor);

    std::ofstream myfile;
    myfile.open("Indexer.txt");

    std::cout << "\n";

    for (int n = 1; n <= divisor; n += 1)
    {
        steps = ((index_L * user) + crumbs);
        crumbs = (steps - round(steps));
        steps = round(steps);
        degrees = (degrees + (steps / user));
        error = (error + (index_L - (steps / user)));
        std::cout << std::fixed;
        std::cout << "Index: " << n << ": - " << "Degrees: " << degrees << char(167) << " - Accumulated Error: " << std::setprecision(8) << error << char(167) << "\n";
        myfile << std::fixed;
        myfile << "Index: " << n << ": - " << "Degrees: " << degrees << "º - Accumulated Error: " << std::setprecision(8) << error << "º\n";
    }
    myfile.close();
    std::cout << "\n";
    system("pause");
    return 0;
}

31 INDEX.jpg
 
Last edited:
Yours looks like a great project. I built an indexer for my mini lathe completly (almost) with 3D printed parts. It works great and I have made three clocks with it (It is used to make the clock wheels (gears)). It is also driven with an arduino.

Thats an interesting design. Are the stl files available? I doubt my printer would be able to print that worm accurately enough but I might give it a try just because.

Thanks John
 
All motors can over heat. They need cooled and not under sized.
The programming of must include a a slow down at end to prevent over run.

The encoder will hole the exactl spot it does use electrical impulses just a mirror and set of two electric eyes.

The encoders take more programming than just simple using simple pulse.
On printer if lose one or two pulses you not see the error but gear it will make a difference.

Now try calculate the the pulses out for other errors.
The encoder off shelf I can find 5,000 Resolution. The stepper motor off the shelf I found was 1.8 degrees or Resolution of 200.

If great precision use compound indexing.

Dave

Dave, I hope you are talking about a servo motor. Yes, I suppose in theory a servo motor could be built using a plain old DC motor and a rotary encoder, but there would need to be some smarts somewhere in there!
 
Dave, I hope you are talking about a servo motor. Yes, I suppose in theory a servo motor could be built using a plain old DC motor and a rotary encoder, but there would need to be some smarts somewhere in there!

Yes, In fact that is all many older servo motors are. The "Smarts" are in the servo Amplifier/Driver although newer servo motors have them built in as part of the motor
 
Skyline, I understand your point. Earlier in the conversation, it sounded like the suggestion was just to put a DC motor on instead of a stepper, as though one could just slap any old DC motor in place. This is where I hope the DC motor in question is actually a servo motor! But let me be the first to say, I may have misunderstood the intent of that earlier post.
 

Latest posts

Back
Top