Z-Axis Motor Not Moving and Unreliable

I’ve having a really hard time with my z-axis. Its behavior is inconsistent.

There are times it won’t move at all and says the farmbot is ‘stuck’. When I try to mainly turn the vertical screw, it makes a clicking noise. However when I unplug the system, the clicking noise goes away.

I do have encoders disabled on all axises and it still keeps happing. Anyone seeing something similar? I’m at a standstill for now.

What are your Allow Negatives settings in the device page hardware widget? Try disabling Allow Negatives for the z axis if it is enabled and you want to move to a positive coordinate. Otherwise, you will only be able to move to negative coordinates. An update to the widget is forthcoming to make that more clear.

I’m thinking of removing the limitation for negative numbers. It would make the movement more reliable as there is no arbitrary stop point. It would give you a floating zero point, until you do a set to zero.

@Gabriel

I already do have Allow Negatives disabled. Also, I set the 0 coordinate of the Z axis to be in the completely up position.

Should I move the Z Axis arm all the way done and reboot the farmbot so that 0 is in the down position? Any other recommendations?

Thanks!

Interesting. Zero with the Z axis all the way up should work. Can you share the movements where you are experiencing the ‘stuck’ message?

@Gabriel

Is there a better way of accessing some type of log other than the top UI portion of the web app? Hoping there’s any easy way to copy and paste log information.

You should be able to copy and paste from the logs that open when you click the top bar.

@Gabriel

This is what I got from the logs:

leona-farmbot is getting kind of bored… 🕣 💤
2:00 pm
leona-farmbot Completed movement: (245, 395, 0)
1:59 pm
leona-farmbot’s arduino says: stopped
1:59 pm
leona-farmbot’s arduino is busy.
1:59 pm
leona-farmbot’s arduino is busy.
1:59 pm
leona-farmbot Movement still not completed. Your bot might be stuck.
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot Movement not complete: (45, 395, 324)
1:59 pm
leona-farmbot’s arduino says: stopped
1:59 pm
leona-farmbot’s arduino is busy.
1:59 pm
leona-farmbot’s arduino is busy.
1:59 pm
leona-farmbot is synced! 

I’m getting no movement on the z-axis at all. After this, when I try to manually turn the lead screw, the z-axis motor appears to be stuck and I hear and feel a clicking sound as I attempt to turn the screw. This goes away as soon as I unplug the farmbot or reboot it. This locking doesn’t happen until I issue some type of move command to the z-axis.

The x and y axises are working well.

The z-axis locking is using the motor to keep the axis in place. This is normal, and we should have a setting for it in the future. That will not prevent the motor from moving using commands though.

Can you try booting with the z-axis in the middle of the axis, and try sending move commands in each direction?

@Gabriel

I did as you directed and set the z axis 0 coordinate to be roughly in the middle. I got some really strange behavior.

  1. First absolute movement direction was to point 50. It did not move at all and you could hear 1 very faint click from the raspberry or arduino like it was trying t0 do something.
  2. I then gave it a absolute coordinate of -50 and it did move successfully.
  3. Finally, I gave it another absolute direction to move to 50. It did move but still produced an error message.

I’ve noticed this behavior on all 3 axises - it won’t move twice in the same direction. You have to gave the farmbot a negative direction and then a positive one or vice versa. Appears that I can’t give it two relative direction commands in the same direction.

Here are the logs:
LEONA-FARMBOT MOVEMENT STILL NOT COMPLETED. YOUR BOT MIGHT BE STUCK.
4:05 PM
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:05 pm
leona-farmbot’s arduino says: stopped
4:05 pm
leona-farmbot’s arduino is busy.
4:05 pm
leona-farmbot’s arduino is busy.
4:05 pm
leona-farmbot Completed movement: (0, 0, -50)
4:04 pm
leona-farmbot’s arduino says: stopped
4:04 pm
leona-farmbot’s arduino is busy.
4:04 pm
leona-farmbot’s arduino is busy.
4:04 pm
leona-farmbot Movement still not completed. Your bot might be stuck.
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
[FILTERED]
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)
4:04 pm
leona-farmbot Movement not complete: (0, 0, 50)

1 Like

It seems like Allow Negatives is enabled for the z axis, which would prevent it from moving to a positive absolute coordinate. You did say that it was disabled, so can you try enabling Allow Negatives for the z axis and then disabling it again? It should read No after you do this.

The other axes (assuming Allow Negatives is disabled) should not be able to move to negative absolute coordinates.

We are doing some work on this setting, so it may change in the future, but the idea is that you shouldn’t be able to move past the minimum (past zero/home) because that would mean running into the end of the axis. It is a software limit/stop. Therefore, if you are using negative coordinates, you shouldn’t be able to move past zero to positive coordinates.

Also, if the z axis is not moving in the direction you expect to based on your positive or negative and home preferences (for example, the axis is at zero at the top and will only execute commands that make it run into the top), you can reverse the z axis motor wire connector on the RAMPS board.

@Gabriel

I did go to my settings and enable and the re-disable allow negatives. That seems to have helped the original issue. I guess the farmbot was updating but wasn’t reflecting in the UI.

However as I’m testing now, my farmbot stopped short of its Z destination and said it may have got stuck. There are no obstacles. It just stopped moving.

After this, it appears to reset it’s coordinate grid. Even though all 3 axises has changed locations, the device says it’s at 0, 0, 0. It’s as though it encounters an error while moving and then just resets itself.

Here’s the log:

leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
uh oh: %FunctionClauseError{arity: 1, function: :do_parse_params, module: Farmbot.Serial.Gcode.Parser}
12:44 am
leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
leona-farmbot Movement not complete: (230, 372, 136)
12:44 am
leona-farmbot Movement still not completed. Your bot might be stuck.
12:44 am
setting previous mcu commands.
12:44 am
leona-farmbot is updating pin_guard_1_active_state: 1
12:44 am
leona-farmbot is updating pin_guard_4_pin_time_out: 60
12:44 am
leona-farmbot is updating pin_guard_3_pin_time_out: 60
12:44 am
leona-farmbot is updating movement_min_spd_y: 50
12:44 am
leona-farmbot is updating movement_timeout_y: 120
12:44 am
leona-farmbot is updating pin_guard_1_pin_time_out: 60
12:44 am
leona-farmbot is updating movement_invert_endpoints_z: 0
12:44 am
leona-farmbot is updating pin_guard_1_pin_nr: 0
12:44 am
leona-farmbot is updating movement_invert_endpoints_y: 0
12:44 am
leona-farmbot is updating pin_guard_2_pin_time_out: 60
12:44 am
leona-farmbot is updating movement_max_spd_y: 500
12:44 am
leona-farmbot is updating movement_home_up_y: 0

@Gabriel

Similar thing just happened again with a slightly different error in the logs:

setting previous mcu commands.
7:59 pm
Unhandled message: “R2223 V1 Q0”
7:59 pm
leona-farmbot Movement still not completed. Your bot might be stuck.
7:59 pm
[FILTERED]
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot is starting serial services
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)
7:59 pm
leona-farmbot Movement not complete: (30, 372, 0)

I am having the same problem with movements of the Z axis getting “stuck” messages and coordinates resetting to 0,0,0. It happens randomly while executing sequences with long Z axis movements, I also don’t have encoders enabled.

I continue to have this problem frequently which makes the farmbot almost unusable as it is. I believe @jmLafarga is having a similar experience. It appears to be isolated to the z-axis for some reason.

@RickCarlino @Gabriel or @roryaronson Do you have any ideas? Should I log an issue in github?

@detchi

For the first time I have successfully set up my tool grab sequence and it works pretty dang well.
but I too have having the same issues with farmbot during this process.

the past 3 tool grab sequences ran seems to be working just fine with no issues from before but I expect that this may arise again when I setup other sequences that involve the Z-axis.

We shall see how the day turns out.

-Christopher

How long does the Z movement take? Is it much longer than X and Y so we get a time-out.

@Tim the z movement does seem to typically take longer than the X and Y movements although it’s not an extremely long time. Seems like the Z axis moves slower when compared to the Y axis for example.

What is the timeout length? My current z-axis speed is set to 500, should I make it faster? Do the logs I shared in my prior comments indicate a timeout is occurring?

The timeout in the firmware is 120 seconds. But there is also a timeout on the OS side.