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.
lol, yes, i dont exactly understand it but thats what my math and conclusions came out to.
hoping someone has something new, i saw mention of a code that will just let me decide steps, which would be fine for me, i just need divisions of 2 4 5 and 6.
ill have the wife walk on my arm, then read thru this again to see if i can figure it out while i wait for you to get home.
i was hoping to accomplish this without having to learn the code :p been about 10 years since i worked in code.....
i still gotta figure out the driver control, enable thing again....

thanks for your time John.
Brandon
 
Hello all
having spent alarge number of hours reading through this thread my poor mind is now frazzled! So I hope that you good people could give me an uncomplicated answer to my problem as follows:-

I want to cut a clock wheel with 96 teeth using a stepper motor as a means of division. The mechanical side of it is no real problem but the code etc. is totally beyond me.
\\\hope someone can help.

I have an Arduino uno, an lcd keypad display, and a stepper motor driver
 
have you gone thru page 1 and gotten everything hooked up, the program installed on your pc, and the code installed to the arduino ?
does your stepper motor move ? and what are the specs of your stepper motor and driver ?
 
yes have gone through page 1 and hooked up pretty much as described. My problem is trying to figure out what code I need to use that will give me the possibility of cutting a 96 tooth wheel. The more I look at examples of what people have done the more confused I get!!:(
 
try the 1st one, in comment 17. the step in 14 and 15 is really important to make sure its communicating to the right spot. if your numbers are entered right for steps per rotation and table raito, and your getting a propper 360 degrees when you enter 360 degrees, then you would be good to go. you would want to select divisions and enter 192, then for every notch you cut, you will move 2 divisions, 1 to skip a tooth and one to cut the notch between them.
if you need help with the math you will need to give more numbers, specifically steps per rotation and table ratio
for the motor your using.
 
Ok more detail of my project. I have built a small dividing head (tony jeffree design). This initially was to be used with indexing plates. It has a 30.1 worm drive. My thoughts were to replace the indexing plates with a stepper motor. I have a nema 17 1.8deg. stepper. The final outcome hopefully will be the building of a skeleton clock.
http://www.jeffree.co.uk/images/divphoto1.gif
 
Ok more detail of my project. I have built a small dividing head (tony jeffree design). This initially was to be used with indexing plates. It has a 30.1 worm drive. My thoughts were to replace the indexing plates with a stepper motor. I have a nema 17 1.8deg. stepper. The final outcome hopefully will be the building of a skeleton
clock.
divphoto1.gif
 
so on your controller there is a selection switch for step multipliers ? hopefully :p you also need to know that setting.
to get the steps per rotation you divide 360 by the stepper angle, and multiply it by the raito your driver is set to.
the code is written for 1.8 degree stepper with the driver set to 2 360 / 1.8 =200 x 2 = 400, so that part of the code stays the same if your driver is set to 2.
the ratio for the table is originally 72 or something, you change that to 30, 400 steps per rotation times 30 ..... and .... you end up with the same problem i have :p 12000 steps per rotation, 12000 divided by 360 is 33 and 1/3 or 33.333toinfinityandbeyond which gets rounded down to 33 and fucks our math all up.....
and pretty sure if you where just using steps to control instead of converting to degrees in the code, you could set your jog to 125 steps, and it would give you the 96 jogs you need to cut your teeth, not sure why i was thinking you need 2 jogs per tooth before.
 
I tried the maths and came up with the same as yourself 33.3, t was from this onwards that my confusion set in.
Not sure what you mean by 'set my jog to 125 steps'.
 
jog is when you hit the button once and it moves a set number of steps or degrees. what i mean is it would be nice to be able to just use steps in both of our situations instead of degrees. sense the math works out and we just need specific cuts
Tjwal / John said he should be back soon and he seems to actually understand better. hopefully he can help us both out, if not i will just have to learn the code better and do it for us :)
 
Hi everybody,
just jumping in and I have not read all postings (but many). I am using a windows based program for clock wheel cutting. The program does some calculations and inserts extra steps at intervals to even out any "impossible" divisions. I did not write the program and do not know exactly how it is calculated but it is possible to divide any number of teeth with only very small deviations from the ideal division. Could the arduino be programmed to do the same? It should not be impossible with some programming.
 
As I said it is not my program but there is an explanation of the technique at this adress and also the program itself
http://members.optusnet.com.au/swensenr/ToothCutting.html
It would be interesting to be able to replace the old PC with an arduino setup in the future but the program does more. It also moves the x-axis so I can drink coffee while the wheel is cut.
Hope this helps
 
Okay I HELP ... I have been following the bmac2 Arduino Rotary Table for Dummies string for well over a year now, there is some great information throughout the 11 pages of this Forum. Many people have contributed some very useful information, thank you. A big thanks to bmac2 for starting off the string Arduino Rotary Table for Dummies, in my opinion a very nice solution for the home hobbyist.
However I am in the same boat as dwk and as it looks a few others who are trying to solve this automation puzzle.
I am not a coder/programmer, I have never developed programs or control code of any form, I have no experience in this field.. All I would like is a Clean Sketch of the bmac2 Arduino code to run my 4" Rotary Table.
My rotary table has a 72:1 table ratio, NEMA 17 1.8 degree stepper motor - 200 steps per rotation , a 5:1 reduction(not sure how to factor the 5:1 reduction into the mix). If it has been determined that the 5:1 reduction is a problem, I will design a direct stepper motor mount to couple the rotary table worm gear shaft to the stepper motor shaft. I have completed my control console build using the components listed by bmac2 and a enclosure offered by Maxmekker50 via aliexpress.
I have loaded bmac2's Arduino stretch successfully and everything works great electrically/mechanically. Except I can not get the table to rotate to the correct position. example with a 45 degree input the table only rotates about 10 degrees.
My goal has been to use the bmac2 solution or some revised version to cut timing gears or index the table to predefined positions.

20180710_105242.jpg 20180729_190843.jpg
 
try multiplying your reduction ratios manually and entering that number for table ratio.
5 x 72 = 360 for table ratio.
or do your math for steps and enter that, stepper is 200 steps per rotation times 1 stepper driver setting, times 5 reduction ratio = 1000 steps per rotation.
or 200 steps, times 2 driver setting, times 5 ratio = 2000 steps per rotation
you did not mention the driver micro steps setting so i assume its on 1, but most people run 2.
 
for people in the future, if your having the 1/3 problem, or just an odd number problem in general where your total steps divided by 360 is not an even number.
what i did to fix mine is enter my steps per rotation as my total , did all my own math. 1200 steps per rotation total. enter that in steps per rotation.
then change table ratio to 1
and in line 263 i changed the degrees math to steps by changing the code to this "for(int i = 0; i < 1200; i++)"
this lets me do my division math manually, sense all i need is simple divisions of 1 2 3 4 5 6 8 10 12 and so on, and enter the number of steps i want to move instead of degrees.
1200 steps divided by 5 divisions = 240 steps per division in the degrees option when using the controller
 
Lamplighter
I’m not sure bmacs original code will work for you.

Your setup takes 72000 steps for 1 revolution, bmacs cide uses integers so you run into trouble with numbers over 32000. There are a number of posts about this issue.
I posted a revised version in post #149. As far as I know it is bug free. It also takes care of the ⅓ type of issue that fubuddy refers to.
There are many other solutions but I can assist if you’re using mine.

Cheers
John
 
Don't know if this helps or if I am just adding confusion but here is an explanation of what I tried to say in previous posts.
As I understood the problem is when you want to cut for example a wheel with 57 teeth and it is not divisible in your setup. As an example the rotary table need 8 turns on the handle to turn i complete turn. Then you may have a 1:3 ratio between the handle shaft and stepper motor.
This means the stepper has to make 24 turns for 1 complete turn of the rotary table. Assume the stepper has 200 steps and is run with 2 stepper driving.
This gives 24*400=9600 steps for a complete turn. For 57 teeth you get 9600/57=168 steps per tooth but with a remainder of 24 steps. To make a complete 360 degree turn they have to be added to the 57*168 steps. In the program I referred to he spreads the 24 extra steps by inserting them as evenly as possible during the cutting. There will be a small error on some teeth but it is so small it falls within the tolerances.
The Arduino should be capable of making the calculation and to distribute the extra steps if someone who is familiar with the program could modify it.
 

Latest posts

Back
Top