This project brings the 1st experience with programmable vehicle Kitronik :MOVE Motor ctonrolled by Micro:bit, the task is to let the vehicle moving forward, as straightly as possible, to a pre-defined destination area, the program is made by MakeCode blocks. Depending on the actual situation, careful calibration and tuning (including direction, speed, driving time) are needed to achieve the result. This project is also suitable for those who have prior knowledge with MOVE vehicle, but not experienced with calibration. Goals:
Starting experience with Kitronik :MOVE Motor
Engineering mindset: Challenges for actual result with real hardware, calibration and tuning
Inspire interests on robotics and programming
START A BIT > Projects Library > This page
An example of a successful result, not necessarily in perfect straight driving.
Below example is a case of direction deviation, if seen, please test several times, if still very obvious, then a calibration is needed.
Just the standard TM015: Kitronik :MOVE Motor for Micro:bit kit, remember to install the 4 batteries, no extra need.
A simple map marked on the floor is enough, by using TM020: Masking Tape .
"starting line" is a line.
"destination area" is not a strict line, but a small buffering area that we accept as long as the vehicle stops inside, optionally a "gate" can be marked
The distance and how wide of the "destination area" or "gate" are flexible
The vehicle should start from the "starting line" of the map
The vehicle should drive forward towards the destination
The driving speed is not defined, feel free to try and find your option
If the vehicle has too much deviation to drive straightly, try the direction calibration
The vehicle should finally stop within the "destination area"
Please note it's impossible to achieve an ideal straight line driving, and it's hard to repeat the perfect result time after time, it's acceptable as long as the above basic points are met.
[x] Simple: 30-60 minutes
[ ] Moderate: 1-2 hours
[ ] Challenging: more than 2 hours
The estimation bases on average situation with some calibration efforts, but without unexpected difficult troubleshooting. It only indicates rough time needed to complete this project, but not about technical difficulty, not covering discussion and sharing time. Here is a possible breakdown:
5-8 minutes: Understand requirement and solution, collect materials, assemble the vehicle
10 minutes: 1st experience with MOVE programming, find out the needed blocks, make the 1st test run, to find out the deviations
10-15 minutes: Optional, driving direction calibration to let the vehicle driving straightly
5-10 minutes: Finally, fine tune the speed and time to make the vehicle reaching the destination area
One should have prior knowledge
Micro:bit V2 board: Know what it is, better to have prior experience using them
MakeCode by Microsoft, the programming tool, better to have prior experience using it with Micro:bit
No necessary prior knowledge of Kitronik :MOVE Motor, but very nice if having experience with it.
1x TM015: Kitronik :MOVE Motor for Micro:bit, unboxed, or assembled
4x Alkaline AAA batteries
1x Micro:bit V2 board , with USB cable
1x TM020: Masking Tape, OK with any size, any color, to mark a "map" on the floor
Click "Extensions"
Search by keyword "MOVE"
Click the found result
Then "MOVE Motor" blocks are available
To command the vehicle driving Forward/Reverse/Left/Right, and the speed is regulated as range 0-100 without a meaningful unit.
NOTE:
Once commanded, the vehicle will keep doing this until another different command is received, e.g. "stop"
"Left" is driving with only right wheel, but the left wheel is still, so the vehicle is moving circling towards left
"Right" is similar, but is circling in right direction.
MOVE Motor -> Motors -> Drive ->
To "stop" the moving, this command must be explicitly sent
NOTE:
Once commanded, the vehicle stops, and rear lights are turned on as red.
MOVE Motor -> Motors -> Drive ->
If the vehicle seriously fails to drive forward in straight line, then calibration might be needed.
It will correct the vehicle to purposely drive more into "Left" or "Right" direction, so to compensate the non-ideal reality.
The calibration range is regulated as 0-10 without a meaningful unit.
NOTE:
Don't do this before testing more times, do the calibration only when the deviation happens very obvious and repeat.
Be aware that it's almost impossible to get a perfect straight line driving in reality.
MOVE Motor -> Motors -> Setup ->
There is on-board horn with the vehicle, useful for indications, e.g. before/after a task
MOVE Motor -> Sounds ->
The vehicle will do what as commanded and keep doing so, until next command is sent.
Command "move [Forward] at speed (...)"
Just wait, so the vehicle keeps moving
Command "stop"
Please adjust speed and pause-time to fit actual needs.
It's annoying to see the vehicle already started rolling too soon before we can place the vehicle well. Button A/B are half-covered by the ultrasonic sensor, not easy to use them.
Here is a good tip to use Micro:bit "logo" touching to trigger the driving, with a few seconds countdown, and a horn indication.
If the vehicle fails to drive forward in straight line, then calibration is needed. This example uses button A/B to find out the suitable adjustment.
"biasValue" is a variable that needs to be created.
If the vehicle leans to the left direction in actual test, use "bias to [Right] by (biasValue)" , otherwise "bias to [Left] by (biasValue)"”.
Why does the vehicle drive not in a straight line at the beginning?
How can we ease the impact or fix the problem other than using the "bias to [Left/Right] by (...)"?
Possible causes:
Mechanism alignment?
Unbalanced weight on the side?
Floor leveling?
Unbalanced floor surface friction?
Small litters on the floor?
Maybe the vehicle is not placed in a good angle at the starting line
...
How to reduce the impact? Any workaround or solutions?
Share with your group about
What troubles you met
How you analyze
How you get help
How you solve it
What you have learnt
Tell us how is your driving direction is corrected in the calibration.
What happens if you forget to command "stop" after "move [Forward] at speed (...)?
Motor Adjustment Tutorial.pdf - Step by step guide for driving direction calibration
More document and tutorials in TM015: Kitronik :MOVE Motor for Micro:bit
A fun challenge is to add a right angle in the middle of the map, try to let the vehicle drive there with a nice turning, and then continue moving forward to the destination area.
There is quite much challenge to keep the vehicle moving forward straightly, and there is more challenge to make the vehicle with a turning for an expected right angle (more or less).
PJ009.2: Collect MOVE vehicle sensors data - This project is a prior learning before the line following project