Professional Documents
Culture Documents
OUTCOME-BASED EDUCATION
LEARNING QUARTER 4
QUARTER 4
WEEK 7-8
Development Team
In order to benefit much from this module, you should learn about Downloading
Programs from the Computer to the Microcontroller and the Basic Robot Movement.
Explain downloading programs from the computer to the microcontroller and the basic
robot movements.
Learning Objectives:
1. State and explain the different downloading programs from the computer to the
microcontroller.
2. Identify the basic robot movements.
What I Know
Directions: Read each item carefully. Choose only the letter of the correct answer and write
it on a sheet of paper.
What’s In
CROSSWORD PUZZLE
Directions: Look for the words integrated to the Robot Locomotion. Write your answers on a
separate sheet of paper.
W E R T Y U I O P L J N H G V F D C L
D N B V C X Z A S D F G H J J K L O I
R T Y Y U I O P M H J U K T R H E W A
S D F G H H J K L M N B V C C Y X Z W
E R T Y U I O P L K J H G F D B V C S
J H G F D D S A W E R T Y U I R I O N
R T Y U I O N B R A C H I A T I N G M
O I U Y T R E H O P I N G R E D W V E
V G T Y H N W A L K I N G M J U I U I
O N J N K H Y S L I T H E R I N G Y U
N G H J T R S W I M M I N G U I I M N
M E T A C H R O N A L M O T I O N I O
N U I T B F D S G V E W K D F U I N B
Introduction to Microcontroller
In today’s evolving world, technology is not only becoming more and more advanced,
but also more and more common in our everyday lives. The invention of “smart” products is
revolutionizing the design process for nearly every product imaginable. Shoes containing chips
that pair with our phones to keep track of our activity, refrigerators that can track when
groceries expire, and now even cars that are capable of driving themselves are all examples
of modern inventions that use microcontrollers to make our lives easier.
What is It
Selecting A Microcontroller
Programming
Once a suitable IDE is obtained, you can begin writing code. For explanatory purposes,
this guide will show an example of the Arduino IDE in use. Below is an example of a simple
Arduino program that makes an LED blink on and off at a frequency of 1Hz. The code is split
into 4 different sections as follows:
It is a generally accepted practice to start any code with a comment section containing
a general description of what the code/program does. While this section has no effect on the
program’s functionality, it’s always a good to document it for future reference. User
instructions, company and copyright information are also commonly placed here as well.
Thirdly, comes the “Void Setup ()” section. Digital pins on microcontrollers are
commonly used as inputs or outputs, but very rarely can they be both. In this section, the user
defines which pins are inputs or outputs, as well as any other parameters that must be
initialized. While the method of doing so varies for different microcontrollers, almost all of them
require a similar step to configure the microcontrollers internal circuitry to fit the needs of your
design.
Lastly, the “Void Loop ()” section. This section is where the function of your
microcontroller is written. Any actions that require reading or writing values from pins or
computing the values of different variables is done here.
This step is almost always handled by the IDE. Once your code is written, it must be
uploaded to the microcontrollers. Most have USB interfaces, but some smaller
microcontrollers require a special hardware to be programmed. While we typically program
microcontrollers in higher level languages, the microcontroller itself runs on assembly. To
translate code to a format usable by a microcontroller, a compiler must be used. A compiler is
a software tool that takes higher level code and optimizes it for assembly. Assembly provides
specific instructions to the microcontroller on what register operations to perform to match the
operation of the original code.
Once the assembly code is created, it can be uploaded to the microcontroller for
testing.
Debugging
Not everything will work perfectly on your first attempt. Debugging is an important part
of any design process and programming microcontrollers is no exception. Fortunately, there
are several methods to help you locate errors in your code without excessive effort.
The first most basic method is to hook up your microcontroller to the circuit it is made
to control. Often enough you can see what is wrong simply by observing the output and how
it differs from the intended functionality. This is called black box testing. While this method is
simple and does not require any additional tools, it is also very limited, as no knowledge of the
inner workings of the microcontroller is available. As mentioned previously, most IDE’s contain
debuggers that are able to run the code step by step at the users control while keeping track
of variable and register values so the user can learn exactly what point the program behaves
differently than as intended. This is a form of white box testing and provides much more
information that can be used to deduce the cause of a faulty program.
Wheeled robots are typically quite energy efficient and simple to control. However,
other forms of locomotion may be more appropriate for a number of reasons, for example
traversing rough terrain, as well as moving and interacting in human environments.
Furthermore, studying bipedal and insect-like robots may beneficially impact on biomechanics.
A major goal in this field is in developing capabilities for robots to autonomously decide
how, when, and where to move. However, coordinating numerous robot joints for even simple
matters, like negotiating stairs, is difficult. Autonomous robot locomotion is a major
technological obstacle for many areas of robotics, such as humanoids (like Honda's Asimo).
Types of Locomotion
1. Walking
Walking robots simulate human or animal gait, as a replacement for wheeled motion.
Legged motion makes it possible to negotiate uneven surfaces, steps, and other areas that
would be difficult for a wheeled robot to reach, as well as causes less damage to
environmental terrain as wheeled robots, which would erode it.
Hexapod robots are based on insect locomotion, most popularly
the cockroach and stick insect, whose neurological and sensory output is less complex than
other animals. Multiple legs allow several different gaits, even if a leg is damaged, making
their movements more useful in robots transporting objects. Examples of advanced running
robots include ASIMO, BigDog, HUBO 2, RunBot, and Toyota Partner Robot.
2. Rolling
In terms of energy efficiency on flat surfaces, wheeled robots are the most efficient.
This is because an ideal rolling (but not slipping) wheel loses no energy. A wheel rolling at a
given velocity needs no input to maintain its motion. This is in contrast to legged robots which
suffer an impact with the ground at heel strike and lose energy as a result.
For simplicity most mobile robots have four wheels or a number of continuous tracks.
Some researchers have tried to create more complex wheeled robots with only one or two
wheels. These can have certain advantages such as greater efficiency and reduced parts, as
well as allowing a robot to navigate in confined places that a four-wheeled robot would not be
able to.
Examples: Boe-Bot. Cosmobot, Elmer, Elsie, Hero, IRobot Create, Irobot’s Roomba,
Johns Hopkins Beast, Land Walker, Modulus robt, Musa, Omnibot, PaPeRo, Phobot,
3. Hopping
Several robots, built in the 1980s by Marc Raibert at the MIT Leg Laboratory,
successfully demonstrated very dynamic walking. Initially, a robot with only one leg, and a very
small foot, could stay upright simply by hopping. The movement is the same as that of a person
on a pogo stick. As the robot falls to one side, it would jump slightly in that direction, in order
to catch itself. Soon, the algorithm was generalized to two and four legs. A bipedal robot was
demonstrated running and even performing somersaults. A quadruped was also
demonstrated which could trot, run, pace, and bound.
Examples:
• The MIT cheetah cub is an electrically powered quadruped robot with passive compliant
legs capable of self-stabilizing in large range of speeds.
• The Tekken II is a small quadruped designed to walk on irregular terrains adaptively.
4. Metachronal motion
Coordinated, sequential mechanical action having the appearance of a traveling wave
is called a metachronal rhythm or wave, and is employed in nature by ciliates for transport,
and by worms and arthropods for locomotion.
5. Slithering
Several snake robots have been successfully developed. Mimicking the way real
snakes move, these robots can navigate very confined spaces, meaning they may one day
be used to search for people trapped in collapsed buildings. The Japanese ACM-R5 snake
robot can even navigate both on land and in water.
Examples: Snake-arm robot, Roboboa, and Snakebot.
6. Swimming
An autonomous underwater vehicle (AUV) is a robot that travels underwater without
requiring input from an operator. AUVs constitute part of a larger group of undersea systems
known as unmanned underwater vehicles, a classification that includes non-
autonomous remotely operated underwater vehicles (ROVs) – controlled and powered from
the surface by an operator/pilot via an umbilical or using remote control. In military applications
an AUV is more often referred to as an unmanned undersea vehicle (UUV). Underwater
gliders are a subclass of AUVs.
7. Brachiating
Brachiation allows robots to travel by swinging, using energy only to grab and release
surfaces. This motion is similar to an ape swinging from tree to tree. The two types of
brachiation can be compared to bipedal walking motions (continuous contact) or running
(richochetal). Continuous contact is when a hand/grasping mechanism is always attached to
the surface being crossed; richochetal employs a phase of aerial "flight" from one surface/limb
to the next.
What’s More
Jumbled Words
Directions: Arrange the jumbled words to come up with the terms discussed in this lesson.
1. INFKWAL 6. MINGMIWS
2. GLINROL 7. CHIABRATING
3. NIPHOPG 8. BYRHID
4. NALORHCATEM NOTIOM 9. COLOTIONMO
5. HESLITRING 10. CHORICHETAL
Microcontrollers are everywhere, serving as the invisible computers in our age of digital
electronics and working tirelessly behind the scenes in all areas of our life. Can you count all
of the devices in your immediate surroundings that you rely on that might have a
microcontroller inside? You might be surprised at what you find. These computers have
opened a world of possibilities for new interactions and intelligence in otherwise common and
everyday objects like washing machines, remote controls, power tools, toys, and a whole lot
more. Without microcontrollers, the world we know today would never be possible.
Explain downloading programs from the computer to the microcontroller and the
basic robot movements.
Learning Objectives:
1. State and explain the different downloading programs from the computer to the
microcontroller.
2. Identify the basic robot movements.
GENERAL DIRECTIONS:
The following test has been answered for you. Your job is to check the answers for
errors. If there are errors do the following in the table below the test sample:
Questions Answers
Sample: What is the collective name for the Robot Psychomotor is the collective
various methods that robots use name for the various methods that robots use
to transport themselves from place to place? to transport themselves from place to place.
10. What robot can both slither like a snake 10. Snakebot can both slither like a snake and
and walk like a biped robot? walk like a biped robot.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Assessment
Directions: Read each item carefully. Choose only the letter of the correct answer and write
it on a sheet of paper. Do not write anything in this module.
1. It is based on insect locomotion, most popularly the cockroach and stick insect, whose
neurological and sensory output is less complex than other animals.
A. Hexapod Robot C. Quadpod Robot
B. Octapod Robot D. Tripod Robot
2. It is a programmable IC, capable of multiple functions depending on how it is programed.
A. Mica Controller C. Milli Controller
B. Microcontroller D. Mini Controller
3. It allows robots to travel by swinging, using energy only to grab and release surfaces.
A. brachiation C. mimicking
B. slithering D. walking
4. It is a software tool that takes higher level code and optimizes it for assembly. .
A. compiler C. programmer
B. downloader D. uploader
5. It is a motion that is similar to an ape swinging from tree to tree.
A. brachiating C. slithering
B. mimicking D. walking
Wolfram Language & System Documentation Center. (2021). Uploading programs to the
microcontroller. Retrieved from
https://reference.wolfram.com/language/MicrocontrollerKit/tutorial/UploadingProgram
s.html