Mecanum Wheel Robot Car Full Package (with 18650 batteries)

Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES ここでご購入を!

Mecanum Wheel Robot Car  Kit Metal Chassis

Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES ここでご購入を!

Encoder normally is used for PID algorithm. Right now our Mecanum car does not need PID function, so we don’t write encoder program for this car.

Many users have purchased OSOYOO DC  gear motor for Tank robot ,Mecanum wheel robot and Balance car which has build-in encoder. Some of them are interested on how to program encoder. We provide a simple program which guide user to use Arduino to read how many pulses encoders send to Arduino on each rotation.

GM25 motor specification download link: specification.pdf


Stepper motor Arduino
Yellow line(V Power) 5V
White line(G-GND) GND
S1(right beside G pin) D6
S2(Right beside S1) D7

Some module might have reversed V Power/G-GND line. If following code does not work, please switch Yellow line to GND and White Line to Arduino 5V.

Software Download:

Once you load the code into Arduino IDE, open the serial monitor in the upper-right corner.

Now install a wheel onto the DC gear motor and make it can be rotated by hand. Then rotate the wheel for 360 degree and stop. You will see the serial monitor screen will show:

Position: 1
Position: 2
Position: 148
Position: 149
Position: 150

The last line shows Position 151 . This means when you rotate the motor to 360 degree, the hall sensor has generated 151 pulses. so my motor has about 150 pulses per rotation.