Z motor works when x is 0 but not when x = 2640

Z motor works when x is 0 but moves real slow when x = 2640

here’s a video: https://youtu.be/O8qhnchm-cE

Sequence used in the video:

additional information:

  • y axis seems to have no affect.
  • going up when x = 2640 works fine
  • values from x = 1000 to x = 3000 seem to have the same problem.

I’d guess this is a software problem.

[@Goanna7007, Just trying to speed up diagnosis and solution for you]
The Farmbot developers will need to know your versions ( Bot Kit, FarmbotOS and MCU/Farmduino )

1 Like

ah yep,

  • Farmduino v1.3
  • Fambot os: Version 8.0.4
1 Like

It could be binding somehow - turn off the power, move the x to home, twist z by hand; Move x to max, twist z by hand, and compare the drag. If equal, keep going on software. The coil-joint at the top seemed to be compressed - same at both ends?

Also, the silent drivers will rock your world. . .cd

1 Like

Thank you Cris,

The drag seems equal.
What do you mean by the coil joint at both ends?
We’ll have a look at the silent drivers.

Update: the Z only freaks out if the location it’s moving to has a combined vector value of over 10 characters (CHAR).

2640, 99, -100 works. CHAR length: 10
2640, 100, -100 fails. CHAR length: 11
2640, 100, -99 works. CHAR length: 10
2640, 100, -100 fails. CHAR length: 11
999, 100, -100 works. CHAR length: 10
999, 1000, -100 fails. CHAR length: 11

This leads me to believe it is a software problem with the G code.

1 Like

The coil joint thingy has a better name - it’s attached to the top of the Z lead screw and connects the stepper motor to the shaft - presumably to reduce any shock in the mechanicals. Anyway, given the testing, it truly seems like a software problem. I’ll let Rory and team address this - squarely out of my league. . .cd

1 Like

I think I found the solution to the problem. The farmduino buffer has a max fixed side of 50.
It’s defined in th config.h file of the farmduino “const int INCOMING_CMD_BUF_SIZE = 50”;
However if you request a move with x>999 or y>999, the size of the request is more than 50.
Exemple : G00 X1050.60 Y999.00 Z-200.04 A400.00 B400.00 C250.00 Q42 (57 char).


Thank you farmbotFr!

I have downloaded a copy of the Arduino software and changed the config from 50 to 60.

I should be able to test it out on the 22nd of October.

To flash the Arduino, can I just plug the Arduino into my laptop and press “upload” in the IDE?

I think I’ve got it:


  1. Download and install the Arduino IDE onto your computer
  2. Download and unzip the latest FarmBot Arduino Firmware
  3. In the firmware folder you just unzipped, go to the src sub-folder and open up src with the Arduino IDE. Note: this file is blank, but there are many other file tabs that should be automatically opened as well.
  4. Connect your Arduino to your computer with a USB cable
  5. From the IDE, click Tools > Board, and then select Arduino Mega 2560
  6. Now click File > Upload. This will flash the firmware onto your Arduino
1 Like

That may or may not be the best fix.
The code in https://github.com/FarmBot/farmbot-arduino-firmware/blob/master/src/farmbot_arduino_controller.cpp at lines 382:388 appears to be trying to deal with command lines longer than INCOMING_CMD_BUF_SIZE (?)
I’ll try to desk-check that code myself soon.


Thanks everyone for helping troubleshoot here. The fix has been merged into master and was deployed today in the latest version of FBOS (v8.1.0)


Huge thanks!

Update fixed it!