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.
Jen you have amazed at how much initiative and expertise you demonstrate and openly shared with this project. And now many more folks have the opportunity to proceed with similar projects and thanks for the rest that have chimed in to help clarify and such. A person can visit a lot of groups and never see this kind of comradery !
Jim
 
So I'm on a small screen phone traveling and with further investigation it looks like this was originally started by bmac2
When it came up on my phone it looked like Jen had just done this... what I said is still true what an amazing group of people willing to share information like this. Internet keeps dropping me in the storms here in NC. Anyway cheers to all that are instrumental in this for dummies post
 
Bruce,

Thank you, for your help.

I had been reading, and trying different wirings, modifying the sketch.

I believe the sketch was not working because it was for a Pololu that only has one STEP and one DIR. Since I am using an HBS860H, I had to modified the sketch.
I don't know if I am going the right way, but this is what I have so far.

I can rotate the stepper CW and CCW now.

I created one function for rotationCW and other for rotationCCW

I have some questions:
On line 31, if I put 51200 instead of 800. The sketch does not work. Even when I change the switches from the driver.
Or if I use 25600, the stepper just works with 180 or 360 degrees. If I type 720, or 1080, it rotates infinitely.
Also, if I use 800 but change line 36 (stepdelay), to 0.5. The PWR/ALM light from the driver turns on and it the stepper does not rotate.
I had to change line 34 to float, so the rotation in more accurate. I need a resolution of 2 decimal places.

This is the wiring I am using:
1. Connect pin 12 (Step) of the UNO to PUL - on the Driver.
2. Connect pin 13 (Dir) of the UNO to DIR - on the Driver.
3. Connect PUL + and DIR + to 5V (I am using a breadboard)

Thank you,
 

Attachments

  • MyCode_Mod1.pdf
    46.8 KB · Views: 838
Miguel

Clearly you are having all sorts of problems and getting some unusual outcomes. These problems are usually due to overflow issues and I would need to look carefully through the code however, I don't have the time at the moment.

I would suggest that you try code that is tried and tested. At this time I think you need something that is basic and the Sketch I use has been implemented on a number of rotary tables and it has worked out every time. Note, it is setup for a 90:1 rotary table. If yours is something different then a small change is required. If you can send me a personal message with your email address and rotary table ratio, I will send you the Sketch.

Regards

Bruce W-S
 
bmac2,

I NEED to motorize my Yuasa 8" HV rotary table. I have worked with servo motors and closed loop motion control but have never touched a stepper motor. However, my DSP motion control board is 3 axis so I cannot incorporate the table with the controller. Therefore, I would like to use an Arduino and a stepper motor. With CNC I don't need to use the table travel for machining. Out of necessity I do all of the repair and upgrades on my CNC machine tool controls but when it comes to design build electronics I'm totally ignorant. In the past I built indexing heads for the projects but motorizing my rotary table would eliminate the need to do that. If this is truly "Arduino Rotary Table for Dummies" then I would like to put it to the test. Will you assist me?

My current project is a centrifugal clutch for my motorcycle.

Clutch Basket.jpg


Multiple teeth were cut at each position on the Indexer below. That is why the divisions appear strange. The limiting factor was the cutter undercutting the first and last tooth or in other words shelving.

Index Head.jpg
Sprockets.jpg
 

Attachments

  • Clutch Basket.jpg
    Clutch Basket.jpg
    27.7 KB · Views: 283
Thank You BMac/Bob! I got mine to work! Now to put it in a nice enclosure and to hook it up to a rotary table!
I’m at the same point. Thrilled to have the stepper behaving as expected thanks to the hard work and knowledge of others (I’m totally new to Arduino), I haven’t yet enclosed the tech bit or mounted mine to the dividing head or rotary table.
Hopefully will get some good ideas if other users share what they’ve done in response to Joseph’s query above.
 
Hi

See post 53. This setup with the counter weight to tame any backlash has worked out very well for me. I have used this rig a lot and tomorrow I will be using it to cut a camshaft for a 4 cylinder engine.

Mark T
 
Attached are pictures of my controller. I had an arduino Pro Micro so I used it. A nano would work just as well. Both of them have standard pin spacing which makes it easier to connect the keypad. I'm using as 18V lithium supply so I used an 8V regulator to drop the voltage to the arduino.

I used a 330 oz-in stepper and a pololu driver. The pulley ratio is 4.2 and I'm using 16 microsteps for 3200 steps per rev. These have to be entered as integers but since they are multiplied together, I entered a table ratio of 42 and 320 steps. With a step delay of 500 usecs, it has enough torque that it is difficult to hold the spin index wheel tight enough to get it to miss steps. With a step delay of 250 usecs I'm pretty sure it missed an occasional step when starting to move.

I've also attached a picture of my 18V powerpack. Originally I only intended to use it at our local "show and tell". It works so well though, that its likely the only supply I will use with the indexer. I found the 3D stl file for it at https://www.thingiverse.com/thing:352094

Kudos to bmac for writing up the assembly instructions.

View attachment 94898

View attachment 94899

View attachment 94900

View attachment 94901

View attachment 94903
----------------------------------------------------------------------------------------
TJWal - very nice design on the hand held enclosure. Would there be any chance of you posting your design? The rest of us could use this as a basis for 3D printing one with the common (BMac2's) components?
 
Last edited:
thanks to all that have made this happen ! I have built this but my stepper driver is a different one , I thought I was ordering the same one , here is what I ordered & received https://www.amazon.com/gp/product/B0093Y88SK/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&th=1 .But mine has ST330-V3 in the bottom right of the board. Where I'm getting messed up is everything seems to work right , the screen, keypad,uno , but the driver I got has Step,Direction,Enable & 5V .the drawing for the project shows , Clock, Direction ,Enable & 5v /VCC. Are Clock & Step the same ? forgive me if this has already been addressed , I have scrolled & read this so many times it is starting to run together .Once I get this resolved hopefully all will be good .
tks
animal
 
thanks to all that have made this happen ! I have built this but my stepper driver is a different one , I thought I was ordering the same one , here is what I ordered & received https://www.amazon.com/gp/product/B0093Y88SK/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&th=1 .But mine has ST330-V3 in the bottom right of the board. Where I'm getting messed up is everything seems to work right , the screen, keypad,uno , but the driver I got has Step,Direction,Enable & 5V .the drawing for the project shows , Clock, Direction ,Enable & 5v /VCC. Are Clock & Step the same ? forgive me if this has already been addressed , I have scrolled & read this so many times it is starting to run together .Once I get this resolved hopefully all will be good .
tks
animal
Yes, they are the same, i.e. Clock and Step.
 
----------------------------------------------------------------------------------------
TJWal - very nice design on the hand held enclosure. Would there be any chance of you posting your design? The rest of us could use this as a basis for 3D printing one with the common (BMac2's) components?


I didn’t really document my design (pics in post 169). I lost the 3d design for the corners due to a hard drive crash. I do have copies of the STL files though. They work with the ⅛” material I had on hand so might not be of any value to anyone else.
I’ve made a couple changes since the pictures were taken. I changed to an external stepper driver and I added a hole in one side so I could slip in a programming cable.
I’m attaching an outline drawing that gives the key measurements. The interior was 1.25” deep.
John
 

Attachments

  • indexer outline.pdf
    79.9 KB · Views: 693
I'm back on this project . I have everything working until I plug in my stepper board , it freezes everything. I have to unplug the stepper board & hit reset to get it to come up again but as soon as I plug the stepper board in it's frozen again. this is my stepper board https://www.amazon.com/gp/product/B0093Y88SK/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&th=1 . I know it is good . I just tested it tonite with this tutorial TB6560 Stepper Motor Driver with Arduino Tutorial (2 Examples) & it worked fine as did the motor . I have clock hooked up to D2 on my UNO & dir hooked to D3 . what do I do with enable ?
thanks
animal
 
Enable is held either high or low. One way turns the steppers on the other way is off. The drivers I have worked with had them on by default. I think I had to pull EN high to turn the motor off.

in any case with everything powered up if the stepper is enabled it will be hard to turn by hand.
 
thanks , I still must have missed something , where does the enable on my stepper driver go on my arduino ?
thanks
animal
 

Latest posts

Back
Top