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.
I can't see any big differences between the Nano and Uno in I/O that would account for non operation. I would take a guess you have a ground not connected between the Nano and your stepper motor drivers. But I'm guessing without seeing your wiring diagram.
Micro and Nano do not use same chip. But still it should be workable. Pinout needs to be checked and the board must be choosen correct?
The first thing I came across, the I2C pins on Micro are SDA-02 | SCL-03 on Nano they are SDA-A4 | SCL-A5. (so display needs to be wired to different pin numbers already) And programm needs to be changed accordingly.

Hope you will figure it out soon.
 
Last edited:
Micro and Nano do not use same chip. But still it should be workable. Pinout needs to be checked and the board must be choosen correct?
The first thing I came across, the I2C pins on Micro are SDA-02 | SCL-03 on Nano they are SDA-A4 | SCL-A5. (so display needs to be wired to different pin numbers already) And programm needs to be changed accordingly.

Hope you will figure it out soon.
Exactly what I was thinking - the nano is essentially an UNO in a smaller package, but the micro is a slightly different animal.
 
72 by 5 by 200 gives a number too large for the code to handle (72000) It'll choke on a full turn . 200 steps per degree have to change the setup a bit to handle the math


from
const int StepsPerRotation = 200;
const int TableRatio = 360;
to
unsigned long StepsPerRotation = 200;
unsigned long TableRatio = 360;

Might be more in the code that would have to be changed - BUT - your timing belt - It's going to bite you sooner of later. Chips will cut the belt eventually. Better off fabbing a direct mount - i.e.
View attachment 105182

Boo Boo in my direct mount - the open slot in the top lets chips in, piece of tape settles it.
Direct mount better, makes math easier . .
 
dear Sir
i do not find the .ino file to load in my arduino board
can you tell me where i can found it !!
thank you in advance
 
dear Sir
i do not find the .ino file to load in my arduino board
can you tell me where i can found it !!
thank you in advance
Check message #281 he provides a link to a 2019 version. There may be newer and other options given in other messages.
 
dear Sir
i do not find the .ino file to load in my arduino board
can you tell me where i can found it !!
thank you in advance
Yes, I have the same query.
#488 says go to some web site, that website tell you to come back here....seems typical of some of these writeups.
 
Yes, I have the same query.
#488 says go to some web site, that website tell you to come back here....seems typical of some of these writeups.
If you go way down on the website that#281 links to there is a link to the code. I’ll try to paste the link here. It might get cut off though
 
Yes, I have the same query.
#488 says go to some web site, that website tell you to come back here....seems typical of some of these writeups.
p.s. just saw; "original poster" used #17" there is a zip file with the code. (I could download it to my computer today and it also compiled fine on my Arduino IDE)
dear Sir
i do not find the .ino file to load in my arduino board
can you tell me where i can found it !!
thank you in advanc

Hello,

unfortunately there are a number of different versions around. All of them appear to be wrong. 😥
:) (at least the ones I had a closer look at) So it becomes a little more involved depends what you need.

You might want to check the discussion here.

https://www.homemodelenginemachinist.com/threads/help-with-arduino-idexer.35108/page-5

The older posted versions have a rounding error and they do count wrong for certain combinations were the rounding error matters.
(some people were and are still using the wrong software happily and have no issues, if the numbers are good or the error is not important then it will be fine)

The version that I "butchered" fixed the rounding error for divisions, but in the process reversing was "damaged" and, the angle advancement might have rounding errors. Sometimes the display does "wrong things" when the layout does not match the present numbers. (might also apply to older versions)
As most rotary tables have backlash reversing without some minor issue will be difficult. Rotating a full circle minus one division instead of reversing would solve the backlash, but would be useless for people who want to use it for milling under power. (even dangerous)

I could not find out so far if someone is using this for milling under power, were the angle advancement would be helpful and forward and reverse should work as someone would expect.
For dividing I use the corrected (butchered) version, it does not allow to rotate backwards and the angle movements are not of much use.

I hope this helps and does not confuse even more.

Greetings Timo
 
Last edited:
Themis

Send me the ratio of your rotary table and an email address, and I will send you the sketch. Note, this sketch has been sent to more than 150 people so it's quite reliable.

Bruce WS
I confirm Bruce's answer, the program he modified runs flawlessly for me. Round table 1:36.
 

Attachments

  • IMG_20240501_135621 1.jpg
    IMG_20240501_135621 1.jpg
    1.6 MB
Themis

Send me the ratio of your rotary table and an email address, and I will send you the sketch. Note, this sketch has been sent to more than 150 people so it's quite reliable.

Bruce WS
Dear Bruce good morning. Thank you for the response . it was very kind of you .
So my small rotary table , the one that i will convert with that arduino divider has a 1:36 ratio . My email is [email protected].
please also inform me whitch arduino IDE shuld i use . the 1.9.19 family or the new 2.0.0
regards
themis
 
p.s. just saw; "original poster" used #17" there is a zip file with the code. (I could download it to my computer today and it also compiled fine on my Arduino IDE)


Hello,

unfortunately there are a number of different versions around. All of them appear to be wrong. 😥
:) (at least the ones I had a closer look at) So it becomes a little more involved depends what you need.

You might want to check the discussion here.

https://www.homemodelenginemachinist.com/threads/help-with-arduino-idexer.35108/page-5

The older posted versions have a rounding error and they do count wrong for certain combinations were the rounding error matters.
(some people were and are still using the wrong software happily and have no issues, if the numbers are good or the error is not important then it will be fine)

The version that I "butchered" fixed the rounding error for divisions, but in the process reversing was "damaged" and, the angle advancement might have rounding errors. Sometimes the display does "wrong things" when the layout does not match the present numbers. (might also apply to older versions)
As most rotary tables have backlash reversing without some minor issue will be difficult. Rotating a full circle minus one division instead of reversing would solve the backlash, but would be useless for people who want to use it for milling under power. (even dangerous)

I could not find out so far if someone is using this for milling under power, were the angle advancement would be helpful and forward and reverse should work as someone would expect.
For dividing I use the corrected (butchered) version, it does not allow to rotate backwards and the angle movements are not of much use.

I hope this helps and does not confuse even more.

Greetings Timo
 
I have been offline for quite a while. After all of the discussions here, the only sketch that makes perfect divisions in a complete circle is the one that Timo claims he "butchered". I made a few modifications to the menu screen to suit my indexing head and I have made several perfect gears with this setup.
 
Thank you Bruce
With your help i finished the rotary encoder and works perfectly.
Your contribution is priceless.
 

Attachments

  • Messenger_creation_6936a70c-082c-43c0-a0c3-2e6d32d91506.jpg
    Messenger_creation_6936a70c-082c-43c0-a0c3-2e6d32d91506.jpg
    119.8 KB
  • 20240522_210420.jpg
    20240522_210420.jpg
    1.4 MB
  • 20240503_121207 (1).jpg
    20240503_121207 (1).jpg
    1.3 MB
Last edited:
I'm using TJWAL's latest code for my rotary and while it works great, I constantly get phantom keypresses which mess everything up. I'm sure it's from interference from the other electronics in the box. I have shielded the wiring as well as I can with aluminum tape and it helps, but doesn't eliminate the issue. Does anyone know how to stop this from happening? While searching I've seen some posts where code/library changes can help, but I don't know enough programming to implement or try anything like that.
Thanks!
Mike
 
I'm using TJWAL's latest code for my rotary and while it works great, I constantly get phantom keypresses which mess everything up. I'm sure it's from interference from the other electronics in the box.
How have you debounced the switch lines? I'm skeptical that interference is the problem, given how prone switches are to bouncing.

It's possible to debounce in firmware, but some filtering on the switches is best practice.
 
How do you go about denouncing?
Switches don't make contact all at once, leading to high frequency noise at the switch closure and opening. This is called "bounce".
There are a bunch of ways to deal with it. Sometimes a little bit of capacitance across the switch is sufficient to filter the bounce. Other times, some circuit hysteresis is added, such as a Schmidt trigger or latch.
Dealing with it in software is a matter of delaying the reaction until after the bounces have settled, or ignoring pulses that come too close together.
 

Latest posts

Back
Top