New Machine Build CNC Indexer (Arduino based) - Page 2

Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 53

Thread: CNC Indexer (Arduino based)

  1. #21
    Registered
    Join Date
    Jan 2008
    Location
    USA
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default

    I wired the shield like your picture and it works fine in continuous mode. The key switches are connected to D5 and D6 though... not D11, 12. The code (KD0 and KD1) does explicitly reference 11 and 12, so I'm not sure what's going on. Maybe there's some mapping I'm not aware of?

    New problem. I'm not exactly sure what is going on but these will reproduce the bug each time :

    1) Select Degree mode. Enter 180.000 degrees as the increment. Press the LEFT key for 3 cycles - display will read P:-3x180.000 ; now press the RIGHT key once. The stepper will now drive infinitely and you can't get out unless you press the Reset button.

    2) Select Degree mode. Enter 180.0000. Press the Right key for 4 cycles.. All works as expected; the fifth and ongoing cycles will move 360 degrees instead of 180.

    If you select say 45 or 90, instead of 180, the same thing happens but at proportionally higher cycle counts - something to do with the total number of degrees or steps.

    Similar things happen in Jog mode. Easier to see when the degree increment is high, like 100.

    BTW.. for those building this -the lcd shield (the same part number) I received is slightly different to the above picture - there are more pins so be careful just following the pictures.

    Last edited by lakeside53; 07-12-2013 at 11:26 PM.


  2. #22
    Registered WmCnc's Avatar
    Join Date
    Jun 2013
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    Solved.
    Attached, the new version.

    Or, if you want to change the code yourself,

    Function "void Index(int mod,int..." about line 1165

    if(mod<3)
    {
    newdeg%=360000L; // was 3600000L (too many zeros...)
    newpos=lround((float)newdeg/360000.0*(float)stprot);
    }

    Now, about the digital input pins, on the LCD shield, connector J5, the order of the pins are: D0 D1 D2 D3 D11 D12 D13
    I was confused at first too. But checking whit a ohmmeter confirmed what is shown on the pdf diagram provided by SainSmart (LCDKeypad Shield SCH.pdf)

    Wagner

    Attached Files Attached Files


  3. #23
    Registered
    Join Date
    Jan 2008
    Location
    USA
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default

    Yes that worked! Funny thing... Very late last night I decided that "tomorrow" was going to go though that exact piece of code to figure what was happening, but extra zeros are sneaky and hard to spot

    And you are correct on J5. For some reason I thought they were just mapping the adjacent Uno pins .

    The current LCD board shipped from Sainsmart (China) : My J5 as 9 pins - the right most pin is now VCC. I also have 10 more header pins on the bottom right - two rows above A0->A5 designated +5 and GND. The lcd contrast potentiometer now points to the viewer so you can insert a small screwdriver though the front panel to adjust.

    I'll keep testing, but the obvious bugs are now gone.

    I'm going to try another driver board and do some comparative testing. On the same rotary table the Toshiba chip board just doesn't seem to perform like my Gecko G251v in micro-step mode (I was driving it from grbl on an Uno), and has much more "vibration" when driving (Gecko has an adjustment for this). Of course, the Gecko is nearly 6X more expensive!

    Last edited by lakeside53; 07-13-2013 at 12:15 PM.


  4. #24
    Registered
    Join Date
    Jan 2008
    Location
    USA
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default

    New issue - maybe not a bug, but interesting.

    In Continuous Mode pressing left or right drives the platform as expected, and after RIGHT the position display updates to say 75.240. Pressing the RIGHT button "once" (just a quick click) updates to 75.250 and again to 75.260 etc. Pressing LEFT once, continues the update to 75.270, then 75.280 etc... , the wrong direction?

    I'm not in my shop right now so I can't verify if just the display is in error or if the table is driving the wrong way.

    BTW.. Not sure if you intended it to be a feature or not, but this is very useful as "micro jog" in Continuous mode.


    And a question :

    In Degree mode you do not allow "360" or "0" to be entered, only 359.999 or 000.001. OK, 0.001 of a degree is really small, but...

    360 to me means "one revolution" in the direction desired, so it would seem to be a valid case. I could do it as 180 and press the key twice and it will end up at zero. Entering 000.000 (to me) means go to zero in the direction of the key press (if it was at 000.001 and I pressed RIGHT, it would drive almost the entire revolution; if LEFT, just step back to zero). Same with "360" . But... no doubt you had good reasons so can you share those?

    Last edited by lakeside53; 07-13-2013 at 04:20 PM.


  5. #25
    Registered WmCnc's Avatar
    Join Date
    Jun 2013
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    Hi Lakeside53,

    I didn't have time yet to check, but maybe it is related to backlash. Indexing CCW (left) will cause the thing to rotate left the amount of pulses plus backlash pulses; than it will rotate right the amount of backlash pulses. I will check it as soon as possible.

    The other thing, I think that increasing the limit to 360 from 359.999 is ok. Changes have to be made on the startup (min...max) and on the config function.

    The zero setting is more problematic; a special treatment have to be implemented on the index function as well.

    Wagner



  6. #26
    Registered
    Join Date
    Jan 2008
    Location
    USA
    Posts
    52
    Downloads
    0
    Uploads
    0

    Default

    I think the concept of "zero degrees" and 360 depends on whether incremental or positional. If thought about like a compass, there is no "0". A compass is 1 though 360, but an indexer is often marked 0-359, and where 0 is 360. Either way, jumping from 359.999 to 000.001 will go

    I'll play with it to determine what make sense to me in use.

    I'll also look in the bug - make sense it's something to do with the backlash.


    BTW, for other builders - J5, on the "Sainsmart lcd, version 1.0" is 9 pins - D13, D12, D11, D3, D2, D1, D0, Gnd, Vcc. The version Wagner has, and the online schematic does not have the Vcc or Gnd pins.



  7. #27
    Banned
    Join Date
    Jan 2006
    Location
    canada
    Posts
    156
    Downloads
    1
    Uploads
    0

    Default

    HI WmCnc, lakeside53,

    Is there an update on the 360 and the backlash problem. Would be good to know. Thanks.



  8. #28
    Registered WmCnc's Avatar
    Join Date
    Jun 2013
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    Hi salzburg,

    Attached, new version.
    Remedies the effect of backlash compensation on continuous mode.


    Wagner

    Attached Files Attached Files


  9. #29
    Banned
    Join Date
    Jan 2006
    Location
    canada
    Posts
    156
    Downloads
    1
    Uploads
    0

    Default

    Thanks for the update.



  10. #30
    Registered
    Join Date
    Sep 2011
    Location
    South Africa
    Posts
    22
    Downloads
    1
    Uploads
    0

    Default

    WmCnc

    Will it be possible for this indexer to cut helical gears on a milling machine, like a conventional dividing head does with gears from the table feed?

    But instead of using gears one can use a encoder to send pulses to the indexer so that it moves in a helix with the milling machine table feed.

    Let me know if its possible?

    Dennis



  11. #31
    Registered WmCnc's Avatar
    Join Date
    Jun 2013
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    Hi rooies13,

    No, the way it is it will not work.
    For that you will probably need a full cnc mill, with a 4th axis.
    The mechanical part of this project would work as the 4th axis; but not the Arduino/electronics part.

    Wagner



  12. #32
    Registered
    Join Date
    Sep 2011
    Location
    South Africa
    Posts
    22
    Downloads
    1
    Uploads
    0

    Default

    Thanks WmCnc

    Quote Originally Posted by WmCnc View Post
    Hi rooies13,

    No, the way it is it will not work.
    For that you will probably need a full cnc mill, with a 4th axis.
    The mechanical part of this project would work as the 4th axis; but not the Arduino/electronics part.

    Wagner




  13. #33
    Registered Epicycloid's Avatar
    Join Date
    Nov 2013
    Location
    United States
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default

    Hi Wagner -- First of all great work and thanks for sharing your project!

    I have been working on something related, and a member of a local group just posted a link to your project, so this is the first I've seen it.

    I am using an Arduino, the same Keling stepper motors, and the accelstepper library too.

    I am curious why you decided to modify/create your own version of the accelstepper library? Was there something you couldn't do with it, or some other reason?

    --Jon



  14. #34
    Registered WmCnc's Avatar
    Join Date
    Jun 2013
    Posts
    24
    Downloads
    0
    Uploads
    0

    Default

    I Jon,

    Thank you for your comments.
    As I remember, the original library had a little error. There was a missing factor on the calculation of acceleration.
    But mostly I modified it to gain more speed. Stripping it to bare minimum allowed the Arduino Uno to provide up to 10,000 pulses per second.
    With the original I got 5,000 maximum.

    Wagner



  15. #35
    Registered Epicycloid's Avatar
    Join Date
    Nov 2013
    Location
    United States
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default

    Thanks for the explanation Wagner. I think Mike McCauley, the author of accelstepper, has done a really good job of fixing issues as users have found them, and he has been adding features too. Anyway I have had such a good experience with it that I wondered what made you create your own version. Makes sense for what you did.

    My application moves my two motors pretty slowly, so I haven't had a lot of issues with Arduino limitations at the slow speeds. But I have also played around with the chipKIT boards, which are Arduino form factor, except they run at 80 MHz, so there is no performance limitation with those. And the accelstepper library works fine on those, as well as a few other faster boards I've tried.

    --Jon



  16. #36
    Registered
    Join Date
    Nov 2012
    Location
    UK
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default

    Hello Wagner,

    What a great project thank you very much.
    Just finished soldering the LCD shield wires ran a couple of tests and it works perfect, now have to find a suitable case and some nice buttons perhaps some illuminated ones.

    Thanks Again

    Paul



  17. #37
    Registered
    Join Date
    Sep 2011
    Location
    South Africa
    Posts
    22
    Downloads
    1
    Uploads
    0

    Default

    Wagner i looked around a bit, and came across someone that used a encoder and stepper motor to cut helix gears.
    I think it can be done, making it talk to the arduino might be tricky.
    Dennis

    Quote Originally Posted by WmCnc View Post
    Hi rooies13,

    No, the way it is it will not work.
    For that you will probably need a full cnc mill, with a 4th axis.
    The mechanical part of this project would work as the 4th axis; but not the Arduino/electronics part.

    Wagner




  18. #38
    Registered
    Join Date
    Sep 2003
    Location
    BRISBANE AUSTRALIA
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default Re: CNC Indexer (Arduino based)

    Excellent project thanks for sharing



  19. #39
    son88's Avatar
    Join Date
    Jun 2015
    Location
    7000
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default

    Thanks for sharing. I'm working on it for my arduino CNC



  20. #40
    Registered
    Join Date
    Oct 2006
    Location
    Bosnia
    Posts
    32
    Downloads
    1
    Uploads
    0

    Default Re: CNC Indexer (Arduino based)

    Why did so many mistakes???
    Can someone give an adequate response and advice?
    Attached text errors.
    Thanks in advance,
    SM


    05.12.2016 at 23:12h Finally, compile succeeded! I used Arduino-1.5.5-r2 ( Slika001.jpg )!

    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Markovic Slavol; 05-12-2016 at 05:18 PM. Reason: corrective


Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

CNC Indexer (Arduino based)

CNC Indexer (Arduino based)