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.
Kim
Just send me an email along with the ratio of your rotary table and I will send you the sketch along with instructions to change the ratio if you ever need to.

Adzijderlaan

When you send me an email, could you also include the ratio you are using. I also have been to Amsterdam several times.

Bruce W-S
 
Libraries are simply programs someone smarter than me has written that our program can reference making everyone’s life a lot easier and you need the 2 attached below. Download the zip files and make sure you know where they are saved.
To install the libraries open the Arduino IDE program and click on “Sketch”, “Include Library” and “Add .ZIP Library”. Navigate to where you saved LiquidCrystal_I2C-master.zip, select it and click “Open”. Do this again and select the Keypad.zip file. You need to close the Arduino IDE and open it again for the libraries to be recognised.

Just started to read through the project and came across this oddball reference (strange numbering)
Is it something to do with my browser not being set to a particular setting or what...?
 
Bruce, any chance we can get a copy of your code/sketch to upgrade my existing rotary table software..
I've been using an older version of the one previously published in this web site with very good results, other than some adjustments required between Arduino and motor drive ( I was having some backlash issues).
Seen your approach to handle the integers seems such a bright idea that I would love to upgrade my existing version.

Kind regards
Jaime
 
Jaime
Happy to send you the latest sketch. Just send me a personal email. I can't upload the sketch directly but email OK.
Just change the multiplier to suit the ratio of your rotary table.

Bruce W-S
 
@ Bruce

I'd like to ask for a sketch.
I finally got mine to work with my equipment (LCD Screen, driver, etc.) --- but it was through the help of some talented individuals on the FaceBook Arduino forum.. Having the correct library for the hardware that you have is critical, and not trivial - as there are lots of different manufacturers of the electronic components. Be prepared to go the full 15 rounds in getting this puppy to work. It took me (with help from people that knew what they were doing) a lot longer than I expected. But it is a nice addition
 
Thanks for making your sketch available to everyone Bruce. I'm anxious to now to get going. I need to get back up to speed with the Arduino.
Your sketch will definitely make things go much faster.
 
I finally got mine to work with my equipment (LCD Screen, driver, etc.) --- but it was through the help of some talented individuals on the FaceBook Arduino forum.. Having the correct library for the hardware that you have is critical, and not trivial - as there are lots of different manufacturers of the electronic components. Be prepared to go the full 15 rounds in getting this puppy to work. It took me (with help from people that knew what they were doing) a lot longer than I expected. But it is a nice addition

What kind of lcd are u using ?
Cause im trying to get a fork of this to work with the 128x64 grapiclcd which is also hard.
Could i maybe get a copy of yours to see how they implemented it ?
My lcd uses the u8g2 or u8glib lib.
Then i just have to work on getting it compatable and work out the buttons.
Seeing i want a rotaryencoder switch to run it instead of the 4x4 buttons.
 
I have a silly question: do you really need a graphic LCD? Or is it just for the challenge?
Aside from that: generally when I'm trying to get "new" (to me) hardware working on Arduino, I start with a demo program - either one that cam with the libraries or something self-penned, but simple. Once that's working you can get the settings from there. If you can't get "hello world" working, there's not much chance you'll get something more complicated working.
(Also: thank you Bruce for sharing the sketch!)
Cheers - Andrew
 
Need is a big word its more cause thats what i got on the shelf left over from a 3d printer its a 128x64 grapiclcd with intergrated rotary encoder.
Got some 20x2 and 16x2 screens aswell but am lacking the 4x4 buttons .
And i got the screen working with the demo sketches but need to write it in to the sketch for the indexer
 
just for information.

the code I use. line 30: steps steppermotor / rotation line 31: table ratio.
 

Attachments

  • Arduino_Rotary_Table_Control_2016B-220428a.zip
    2.4 KB · Views: 185
As promised, here are pictures of the finished product after I got the electronics sorted. It now works well. All the electronics in the case with the keyboard and display.

View attachment 117693
View attachment 117694
View attachment 117695
hope all's ok! yeah a bit behind seeing this 2020 post, i couldnt see a desc of the big knurled disc thingo adjacent the split aluminium frame .. a harmonic drive? maybe i missed your desc.
Also is your f/w the same as B MAC or different/upgraded? Hard to know/choose the 'right' one!
 
Some time ago I posted to this site a link to indexer code I wrote which uses stepper motor acceleration and deceleration capabilities, and also includes additional functionality.Several people requested that I make some additional code modifications, and I am now making that update generally available.

While this latest release has 2019 in the file name (because it is based on code originally written in 2019), this is a new modification for 2022. The following capabilities have been added (see notes in the code for additional details):
  • Ability to operate a relay
  • Ability to change the "clock-wise" designation to match the physical rotation of your indexer
  • When choosing "arc rotation" (indexer moves back and forth in a designated arc), the indexer does not move immediately after degree designation, but only when the "Go" key is pressed
The new code is available via the link below (as will be any future changes, if there are any) :

Academy of Lagado - Stepper Motor - AccelStepper.h
 
Some time ago I posted to this site a link to indexer code I wrote which uses stepper motor acceleration and deceleration capabilities, and also includes additional functionality.Several people requested that I make some additional code modifications, and I am now making that update generally available.

While this latest release has 2019 in the file name (because it is based on code originally written in 2019), this is a new modification for 2022. The following capabilities have been added (see notes in the code for additional details):
  • Ability to operate a relay
  • Ability to change the "clock-wise" designation to match the physical rotation of your indexer
  • When choosing "arc rotation" (indexer moves back and forth in a designated arc), the indexer does not move immediately after degree designation, but only when the "Go" key is pressed
The new code is available via the link below (as will be any future changes, if there are any) :

Academy of Lagado - Stepper Motor - AccelStepper.h
ah, thanks Kevin, yes its been quite a while, grateful for the improvements too, cheers:)
 
Last edited:
Just built this, quite happy with it, and it works well.
I used the code from kquiggle linked in post #475 👍
If anybody wants to have a play with it, I put it in an Arduino simulator. (I hope kquiggle is OK with me doing this.)
Rotary Table.ino - Wokwi Arduino and ESP32 Simulator
This is kquiggle's code. I'm not taking any credit for this.


Couple of important things to note about the Simulation:
The Stepper driver and motor are powered by the Arduino. Don't do that. The simulation doesn't have an option to add an extra power supply.
For some reason the stepper motor starts at -2 steps instead of 0. I get this on most steppers on all of my simulations so your steps will be off by 2, but only in the simulation.
I had to comment out the getSettings() to get it to work on the simulation. Delete lines 1232 (/*) and 1246 (/) before you upload the code to the Arduino.
You can also delete lines 521 to 523.
Don't forget the AccelStepper library.
I used an Arduino Uno. this code almost maxes out the memory, so if you want to change any of it, you won't be adding much to it. (It's got room for maybe half a dozen new lines.)

Rotary Table.jpg



I never thought I'd use the "Arc" option, but after taking out the bulk of the material, I set the dividing head up to the vertical position, set the arc to move from 0° to I think 292° and used it to finish off the outside arc of this piece. (Taking very light cuts, but it did it well)
mount1.jpg
 
Fritz -

You are more than welcome to use my code. I would also like to note that I recently made an update to the code to add some new options :
  • Ability to operate a relay
  • Ability to change the "clock-wise" designation to match the physical rotation of your indexer
  • When choosing "arc rotation" (indexer moves back and forth in a designated arc), the indexer does not move immediately after degree designation, but only when the "Go" key is pressed
You can find a link to the updated code here :

Academy of Lagado - Stepper Motor - AccelStepper.h

P.S.

There are no bug fixes in the new release, so if you are already using the previous version and it it working to your satisfaction, there is no need to update.
 
tell me what settings are needed for this driver DM 542Безымянный.png
 
Last edited:

Latest posts

Back
Top