This article describes how to let two LEGO MINDSTORMS EV3 motors do the exact same movement in total harmony and synchronization. Even when the motors have different friction and load they will still synchronize. When you know how to do it, it’s simple. It requires only a little math. Here’s some mathematical background after seeing my windscreen wiper motor synchronising video tutorial on YouTube. First, here’s the video:
In the video, after using the regular motor blocks, I first show some kind of block wave. It is generated by alternating the value of a variable and waiting one second in between. Because motors don’t have infinite acceleration it takes a while before the motor is at the requested position. That’s what the green line shows. Because the green line has flat horizontal bits, the movement still looks jerky.
To avoid the horizontal bits in the motor curve I then move to a sine wave. The numbers it generates are visible in the picture below. Because the movement is smooth, the motor has no difficulty of following it more or less exactly. This gives us the nice windscreen wiper movement. If you build this at home, try to play with the different numbers in the advanced math block to get a feel for what they do.
In another video I explain how you can use this technique to make a lizard move it’s legs and body in coordination.