Unexpected Motor Travel on Initial Setup

Post technical questions about the Buildbotic Controller here.
Forum rules
No profanity, no gambling, no illegal activity, so sexual or pornographic material.

Posts not related to the Buildbotic CNC Controller are likely to be moved or deleted.
Post Reply
markm
Posts: 1
Joined: Sat Oct 03, 2020 6:48 am

Unexpected Motor Travel on Initial Setup

Post by markm » Sat Oct 03, 2020 9:06 am

Hello, I was wondering if someone would be able to provide a little support to get me milling again?

I have recently started the process of retrofitting an old ShopBot table with the BuildBotics CNC Controller. Following the Getting Started documentation was a breeze. I rewired the existing motors from Unipolar to Bipolar in order to use the BuildBotics drivers, booted up, and boom, it just plain worked with the existing settings using the supplied gamepad. Kudos to the BuildBotics team here as I was expected a little more work to see my first movements!

The default settings are not ideal for my motor configuration, so I made the recommended adjustments. At least, what I think are the correct adjustments.

Here is some general information about my setup:
M0 = X-Axis (Reversed through wiring) - PK296A1A-SG3.6
M1 = X-Axis - PK296A1A-SG3.6
M2 = Y-Axis - PK296A1A-SG3.6
M3 = Z-Axis - PK266-02A

In the BuildBotics UI I entered the following values:
For the (2) X Motors and the Y Motor I set the Drive Current to 2. I did this because the motor specs show 1amp/phase and this is a 2-phase motor. I left the idle at 0 (default). I set the step angle to .5 to match the motor specs.

For the Z Motor I set the Drive current to 2.8 as the motor specs show 1.4amps/phase and this is also a 2-phase motor. Again, I left the idle at zero. I verified that the step angle matched the motor specs (1.8).

I made no other changes to the motor configurations other than reversing the motors so that positive X, Y and Z values moved the machine in the correct direction.

I pulled the post processor from github for Fusion 360 and exported a tool path with it to cut out some small shapes to validate sizing. This is where things went a little crazy….

The program ran, started a tool change sequence, I continued, and the machine started moving. And it moved A LOT and at a speed I am unused to. This machine has never had limit switches but believe me, after this experience, they have been ordered. I stopped the program quickly to avoid any damage. The shapes I am cutting out are 1x1” and the machine bed is 4x8’. There is no logical reason that I can think of as to why the machine would need to move several feet in order to run a program where the stock size is less than 4x4 inches.

I started a little experimentation at this point and jogged the machine around and watched the position values on the controller. The CNC Controller would show a movement of a millimeter, but the machine is moving much more. This leads me to believe I have goofed something in the configuration, and this is likely not an issue with the tool path itself.

This machine setup is obviously a little more complicated than my Shapeoko running Carbide Motion so I could be missing something. My best guess is that this has something to do with the travel per revolution and/or gear ratio for these motors, but I really don’t want to continue guessing on what I need to do especially if this machine can effectively destroy itself or worse, come out of alignment, lol.

It would also be awesome if I could put on some “training wheels” and slow the motors down a bit while I'm still learning. I assume this is done in the max velocity value for the motor but again, I will defer to the subject matter experts.

Thank you so much for any support you can provide. I’m happy to provide any additional details that may be required!

Motor Specs:
PK296A1A-SG3.6 - https://catalog.orientalmotor.com/item/ ... 6a1a-sg3-6
PK266-02A - https://catalog.orientalmotor.com/item/ ... /pk266-02a

User avatar
Doug
Posts: 163
Joined: Fri Feb 02, 2018 4:56 pm

Re: Unexpected Motor Travel on Initial Setup

Post by Doug » Sat Oct 03, 2020 1:38 pm

For the (2) X Motors and the Y Motor I set the Drive Current to 2. I did this because the motor specs show 1amp/phase and this is a 2-phase motor. I left the idle at 0 (default).
Actually, the current setting in the BB controller refers to per phase current. You should not double the current because the motor has two phases. As a side note, there is some confusion between motor vendors and drive vendors. Often times the motor vendors refer to RMS phase current while drive vendors (including Buildbotics) refers to peak phase current. If you find that 1 amp is not enough, try multiplying that value by the square root of 2 to get 1.41 amps of drive current. If the motors get really hot, then the drive current is too high.

I set the step angle to .5 to match the motor specs.
You did this correctly since your motor is 1.8 degrees per step and the planetary gear ratio is 3.6:1.

For the Z Motor I set the Drive current to 2.8 as the motor specs show 1.4amps/phase and this is also a 2-phase motor.
Once again, the correct current is 1.4 amps, but you might need to multiply this by the square root of 2 as described above.

I verified that the step angle matched the motor specs (1.8).
Right again.

Again, I left the idle at zero.
It is sometimes necessary to apply some idle current to the Z axis to prevent the spindle from falling when current is removed. .5 amps might be a good value for idle-current on the Z axis

I pulled the post processor from github for Fusion 360 and exported a tool path with it to cut out some small shapes to validate sizing. This is where things went a little crazy….
As you mentioned, the travel-per-revolution is wrong. You assign this number to tell the BB Controller how far the axis will move with each turn of the motor. If the axis travels way farther then you told it to move, then the value in 'travel-per-revolution' is way too low. Use the following procedure to calibrate the travel per revolution for each axis:
  • 1. Note the current value in the 'travel-per-revolution' field for the axis in question
    2. Move the axis to a place where you have a lot of room to move without hitting an end stop.
    3. Set the axis offset to zero by clicking the button that has a zero with a cross through it in the Axis table at the top of the Control page.
    4. Select the MDI tab on the Control page.
    5. Mark the current position of the axis.
    6. Enter a GCode command in the MDI entry field and click the "Play" button to tell the axis to move a fixed distance. For instance, if the machine is working in metric units, then G0 X20 would cause the axis to move to X = 20mm.
    7. Measure the distance moved.
    8. Divide the actual distance moved by the requested distance. For instance, if you asked it to move 20 mm and it actually moved 100mm, then the result would be 100mm/20mm = 5.
    9. Multiply the old value in the 'travel-per-revolution' field by the quotient (5 in the example) and enter the new value in the 'travel-per-revolution' field, then Click the green "Save" button to get the new configuration to take. For instance, if the old value in 'travel-per-revolution' was 5mm and the quotient is 5 as in the example, you would change 'travel-per-revolution' to 25mm.
    10. Repeat 3 through 9 again to confirm that the travel distance is correct for the axis. Make sure you reset the offset, because the controller will move to the new position from where it currently thinks it is. If the current position is not zero, then the distance moved will not be the distance requested.
Repeat this procedure for each axis.

Tip - When using the game pad, use the Y, X, A , and B buttons next to the joystick on the right to adjust gamepad jogging speed. Y travels at the maximum speed as set in the 'max-velocity' field, X is slower, A is even slower, and B is very slow.

Finally, if you would like more help, feel free to call me at 707-559-8539.

Doug

Post Reply