sidlauskaslukas/barbot

Direction changes on initialization process

Closed this issue · 3 comments

Thanks for your nice barbot setup.

We are facing an issue while driving to the barbot to the initial position. Whenever driving on an obstacle the motor changes the direction (this happens on the setup routine). We don't understand what automatically changes the direction.

Do you know how much power the motor has? We guess that quite some power is needed for moving the glas. So, it looks that the direction is always changing instead of putting real power on the motor.

As everything happens on just few lines of code I'm not really sure what exactly happens.

@lunanigra have you tried to run the motor standalone? If not, then I would recommend to try this first as it seems this is a hardware problem and not a software.

By the way, on the setup routine the stepper motor will run towards one direction as long as the endstop switch is not triggered (this is a must for homing the cup holder and marking the 0 point on the X axis).

Hi! I also believe it's not the Arduino code. We did several tests, everything looks ok.

However there is some strange effect. Whenever connecting the cup holder to the motor the motor behaves strange.

We also created some videos showing this effect...
https://youtu.be/cTiT1s3xd5g
https://youtu.be/D-GPr4ozHjQ

Currently I do not understand which hardware part may be defect. I cannot believe the motor is defect... Maybe the A4988? Is there anything we can verify/check?

How to run the motor standalone? Directly connect to power (which voltage)?

It seems that your driver and the motor is unable to handle the speed and acceleration set in the Configuration file and it's because your driver is not providing enough current to the motor coils. You can try to decrease those values and see if that works for you.

You can check this video and see how to properly adjust A4988 driver and set the maximum output current according to your stepper motor specs.

https://youtu.be/5CmjB4WF5XA