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 Buy from JP

Mecanum Wheel Robot Car Electronic Parts Kit (without 18650 batteries)

Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

Mecanum Wheel Robot Car Full Package

Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

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:
https://osoyoo.com/picture/mecanum_wheel_robotic/GM25-370-motor specification.pdf

Connection:

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

Software Download:
https://osoyoo.com/driver/encoder.zip

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.