Y motor moving irregularly in both directions

Hi,

I have assembled my farmbot and continued on the to software docs section of farmbot.
I have configured my raspberry pi wifi and can now control my farmbot through the farmbot web my.farmbot.io/controls.

I was trying out some movements from the controls section to see if everything is setup correctly.

Originally the z and x axis where moving ok, but the y axis had some issues. I disassembled the plastic belts from the motor and tried again.

Here is my problem with the y motor:
The motor does not move in one direction when given a positive command but it goes in both directions irregularly. When given a command in the negative direction it does not move at all, but I can hear a soft whir sound from the motor itself.

I started to read and troubleshoot, this is what I have done so far:

  1. I switched the stepper driver with the z one.

Z:

At one point the z axis could only go down not up anymore. This only happened only once, then I have seem to resolved it somehow.

Y:

The exact same behaviour was seen as with the other stepper driver.

  1. I disconnected the y encoder cable.

The exact same behaviour was seen as if it where connected.

  1. I tried to adjust the screw on the y stepper driver -45 degrees.

No movement at all from the motor anymore.

  1. I tried to adjust the screw on the y stepper driver 45 degrees.

The exact same behaviour as in the 0 degrees position.

I am at a point where I am not sure any more what to do.
Could my motor or encoder cable be broken somehow?
Is there something I forgot to do?

Can you guys help me out, it would be much appreciated.

Hey @skorzec
So you tried moving your Y-axis without the belt just to see if its working at all. When you try to move in a direction which would make a positive value the motor kind of stutters and moving forward/backwards in short periods?

And when moving in a negative direction it does not move at all and just clicks shortly?( <- this could be normal because farmbot can’t move to negative coordinates by default. )

I assume you are using a official kit by farmbot.io.

Hi,

Thanks for replying. And I can answer yes to all your questions.

Yes i am using the official full kit farmbot genesis.
Yes I have disconnected the belt to see if the motor moves at all. That is the behaviour I have written about.
And yes, when I try to move in a direction which would make a positive value the motor kind of stutters and moving forward/backwards in short periods?
And yes, when moving in a negative direction it does not move at all and just clicks shortly? Actually it does not click as far as I can remember, it just whirs softly.

For the first tests, you should make sure the encoders are off. Software limits (stop at position 0) should also be off. That way you have free movement without checks.

If it still doesn’t work like that, it’s most likely a motor driver issue. If the screw is not tuned it just clicks without actually moving (too little power) or you have movement runs for several centimeter, stops, runs again for a few centimeter (too much power).

For a more correct approach for adjusting the driver, there is this guide: https://www.youtube.com/watch?v=XU6lgFeZ7ZQ

Hi Tim,

Thanks for the reply. My encoders are disabled. My software limits (and find home on boot) are yellow in the device section and I cannot give the command to turn them on or off.

Also thanks for the video, but it seems that this guys warns you it should work before tuning. I am also a bit suprised that my motor moves in both directions irregularly given a positive command.

So before tuning the stepper drivers I also did the following:

-switched stepper drivers
-switched power cables
-switched motors
-switched encoder cables

That all did not change the behaviour of my problem. two x motors and one z motor are working correctly. y motor is giving troubles.

Next I did the tuning. I tried values as low as 4.5 V which made the motor respond less to none and as high as 9V which did the exact same for me as the standard 6.2V or the recommended 5.5V.
The best response so far I have gotten from 5V, which makes the motor move 20 degrees often in the direction I want. But still it is off and occasionally moves in the wrong direction. It seems to hang in between North and North East the most, where it either hangs or moves in the wrong direction. Increasing the step to 100mm gives the same kind of results.

The problem remains.

All other motors axis behave super neatly, if I give a command to move 10mm they move 45 degrees exactly.
If I give a command to move 10mm on my y motor, it moves at the best 25 degrees in the right direction and many times in the reverse direction I wanted, but also randomly in the other direction and in the worst cases (quite often) a little in both directions.

I’ve ruled out the driver, the tuning, the motor, the cables.

Could my ramps be damaged somehow? Is there a way to measure this or run a diagnostics?
I have some crooked pins on the ramps, but they all seem to be connected to the arduino and steppers, so I am skeptical that might be my issue.

Any help is still appreciated. Thanks so far.

Have you tried plugging in your Y axis into a different axis to test it? This would confirm that the problem lies behind the pins the stepper driver is plugged into. I assume by “power cables” you mean “motor cables” otherwise that would be another thing to test.

The yellow toggles for those two settings indicate that you aren’t using the latest version of FarmBot OS and the Arduino firmware.

Hi Gabriel,

I meant motor cables yes, sorry for that.
And yes I connected the y motor cable pins on the arduino/ramps to the x axis and that moved the problem to the x motor.

I ran the out of the box version 3.1.4. I have just updated it to version 3.1.6. Now software limits and find home on boot are indeed selectable and turned off by default.

Updating did not resolve the issue I tried with 5V and 6V.

Anything else I can test or check out?

I would recommend further investigating the pins connecting the RAMPS shield to the Arduino. Make sure they are all connected fully. Look also for any visible damage or defects in the solder or possible debris that might cause a short. If it all looks good, a component on the RAMPS board or the Arduino’s chip may be damaged. Usually if that were the case it wouldn’t work at all, so it sounds more like a connection issue to me.

Hi Gabriel,

I found some residue on the bottom of the ramps shield. I sent some pictures to support@farmbot.io. Could you take a look when you have the time? Thank you.

1 Like

We will take a look, thank you!

I received the new parts today. Installed them and updated to version 4 and everything is behaving now.

Most important observation. If I give a 10 mm command it now results in a very tiny movement (plusminus 5 degrees) which is the same for all motors. Previously this command would move the three motors 45 degrees.

Happy to be able to continue. Thanks for all the suggestions and help.

Hooray! Glad you’re up and running :slight_smile: