Arduino Rotary Table for Dummies

Help Support HMEM:

SmithDoor

Well-Known Member
Joined
Feb 12, 2009
Messages
954
Reaction score
133
Location
Clovis Ca
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
 

Eccentric

Well-Known Member
HMEM Supporter
Joined
Dec 29, 2020
Messages
68
Reaction score
88
Location
Southern California
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
 

SmithDoor

Well-Known Member
Joined
Feb 12, 2009
Messages
954
Reaction score
133
Location
Clovis Ca

deeferdog

Well-Known Member
Project of the Month Winner
Joined
Mar 23, 2014
Messages
419
Reaction score
398
Location
Gold Coast, Australia
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

weir-smith

Bruce W-S
Project of the Month Winner
Joined
Jan 30, 2015
Messages
65
Reaction score
59
Location
Perth Western Australia
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 bruce.weir-smith@iinet.net.au and let's get it working for you.

Bruce
 

xpylonracer

Well-Known Member
Joined
Dec 23, 2010
Messages
334
Reaction score
84
Location
Norfolk, UK
I thought this point had been raised before and the original author answered the question with a satisfactory solution.
 

deeferdog

Well-Known Member
Project of the Month Winner
Joined
Mar 23, 2014
Messages
419
Reaction score
398
Location
Gold Coast, Australia
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:

xpylonracer

Well-Known Member
Joined
Dec 23, 2010
Messages
334
Reaction score
84
Location
Norfolk, UK
Peter

Original article by the late Chuck Fellows here:

Rod's work added to the functions and made several options available but I'm sure I have read the problem you describe has been programmed out.
 

ajoeiam

Well-Known Member
Joined
Aug 14, 2020
Messages
178
Reaction score
66
Location
MN
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?
 

xpylonracer

Well-Known Member
Joined
Dec 23, 2010
Messages
334
Reaction score
84
Location
Norfolk, UK
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
 

ajoeiam

Well-Known Member
Joined
Aug 14, 2020
Messages
178
Reaction score
66
Location
MN
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!
 

ignator

Well-Known Member
Joined
Jan 22, 2012
Messages
197
Reaction score
37
Location
USA, Iowa
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.

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;

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

Last edited:

GarryIno

New Member
Joined
Feb 24, 2021
Messages
1
Reaction score
0
Location
Victoria, Florida, USA
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.
 

deeferdog

Well-Known Member
Project of the Month Winner
Joined
Mar 23, 2014
Messages
419
Reaction score
398
Location
Gold Coast, Australia
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
 

OldRon

Well-Known Member
Joined
Oct 16, 2012
Messages
45
Reaction score
4
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:

tjwal

Well-Known Member
Joined
Sep 22, 2013
Messages
95
Reaction score
16
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
 

awake

Well-Known Member
HMEM Supporter
Joined
Sep 4, 2019
Messages
1,193
Reaction score
502
Location
North Carolina
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!
 

skyline1

Well-Known Member
Joined
Aug 6, 2012
Messages
360
Reaction score
97
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
 

awake

Well-Known Member
HMEM Supporter
Joined
Sep 4, 2019
Messages
1,193
Reaction score
502
Location
North Carolina
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

Top