hello,
is it possible to use motor encoders with mBot’s motors? Or any other ideas how to measure Odometry on mbot
hello,
is it possible to use motor encoders with mBot’s motors? Or any other ideas how to measure Odometry on mbot
@marat.gubaidullin, currently, the encoder motors cant be used for mBot, can it only work with DC motors, and there is no way to measure Odometry on mBot.
Hi all,
has anyone already tried to use the line follower module for a poor man’s odometry?
Just an idea…
I’m thinking about using Compas+Acelerometr+Gyro+Sonar (distance changes in time) to calculate speed and angle speed.
But I have a small computer (ODROID-C1, 4core, 1Gb RAM, 8Gb eMMC) on board to store data, make calculations, etc
However I’d like to have encoders to do it more precisely.
I am pursuing a related problem - how to program the robot to move a specific distance. If that could be done, then with Start Timer and Stop Timer triggered by the user in a MakBlock program, one could easily calculate the distance. As others have pointed out, wheel encoders are not possible to implement in MakeBlock, not only because of the small memory of the Uno, but also because the programming mode (over Bluetooth or wireless) does not allow interrupts, which is required to read the encoders. An alternative is to specify the speed and time the motors run, then measure the distance. If the speed is kept constant, the time should be linearly related to distance. In pursuing this, I found three problems: the motors take time to get up to speed and the wheels provided for the mbot skid a little as they start. This means that moving 5 steps of 10 cm each takes longer than 1 step of 50 cm. The skidding was virtually eliminated by using wheels that are stickier (I found them on Sparkfun) and adding more weight (more batteries!) to the bot. Turns out that one can adjust for the slow start by empirically fitting these data to distance = m X time + b. But the third problem is that as the batteries run down, it takes longer for the bot to move a specific distance. I have dealt with this by using more batteries (total of 9 volts) and using a voltage regulator set at 5 volts to supply the bot. Given all this, it works pretty well. But the best solution would be to use stepper motors. I am currently implementing this with cheap ($5.00) steppers from Adafruit and using Adafruit’s motor driver board. If that works well, I will try to change the Motor subroutines in MakeBlock so that they run the steppers. This would provide a consistent relationship between distance and number of steps, independent of battery rundown or slow starts of the motor. If I can get it to work, I will be happy to share the code (of course) and perhaps we could even get Makeblock to sell the robot with stepper motors as an option. Comments are welcome!
Thanks for your reply.
OK. However I also have your previous model C2WDRK Makeblock Configurable 2WD Robot Kit.
It contains DC motors (LT25GA75) but without encoders.
Could you sell encoders for them? If yes, what hardware/software I need to buy?