Hi!
To be short when changing the direction using AccelStepper (under load) it misses a few steps like in this video: https://youtube.com/shorts/IYzP0Moj8Ro?feature=share
Its not happening always. out of 8 tried it happens once (roughly). I beliebe that sometimes when the direction is changed that it somehow loses power for a short time when its at its peak and changing the direction.
The gear is not slipping as its a 50:1 gear as well as the coupling flange is also not slipping. I think instead of the power being gone its actually super weak in this one moment letting it all fall down.
The driver is setup correctly with 400 steps/revolution. Likely using 800 would fix the problem but then the robot would be slower. Normally a robot like this would have some sort of balancer but i didnt build one yet.
Im also not providing any code because to be honest its a simple direction change. "go 200 steps this way, go -200 this way". its not magic and literally just this but i explained my theory above.
Im curious if anyone had similar problems.
Maybe you should stop the motor before changing direction.
interesting idea i can try that
Unless you actually STOP the stepper, it will loose steps when reversing direction.
i tried to stop it tho it still happened sadly
If you are stopping by disabling the controller, then it will obviously miss steps. But if you are taking ZERO steps for some period of time, then there should be no steps lost. You will have to experiment with the time for no steps.
I don't have much experience with stepper motors but you can maybe try locking them. That worked for me in the past.
@shydevil Does your power supply have enough power? If not sure try it with only on stepper moving..
What motor and nm rating is that? How long is the robot arm and how much weight does it have at the end?
Yes it does it has 30 Amps. I think i know the issue. I was going really fast and tried pulsing for 4 stepper motors, all of them use gears. Apparently the arduino cant pulse fast enough for all the steppers so if i go fast and try to switch the direction it gets lost somehow. when going slow its not happening
so i guess my fix would be to use multiple arduinos and spllit the motors or go slower. or go with a board thats faster
Hmm im also using accelstepper and 6 steppers.. and tested (just to see what’s happening) speeds over 4000seps/sec never encountered something like that.. the arduino should be able to handle that, but possible that something is slowing down your code.. that I have encountered by my self a lot. things like reading analog inputs every cycle, printing serial every cycle - that effects my steppers more than everything else
Maybe the motor is simply not strong enough.. does it only happens in the position when the arm is parallel to the ground? When the forces are the biggest? Or, to check it: add some more weight and see if it gets worse
Im using 6 steppers all with 50:1 gear reduction and all of them in 800steps/rotation microstepping.
well i encountered the issue with 8000 steps/second. also it didnt happen always. in order to catch it on video i had to make the movement like 6 times. the motor where this is happening also has a 50:1 gear. strange to me
Okay…
AccelStepper can only go to 4000 steps a written in the lib description. Also the arduino not care if the motor has gears…
Use the plain example from the AccelStepper library with only the one motor. Use max speed 2000.0 max acceleration 2000.0 for that test. No other code just the example.
If it works -> your code is the problem
If it still has the same problem -> hardware
360°/400microstepping/50gearreduction=0,018° each step *4000 steps =72° every second
Thats the speed you can possible reach
yeah i heard about the 4k limit too but when i use 4k and then 8k it goes faster and 16k even faster and 20k it stops rotating and becomes a siren
The problem is probably that method you posted here:
„User claims to achieve Syncd Starts & Ends with AccelstepperLibrary“
That way all steppers only accelerate and never reach the max speed
Use the accelstepper example and look how fast 4000 steps/s are compared to your video with 8000steps/s