were you able to set up the stall detection in the end?
I tried to play around with the settings again yesterday: I cranked up the motor current, speed and reduced the acceleration. I spent an hour to fine tune the settings and with a max motor load of 93 and a grace period of 130, the bot was able to run the entire X axis, a bit hesitant tbh, with some stops here and there. Then I tried to grab one end - to simulate an obstacle on the tracks - but the bot kept running: I was quite disappointed. So for now I’m not using it, waiting for an upgrade sometime in the future.
What’s your experience on the matter?
Sorry you are having troubles tuning your Express bot. I took a look at your settings and noticed your MAX SPEED values are about 60% of the default values. The stall detection functionality requires somewhat fast speeds to work effectively. I suggest returning your max speed values to the default values and only try tuning within +/- 20% of default values.
If your FarmBot is in a state where remote operation would be okay (ie: not damage plants) then I can login to your account and try to tune remotely. Let me know if you would like this assistance.
thanks for the reply. According to the documentation max speed should be set as follows:
Which are values my bot is currently set. I think I went all the way to 150 for the X axis during trials, but put the value back to default as soon as I saw stall detection not working.
Feel free to play around with the bot, just avoid to go beyond X>3000 mm cause the tracks have some issues that I am still figuring out.
Could you please explain how to interpret the relation between motor load values in the Controls panel and the Max motor load in the Settings panel?
As per documentation I understand the relation between Motor current and stalling: lower motor current means less chances to trigger a stall. But one can’t lower it too much otherwise the bot will not have enough power to move forward.
Higher Max speed also makes the bot less prone to stalling: but running too fast is not advisable.
I find it uneasy to understand how all these setting influence one another and which one to increase or decrease when looking at the bot response during trial.
@Sizen thanks for bringing to our attention the missing default settings in the app for you. It appears to be a bug with the translation file for your language, which we will fix this week.
Also, thank you for pointing out the documentation you were referring to. I have made updates to those sections to prevent users from being confused by the example screenshots, and to make it more clear that the equations are only necessary to refer to when using non-standard hardware (such as a different leadscrew).
The motor load values shown in the controls panel are the real-time measurements coming from your FarmBot as it moves. The “Latest” value is the most recent reading. The “Max” is the largest reading from the most recent 10 readings. And the “Average” is the average of the most recent 10 readings.
If the FarmBot detects a motor load greater than the MAX MOTOR LOAD as defined in the settings panel, then it will stop movement due to stall. Because it is common for the motor load to be very high during acceleration, you can ignore motor load readings for a portion of the acceleration phase using the GRACE PERIOD setting.
In general, the goal is to achieve a relatively low average motor load when the FarmBot is moving around normally at full speed. Adjusting MAX SPEED and MOTOR CURRENT are the only settings that will have an effect on normal full speed movements.
When the FarmBot does stall (due to an obstruction, or when finding the home position), the motor load should spike up to a relatively high amount, and it must be greater than the MAX MOTOR LOAD in order for the stall to trigger.
sorry, I still don’t get it. What is the unit for Max motor load? Milliampers like the Motor current?
Having the two fields with the same unit would ease the issue.
Let’s say Motor current for X axis is set at 800 mA, as per default. Let’s set the same value for Max motor load, 800 mA, which will act as threshold value.
The bot strickes an object in the way and the motor starts consuming more than 800 mA, trying to overcome the obstacle. The bot sees that Motor current is now higher than Max motor load so it has probably hit something. Let’s give him a couple of seconds just to be sure it was not a false signal. If after two seconds Motor current is still higher than Max motor load then trigger a stall.
Would this work?
Your idea for detecting stalls makes sense, though it is not how our firmware is written or how the hardware is working.
The driver chips measure back-emf current and report to the FarmBot firmware when it thinks the motor has missed steps. The driver chips do not report realtime current to our firmware.
Through testing we have found that the back-emf current stall reports coming from the stepper drivers cannot be taken verbatim because there are a lot of false positives. Thus, our firmware smooths out the stall reports from the stepper drivers and we convert them into an approximation for motor load that is a percentage out of 100. This, when used as a threshold (max motor load) can reasonably determine when a stall has occurred.