Hi everyone.
I'm building a little car with 4 stepper motors without the steering: how can I rotate the car by 90 degrees clockwise?
I think that the two right steppers needs to step the same amount of the left steppers, but the left ones need to go forward and the right ones need to go bacwards, but this doesn't rotate it by 90 deg, it only rotates it.
What do I have to do?
Thank you very much
the left ones need to go forward and the right ones need to go bacwards
That is called differential drive. It works, but the wheels slip.
To turn 90 degrees, you need to know where the vehicle nose is pointing.
A properly calibrated magnetometer can be used as a compass for that, if the magnetometer is placed away from magnets and current carrying wires.
Such turns by dead reckoning work quite well with a two-wheel robot, I've done that with DC motors and the help of a simple encoder. No need for battery draining steppers.
With a four-wheel robot it's a whole different ballgame indeed. I indeed would expect that doing the same number of steps over and over again gives you quite different rotations over and over again, especially if the surface is a bit different.
Thanks for all the answers. I'll try and let you all know