arduino rotary table factory
The stepper motor will have to be sized for your application. I used a small 3 rotary table and dont plan on using it for anything other than indexing so a high torque NEMA17 did the job. If youre working with a larger rotary table or want to be able to use it as a 4th axis in the mill you will want at least a NEMA23 size motor. You will have to reach out to the forum for help with selection.
Youll have to install the Arduino software (IDE) on your computer. Spark Fun has a good step by step tutorial for completing the install. https://learn.sparkfun.com/tutorials/installing-arduino-ide
I recently read an article in Model Engineers Workshop Magazine (December 2016 issue 249) for adding a stepper motor drive to a rotary table. I don′t use my small Vertex rotary table very often but I thought this might be a useful project to learn a little about stepper motors and digital control of machinery. The article by Carl Wilson describes how to use an Arduino micro-controller to control the rotary division process. Much of the coding is contained in another article in Digital Machinist by Gary Liming. So no original thinking by me here, just a rehash of other engineers good work. All the links and useful information can be found in the Glossary at the end.
Prepping the table can be as simple as doing nothing, a complete strip down and re-build with thrust washers and the like or somewhere in between. There are a few articles on the web giving details (see glossary). Software setup and programming the Arduino is the quickest part and if you use Gary Liming′s software without alteration, the programming takes just a few seconds. Assembling the electronics is mainly about fitting the bits into the box and requires a bit of inginuity to fix things in place. The boards are fairly flimsy and things, like the display, tend not to be square or flat, I found.
The stepper motor mounting I made from three parts and assembled with Loctite and screws. I have no doubt there are other ways of making this or a suitable motor mount could be found ready made and adapted to fit the table. You will probably want to test things as you you go along rather than leave everything to the end. I discovered I had a faulty motor driver, easier to deal with whilst still uncased. I don′t think it makes makes any difference which order things are done.
This is covered elsewhere on the web in some detail so I have just made a few notes that may be of interest. Dismantling the table is quite straightforward, just look for allen headed grub screws at the bottom of deep holes. The notes refer to my 4" Vertex table.
Start off by removing the handle, the table locking clamps and the worm engagement lock. The handle is just one screw but watch out for the shaft key which is small and easily lost. Photo (2) shows the board I made to store the table with a cutout for the handle. The stepper motor will also need a similar storage solution. I used pliers and some cardboard to protect the finish to unscrew the table clamp handles. Remove the engagement lever and collar, two grub screws and it slides off, this is the part that the motor connector will attach to, it has three ready tapped holes for when used with division plates.
Remove the cam shaft securing and adjusting collar (4), four cap screws. Remove the grub screw that sets the worm engagement depth, found at the bottom of a deep hole (5). The worm shaft and cam bearing can now be removed as one unit, rotate the table and it will push the spindle out.
Turn the table upside down and remove the table bearing and adjustment plate (6), four cap screws. The table can now be removed, mine was pretty clean (7) not having been used much, there wasn′t even that much grease. Now that everything is apart it can all be cleaned re-greased and re-assembled. The worm drive shaft can be slid out of the cam adjuster by removing the collar, it is a ground shaft with an oilway and a very good fit in the cam adjuster.
Other than adjustment to remove backlash I didn′t make any changes to my rotary table, it was in fact pretty good before I started. If you have an older well used table it may take a bit more cleaning to remove old grease and any swarf that may have found it′s way inside.
Other parts worth note are the cam shaft retainer / bearing (4) and the table retainer / bearing (6). These both feature four cap screws which bolt the item in place and four grub screws which act as jack-screws to prevent clamping the rotating part. When reassembling it is worth adjusting these carefully to limit the table lifting whilst still turning freely and likewise to prevent the cam shaft moving in and out. I noticed with the table bearing / retainer that there was a noticeable stiff spot so it is worth rotating the table through a full 360° whilst adjusting. The cam shaft could be locked in place if you think there is no need to disengage the worm gear. Last bit is to set the worm engagement, this is controlled by a grub screw at the side (5) which engages with a slot in the cam shaft to prevent rotation. If you undo the grub screw and fully engage the worm it will be very difficult to turn, tighten the grub screw just enough so that the worm turns easily with a minimum of backlash.
Not much to this really but first you will need to go to the Arduino website and download the Integrated Development Environment (IDE) software. This is basically a fairly lightweight program that runs on your PC (Windows, Mac or Linux) and allows you to edit programs (sketches in Arduino speak) and upload to the Arduino board. You will also need to download Gary Liming′s software. Once the software is downloaded installation is straightforward. The Arduino IDE is self-installing from an exe file in Windows. Gary Liming′s programs come as a zip file which needs un-zipping to a folder. Once unzipped, double click on the "Stepindex23.ino" file and it will start the Arduino IDE and load the program.
All being well you should now have a screen like something like those above. Click on the image to read the text. Affix the LCD shield to the Uno making sure that all the pins are in the right places and none of the connectors is bent. Plug the Uno into the PC using a USB cable, often supplied with the board. The Uno will be powered by the USB connection. First thing to do is go to the "Tools" menu (10) and set the type of board. All being well the software should then report that it is talking to the Uno, bottom right of the IDE, something like "Arduino/Genuino UNO on COM4". You should also be able to click on the "Port" section of the menu to assign a COM port. If this isn′t working and the Port section is greyed out it may be driver related.
Arduino micro-controllers are mainly programmed using the C++ programming language or at least a subset of C++, so the programs are fairly understandable for basic editing. The first few lines of the program (11) are used to set parameters used later. These can be adjusted now, the program is well commented, or left until later when everything is assembled. You may wish to alter gear ratios or even remove some items. There is more help in the readme files that come in the program zip-file. If you are a C++ programmer the world is your oyster, the menu items can be moved around or even removed if you don′t need a particular function. You may wish to experiment with some of the delay timings to help de-bounce the keys but this is probably better done during final testing.
The parts are shown (12) above and are the Arduino Uno, the LCD shield, the cable gland, TB6560 stepper driver, switches, plug, socket and power supply. The circuit boards are all pretty flimsy and the mounting holes are very close to the edges. The LCD shield has a seperate smaller board for the LCD soldered on top and the two boards were not particularly parallel. There is also a multi-turn variable resistor on the board which cunningly sticks up higher than the LCD face. If you are adept with a soldering iron it can be re-positioned on the other side of the PCB. I solved the non-flush pot problem by using a 1.5mm clear polycarbonate sheet between the box lid and LCD with a small cutout for the variable resistor.
I fitted as much as I could to the box lid, only the mains in and stepper out are fitted to the box. The display needs a cutout in the lid as do the three switches and a number of 3mm holes for various mounting screws. Once I had worked out the position of all the bits I marked the inside of the box lid for the position of the LCD and switch cutouts. I set this up on the mill and used a 5mm slot drill to remove the cutouts, the ABS machines very easily. I fixed the lid to an off-cut of MDF with woodscrews through the mounting holes, I also used double sided tape to make sure nothing moved. A couple of T-nuts and studs fixed the MDF to the mill table (13). With hindsight the double sided tape was overkill, it took me longer to get it off the lid than it did to do the machining. The corners of the switch cutouts I filed square, I drilled the various mounting bolt holes by hand as I did for the other round holes opening them up as necessary with a taper reamer and file.
I made the two flat plates and then fitted the motor, flexible coupling and rotary table together to measure the shortest length of tube that would work. The dimensions for the motor mounting plate were copied from the motor spec sheet.
I used another bit of 3" x ¼" bar to turn the plate that bolts to the rotary table. I drilled a 10mm hole in the centre of the plate and used a length of studding to hold it (22). The studding has two nuts locked to it which fit against the back of the chuck jaws and a nut and washer clamp the plate against the front of the jaws, there is a centre in the outboard end of the studding for support. I used a trepanning tool to remove the corners and then turned the O.D. to to size.
When the R.T. mounting plate is the correct diameter add a step 3mm deep with 38.1mm diameter to create a short spigot to fit the tube bore. Remove from the mandrel (studding) and mount holding the just turned spigot (23), bore out the centre hole to 21mm to fit the R.T. collar. To finish this part it need the three mounting holes drilled to match the table. I clamped the table index ring to the plate, they should be the same diameter, then spotted through with a drill that just cleared the threads in the index ring. Unclamp and drill the holes 5mm, there is no other alignment so keep the holes small, don"t use an M5 clearance drill.
The three parts are "glued" together, I used Loctite 603 which is a high strength oil tolerant retainer. Check alignment before joining, it will depend on the orientation of the holes in the index collar on the R.T. probably easier to join the tube to the table end first and then bolt it in place. The motor mount can then be aligned so that it is square when in use. I had an interesting experience when I first tried assembly. applied the Loctite placed suitable weight on top and left overnight. The following day removed the weight picked it up and it came apart. Apparently Loctite "goes off" still mine was a few years old! If you want to add screws it is probably easier to do this after assembly, I used 3 M3 C/S screws in each end, a bit belt and braces as either screws or adhesive alone will probably do the job.
Not much to this really, first bolt the connector to the rotary table. Slide in the flexible coupling and tighten onto the table drive, I aligned it so that the grub screw would tighten into the keyway. Fit the motor using four M5 capscews, nuts and shakeproof washers. Tighten the coupling onto the motor shaft and thats the mechanical bit done.
To test I went through each menu item in turn and made sure it did what it was supposed to. I discovered that clockwise and anti-clockwise were reversed but this can be adjusted in the software. I also discovered that I had wired one switch back to front and needed to reverse the leads fortunately just swapping a couple of push on connectors. Found that the motor vibrated rather heavily, haven′t got to the cause of that yet. I also set the table to zero on it′s scale and checked that the angle turned matched what the display said for a full 360° - it did.
With a bit of work on the software, to slow the motor down, I don′t see why the table could not be operated under power, to mill say a semi-circular slot. WIll also need a bit of work on the switch de-bounce software for this to ensure reliability, as it is it is easy to double press keys. Nice little project a good introduction to both the Arduino and to stepper motors neither of which I had used before.
As I had to take everything apart I added a reset button (29) by soldering leads to the back of the shield button in the same way as for the other buttons. Caused me some aggravation as the first button I found in my "bits that will be useful one day box" remained steadfastly open-circuit when pressed, still it was probably 30 years old! Last but not least a short video (30) which shows the table spinning quietly in run mode and then vibrating in step and angle mode. It makes me think this might be software generated as that is the only difference between the modes.
Model Engineers Workshop Forum- thread discussing the original magazine article and various points arising including some useful information about variations in the Arduino hardware, particularly the LCD shield.
Gary Liming′s Website- describes the making of the original step-indexer which could be used in place of a rotary table and outlines the software in a bit more detail.
Arduino Home Page- has all the information about the Arduino project. You can download the IDE (Integrated Development Environment) from here which you will need to program the micro-controller board.
CH340G driver- Some boards use the CH340G USB/serial chip as a cheaper alternative to the FTDI chip, this is the driver download link. The FTDI standard driver is installed when you setup the Arduino IDE.
Model Engine Maker Forum- thread covering the preparation of a Vertex rotary table ready for automation. This was done by John "Bogstandard" Moore in readiness for the Division Master system but the mechanics are the same.
The list above is for the major parts required for the project. The suppliers are those I used and the prices were correct in January 2017. (Please note the links to some of these items seem to change weekly, apologies if they don′t work) I make no particular recommendation as to the suppliers it is just where I found the bits needed, it is likely that better/cheaper/different parts are available from myriad locations on the web. In addition to the bits listed you will need - hook-up wire, solder, nuts, bolts, spacers, cable ties, crimp connectors and sleeving. Please note that the above table doesn"t display well on a small screen, try rotating to landscape to view!
Many of the links in the Glossary and particularly the Parts List table have gone missing over time so I have tried to update them with currently available parts and information. In fact none of the parts are particularly critical and a bit of web searching will find suitable replacements. The Model Engineer Forum link is still active and one of the later additions is the replacement of the switches with a cheaply available numeric keypad. I haven"t carried out this mod but it looks quite interesting.
I used a scrap riser to mill a custom knob with 17 flutes as an example, because most traditional manual rotary tables and dividing heads struggle with dividing prime numbers.
I needed two large holes in plates, 46mm and 40mm. I mounted the plates on the rotary table, set the indexer to continuous run and slowly lowered the cutting bit. This saved me from having to buy 2 different size hole saws that I might never use again.
After writing the "conventional" Rotary Table Control program below (final version of the Arduino_Rotary_Table_Control_2019_Rev7 series), I decided to write a completely new program which would enable stepper motor control with acceleration and deceleration, as well as a number of additional features. For a link to this program, as well as additional related information, see this link:
[3-35-2019] Beeper Test programThis is a simple Arduino sketch which can be used to test whether a piezo beeper is working, and also to find the loudest (or otherwise most desirable) tone.
The code changes were made so that when stepper motor and rotary table parameters are entered into the program, calculations will be made in two ways:
The determination of the required number of steps to move is in all cases based on the theoretical steps, which are then converted to actual steps. This method provides the best approximation (typically with an error less than 0.01%), and enables the easy use of gear and table ratios which do not divide exactly into 360.
Of course this means indexing. The usual way to achieve this is to use a rotary table with dividing plates. This time honoured method, whilst working extremely well, is also rather tedious and is prone to human error - especially when I am doing it!
Step Index is an Arduino based system with the firmware currently at version 2.3. The system can work with fixtures with a variety of gear ratios. Initially it was designed for a 3:1 set up, but has since been re-written to cope with 40:1 and 90:1. Most rotary tables are 90:1, as is mine. The Arduino source code can be downloaded from the Digital Machinist site, as can a Read Me file explaining how to make modifications to the code to add more ratios or to make a specific value the default.
An Arduino Uno board is at the heart of the system. This is fitted with an LCD keypad shield. I got mine from Sain Smart, but there are many other sources for this part. The Arduino displays system modes and status via the LCD. A stepper driver board based on the Toshiba TB6960 IC is clocked by the Arduino, thereby driving the stepper motor. The motor I used is from Zapp Automation here in the UK, type SY57STH76. This is a NEMA 23 frame, 2A, 1.8 degree per step motor with a holding torque of 1.89Nm. I also obtained a 12V, 5A switch mode supply to run the lot.
Temp - Facility to read motor and driver heatsink temperature, using two sensors connected to the Arduino"s analogue inputs. I did not use this function.
Thenext step is to prepare the rotary table. This unit is a Vertex HV6, and I"ve posted pictures of it on this blog before. It will need to be finessed somewhat before the motor can be fitted. I will also have to make the motor mounting hardware.
The Sherline CNC Ready Rotary Table offers a P/N 3700 manual 4 inch rotary table and a stepper motor mount with dampened coupling in place of the handwheel. The mount accepts a NEMA #23 frame size stepper motor for CNC control. This allows the table to be used as a 4th axis with CNC systems that have the capability to drive a rotary axis.
This table is also available as P/N 8700, which includes a stepper motor and a self-contained CNC controller for use as a stand-alone CNC indexer. The rotary tables can hold more weight when they are not under a continual load.
Sherline’s rotary table offers an accurate, stable platform for rotary laser marking applications. Its compact size makes it a good fit in small enclosures.
NOTE: Because components of the table are ground as a set during production, the P/N 3700 rotary table cannot be upgraded to the P/N 3700-CNC version later on. A new rotary table with stepper motor worm housing must be purchased.
I was searching around on eBay and came across an interesting little trunnion table, link below. I had seen similar units, but they all used belt drive reductions, which from experience will not have enough reduction, and will likely be chatter with any real cutting, not to mention the belt is exposed. This unit however uses a harmonic drive to get a 50:1 reduction, with essentially zero detectable backlash. on top of that, it actually back drives the stepper motor. Harmonic drives are also sometimes called wave strain drives or flex spline drives. Anyways, the trunnion uses a couple of nema 23 steppers, and the holding torque is fantastic, even with a cheap stepper driver. For simplicity I"m using an arduino based controller that runs grbl 1.1f, and a couple of 5-30v inductive switches, links below. The controller can be controlled by sending gcode over the rx and tx pins, aka rs-232. The trunnion unit itself is very beefy for what it is, and has what look to be waterproof seals around all the bearings, so with a bit more sealing on the motors it can probably handle coolant usage.
Link to buy on ebay, although I got mine through aliexpress for cheaper. CNC Rotary axis Harmonic Gearbox Dividing Head 5th 4th Axis 50:1 reduction ratio | eBay
Sherline’s CNC driver box comes equipped with an A-axis output cable ready to drive a 4th rotary axis. This rotary table is all you need to turn your Sherline CNC mill into a 4-axis machine. Just plug the A-axis cable from the external driver box or the built-in driver box in your Sherline computer into the matching plug on the stepper motor. The EMC2 software is already set up to handle G-code for the A-axis, and numbers entered after the letter “A” in your code are interpreted in degrees.
The same end result can be obtained by ordering a CNC ready rotary table and a stepper motor and attaching the motor, but this single part number does the same thing, making it easier to order and saving you the trouble of installing the motor on the rotary table.
I"ve actually used Arduino"s for a number of projects over the last few years (and PIC"s, but that"s another story) but never used stepper motors, so I"m keen to play with this and see what it will do.
Garth, if you download from the DM link you will find three versions of the software in the zip file. The latest (I believe) is ver 2.3. If you open the sketch in the Arduino IDE the first line gives you the version number in confirmation.
Hi i wonder if any one can help i have tried two Arduino Uno boards and two different DF Robot keypads and get the same result that the up and down left keypads go through the menu but pressing select makes no difference they just show the menus .I have downloaded the software on two different computers and get the same result.
I have been wanting to make gears for some time. One of the principal tools required for gear making is an indexing system of one form or another. As the gears I want to make have a significant number of teeth the thought of manually indexing the rotary table filled me with dread! Losing my place, forgetting the number of turns of the index arm or the numerous other errors I was liable to make, meant automating the process was essential. Hence the need to convert my manual 6" Vertex rotary table to CNC.
The milling machine I have is a Denford TRIAC PC - this still runs using the original Eurostep controller and can only be converted to incorporate a 4th axis at great expense. Therefore I will have to use another signal generated by the Denford TRIAC in order to move the table to the next position.
The rotary worm drive on the Vertex rotary table provides a 90:1 reduction. This means 72,000 steps per revolution with the motor set to 200 steps per revolution.
The software was re-designed using Arduino - There are a number of useful libraries available for the Arduino and floating point is available. With Algorithm Builder I would have needed to have built a floating pointsuite, further delaying this project!
The keyboard has yet to find a suitable enclosure, at the moment it is used for debugging the software. So awaits a box to enclose the electronic controls.
I"m not saying a powered rotary table is not useful. Just that for my uses something that will self center stock in a collet might be more useful. Hence my interest in the Taig 5C lathe chuck as a project build. If I need to work larger stock I can get a 4 jaw and mount it on a 5C adapter plate, If I need a flat plate, well I just machine a 5C adapter plate flat. Most of the small rotary tables I have seen have a very small taper in the center or no through hole taper at all. Mine has no hole. A slightly larger one a buddy of mine has an MT1. I was really surprised that was all the hole it had. I think if I was gear cutting I"d mount the gear on a tapered or keyed (or both) mandrel By mounting the mandrel in a collet its very repeatable.