So in my project i need to drive a robot car at straight line .I am using Nema-17 motors and DRV8825 drivers
PROBLEM :
is that my left motor wont run at the same speed as the right one. its also missing steps (the left one ) at random rate .
CONFIGURATIONS :
For the power i am using a 12V li-ion battery with the drivers beeing connected in parallel with the power supply cause many tutorials seems to use that kind of connection .
I've already configured the Amps given from my drivers to the motors guided by the datasheet of my motors
CONCLUSION:
I think that the problem has something to do with my code and not the power i am giving to drivers
Ideal would be if You had supplied schematics and link to power supply, drivers, motors. Especially the power supply needs to be verified.
I suggest raising the second delay to some 20000 as a beginning.
The 2000 for a still standing motor this might be too little and steps are missed.
Could You make a test version of the code, only running one motor at the time and check the RPM? This might tell whether the power source is up to the job or not.
You lack speed-ramping, so the motors are going to miss-step(*). Try the AccelStepper library which provides acceleration (ramping) for you.
(*) Unless the steppers are absolutely tiny, or you only get them going at a few tens of rpm. Basically the laws of physics require the step rate to increase smoothly as the rotor starts to spin, otherwise the steps will get too far ahead of the rotor and the motor simply loses lock. (This then results is many forms of misbehaviour from stalling, intermittent running, running at the wrong speed or even backwards).
if you mean Marks solution i havent try it yet cause i have no clue how to use this lib and i am still searching
have you any idea where i can find some answers?
Can you post link to specs/data on your steppers please?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Please include power supplies, component labels and pin names.
Hand drawn and photographed is perfectly acceptable.
Please no Fritzy pictures.
Okey. Not the biggest surprise. Stepping too fast steppers mostly don't move at all, only make a squeaking sound. Of course an increased demand for torque might stall the stepper and make it buzz.
New game, new bets.
A desperat and likely wrong suggestion.... Are the two stepper driver channels set up for the same stepping rate? I think about one using 16 micro stepping and the other 8...
I suggest a temporary test, using single step for both.
You have been swapping drivers in one try and motors in the other. You ought to know by now if the fault follows the motor or the driver.
Too many tests gives too many words and it's hard get here.
Report each test, one by one like thsi:
Keep the drivers connected to the same lines during the 2 tests!
Setup1) Driver 1 + motor A, driver 2 + motor B: Fastest is ......
Setup2) Driver 1 + motor B, driver 2 + motor A: Fastest is ......
Swap driver connections to the controller!
Setup1) Driver 1 + motor A, driver 2 + motor B: Fastest is ......
Setup2) Driver 1 + motor B, driver 2 + motor A: Fastest is ......