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.
The attached file contains the arduino sketch I wrote for my dividing head. The math algorithm is written to assure that the 0 (zero) location always winds up at the same point of rotation. As it moves, it recalculates the position from zero so no matter how many times it goes around or back and forth, it maintains positional integrity. The algorithm should work for your rotary table as well.
Chuck
Thank you all for your suggestions. I will try them out next time I am in my man cave. Limited time at the moment. I will post the results when I have investigated.
Thanks once again for your help, best wishes, Colin
 
So I was able to get this working very easily with the uno as these instructions are absolutely amazing and very well made but, I wanted to try and use a Arduino Micro instead of the Uno so I cant solder the connections and not have to worry about anything coming undone in the case, but when I tried to load the program on the Micro It just never seemed to work for some reason, I confirmed the Micro was connected and working properly as I got the simple "blink" program to work. Any ideas on why it wouldnt work on the Mirco? it has enough pins and I would imagine work the same as the Uno but just smaller. You might already tell but I am not very Arduino savvy as I have no idea how to make my own programs, but can load things and wire fine haha
 
So I was able to get this working very easily with the uno as these instructions are absolutely amazing and very well made but, I wanted to try and use a Arduino Micro instead of the Uno so I cant solder the connections and not have to worry about anything coming undone in the case, but when I tried to load the program on the Micro It just never seemed to work for some reason, I confirmed the Micro was connected and working properly as I got the simple "blink" program to work. Any ideas on why it wouldnt work on the Mirco? it has enough pins and I would imagine work the same as the Uno but just smaller. You might already tell but I am not very Arduino savvy as I have no idea how to make my own programs, but can load things and wire fine haha
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.
 
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 . .
 
Back
Top