I finally started building my first CNC machine. And I done it and I am proud of it. However I have one problem that I failed to manage. I notice when I run some G code that have strait lines it works ok, sometimes I notice that it doesn’t return to same position but I was still experimenting with speeds and acceleration so I thought that was the problem.
However I noticed that with code that doesn’t have straight lines, but rather contours and G code is point next to point generated by MasterCAM i loose steps a lot! For test I took only part of G code that lasts 1min 17 seconds with adjustments 400mm/s and 20mm/s^2, 80 steps per millimeter and I notice that I lose about -0.5 millimeter when I return to same position x,y,z(-2,0,0). And I always loose steps in same direction!
To diagnose this problem and make sure that problem is in electrics not mechanics I took off stepper motor, I put straight part of the shaft in horizontal position at (-2,0,0) and started G code. After it finished the straight part of the shaft wasn’t horizontal, but rather at some angle (30-40 degrees) which is half millimeter on the pitch of 5mm. If I put it to run 1000mm, motor rotates and finish in the horizontal position (5mm pitch, so one full revolution, 400 steps per rotation, 80 steps per millimeter).
Also to make sure that correct signals are coming to the stepper driver I made circuit that counts steps with PIC microcontroller, divides steps by 8 and show on the display. I start G code and when I finish code at -2,0,0 at screen from microcontroller I also have -2.0 for X axis. So I don’t loose steps at all for signal part. I also tried to lower acceleration to 2mm/s^2 just to make sure that acceleration is not the problem. I also tried to lower speed. I always lose steps with this code in attachment.
I use driver DM556, and power supply SW-13A-36V. Stepper motor is NEMA 23, 57HS112 (3A and 3Nm).
I don’t have any idea left, so if someone have any suggestion, please free to replay. Thank you in advance