0% found this document useful (1 vote)
634 views281 pages

RoboTek-Makeblock-Grade 4

This document provides information over 4 sessions on robotics and introducing students to mBot robots. It discusses different types of robots, robot parts like motors and batteries, and how to assemble an mBot robot. The sessions include activities for students to learn about robotics components and their functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
634 views281 pages

RoboTek-Makeblock-Grade 4

This document provides information over 4 sessions on robotics and introducing students to mBot robots. It discusses different types of robots, robot parts like motors and batteries, and how to assemble an mBot robot. The sessions include activities for students to learn about robotics components and their functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 281

ROBOTEK:

ROBOTICS FOR KIDS


GRADE 4
ALL ABOUT ROBOTICS
MODULE 1 LESSON 1 (SESSION 1)
Session 1: All About Robotics

Target Outcomes:
At the end of this session, the students
will be able to:
Enumerate different types of robots
Recognize the 4D’s where robots
are used
Recognize the uses of robots
Session 1: All About Robotics
UNLOCKING ACTIVITY:
What are the similarities shown in the pictures?
Session 1: All About Robotics

Hi! I am Android 17,


I am from the story
Dragon Ball. Do you
know me?
I will now introduce
other Androids like
me and robots like us.
Session 1: All About Robotics
Key Discussion
HUMANOID
 A humanoid robot is a robot with its body built to
resemble a human body.
ALPHA 1

NAO

ASIMO
Session 1: All About Robotics

WHAT IS AN ANDROID?
 ANDROID - is a robot which looks, acts and appears like
a human.

Ever 1 DER 1
Session 1: All About Robotics

WHAT IS A CYBORG?
 CYBORG (short for “cybernetic organism”) – is a being
with both organic and technological components.

T 800 (Terminator
Robocop
Movie
Session 1: All About Robotics

4D’S OF A ROBOT
Dirty
Dangerous
Dull
Difficult for Human to perform
Session 1: All About Robotics

USES OF ROBOTS
Dangerous
Repetitive
High Precision
Session 1: All About Robotics

Practice Exercise/ Assessment:


I. Enumerate some different types of robots
1.
2.
3.
What are the 4D’s of robots?
1. 3.
2. 4.
II. Essay
5-10. What do you think are some of the reasons
for creating robots?
 
ALL ABOUT ROBOTICS
MODULE 1 LESSON 1 (SESSION 2)
Session 2: All About Robotics

Target outcomes:
At the end of this session, the students
will be able to:
Identify what motors are, as well as
some different kinds of motors
Recognize what batteries are, as well as
some different kinds of batteries
Describe what a motherboard is
Session 2: All About Robotics
Unlocking Activity:
Look at the pictures and explain.

ati ng

Energy
E

Digestion
Session 2: All About Robotics

Key Discussion

WHAT ARE MOTORS?

 MOTOR – a machine that converts

electrical energy to kinetic


energy, to enable a vehicle or a
mechanical part to move.
 
Session 2: All About Robotics

Kinds of motors

1. DC MOTOR
DC (Direct Current) motors are
two-wire (power & ground)
motors which run continuously.
Session 2: All About Robotics

2. SERVO MOTOR
Servo motors have a limited
angle of rotation, usually 180
degrees or so, and move back
and forth.
Session 2: All About Robotics

3. STEPPER MOTOR
A stepper motor is essentially
a servo motor that moves in
steps, rather than
continuously.
Session 2: All About Robotics

WHAT ARE BATTERIES?

 BATTERY - is a container that

converts the chemical energy


stored within its cells into
electricity.
Session 2: All About Robotics

KINDS OF BATTERIES
 Nickel cadmium (NiCd)
 Nickel-metal hydride (NiMH)
 Lead acid
 Lithium ion
 Lithium polymer
Session 2: All About Robotics

WHAT IS A MOTHERBOARD?

 MOTHERBOARD - a printed circuit board

which contains the main components of


a device such as a computer. It has
built-in connectors where other circuit
boards can be slotted.
Session 2: All About Robotics
Practice Exercise:
Identify what is being asked for in each item.
_________1.) a printed circuit board which contains the
main components of a device such as a computer.
_________2. ) is a container that converts the chemical
energy stored within its cells into electricity.
________ 3. ) a machine that converts electrical energy
to kinetic energy, to enable a vehicle or a mechanical
part to move. 
Session 2: All About Robotics
Enumeration
List down the following:
1-3 Types of Motors
4-8 Types of Batteries
THE MBOT PARTS LIST
MODULE 1 LESSON 2 (SESSION3)
Session 3: mBot Servo Add-on Familiarization

Target outcomes:
At the end of this session, the students
will:
Become familiar with the parts
of an mBot Robotics kit
Session 3: mBot Servo Add-on Familiarization
Unlocking Activity:

 Can you name the different parts of

your body and its function?


 What is the importance of knowing the

parts and function of our body?


 What so you think will happen if pone of

our body parts didn’t function well?


Session 3: mBot Servo Add-on Familiarization

mBot
Session 3: mBot Servo Add-on Familiarization
 Key Discussion
The mBot Parts
Session 3: mBot Servo Add-on Familiarization
Session 3: mBot Servo Add-on Familiarization

Practice Exercise:
MAKEBLOCK MBOT ASSEMBLY
MODULE 1 LESSON 3 (SESSION 4)
Session 4: mBot Servo Add-on Parts Assembly

Target outcomes:
At the end of this session, the students
will able to:
Follow accurately the steps on
how to assemble the mBot kit
Identify the different
components in an mCore
Session 4: mBot Servo Add-on Parts Assembly
Unlocking Activity:
1. Form a group with five (5) members.
2. Choose any step by step procedure based on
your interests, then discuss it creatively in
front of the class.
You’ll be graded according to this rubric:
Content of the discussion – 50%
Accuracy of the procedure – 30%
Creativity – 20%
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly
Session 4: mBot Servo Add-on Parts Assembly

Practical Activity
1. Form a group with five (5)
members.
2. The group will pick five (5) steps of
mBot assembly and demonstrate
these, one by one.
Session 4: mBot Servo Add-on Parts Assembly

THE MBOT COMPONENTS


 mCore - Main Control Board for

mBot
 It has a light sensor, buzzer, RGB

LEDs, IR Reciever, IR
Transmitter, RJ25 ports, USB
connector, reset switch, power
switch, motor interface and a
push button.
Session 4: mBot Servo Add-on Parts Assembly

 Light Sensor

The light sensor on the


mCore board measures light

 Line Follower Sensor

The line follower has two


sensors which can detect a white
surface (within the range of 1-
2cm).
Session 4: mBot Servo Add-on Parts Assembly
 Range Sensor

The ultrasonic sensor


measures distance. The
ultrasonic sensor has a range of
3-400cm. If an object is outside
this range, the sensor will return
a value of 400.
Session 4: mBot Servo Add-on Parts Assembly

RGB LEDs
The mCore has two built-in
RGB LEDs that can be programmed
to light up and produce different
colors.

 Buzzer
The mCore has a buzzer
that can produce sounds.

IR Receiver
The mCore has an IR
receiver which is bundled with an
IR Remote.
Session 4: mBot Servo Add-on Parts Assembly
IR Transmitter
The mCore has a built-in IR
transmitter which allows the mBot to
communicate with other mBots via IR
communication.

DC Motors
The mBot kit contains two (2) DC
motors that can be programmed to
move independent of each other, so
that the mBot can move in different
directions.

Battery pack
The battery pack serves as the
main power source of the mBot.
Session 4: mBot Servo Add-on Parts Assembly

Group Activity:

1. Form a group with 5 members.


2. With a given mBot set-up, identify five parts
and their functions.
3. Think of how mBot parts can be like certain
parts of your body, or appliances at home.
Session 4: mBot Servo Add-on Parts Assembly
Teams will present the progress of their mBot’s construction
and shall be rated according to the rubrics below.
Course Teacher:
Robotics Team/Students: Rating Scale: 1-5 (5 as the
highest)

Activity Thinking Relating to Understanding Managing Participating


others text/symbols/lan self and
guage contributing
Constructin Assem /5 Supporti /5 Reading and /5 Responsibil /5 Problem /5
g the mBot bly of ng peers understandi ity for the solving
25/25 mBot who ng designated mBot
have instruction mBot challeng
difficulty manuals es
assembli with mBot
ng the diagrams
mBot

Total
Session 4: mBot Servo Add-on Parts Assembly
Practice Exercise:
 Label the parts indicated.
MBLOCK SETUP AND WORKING
ENVIRONMENT SETUP AND BASICS
MODULE 1 LESSON 4 (SESSION 5)
Session 5: mBlock Setup and Basics

Target Outcomes:
At the end of this session, the students
will able to:
Setup an mBlock Program
Navigate the mBlock Graphical
User Interface (GUI)
Session 5: mBlock Setup and Basics

Unlocking Activity:

1. Who among you here have tried using a new


device, like a cellphone, tablet or computer?

2. What is the first thing that you do when you


try to operate your new device? Did you try
exploring the applications and the functions of
each app?
Session 5: mBlock Setup and Basics
 WHAT IS MBLOCK?
Session 5: mBlock Setup and Basics
SETTING UP THE MBLOCK PROGRAM

1. Downloading mBlock, installing


drivers and connecting to mBot.
Download the installer from
http://www.mblock.cc/software/
Session 5: mBlock Setup and Basics
Session 5: mBlock Setup and Basics

2. Install and open the software.

3. Get the Arduino drivers, then


go to the Connect menu in
mBlock:
Session 5: mBlock Setup and Basics
  Key Discussion
Connect the
robot to the
computer via
USB cable.
Turn the
robot on and
open mBlock.
Go to
Connect->
Serial Port ->
(port ID).
Session 5: mBlock Setup and Basics

Once the connection is


successful, the title bar
will say you are
connected and the red
dot in the “Robots”
Scripts will turn green.
Session 5: mBlock Setup and Basics

Next, make sure you have


the appropriate board
selected in the Board
menu:
 mBot – mCore
 The mCore board is

selected:
Session 5: mBlock Setup and Basics

CONNECTING BY USB OR
BLUETOOTH

To run programs from the mBlock

IDE, you can connect via Bluetooth


(or USB). Here is how to connect in
each of these ways:
Session 5: mBlock Setup and Basics

USB cable
1. Connect the robot to the computer

via USB cable, turn the robot on,


and open mBlock.
2. The title bar should say you are
disconnected.
Session 5: mBlock Setup and Basics

3. Go to Connect-> Serial Port -> (port ID). (TIP: If


you don’t know the port ID you are connected to,
make a note of the available ports, disconnect your
robot, and see which port disappears.)
Session 5: mBlock Setup and Basics
Session 5: mBlock Setup and Basics

Once you have been successfully paired,


open mBlock. The title bar will still show
you are disconnected:
Session 5: mBlock Setup and Basics
Bluetooth
1. Make sure that the robot is turned on, that
the Bluetooth module is properly inserted into
the board and that the blue LED is flashing.
2. The title bar should say you are disconnected.
Session 5: mBlock Setup and Basics
3. Then you are ready to connect:
Session 5: mBlock Setup and Basics
Session 5: mBlock Setup and Basics
Practice Exercise:
EXPLORING THE MBLOCK WORKING
ENVIRONMENT
MODULE 1 LESSON 4 (SESSION 6)
Session 6: Exploring the mBlock Working Environment

Target outcomes:
At the end of this session, the students
will able to:
Navigate the mBlock Graphical User
Interface (GUI)
Become familiar with the mBlock
palette and blocks
Use the basic mBlock palette and blocks
Session 6: Exploring the mBlock Working Environment

  This header block indicates that the program

will be translated into Arduino code and


uploaded to the mCore board.
Session 6: Exploring the mBlock Working Environment

This block makes the program wait for


the time noted within.
Session 6: Exploring the mBlock Working Environment

 This block plays the note selected on

the on-board buzzer for the length


selected.
Session 6: Exploring the mBlock Working Environment

All the code inside this loop block will

run forever.
Session 6: Exploring the mBlock Working Environment

This block selects the LEDs – only the

left LED, only the right LED, or both


LEDS - and any value of red, green and
blue between 0 and 255.
Session 6: Exploring the mBlock Working Environment

This block moves the mBot. The options


are: forward, backward, left or right,
with the speed between -255 and 255.
Session 6: Exploring the mBlock Working Environment

This block controls the motors


individually, setting either M1 or M2 to a
speed / power setting between -255 and
255.
Session 6: Exploring the mBlock Working Environment

 This block is the Less-Than Operator. If the

value put in the left hand side is less than


the value put in the right hand side, this
block will evaluate the statement as true,
otherwise it will be false.
Session 6: Exploring the mBlock Working Environment

 This block returns the value of the ultrasonic

sensor in centimeters. Possible values are


between 3 and 400. For this block to work, the
right port must be selected.
Session 6: Exploring the mBlock Working Environment

This block returns the value of the light

sensor. Possible values are between 0


and 1023, with 0 being dark and 1023
being light.
Session 6: Exploring the mBlock Working Environment

If the condition in the top line of the

block is true, the code inside this block


will be executed. Otherwise, it won’t.
Session 6: Exploring the mBlock Working Environment

This block returns a random number

between the numbers entered.


Session 6: Exploring mBlock Working Environment

This block will return true if what is in

the left AND what is in the right both


return true.
Session 6: Exploring the mBlock Working Environment

 This block returns the value of the line

follower sensor as follows: 0 – no light


reflected, 1 – light reflected from the right
side, 2- light reflected from the left side, 3 –
light reflected from both sides. Make sure that
the right port is selected.
Session 6: Exploring the mBlock Working Environment

This block returns true or false. The

correct port must be selected, as well as


the side of the sensor concerned, and
black or white is being tested for.
Session 6: Exploring the mBlock Working Environment

This button creates a variable.


Session 6: Exploring the mBlock Working Environment

This block returns the value of the

variable.
Session 6: Exploring the mBlock Working Environment

This block sets the variable selected to

the value set on the right.


Session 6: Exploring the mBlock Working Environment

This block changes the variable selected

by the amount noted on the right.


Session 6: Exploring the mBlock Working Environment

 This block resets the on-board timer to 0,

after which the timer immediately starts


counting.
Session 6: Exploring the mBlock Working Environment

This block returns the value of the timer

in seconds.
Session 6: Exploring the mBlock Working Environment

This is a Boolean block that has

“pressed” or “released” as its options.


Session 6: Exploring the mBlock Working Environment

 This block can only be used from the mBlock

environment. The code below this block will run


when the on-board button is either pressed or
released, depending on what is selected.
Session 6: Exploring the mBlock Working Environment

This creates a block (function).


Session 6: Exploring the mBlock Working Environment

This block calls a function, with the

option of passing parameters.


Session 6: Exploring the mBlock Working Environment

This is the header block for a block

(function). The code attached to this


header block will run when the function
is called.
Session 6: Exploring the mBlock Working Environment

This block returns the value of the


parameter.
Session 6: Exploring the mBlock Working Environment

This block sends a message out via


infrared.
Session 6: Exploring mBlock Working Environment

This block returns any message the mBot

has received via infrared.


Session 6: Exploring the mBlock Working Environment

This block is used to verify whether the

mBot has received data via serial


communicator.
Session 6: Exploring the mBlock Working Environment

This block is used to check if two strings

are equal. It is usually used to check if a


line read from a serial communicator
matches a certain string.
Session 6: Exploring the mBlock Working Environment

This block returns a line read from a

serial communicator.
Session 6: Exploring the mBlock Working Environment

This block sends a line through a serial

communicator.
Session 6: Exploring the mBlock Working Environment

Practice Exercise:
Match each box to its proper group.
1. a. Robot
2. b. Data and Blocks
3. c. control
4. d. looks
5. e. operator
NAVIGATING AUTONOMOUSLY
MODULE 1 LESSON 5 (SESSION 7)
Session 7: Navigating Autonomously
Target outcomes:
At the end of this session, the students will
be able to:
Become familiar with the DC motor
component of the mBot
Recognize the “Run” command block in
mBlock
Upload programs into the mBot using the
“Upload to Arduino” feature of mBlock
Session 7: Navigating Autonomously

Unlocking Activity:
1. Two volunteers will stand in front.
2. One will run and the other will walk.
3. Observe.
Session 7: Navigating Autonomously

WHAT IS A DC MOTOR?

 DC Motors are electric

motors turn electricity into


motion through the use of
electromagnetic induction.
Session 7: Navigating Autonomously
Session 7: Navigating Autonomously

DC MOTOR IN THE MBOT

 The mBot has two DC motors that are

connected to the pins M1 and M2. M1 is for the


left motor while M2 for the right motor. The
figure below shows how the two DC motors are
connected to the mBot.
Session 7: Navigating Autonomously
Session 7: Navigating Autonomously

MBLOCK “RUN” AND “SET MOTOR”


BLOCK COMMAND

To program the movement of the mBot’s

DC motors, the “run” and “set motor”


block commands will be used.
Session 7: Navigating Autonomously

Motor Speed
parameter parameter
Session 7: Navigating Autonomously

This is the motor


The speed
direction parameter. parameter
Session 7: Navigating Autonomously
 Setting the motor speed to zero will memake

the mBot stop, since no power will be supplied


to the DC motor. Positive speed or power
value means that the motor will turn in a
clockwise direction, moving the mBot forward,
with the higher the power value giving higher
torque. A negative power value turns the DC
motor’s shaft counterclockwise.
Session 7: Navigating Autonomously

Fig. 4

Fig. 5
Session 7: Navigating Autonomously

HOW TO UPLOAD AND STORE COMMANDS


AND PROGRAMS IN THE MBOT
Create the code as shown below:

Right click the mBot


Program Block and
select the “Upload to
Arduino” option.
Session 7: Navigating Autonomously

Click
“Upload to
Arduino”
Session 7: Navigating Autonomously
Session 7: Navigating Autonomously
Practice Exercise:
Using the “set motor” block command in mBlock. explore how to
create the “turning” commands to left and right. Create the program
that will allow the mBot to move in sequence according to the table
below:
Movement Duration Speed
Forward(M1,M2) 5 seconds 100
Turn left(M1,M2) 2 seconds
Forward(M1,M2) 5 seconds 100
Turn left(M1,M2) 2 seconds
Forward(M1,M2) 5 seconds 100
HAVING MBOT EXECUTE PROGRAMS
UPLOADED FROM MBLOCK
MODULE 1 LESSON 5 (SESSION 8)
Session 8: Having Mbot Execute Programs Uploaded from mBlock

Target Outcomes:
At the end of this session, the students will be
able to:

Use mBlock and its commands to

program an mBot to move in a given


path.
Session 8: Having Mbot Execute Programs Uploaded from mBlock

Unlocking Activity:
“Follow the Leader”

1. Form a group of 5. Each group should assign a leader.


Each group will form a line with their leaders lining in
front.
2. The teacher will give the command to the leader. The
leader will then serves as the source of command and
will pass the task on to each of his members.
Session 8: Having Mbot Execute Programs Uploaded from mBlock

3. The last member in the line will act out, to the


teacher, the command which he received.

4. The first group to get 3 points will be the winner.


Session 8: Having Mbot Execute Programs Uploaded from mBlock

HOW TO UPLOAD AND STORE


COMMANDS/PROGRAMS IN THE MBOT

Create the
blocks
shown.
Session 8: Having Mbot Execute Programs Uploaded from mBlock

 Right click the mBot Program Block and select the

“Upload to Arduino” option.


Session 8: Having Mbot Execute Programs Uploaded from mBlock
Session 8: Having Mbot Execute Programs Uploaded from mBlock

Practice Exercise:
 Having the mBot turn using the existing

program can be quite difficult. Modify the


program so that the mBot will follow a
square path. Upload and debug the
program until the required goal is
achieved.
Session 8: Having Mbot Execute Programs Uploaded from mBlock

Using the program from the exercise,

program the mBot to follow the “M” and


“S” paths provided by the teacher.

Follow the Assessment rubric on the

handouts.
ASSEMBLING THE DANCING CAT
MODULE 2 LESSON 6 (SESSION 9)
Session 9: Assembling the Dancing Cat

Target outcomes:
Identify the Servo Motor and how it
works
Follow the instructions on how to
assemble the Servo Add-on Pack onto
the mBot
Session 9: Assembling the Dancing Cat

Unlocking Activity:
Session 9: Assembling the Dancing Cat

WHAT IS AN ACTUATOR?

 Actuators are components of a

machine that can move or


control a part of a system. They
are “movers.”
Session 9: Assembling the Dancing Cat
WHAT IS A SERVOMOTOR?

A servomotor is a special

type of motor that is


designed for precise
motion. A typical
servomotor has a limited
range of motion.
Session 9: Assembling the Dancing Cat

Servomotors are useful when precise

movements are needed, such as


sweeping an area with a sensor to look
for a target or move the control surfaces
on a remotely controlled airplane.
Session 9: Assembling the Dancing Cat

 The main reason a servomotor is used is when angular

precision is needed, i.e. the motor will only rotate as


much as desired and then stop and wait for next signal
to take further action.
 The servomotor does not operate like a regular DC

motor, which starts rotating when power is applied to


it, then stops rotating when the power is switched off.
Session 9: Assembling the Dancing Cat

SERVOMOTOR
APPLICATIONS
Session 9: Assembling the Dancing Cat

ROBOTICS
 Servomotors are used in a large number of

applications where position control is critical.


A DC motor cannot be used for the tail
controls of aircraft because accurate
positioning with a DC motor is impossible.
Session 9: Assembling the Dancing Cat
Session 9: Assembling the Dancing Cat

 
INDUSTRIAL MANUFACTURING

Conveyors are used in industrial


manufacturing and assembly units to
pass an object from one assembly
station to another.
Session 9: Assembling the Dancing Cat
Session 9: Assembling the Dancing Cat

Servomotors in Robotic Vehicles

The robotic vehicles which are used


today for highly complex military as well
as industrial applications use
servomotors to power and control their
wheels.
Session 9: Assembling the Dancing Cat

HOW DOES THE SERVOMOTOR WORK?

The simplicity of a servomotor is what makes these so


reliable. The heart of a servomotor is a small direct
current (DC) motor, similar to what might be found in
an inexpensive toy. These motors run on electricity
and spin at high RPM (rotations per minute) but put
out very low torque (a twisting force used to do work
— you apply torque when you open a jar).
Session 9: Assembling the Dancing Cat

 Unlike a simple DC motor, the spinning speed of a

servomotor's shaft is greatly slowed down by gears.

 A positional sensor on the final gear of a servomotor is

connected to a small circuit board. The sensor tells


the circuit board how far the servomotor shaft has
rotated.
Session 9: Assembling the Dancing Cat

THE MAKEBLOCK MBOT SERVO ADD-ON


PACK

The mBot servo pack is a 3-in-1 pack. The "Dancing


Cat," "Head-Shaking Cat" and "Light-Emitting Cat" can
be constructed using an mBot and the components in
the pack.
Session 9: Assembling the Dancing Cat

Parts
Session 9: Assembling the Dancing Cat
Session 9: Assembling the Dancing Cat
Session 5: Assembling the Dancing Cat
Session 9: Assembling the Dancing Cat
Practice Exercise:
Course Teacher:
Robotics Team/Students: Rating Scale: 1-5 (5 as the
highest)

Activity Thinking Relating to Understanding Managing Participating


others Text/symbols/lang self and
uage contributing
Constructing Assem /5 Supporti /5 Reading and /5 Responsibili /5 Problem /5
the mBot bly of ng peers understandin ty for solving
Dancing Cat mBot who g instruction designated mBot
25/25 have manuals with mBot challenges
difficulty mBot (back,
assembl diagrams forward,
ing around
mBot objects)

Total
ASSEMBLING THE MAKEBLOCK MBOT:
SERVO MOTOR PROGRAMMING USING MBLOCK
MODULE 2 LESSON 6 (SESSION 10)
Session 10: Servomotor Programming using mBlock

Target outcomes:
At the end of the session, the students will be
able to:
Identify the mBlock servo command
block
Program the mBot Dancing Cat using the
servo command block
Exhibit proficiency in the use of the
servo command block
Session 10: Servomotor Programming using mBlock

Unlocking Activity

1. Call a volunteer to share their experience when


assembling the Dancing Cat.
2. Ask them what they think are the other things the cat
can do.
3. If you could create another program for the dancing
cat, what else would you want it to do?
Session 10: Servomotor Programming using mBlock

Connecting Servomotor/s
Use an RJ25 Adapter to connect the
servomotor to the mCore (as shown
below).
Session 10: Servomotor Programming using mBlock

Figure 1. mBlock Working Environment


Session 10: Servomotor Programming using mBlock

Figure 2. mBlock mBot command block for controlling


servo motor
Session 10: Servo Motor Programming using mBlock

Slot Angle
Port parameter
parameter parameter
Session 10: Servomotor Programming using mBlock

CALIBRATING THE SERVOMOTOR USING


MBLOCK

1. Remove the servo pan (white) as well as the


cuttable linkage from the servomotor.
2. Connect the mBlock software to the mBot.
Upgrade firmware for the mBot first. Then,
run the following program to set the servo
angle to 0 degrees.
Session 10: Servomotor Programming using mBlock
Session 10: Servomotor Programming using mBlock

3. Attach the servo pan to servomotor. The


servo pan should be level with the servomotor.
Session 10: Servomotor Programming using mBlock

4. Attach the cuttable linkage. After the


calibration, please check if the servomotor
works by testing with the following program.
Session 10: Servomotor Programming using mBlock

Practical Activity

Create the mBlock diagram as shown


and test the output by pressing the flag
button from the mBlock.
Session 10: Servomotor Programming using mBlock
Session 10: Servomotor Programming using mBlock

Practice Exercise/Assessment
“Flag Waver”

Modify the program from the previous


activity to make the servomotor move left
and right, forward from its original position
and then back to its original position.
PROBLEM SOLVING USING AN
AUTONOMOUS ROBOT
MODULE 2 LESSON 7 (SESSION 11)
Session 11: Problem Solving Using an Autonomous Robot

Target outcomes:
At the end of the session, the students will
be able to:

Demonstrate good problem solving


skills in mBot programming
Exhibit proficiency on the use
movement commands in mBlock
Session 11: Problem Solving Using an Autonomous Robot

CULMINATING ACTIVITY

Using the knowledge and skills previously


learned in mBlock programming, specifically
with motion, control and event commands,
program the mBot according to the following
specifications:
Session 11: Problem Solving Using an Autonomous Robot

mBot Programming Challenge # 1

1. Have the mBot move forward for three


seconds, then stop.
2. Once stopped, have the mBot flash its
light Green, then red and then blue, four
times in sequence.
Session 11: Problem Solving Using an Autonomous Robot

3. Once the lights are done flashing, have


the mBot beep its horn three times, with a
½ second pause between each beep.

4. Once done, have the mBot back up (no


turn around needed) to where it started.
Session 11: Problem Solving Using an Autonomous Robot

Extensions:
 Have the mBot’s light flash in a repeating green, red

and blue pattern while it moves forwards.

 For step #4, have the mBot turn around 180 degrees

and then go forwards back to its starting point.

 Have the mBot beep once it is back at its starting

point.
Session 11: Problem Solving with Autonomous Robot

ASSESSMENT OF THE OUTPUT


Use rubrics for assessment
performance and output
(handouts).
PROBLEM SOLVING USING AN
AUTONOMOUS ROBOT
MODULE 2 LESSON 7 (SESSION 12)
Session 12: Problem Solving Using an Autonomous Robot

TARGET OUTCOMES:
At the end of the session, the students
will be able to:

Demonstrate good problem solving skills

in mBot programming
Exhibit proficiency in the use of

movement commands in mBlock


Session 12: Problem Solving Using an Autonomous Robot

CULMINATING ACTIVITY 

Using the knowledge and skills learned in mBlock


programming, specifically with motion, control
and event commands, program the mBot
according to the following specifications:
Session 12: Problem Solving Using an Autonomous Robot

mBot Programming Challenge # 2


Create an mBot program that will do the following.

1. Pressing on the space key stops everything from


running (lights, sounds and wheels).
2. Pressing on the right arrow key turns the mBot
right.
3. Pressing on the left arrow key turns the mBot left.
4. Pressing the up arrow key moves the mBot forward.
Session 12: Problem Solving Using an Autonomous Robot
5. Pressing the down arrow key moves the
mBot backwards.
6. Pressing the W key makes the mBot
beep.
7. Pressing the S key makes the mBot
flash a green light 8 times.
8. Pressing the Q key makes the mBot
alternately flash a red light, then a
blue light, three times.
PROBLEM SOLVING USING AN
AUTONOMOUS ROBOT
MODULE 2 LESSON 7 (SESSION 13)
Session 13: Problem Solving Using an Autonomous Robot

TARGET OUTCOMES
At the end of the session, the students
will be able to:

Demonstrate good problem solving


skills in mBot programming
Exhibit proficiency in using
movement commands in mBlock
Session 13: Problem Solving Using an Autonomous Robot

CULMINATING ACTIVITY

Using the knowledge and skills learned in


mBlock programming, specifically with motion,
control and event commands, program the mBot
according to the following specifications:
Session 13: Problem Solving Using an Autonomous Robot

mBot Programming Challenge # 3


Drawing Challenge
Attach a pen to the mBot and create a
program to solve the following
challenge.
Session 13: Problem Solving Using an Autonomous Robot
“Drawing Challenge”

Draw different regular shapes using the mBot. Use the


move and/or set servo block to turn the mBot (tank-turn
style) and then to move the mBot in the direction that it
is facing. You will need to do some calibration of “how
long” a turn of (for example) 90 degrees takes. Use a
“wait” block to make sure the mBot completes its turn
before moving on.
Session 13: Problem Solving Using an Autonomous Robot

Shape Mission Complete?

Yes No
Square

Equilateral Triangle

Regular Pentagon

Regular Hexagon
PROBLEM SOLVING USING AN
AUTONOMOUS ROBOT
MODULE 2 LESSON 7 (SESSION 14)
Session 14: Problem Solving Using an Autonomous Robot

Target outcomes:
At the end of the session, the students will be
able to:

Demonstrate good problem solving skills

in mBot programming
Exhibit proficiency when using

movement commands in mBlock


Session 14: Problem Solving Using an Autonomous Robot

CULMINATING ACTIVITY

Using the knowledge and skills learned in


mBlock programming, specifically with motion,
control and event commands, program the mBot
according to the following specifications:
Session 14: Problem Solving Using an Autonomous Robot
Session 14: Problem Solving Using an Autonomous Robot

“Maze challenge”

Use the custom blocks (left, right, up,


down) in the correct order and duration
so the mBot robot gets to the cheese
without bumping into walls.
MOBILE CODING
MODULE 3 LESSON 8 (SESSION 15-16)
Session 15-16: Mobile Coding

Target outcomes:
At the end of the session, the students will be
able to:
 Install the MakeBlock App from Google
Playstore
 Setup the mBot to connect with the
Makeblock app
 Exhibit proficiency in setting up the
Makeblock app
Session 15-16: Mobile Coding

Unlocking Activity:
1. Have you tried installing app from
Google Playstore?

2. What are the apps you have tried?


Can you share some?
Session 15-16: Mobile Coding

Makeblock app is a robot control

software in smart devices.

Everyone can control an mBot using

official controller in the software, or


create and program a specific controller
to achieve better robotic functionality.
Session 15-16: Mobile Coding
Open the Google Playstore App from the
tablet. Make sure that the tablet is
internet connected.
Session 15-16: Mobile Coding

Search
Makeblock
through the
search box in
Google
Playstore
Session 15-16: Mobile Coding

Click Install
Session 15-16: Mobile Coding

Click
Accept
Session 15-16: Mobile Coding

Wait for
the
download
to finish
Session 15-16: Mobile Coding

Click
“Open” to
launch the
app

Click
Select to
choose the
mBot
Platform
Session 15-16: Mobile Coding
• Click on the MakeBlock Application in the tablet.
Session 15-16: Mobile Coding

Click this
to Select
the mBot
as the
Makeblock
platform
Session 15-16: Mobile Coding

Click mBot
and click
the X
button
Session 15-16: Mobile Coding

Pair the
tablet with
the mBot.
Click the
Bluetooth
icon
Session 15-16: Mobile Coding

Click Allow
Session 15-16: Mobile Coding

Wait for
connection
Session 15-16: Mobile Coding

If successfully
connected,
this will show
up.
Session 15-16: Mobile Coding

If the
connection
doesn’t
work, click
this icon to
manually
select the
mBot to be
connected
with
Session 15-16: Mobile Coding
The Bluetooth icon
will change from red
to white if the mBot
has been
successfully paired
with the MakeBlock
App.

Next, click on the


“Play” icon.
Session 15-16: Mobile Coding

Practice Exercise:
Enumerate and explain the steps needed
to connect the mBot to Makeblock app.
SOCCERBOT- BASIC
MODULE 3 LESSON 8 (SESSION 17)
Session 17: Soccerbot- Basic

TARGET OUTCOMES:
At the end of the session, the students will be
able to:
Follow accurately the steps needed to
assemble the mBot kit.
Create a soccerbot using the mBot kit
Session 17: Soccerbot- Basic

“Soccerbot”
For this session, an mBot soccerbot will be assembled.
 First, set up your workplace. Make sure that your

materials are well-organized.


 Follow the procedure for building a soccerbot on the

picture concerned.
 After building the soccerbot, proceed to the playfield

prepared by your teacher.


Session 17: Soccerbot- Basic

Rules:

1. A match lasts 10 minutes.

2. The aim of the game is to score a goal heading the


ball into the opponent team’s goal.

3. The team with the highest score posted within the

allotted time will be the winner.


SOCCERBOT- WITH SERVOMOTOR
MODULE 3 LESSON 8 (SESSION 18)
Session 18: Soccerbot - with servomotor

TARGET OUTCOMES:
At the end of the session, the students will be
able to:
Follow accurately the steps needed to
assemble the mBot kit
Create a soccerbot using the mBot kit
with servo motor
Session 18: Soccerbot - with servomotor

“Soccerbot- with servomotor”


For this session, an mBot soccerbot with servomotor will
be created.
 For this session, a soccerbot with a servomotor will be

assembled using an mBot kit.


 Follow the procedure for building a soccerbot with

servo motor as shown in the picture.


 After building ytheour soccerbot, proceed to the

playfield prepared by your teacher.


Session 18: Soccerbot - with servomotor

Rules:
1. A match lasts 10 minutes.
2. The aim of the game is to score a goal by kicking the
ball into the opponent team’s goal.
3. The team which posts the highest score within the
allotted time will be the winner.
LIGHT EMITTING CAT ASSEMBLY
MODULE 4 LESSON 9 (SESSION 19)
Session 19: Light Emitting Cat Assembly

Target outcomes:
Identify the parts need to assemble the
light emitting cat
Follow accurately the instructions to
assemble the light emitting cat
Upload the program for the light
emitting cat
Session 19: Light Emitting Cat Assembly

Unlocking Activity:

Have you seen a cat? What does the cat looks


like? How does it move?

Today, our task is to make a robot that looks


like a cat.
Let’s see what the Light-Emitting Cat can do.
Session 19: Light Emitting Cat Assembly
Session 19: Light Emitting Cat Assembly
Session 19: Light Emitting Cat Assembly
Session 19: Light Emitting Cat Assembly
Session 19: Light Emitting Cat Assembly
Session 19: Light Emitting Cat Assembly
Session 19: Light Emitting Cat Assembly
RGB LED: MCORE ONBOARD
MODULE 4 LESSON 9 (SESSION 20)
Session 20: RGB LED “mCore onBoard”

TARGET OUTCOMES:

Recognize the RGB color system


Set the LED colors onboard the mBot

system using mBlock


Exhibit proficiency in the use of the set

led color onboard command block


Session 20: RGB LED “mCore onBoard”

Unlocking Activity:

What are the primary colors in pigments?


What are the primary colors of light?
Why are the primary colors of light

different from the primary colors of


pigments?
Session 20: RGB LED “mCore onBoard”

What is the RGB color model?


 The RGB color model is an additive color

model in which red, green and blue light are


added together in various ways to produce a
wide array of colors.
 The name of the model comes from the initials

of the three additive primary colors: red,


green and blue.
Session 20: RGB LED “mCore onBoard”
Session 20: RGB LED “mCore onBoard”

PRACTICE EXERCISE AND ASSESSMENT


Go to the website
https://www.w3schools.com/colors/col
ors_rgb.asp
and try the
RGB Color Mixer Simulation.
Copy the color by screen clipping, the
output of which will be produced by the
following rgb color numbers/data. Fill
out the table below.
Session 20: RGB LED “mCore onBoard”
Color RGB Value
1. 255,0,0
2. 0,255,0

3. 0,0,255
4. 255,255,0
5. 255,150,0
6. 255,0,255
7. 0,255,255
8. 137, 0,255
9. 137,255,0
10. 255,179,0
SERVOMOTOR PROGRAMMING USING
MAKEBLOCK APP WITH RGB LED
MODULE 4 LESSON 9 (SESSION 21)
Session 21: Servomotor Programming using MakeBlock App with RGB LED

Target Outcomes:

Recognize the onboard RGB LED


Recognize the mBlock command for
RGB LED programming
Use the mBlock command for RGB
LED programming correctly
Unlocking Activity:

Call volunteers from the class to recall


what they have done in their previous
lesson.

Ask how to produce specific colors if you


are given a set of values.
Session 21: Servomotor Programming using MakeBlock App with RGB LED
MBLOCK RGB LED
The mBot/mCore has an onboard RGB
LED and/or RGB LED module that can be
used or programmed.

Figure 1. Onboard RGB LED of mBot


Session 21: Servomotor Programming using MakeBlock App with RGB LED

MBLOCK RGB LED PROGRAMMING


mBlock has a block to program the

lighting of the RGB LEDs of the onboard


and the RGB LED module.

mCore Onboard RGB LEDs are located on

the left and right of the mCore.


Session 21: Servomotor Programming using MakeBlock App with RGB LED

These parameters allows you to set the


This parameter
RGB values of the onboard LEDs.
allows you to specify
Allowable values are from 0 to 255.
which led we are
programming.
Available options
are: left, right and
all.
Session 21: Servomotor Programming using MakeBlock App with RGB LED

Figure 2. RGB LED Module for


mBot
The RGB LED module
needs to be attached to
the RJ25 shield. Take
note of the port number
where the RGB LED
module was plugged in.
Session 21: Servomotor Programming using MakeBlock App with RGB LED

The RGB LED module command block


Session 21: Servomotor Programming using MakeBlock App with RGB LED

Activity:
MBLOCK ONBOARD RGB LED
PROGRAMMING
Run the program shown below

and observe the output.


Session 21: Servomotor Programming using MakeBlock App with RGB LED
Session 21: Servomotor Programming using MakeBlock App with RGB LED
For the RGB LED module, test the code shown below.
Session 21: Servomotor Programming using MakeBlock App with RGB LED
Practice Exercise:
Produce the code/blocks for the onboard RGB LED given the
following requirements.
I. Onboard RGB LED

Scenario RGB LED


LEFT RIGHT  
Blue for 1 second Red for 1 second  
Red for 1 second Green for 1 second  
Red for 2 seconds Red for 2 seconds  
White for 2 seconds White for 2 seconds  
Black/off for 5 seconds Black/off for 5 seconds  
Session 21: Servomotor Programming using MakeBlock App with RGB LED

II. RGB LED Module


Produce the code/blocks for the onboard RGB LED
given the following requirements.
Scenario RGB LED
1 2 3 4
Blue for 1 Red for 1 second Green 1 Red 1 second
second second
Red for 1 Green for 1 Blue 1 second Green 1
second second second
Red for 2 Red for 2 Red 2 seconds Red 2 seconds
seconds seconds
White for 2 White for 2 White 2 White 2
seconds seconds seconds seconds
Black/off for 5 Black/off for 5 Black/off for Black/off for
seconds seconds 5 seconds 5 seconds
RGB LED COLOR AND LIGHT MIXING
MODULE 4 LESSON 9 (SESSION 22)
Session 22: RGB LED Color and Light Mixing

TARGET OUTCOMES:

Understand the principles of color and


light mixing
Program color and light mixing of
onboard and module RGB LEDs
Exhibit proficiency on the use of the
RGB LED block in mBlock
Unlocking Activity:

“Think- Pair- Share”

Let the student think of a plan to mix


color using RGB LED program.
Pair them with another student and share
their ideas together to assess if it is
possible to be done.
Session 22: RGB LED Color and Light Mixing

Knowledge points

 Point 1: Principles of color and light mixing


The color of the onboard LED is based on
the three original color mode (RGB color model, or the
RGB color model, or the red, green and blue color model).
It is a color-adding model, which creates diversified color
effects by mixing two or three of the aforementioned
colors in different ratios.
Session 22: RGB LED Color and Light Mixing
Session 22: RGB LED Color and Light Mixing

 Point 2: Color and light of the onboard LED

For the color and light values of the


onboard LED, refer to RGB color map.
Session 22: RGB LED Color and Light Mixing

In addition to the color plan in this

program, refer to the RGB color table to


set the onboard LED color.
Session 22: RGB LED Color and Light Mixing

Onboard
RGB R.G.B Block setting
real color Name LED value
value

0 139
  Cyan4 0 14 14
139

30 144
  DodgerBlue 3 14 26
255

SpringGree 0 238
  0 24 12
n2 118

178 34
  Firebrick 18 3 3
34

208 32
  VioletRed 21 3 14
144

176 48
  Maroon 18 5 10
96

DarkGolden 139 101


  14 10 1
rod4 8
Session 22: RGB LED Color and Light Mixing

Practice Exercise:

As the program runs quickly, if there is no waiting


time between when the red and blue lights flash,
the result is like lighting red and blue at the same
time, which creates the color yellow. The
following two blocks cause the LED to light up
yellow when these are executed.
Session 22: RGB LED Color and Light Mixing

Effects  
Script (upload the program
to Arduino)

The onboard
LED
continually
displays
yellow
Session 22: RGB LED Color and Light Mixing

Extended tasks

Use the RGB color table to modify the


proportion of red, green and blue light to
make beautiful lighting effects. The
program needs to be uploaded to Arduino.
ASSEMBLING THE HEAD SHAKING
CAT
MODULE 4 LESSON 10 (SESSION 23)
Session 23: Assembling the Head Shaking Cat

TARGET OUTCOMES:
Recognize the mBlock servo command
block
Program the mBot Head Shaking Cat
using the servo command block
Exhibit proficiency in the use of the
servo command block
Unlocking Activity:

Call 5 volunteers in front of the class.


Let them share and recall their
experience in building the light-
emitting cat.
Let them enumerate the steps in
building the light- emitting cat.
Session 23: Assembling the Head Shaking Cat
Assemble the
“Head Shaking
Cat” by first
disassembling the
“Dancing Cat”
and then
following the
instructions in
the slides.
Session 23: Assembling the Head Shaking Cat
Session 23: Assembling the Head Shaking Cat
Session 23: Assembling the Head Shaking Cat
Session 23: Assembling the Head Shaking Cat
Session 23: Assembling the Head Shaking Cat
Session 23: Assembling the Head Shaking Cat

HEAD SHAKING CAT PROGRAMMING


IN MBLOCK
 
Open the mBlock Programming
Software and upload the given code
(provided) as shown below.
Session 23: Assembling the Head Shaking Cat
Session 23: Assembling the Head Shaking Cat
Session 23: Assembling the Head Shaking Cat

Practice Exercise:

Test the “Head Shaking


Cat.”
SPRINT RACE
MODULE 4 LESSON 10 (SESSION 24)
Session 24: Sprint Race

Target outcomes:

Follow accurately the steps needed to


assemble the mBot kit.
Create an autonomous race car using the
mBot design.
Session 24: Sprint Race

Sprint Race: Assesmbling a Race Car

For this session, a race car will be set up

using an mBot kit and design.


Always check your workplace. Make sure

that your materials are well-organized.


Session 24: Sprint Race
Procedure:
1. The class will be divided into groups of 5.
Using their mBot kit, each group will create
an autonomous race car.

2. Each group will be given 10 minutes to


assemble their race car. This includes the
programming of the robot.
Session 24: Sprint Race

Procedure:

3. Once time is up, the leaders of each


group will be asked to stand on the
starting line and place their robots in
their designated starting areas.
Session 24: Sprint Race

Procedure:

4. The teacher will give the signal to start


the race.

5. The fastest robot to complete the race


wins.

You might also like