Run motor slowly


#1

Hi,

I’d like to run slowly DC motor thanks to MegaPi encoder and I use MeEncoderOnBoard Library.
The problem is that the motor jerk and doesn’t run constantly. How can i fix that ?
Thanks you !


#2

A few questions:

  1. Which operating system.
  2. Are you using mBlock or the Arduino IDE. If mBlock, which version?
  3. What power level setting are you using for the motor?

#3

I use Arduino IDE on Windows. Motors are powered at 9V thanks to 6x1.5V batteries and they are the 25mm DC Encoder Motor.


#4

The speed level -255~255, what did you set? With quite low like 20 speed level, I am afraid it cannot move constantly.


#5

My robot has to move at 15 mm/s so I set the level at 5 to respect this constraint.


#6

A setting of 5 will likely not send enough pulses to the motor to move. I would suggest starting with a power setting of 100, take timing measurements over a set distance, and then reduce the power setting by 10 until you get something approximating the desired rate of movement. Even with encoders, the motors are still pulse-width driven.


#7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.