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.
[FONT=&quot]How can you tell if your controller is a Chinese clone? On mine I set the “Running Cunent”. scratch.gif[/FONT]

TB6560 Chinese Clone.jpg
 
The Arduino runs on 5vdc and if your stepper is running on 12 volts or less you can power it by connecting the power supply positive (+) to the VIN pin on the Arduino and the negative (-) to the Arduino GND.
If you are using a supply greater than 12 volts the easiest way to power the Arduino is to use a DC to DC (Bump) convertor. Most of the ones I have seen on the internet have a maximum input voltage of 35 volts DC. The output can be adjusted to anything from 1.5 volts up to the same as the input.

Connect the power supply positive (+) to the “IN +” terminal on the convertor. Connect the power supply negative (–) to the “IN -“on the convertor. Turn on the supply and adjust the “OUT” to read around 6 volts. If you’re Buck doesn’t have a display use a DC meter to set this. It has to be above 5 volts or the Arduino internal regulator would drop it to 4.

Peel off 2 of the DuPont Male to Male jumper and connect them to the “OUT +” and “OUT -“ terminals. (the power supply is turned off now, right? just asking.) Then connect “OUT -“ terminal to the “GND” on the Arduino. Next Then connect “OUT +“ terminal to the “VIN” on the Arduino.

Check this connection twice! This is about the only step where you can smoke the Arduino
.

LM2596 Buck Converter IN.jpg


LM2596 Buck Converter OUT.jpg


IMG_1914.jpg
 
You will notice that if you now ask the controller to turn the stepper motor 45 degrees it will spin around a half a dozen times before it comes to a stop. This is because the software is calculating the reduction of the rotary table.
We are down to the last edit that is needs to complete the project. Open the sketch in the Arduino IDE (program) you need to edit 2 lines.

Line 30, “const int StepsPerRotation = 400;”

Change this to reflect the number of steps of your stepper motor multiplied by the step resolution set on the controller. For example if you have a 200 step motor (most common) and you set the controller to ½ step (2) then the StepsPerRotation = 400, for 1/8 step (8) it will be 1600 etc.

Line 31, “const int TableRatio = 36;”

This is the ratio of rotary table and my table has a 1:36 reduction. If your table is 1:72 then the line will have to be changed to read

“const int TableRatio = 72;”

Upload the sketch to the Arduino and you are done.
 
That looks great! Well, the rotary table I have 'borrowed' (see my dividing plate thread) came from a cupboard full of a university project a fellow postgrad completed about 20 years ago, and untouched since. In the same cupboard were (the last time I looked) a pair of stepper motors, one of which was once attached to the rotary table, and a fairly big rack of control gear which (given when it was) must have hooked up to a 486 PC. The rats nest of a controller was the reason I borrowed the table and left the motors, but...maybe I ought to find a reason to go back! :). Oh, in the boot of my car are some large-ish regulated DC PSUs scavenged from a scrapped flight simulator for no better reason than I couldn't leave them in the bin.

Thanks for this tutorial - I used to program in Fortran and Matlab but I've kind of left that world behind. Perhaps I should have another play.
 
Great writeup .

Maybe worth mentioning that for a chinese arduino clone , a diffferent driver needs to be loaded , the one that come with the arduino software do not work .

Wel , at least mine didn't , but the driver is easy to find if you google for chinese arduino driver .

Pat
 
Great writeup Bob. I will be ordering components needed to build the controller, and a 100 mm RT dedicated for the Arduino-controller.:)

CS
 
Hi

Looking more closely to the photos I see two decimal places.

So here is my root question. I want to drive an indexer using a 4 to 1 reduction with a timing belt. Will that ratio provide sufficient resolution for cutting gears?

Mark T
 
Doubt it.

At only 4:1 the cutting forces may be too great that they will force the table to jump steps.
 
At only 4:1 the cutting forces may be too great that they will force the table to jump steps

That is a given. For gear cutting the indexer would be locked mechanically after each move. I am leaning towards a stepper with a planetary gear reduction.

Mark T
 
Great writeup .

Maybe worth mentioning that for a chinese arduino clone , a diffferent driver needs to be loaded , the one that come with the arduino software do not work .

Wel , at least mine didn't , but the driver is easy to find if you google for chinese arduino driver .

Pat

Thanks guys. The hard part was convincing my wife to do the build.



Pat good call. :thumbup: I’ve never ran into that with an UNO only with the NANO clones but that said I got some NANO clones pretty early on so I would never have noticed it.
 
That is a given. For gear cutting the indexer would be locked mechanically after each move. I am leaning towards a stepper with a planetary gear reduction.

Mark T

Mark, John
For gear cutting the stepper is just indexing and providing holding torque but I still lock the table when making a cut. Maybe have a look at the BAZMAK’s “A dedicated indexing head for the Sieg mill” http://www.homemodelenginemachinist.com/showthread.php?t=25980


If you are using a 200 step per revolution motor with a 1:4 reduction, with the driver to 1/8 step you would have 6400 steps per revolution or 17.7 steps per degree. With a 42 tooth gear the teeth are something 8.5 degrees apart (I think) so 1:4 might not leave enough wiggle room. Sneak in a second belt with an idler shaft?
 
Hi

Thanks bmac2 your numbers match mine. I suspected a simple 4 to 1 belt drive would be to rough.

Mark T
 
Hi

So I'm not as swift as bmac2's wife.

When I got to the part

“To test the display click “File”, “Examples”, LiquidCrystal_I2C”, then “Hello, World”. Check that the address matches what you got from the scan, edit it if necessary and upload it to the Arduino. Your display should light up with “Hello World” as below. If the display is just blank check that the small jumper on the back of the display is in place, without it the back light will not come on.”

I am not getting the simple example “liquidCrystal_12C” . Instead I get “Arduino-LiquidCrystal-12C-Library—master” When loaded I do not get the 4 line output, I only get one line that reads Hello, World.

And if I go on to the next step and load the control sketch I get an error

'class LiquidCrystal_12C' has no member named 'initc'


I must be doing something wrong, any ideas?

screensave1.jpg


screensave2.jpg
 
Tried that and it just bumped the error to another line that started with lcd.init

I see that text in three lines

line 41 lcd.init () ; // initialize the lcd

line 53 lcd.init () ;

And then the line that caused the error

line 114 lcd.init () ;


Thanks for the effort

Mark T
 
It looks like I uploaded the wrong library:wall:. I just checked and I don’t have the “Arduino-LiquidCrystal-I2C-library-master” installed.
I have it in my Arduino “ZIP Files” directory but never installed it. You need the Marco Schwartz "LiquidCrystal_I2C-master" library for the DFRobot I2C LCD displays from GitHub.
Hope this works and I have to apologize for the confusion.

View attachment LiquidCrystal_I2C-master.zip
 
Back
Top