Module Mikrobotik v1.2 Ebook BI
Module Mikrobotik v1.2 Ebook BI
i
© 2022 Copyright Micro Concept Tech Version 1.2
Step by Step block arrangement ............................................................................................................................................................................................................................................ 21
Challenge ....................................................................................................................................................................................................................................................................................................... 23
Objective 2: Please Switch On The Lights!............................................................................................................................................................................................................................24
Introduction to Light-Emitting Diode (LED)....................................................................................................................................................................................................................24
Step by Step block arrangement ...........................................................................................................................................................................................................................................24
Challenge .......................................................................................................................................................................................................................................................................................................26
Objective 3: Our Adventure Begin (Free Movement) .................................................................................................................................................................................................. 27
Introduction to Motors ...................................................................................................................................................................................................................................................................... 27
Introduction to Basic of Free Movement ........................................................................................................................................................................................................................ 28
Step by Step block arrangement ............................................................................................................................................................................................................................................ 31
Challenge .......................................................................................................................................................................................................................................................................................................36
Objective 4: Let’s Follow The Line! ................................................................................................................................................................................................................................................ 37
Introduction to Line Detector...................................................................................................................................................................................................................................................... 37
Introduction to Line Tracer Time and its Mechanism ....................................................................................................................................................................................... 37
Step by Step block arrangement: .......................................................................................................................................................................................................................................... 38
Challenge ...................................................................................................................................................................................................................................................................................................... 40
ii
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 5: What To Do When Meeting Junction? .......................................................................................................................................................................................................41
Introduction to Path Finder and its Mechanism .......................................................................................................................................................................................................41
Step by Step Block Arrangement: .........................................................................................................................................................................................................................................42
Challenge .......................................................................................................................................................................................................................................................................................................44
Objective 6: What Else Can Be Done When Meeting Junction? ........................................................................................................................................................................ 46
Introduction to Path Finder Tank and its Mechanism ...................................................................................................................................................................................... 46
Step by Step block arrangement: .......................................................................................................................................................................................................................................... 47
Challenge .......................................................................................................................................................................................................................................................................................................49
Objective 7: Wrong way? Make U-turn .....................................................................................................................................................................................................................................51
Introduction to Turn At Centre and its Mechanism ..............................................................................................................................................................................................51
Step by Step blocks arrangement ........................................................................................................................................................................................................................................ 52
Challenge .......................................................................................................................................................................................................................................................................................................54
Objective 8: Let’s Control Mikrobotik ...........................................................................................................................................................................................................................................55
Introduction to Bluetooth and its Mechanism.............................................................................................................................................................................................................55
Step by Step block arrangement: ..........................................................................................................................................................................................................................................56
Mikrobotik Mobile Apps .....................................................................................................................................................................................................................................................................61
iii
© 2022 Copyright Micro Concept Tech Version 1.2
Challenge .......................................................................................................................................................................................................................................................................................................62
Objective 9: We Need Area Patrol! ................................................................................................................................................................................................................................................63
Introduction to Movement and Its Mechanisms.....................................................................................................................................................................................................63
Step by Step Block Arrangement ......................................................................................................................................................................................................................................... 66
Objective 10: Let's Find Hidden Treasures. .........................................................................................................................................................................................................................69
Introduction to Push Button ........................................................................................................................................................................................................................................................ 70
Introduction to Movement and Its Mechanisms. ................................................................................................................................................................................................... 70
Step by Step Block Arrangement: ......................................................................................................................................................................................................................................... 74
Extra: Try Upgrade and Self Program .................................................................................................................................................................................................................................... 78
iv
© 2022 Copyright Micro Concept Tech Version 1.2
Mechanical Structure Mechanical Movement
Element of Robotics
2
© 2022 Copyright Micro Concept Tech Version 1.2
What is Software Coding?
Electronic Hardware
Controller
Operate
Sets of instruction
written in specific
language
3
© 2022 Copyright Micro Concept Tech Version 1.2
Path Finding Robot
Robot designed and built specifically to detect and autonomously follow white and black line. Besides, robot also designed for
other functions such as obstacle detector and moving small objects.
5
© 2022 Copyright Micro Concept Tech Version 1.2
“Mikrobotik” Pathfinding Robot
Line Detector Sensor Indicator LED
6
© 2022 Copyright Micro Concept Tech Version 1.2
Arduino Nano Microcontroller
A microcontroller is a device that handles core functions such as controlling the use
of other electronic hardware connected to it, analyzing data and executing logic.
Mikrobotics uses an Arduino Nano microcontroller that acts as the brain to control the
entire hardware and movement of the robot.
7
© 2022 Copyright Micro Concept Tech Version 1.2
Low Battery Indicator
Low battery indicator will light up red colour. User need to stop using Mikrobotik
The lower the voltage value in battery, the brighter the indicator. and start charging when low battery
Minimum voltage operated: 11.0 V (Low battery indicator light indicator lights at maximum.
at maximum bright)
8
© 2022 Copyright Micro Concept Tech Version 1.2
Installation of mBlock v5
Step 1 mBlock v5 software can be obtained from:
9
© 2022 Copyright Micro Concept Tech Version 1.2
Step 5 Click ‘INSTALL’.
10
© 2022 Copyright Micro Concept Tech Version 1.2
Steps for Adding Mikrobotik
Step 1 Mikrobotik software can be obtained from:
Link: https://www.microconcept.com.my/stem-robotic/download/
11
© 2022 Copyright Micro Concept Tech Version 1.2
Calibration Process
The calibration process is an important process for the robot to identify between the white line and the black line. The
calibration process for this Mikrobotik robot can be done both manually and automatically. This process is done before the
robot can follow the line and complete the circuit.
Block Arrangement (Automatic Calibration):
Step 1 Insert block When Mikrobotik Starts and combine with block Prepare.
Step 2 Next, combine block Tank Turn (Wheel Left-Forward, Speed-50, Wheel Right-
Backward, Speed-50) under Robot Prepare.
12
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 Furthermore, combine block Repeat with block Calibrate Sensor.
Combine these blocks with blocks in Step 2.
Step 4 Lastly, drag Stop and block Wait (1 second) and put under block Repeat.
13
© 2022 Copyright Micro Concept Tech Version 1.2
Steps for Automatic Calibration Process
Step 1 Put Mikrobotik on the track.
Make sure all sensors starting from TR1 (LED L1) until TR5
(LED L5) were put on black line.
14
© 2022 Copyright Micro Concept Tech Version 1.2
Block Arrangement (Manual Calibration):
15
© 2022 Copyright Micro Concept Tech Version 1.2
Steps for Manual Calibration Process
Step 1 Switch on Mikrobotik.
LED1 with red colour and LED2 with blue colour will light up.
POWER
SWITCH
16
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 Repeat movement in Step 2 until both LED (LED1 and
LED2) light off.
Make sure all the sensors can detect the black line. The RED LED (LED1)
LED on the sensors will light up if the sensor detects a LIGHTS OFF.
black line. For example LED L1 will light up if sensor TR1
detects a black line on the circuit.
17
© 2022 Copyright Micro Concept Tech Version 1.2
Autonomous Robot PID Algorithm
PID algorithm is a control strategy suitable to assist determine the direction and speed of the robot such that it autonomously drive
and follows the line as close and fast possible. PID algorithm will ensure the robot does not overshoot from the line track when
turning and moves straight along the line.
Kp Kd
High Kp Value High Kd Value
18
© 2022 Copyright Micro Concept Tech Version 1.2
Type of Tracks
19
© 2022 Copyright Micro Concept Tech Version 1.2
Type of Junctions
Offset
20
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 1: Vroom Vroom
The robot will use a buzzer to produce a simple sound. It can only produce one tone at a time. This code block can be used to
produce different tones to create an interesting sound pattern.
Introduction to Buzzer
Buzzer is a type of sound device that converts audio models into sound signals. It
is usually used for alarms.
21
© 2022 Copyright Micro Concept Tech Version 1.2
Step 2 Next, combine block After
Mikrobotik starts with block Play
Music (Note-C5, Beat-Double), (Note- Choose “C5”
D5, Beat-Double), (Note-E5, Beat- as music note
Double), (Note-F5, Beat-Double),
(Note-G5, Beat-Double), (Note-A5,
Beat-Double), (Note-B5, Beat-Double)
Choose “double”
as music beat
Step 4 Once the program is uploaded, the robot will produce the sound or tone you have entered.
22
© 2022 Copyright Micro Concept Tech Version 1.2
Challenge!!
In this challenge, you have to enter the provided musical notes and try to guess the name of the music.
C C G G A A G F F E E D D C
3 3 5 5 5 5 5 5 5 4 4 3 3 3
23
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 2: Please Switch On The Lights!
Light-Emitting Diode (LED) on robot used as indicators. LEDs on the robot can be seen at power indicator, low battery indicator,
LED1, LED2, Arduino NANO and line sensors.
Light-Emitting Diode or LED functions to convert electric current into light and
emit light. Used as an application for indicator and light source.
Step 1 Combine block When Mikrobotik starts with block Robot Prepare.
24
© 2022 Copyright Micro Concept Tech Version 1.2
Step 2 Combine block After Mikrobotik starts with block Turn
On LED with choice of Status On and LED #1 and block
wait 1 second. Put the blocks under the block in Step 1.
This program will light up the LED.
Step 4 Lastly, upload the program. After the program uploaded, LED 1 will light up in one second and light
off in one second. The program will continue to run until the robot is turned off by the user.
25
© 2022 Copyright Micro Concept Tech Version 1.2
Challenge!!
Start
End
Program above show LED will light up in three seconds and light off in three seconds. The program will continue to run until
the Mikrobotik is turned off by the user.
26
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 3: Our Adventure Begin (Free Movement)
The robot is moved using the code block "tank turn" to move without following the line. This code block is suitable for solving
maze circuits (labyrinth). The robot will move depending on the speed and direction of the left and right motors set by user.
Introduction to Motors
There are two motors on Mikrobotik that can be controlled separately, can
rotate clockwise and counterclockwise continuously. These motors can also
be used to move or drive the project. The speed and duration can also be
set.
27
© 2022 Copyright Micro Concept Tech Version 1.2
Introduction to Basic of Free Movement:
Stop
Left motor forward, right motor forward Left motor backward, right motor backward
left motor speed = right motor speed left motor speed = right motor speed
28
© 2022 Copyright Micro Concept Tech Version 1.2
Steer to right Steer to left
Left motor forward, right motor forward. Left motor forward, right motor forward.
Left motor speed > Right motor speed Left motor speed < Right motor speed
Left motor forwards, right motor stops. Left motor stop, right motor forwards.
29
© 2022 Copyright Micro Concept Tech Version 1.2
Turn to right Turn to left
Left motor forward, right motor backward Left motor backward, right motor forward
left motor speed = right motor speed left motor speed = right motor speed
30
© 2022 Copyright Micro Concept Tech Version 1.2
Step by Step block arrangement
i) Move forwards
Step 1 Combine block When Mikrobotik starts with block Robot Prepare.
Step 2 Combine block After Mikrobotik starts with block Tank Turn (Wheel Left -Forward, Speed-100, Wheel
Right-Forward, Speed-100), block wait (3 seconds) and block stop. Drag those blocks and put it under the
blocks in Step 1.
Left motor and right motor will move with the same speed.
31
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 Lastly, combine block wait, block repeat until (false), and block stop and combine those blocks
with blocks in Step 2.
Step 4 After the program uploaded, Mikrobotik will move forwards for duration of 3 seconds.
Step to make the robot move backwards is the same as step to move forwards. You only need to change
the direction of the left wheel to backward and the direction of the right wheel to backward.
32
© 2022 Copyright Micro Concept Tech Version 1.2
ii) Steer to left
Step 4 After the program uploaded, Mikrobotik will steer to left for duration of 3 seconds.
Step for steer to the right is similar to the step for steer to the left. You just
need to change the direction to right.
33
© 2022 Copyright Micro Concept Tech Version 1.2
iii) Turns left
Step 1 Combine block When Mikrobotik starts with block Robot Prepare.
Step 2 Combine block After Mikrobotik starts with block Tank Turn (Wheel Left -Backward, Speed-100,
Wheel Right-Forward, Speed-100), block wait (3 seconds) and block stop. Drag those blocks to under
block in Step 1. The left motor will move backward and the right motor will move forward with the same
speed.
34
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 Lastly, combine block wait (1 second), repeat until (false) and block stop. Then, combine those blocks
with blocks in Step 2.
Step 4 After program uploaded, Mikrobotik turns left for 3 seconds and stops.
Step for turn to the right is similar to the step for turn to the left. You just need to change the
wheel left direction to forward and wheel left direction to backward.
35
© 2022 Copyright Micro Concept Tech Version 1.2
Challenge!!
In this Challenge, you need to ensure that Mikrobotik moves along the path that has been prepared by applying the knowledge
that has been learned.
Start
Finish
36
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 4: Let’s Follow The Line!
The robot will follow the line (Black or White) continuously. The robot will always move even if it meets a left or right junction.
The line detector will emit infrared light and detect black or white surfaces. The analogue
reading value will be high if a black surface is detected while the analogue reading value will
be low when a white surface is detected.
37
© 2022 Copyright Micro Concept Tech Version 1.2
Step by Step block arrangement:
Step 1 Prepare the arrangement blocks for automatic calibration.
38
© 2022 Copyright Micro Concept Tech Version 1.2
Step 2 Then, insert block After Mikrobotik Starts and combine with block Line Tracer Time.
Line sensitivity
(higher values mean more sensitive)
≥ 50: Motor speed when divert from line
< 50: Time at maximum speed
Control Kd value
(Kd must more
than >Kp)
Robot autonomously Right motor speed when on the line
detects black or white
line.
Maximum time (ms) for robot move
Acceleration percentage forward
Acceleration percentage
39
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 After uploading the code, Mikrobotik will start moving forward temporarily.
Perform the calibration process on the line sensor. After that, Mikrobotik will follow the line of either
Black or White until it reaches the maximum time period (in ms).
Challenge!!
Apply Line Tracer Time to solve the track below.
Start Finish
40
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 5: What To Do When Meeting Junction?
Robot will move autonomously and can decide whether to turn left, turn right or stop at the junction. The technique used to
know as Steer Turn Method.
Path Finder is used to move the Mikrobotik autonomously follow over a white or black line until the Mikrobotik finds a junction
(right or left or middle or dead end or offset).
At the junction, Mikrobotik will act to turn (left or right or stop) for a set period of time or until the robot finds the next line and
will stop.
Robot will turn by using Steer Turn Method.
41
© 2022 Copyright Micro Concept Tech Version 1.2
Step by Step Block Arrangement:
Step 1 Prepare the blocks arrangement for automatic calibration.
42
© 2022 Copyright Micro Concept Tech Version 1.2
Step 2 Lastly, combine block After Mikrobotik Starts and block Path Finder (Line Format-Black, Junction-
Left, Action-Turn Left, Left Speed-50, Right Speed-50, Turn Speed-200, RampUp Perc-100, Kp-0.02,
Kd-0.2, Sensor Threshold-20, Junction Speed-50, Forward Delay-50, Turn Period ms-300).
Robot autonomously detects black or Right motor speed when on the Control Kd value (Kd must more than On time (ms) for robot to turn or till find
white line. line >Kp) line (0)
43
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 After uploading the code, turn on the Mikrobotik switch and perform the calibration process.
After that, Mikrobotik will follow the black line and if the robot meets a left junction, Mikrobotik will move
forward and then turn to enter the left junction until Mikrobotik meets another line.
Challenge!!
i) Path Finder Left Junction, steer left at left junction.
Finish
Start
44
© 2022 Copyright Micro Concept Tech Version 1.2
ii) Path Finder Right Junction, steer right at right junction.
Finish
Start
Finish
Start
45
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 6: What Else Can Be Done When Meeting Junction?
Robot will move autonomously and can decide whether to turn left, turn right or stop at the intersection. The technique used
known as Tank Turn Method.
Mikrobotik travel autonomously on lines (Black or White or Thin Black or Thin White) until meet an intersection (Left or Right or
Middle or Dead End or Offset).
At the junction, Mikrobotik will act (Turn left or Turn right or Stop) for at least the Minimum Turn Period (Min Turn Period) and
continue turning until it detects the line and stops.
Mikrobotik will turn by using Tank Turn Method.
46
© 2022 Copyright Micro Concept Tech Version 1.2
Step by Step block arrangement:
Step 1 Prepare the blocks arrangement for automatic calibration.
47
© 2022 Copyright Micro Concept Tech Version 1.2
Step 2 Combine block After Mikrobotik starts with block Path Finder Tank (Line Format- Black, Junction-
Right, Action-Turn Left, Left Speed-50, Right Speed-50, Turn Speed-200, RampUp Perc-100, Kp-0.02,
Kd-0.2, Sensor Threshold-20, Junction Speed-50, Forward Delay-50, Min Turn Period ms-200).
Left motor speed when on the line Minimum time (ms) for robot turning
Control Kp value
Robot autonomously detects black or Control Kd value (Kd must more than Time (ms) for robot
Right motor speed when on the line
white line. >Kp) move forward after
meeting junction and
make action
Acceleration percentage Turning speed at junction (higher value,
Robot action when meeting junction sharper turns)
48
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 After uploading the code, turn on the Mikrobotik switch and perform the calibration process.
After that, Mikrobotik will follow the black line and if the robot finds a left junction, Mikrobotik will move
forward and then turn for at least the Minimum Turn Period (Min Turn Period) and continue turning
until it detects the line and stops.
Challenge!!
i) Path Finder Tank Right Junction, turn at right junction
Finish
Start
49
© 2022 Copyright Micro Concept Tech Version 1.2
ii) Path Finder Tank Left Junction, turn at left junction
Finish
Start
Finish
Start
50
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 7: Wrong way? Make U-turn
Mikrobotik can make a U-turn on the line it passes through 180 degrees on its axis and turn left or right during the Minimum
Turn Duration (Min Turn Period) and continue until it meets the line (Black or White).
Mikrobotik will make a tank turn in the direction (left or right) for the Minimum Turn Duration (Min Turn Period) until the robot
finds the line and finally stops.
This technique is useful for making U-turns.
51
© 2022 Copyright Micro Concept Tech Version 1.2
Step by Step blocks arrangement:
Step 1 Prepare the arrangement blocks for automatic calibration.
process
Step 2 Combine block Turn At Centre (Line Format- Black, Direction Turn-Left, Speed-50,
Sensor Threshold-20, Min Turn Period-200) with block wait (1 second). Combine those blocks with blocks
in Step 1.
52
© 2022 Copyright Micro Concept Tech Version 1.2
User push button S1
Sensor Threshold
(higher value means higher Minimum time period
sensitivity) (ms) for robot moves
All LED lights on Left wheel speed
Step 3 After uploading the code, turn on the Mikrobotik switch and perform the calibration process.
After that, Mikrobotik will make a U-turn according to the set direction and will stop after detect the
black line.
53
© 2022 Copyright Micro Concept Tech Version 1.2
Challenge!!
i) U-turn at the middle, left direction and move forward.
(blue arrow to yellow arrow)
Start
Finish
Start
Finish
54
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 8: Let’s Control Mikrobotik
Bluetooth is a short distance wireless technology used or data exchange between fixed and mobile devices in close range.
Besides, it can build private network area. Bluetooth allows Mikrobotik to exchange the desired data with other devices directly.
Mikrobotik can be control in close range using the Bluetooth approach as it can be find and control easily. The
Bluetooth module inserted into the port provided. This Bluetooth module contains 4 pins which are RXD, TXD, GND,
and VCC.
55
© 2022 Copyright Micro Concept Tech Version 1.2
Step by Step block arrangement:
Step 2 Combine block After Mikrobotik starts with block if after combined with block Bluetooth
Data Check. Put those blocks under the block in Step 1.
56
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 Under the block After Mikrobotik starts, combine 5 blocks Bluetooth Data Control Data (F, B, L. R, X) with 5
blocks if and under the block then combine with 5 blocks Tank Turn to get forward, backward, turn to
left, turn to right and stop movement.
57
© 2022 Copyright Micro Concept Tech Version 1.2
Step 4 For the next block, combine 6 blocks Bluetooth Data Control Data (T, S, E. Q, C, Z) with 6 blocks if and
under the block then combine with 2 blocks Play Music (Note-C3, Beat Half).5 and 4 blocks Tank Turn to
get forward and steer right, forward and steer left, backward and steer left, backward and steer right
movement.
58
© 2022 Copyright Micro Concept Tech Version 1.2
Step 5 For the next block, combine 5 blocks Bluetooth Data Control Data (1, 2, 3, 4, 5) with 5 blocks if and
under the block then combine with 2 blocks Turn On LED (#1 On, #1 Off, #2 On, #2 Off) and 1 block
Play Music (Note-A3, Beat Whole).
59
© 2022 Copyright Micro Concept Tech Version 1.2
Step 6 After uploading the code, pair the Bluetooth module on the Mikrobotik and match it with the device.
Mikrobotik is ready to be controlled by the device. Make sure all Bluetooth pins are connected to the
Bluetooth port (RXD-RX, TXD-TX, GND-GND, VCC-VCC)
60
© 2022 Copyright Micro Concept Tech Version 1.2
Mikrobotik Mobile Apps
Step 2 Open application and click on “Bluetooth connection”. Choose based on the number of Bluetooth.
Step 3 Make sure “Connected” displayed. Now Mikrobotik can be controlled in free movement.
61
© 2022 Copyright Micro Concept Tech Version 1.2
Challenge!!
In this challenge, you need to make sure that Mikrobotik moves along the path provided by using a device that has been paired
with a Bluetooth module on Mikrobotik.
Start
Finish
62
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 9: We Need Area Patrol!
Sometimes a robot needs to use more than one block to complete a task such as "area patrol robot". To patrol an area, the robot
needs to move along a line at varying speeds and for a certain distance or time. In addition, while following the line, the robot
has to make a turn in the opposite direction.
The technique used is to combine several Line Tracer Time blocks and Turn at Centre blocks.
The robot moves autonomously following the line using the Line Tracer Time block with high speed and then with low speed for
a certain time. After finishing moving, the robot makes a turn in the opposite direction using the Turn at Centre block. Finally the
robot moves again autonomously by using the Line Tracer Time block with high speed.
Here is a sketch of the movement of the "area patrol robot" with a set time and speed and make a turn to complete the task.
63
© 2022 Copyright Micro Concept Tech Version 1.2
i) The robot moves autonomously using Line Tracer Time with high speed for 3 seconds (red arrow) and then with
low speed for 3 seconds (yellow arrow).
Start
ii) The robot makes a turn in the middle, towards the left. (yellow arrow direction to green arrow) usingTurn At
Centre.
64
© 2022 Copyright Micro Concept Tech Version 1.2
i) The robot moves autonomously to the end point using Line Tracer Time at high speed for 4 seconds.
End
65
© 2022 Copyright Micro Concept Tech Version 1.2
Step by Step Block Arrangement:
Step 1 Set up an automatic calibration block arrangement.
Mikrobotik perform the calibration process while moving for a few seconds.
Step 2 Combine the After Mikrobotik starts block with the repeat until block. After that, add a Line Tracer
Time block by setting the speed to 80 within 3 seconds. Then, add another Line Tracer Time block by
setting the speed to 30 within 3 seconds.
66
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 Add a Turn at Centre block and set it to make a left turn. Add another Line Tracer Time by setting
the speed to 80 for 3 seconds. Then, add another Line Tracer Time block by setting the speed to 80 in 4
seconds.
67
© 2022 Copyright Micro Concept Tech Version 1.2
Step 4 After uploading the code, turn on the Mikrobotik switch and perform the calibration process. After
that, Mikrobotik will make all movements according to the set time and will stop after the set time.
68
© 2022 Copyright Micro Concept Tech Version 1.2
Objective 10: Let's Find Hidden Treasures.
Sometimes the robot needs to use more than one block to complete a task such as "robot looking for hidden treasure". In order
to get all five hidden treasures, the robot needs to go through many intersections, among which are left junctions, right junctions
and 3-way junctions. Sometimes the robot needs to turn at different speeds to enter the junction.
1
4
2
5
69
© 2022 Copyright Micro Concept Tech Version 1.2
Introduction to Push Button
A push button is a type of switch that functions to control a machine directly through
the touch of a hand or finger from the user or the surface of a component. Mikrobotik
has push buttons S1 and S2. The analog reading value will be less than 400 when S1 is
pressed while the analog reading will be less than 500 when S2 is pressed.
The technique used is to combine several Path Finder and Path Finder Tank blocks.
By using the Path Finder or Path Finder Tank block, the robot will move autonomously following the black or white line until it
finds an intersection and then the robot will turn towards the specified intersection.
To get the first hidden treasure, the robot moves using the Path Finder until it finds a left intersection and turns to the left.
Then, the robot continues moving using the Path Finder until it finds a right intersection and turns to the right for the second
hidden treasure. Next, the robot continues moving using the Path Finder until it finds a 3-way junction and turns left for the
third hidden treasure. After that, to get the fourth haunted treasure the robot needs to use the Path Finder Tank until it meets
the left intersection and turn left and finally to get the last haunted treasure the robot needs to use the Path Finder Tank until
it finds the right intersection and turns right.
70
© 2022 Copyright Micro Concept Tech Version 1.2
Here is a sketch of the movement of the robot searching for hidden treasures by going through different intersections to
complete the task.
i) The robot moves from the starting point to find the left junction and turns using the Path Finder to the left to pick
up the first hidden treasure.
Start
ii) The robot moves to find the right junction and turns using the Path Finder round to the right to pick up the
second hidden treasure.
71
© 2022 Copyright Micro Concept Tech Version 1.2
2
iii) The robot moves to find the 3-way intersection and turns using the Path Finder to the left to pick up the third
hidden treasure.
iv) The robot moves again to find the left junction and turns using the Path Finder Tank to the left to pick up the
fourth hidden treasure.
72
© 2022 Copyright Micro Concept Tech Version 1.2
4
v) The robot continues to move looking for the right junction and turns using the Path Finder Tank to the right to
take the last hidden treasure and then stops .
5
End
73
© 2022 Copyright Micro Concept Tech Version 1.2
Step by Step Block Arrangement:
Step 1 Set up an automatic calibration block arrangement.
Mikrobotik perform the calibration process while moving for a few seconds.
Step 2 Combine the After Mikrobotik starts block with the repeat until block. After that, add the Path Finder
block and set it (Junction – “Left”, Action – “Turn Left”, Speed – “60”, Turn Speed – “200”, Junction Speed
– “200”, Forward Delay – “400” and Turn Period – “400” ).
74
© 2022 Copyright Micro Concept Tech Version 1.2
Step 3 Add a new Path Finder block and set the value to (Junction – “Right”, Action – “Turn Right”, Speed –
“60”, Turn Speed – “200”, Junction Speed – “50”, Forward Delay – “0” and Turn Period – “600” ).
Step 4 Add a new Path Finder block and set the value to (Junction – “Middle”, Action – Turn Left”,
Speed – “60”, Turn Speed – “200”, Junction Speed – “100”, Forward Delay – “250” and Turn Period –
“300” ).
75
© 2022 Copyright Micro Concept Tech Version 1.2
Step 5 Add a Path Finder Tank block and set the value to (Junction – “Left”, Action – Turn Left”,
Speed – “70”, Turn Speed – “100”, Junction Speed – “100”, Forward Delay – “350” and Min Turn Period
– “200” ).
Step 6 Add a new Path Finder Tank block and set the value to (Junction – “Right”, Action – Turn Right”,
Speed – “40”, Turn Speed – “100”, Junction Speed – “100”, Forward Delay – “150” and Min Turn Period
– “50” ).
76
© 2022 Copyright Micro Concept Tech Version 1.2
Step 7 After uploading the code, turn on the Mikrobotik switch and perform the calibration process. After
that, Mikrobotik will move to find the designated intersection and make a circle until it finds the hidden
treasure.
77
© 2022 Copyright Micro Concept Tech Version 1.2
Extra: Try Upgrade and Self Program
DEVICE PORT ARDUINO NANO PIN PERIPHERALS ADDITIONAL INFO
ITR1 A6 Line Detection Sensor – Outer Left ITR8307
ITR2 A3 Line Detection Sensor – Inside Left ITR8307
ITR3 A2 Line Detection Sensor – Middle ITR8307
ITR4 A1 Line Detection Sensor – Inside Right ITR8307
ITR5 A0 Line Detection Sensor – Outer Right ITR8307
S1 A7 User Switch S1 Value < 100
S2 A7 User Switch S2 Value ≥ 100 & < 400
BUZZER D2 Buzzer
LED1 D13 Indicator Light L1
LED2 D12 Indicator Light L2
M1 – AIN1 D5 Left Motor – Bridge A Input 1 DRV8833 Dual H-Bridge Motor Driver
M1 – AIN2 D6 Left Motor – Bridge A Input 2 DRV8833 Dual H-Bridge Motor Driver
M2 – BIN1 D3 Right motor – Bridge B Input 1 DRV8833 Dual H-Bridge Motor Driver
M2 – BIN2 D9 Right motor – Bridge B Input 2 DRV8833 Dual H-Bridge Motor Driver
P1 D7 Open Pot P1
P2 D8 Open Pot P2
BT – TX D10 Bluetooth Pot TX
BT – RX D11 Bluetooth Pot RX
78
© 2022 Copyright Micro Concept Tech Version 1.2