Arduino Rotary Table for Dummies

Discussion in 'Machine Modifications' started by bmac2, Apr 24, 2017.

Help Support HMEM by donating:

  1. Jun 9, 2019 #341

    Jim Woodworth

    Jim Woodworth

    Jim Woodworth

    Member

    Joined:
    Jun 2, 2019
    Messages:
    8
    Likes Received:
    4
    Gender:
    Male
    Location:
    SE Ohio
    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
     
  2. Jun 9, 2019 #342

    Jim Woodworth

    Jim Woodworth

    Jim Woodworth

    Member

    Joined:
    Jun 2, 2019
    Messages:
    8
    Likes Received:
    4
    Gender:
    Male
    Location:
    SE Ohio
    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
     
    Imre karoly likes this.
  3. Jun 17, 2019 #343

    lmeb83

    lmeb83

    lmeb83

    New Member

    Joined:
    Jun 3, 2019
    Messages:
    3
    Likes Received:
    0
    Gender:
    Male
    Location:
    US
    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,
     

    Attached Files:

  4. Jun 17, 2019 #344

    weir-smith

    weir-smith

    weir-smith

    Bruce W-S Project of the Month Winner

    Joined:
    Jan 30, 2015
    Messages:
    40
    Likes Received:
    35
    Occupation:
    Retired
    Location:
    Perth Western Australia
    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
     

Share This Page