Skip to main content

How to increase J1 (2x) and J6 (4x) speeds?

Hi Chris and the community,

I am using an AR4 (Teensy 4.1, Software v6.3) for a high-speed pick-and-place application. My current cycle time is limited by the physical speed of the robot, so I need to drastically increase the speed of specific axes.

Application Context (Payload): The target workpieces are very lightweight, ranging from 1g to 12g. Due to this low payload, I believe the motors have enough torque headroom to handle much higher speeds and accelerations than the default settings.

My Goal:

  1. J1 (Base): Increase speed by 2x (Steps: 800 -> 400).
  2. J6 (Wrist): Increase speed by 4x (Steps: 800 -> 400 + Software Speed Increase).

The Issue (Implementation Block): I attempted to change the J6 microstepping from 800 to 400 (SW4=ON) and updated J6 Step/Deg to 22.222 in the AR4 software (Kinematics tab). However, immediately after saving and calibrating, I encountered "Collision/Motor Errors" even when jogging unrelated axes like J5.

My Diagnosis: I noticed that float J6StepDeg = 44.444; is hardcoded in the "AR4_teensy41_sketch_v6.3.ino" file. I suspect the collision detection logic in the firmware is using this hardcoded value, causing a mismatch with the new encoder feedback ratio.

Questions:

  1. Procedure: To successfully change the gear ratio/microstepping, is it required to manually update the J6StepDeg value in the .ino sketch and re-upload the firmware to the Teensy?
  2. Feasibility: Given the lightweight payload (1g - 12g), is a 4x speed increase for J6 physically realistic for the standard NEMA 14 motor? Or are there other limiting factors I should be aware of?

Any advice on properly configuring the robot for higher speeds would be appreciated.

Chris Annin

If you are reducinng your microsteps by 50% you would also want to reduce the encoder mult value by 50% in the sketch:

//set encoder multiplier

float J1encMult = 5;

float J2encMult = 5;

float J3encMult = 5;

float J4encMult = 5;

float J5encMult = 2.5;

float J6encMult = 5;

You can also play with the min speed delay settings. You can overclock the step delays. Your mm/per/sec or sec speed values might get thrown off though.

float minSpeedDelay = 500;

Tadashi Hiraoka

Chris Annin 
Thank you so much for the exact answer I needed! The encoder multiplier (encMult) makes perfect sense—I didn't realize that was the missing piece causing the mismatch and the collision error.

I won't be able to work on the robot for a few days, so I will test these updates (the sketch modifications and DIP switch changes) sometime after the 26th of next week. I am very excited to try it again. I will report back on how much the cycle time improves once I get it running.

Thanks again for the great support and the tips on overclocking!

Tadashi Hiraoka

Hi Chris and the community,

I want to report back on my progress with the high-speed pick-and-place application. Chris, your advice about modifying the encMult and overclocking the minSpeedDelay was exactly the missing piece I needed. Thank you so much!

By applying your tips, I was able to drastically increase the physical speed of the robot without triggering any "Collision Errors."

[The Results]

  • Previous Average Cycle Time: 8.37 seconds (Worst case: ~11 seconds)
  • New Average Cycle Time: 3.66 seconds! (Running at 100% speed)

Here is a quick breakdown of how the motion times improved:

  • Direct Approach: 2.47s -> 1.04s
  • Place Sequence: 2.47s -> 0.90s

Note: The biggest impact came from the J6 speed increase. Previously, if a workpiece was oriented poorly, waiting for the wrist to rotate caused the cycle to drag up to 11 seconds. The J1 speed increase also cut the long travel time across the workspace by more than half.

[My Final Firmware Settings] For anyone in the community looking to push the physical speed limits for lightweight payloads (mine is 1g - 12g), here are my settings in AR4_teensy41_sketch_v6.3.ino:

float minSpeedDelay = 100;
float J1encMult = 10;
float J2encMult = 10;
float J3encMult = 10;
float J4encMult = 10;
float J5encMult = 5;
float J6encMult = 5;
float J1StepDeg = 88.888;
float J2StepDeg = 111.111;
float J3StepDeg = 111.111;
float J4StepDeg = 99.555;
float J5StepDeg = 43.720;
float J6StepDeg = 22.222;

The AR4 handles these extreme speeds and accelerations flawlessly with my 12g payload. No overheating issues so far, and the precision remains excellent.

Thank you again, Chris, for the amazing support, and to the community for this fantastic project!