Electronics Module G10 Q4 Week 3 4 PDF
Electronics Module G10 Q4 Week 3 4 PDF
OUTCOME-BASED EDUCATION
GRADE
Science, Technology and Engineering (STE) Program
ELECTRONICS 10
QUARTER 4
LEARNING
MODULE WEEK 3-4
QUARTER 4
WEEK 3 - 4
Development Team
Flenie A. Galicinao
Learning Objectives:
1. Enumerate the basic parts of a basic Arduino robot and mention their functions.
2. Build a simple robot project using standard Arduino.
What I Know
Directions: Read each statement carefully. Choose the letter of the correct answer.
1. It is capable of being programmed to sense and control objects in the physical world.
A. Microcontroller C. Mini-controller
B. Millie-controller D. Mono-controller
4. It sets things up that have to be done once and then don’t happen again.
A. void enter() C. void loop()
B. void exit() D. void setup()
5. It contains the instructions that get repeated over and over until the board is turned off.
A. void enter() C. void loop()
B. void exit() D. void setup()
CROSSWORD PUZZLE
Directions: Look for the words related to the Arduino IDE Interface used in robot construction.
Write your answers on a separate sheet of paper.
Q W R T E X T C O N S O L E U I L J
C V B N M I O Y T R K E W Q A Z G M
H J K L N U I O R B E N T E W B G I
S E R I A L M O N I T O R I U I N T
G B V T Y U I O N B C O D E A R E A
R F G H J Y T R H E H B G J N M Y U
I H J K H G V B G T N T F K I O L N
O P I N T M E N U B A R B G N H J Y
B H G H Y E R R P E M N F N B F G E
M N U I O S I Y L G E M N H V E R Y
O U H J J S F U O L I O N M J K L O
M N B J U A Y S A V E S K E T C H K
K M I O L G B N D N J O I L K Y N H
U Y M B L E U N B J K Y B N G T U I
P O I N T A T R U E B E W T D U I P
N G M K Y R T B T M N U I O P N R T
O I P T G E O M T J H G T R D E W R
B N V C J A N N O M I O P Y T N U I
O P U T N G T H N E W S K E T C H I
L I O M Y T R G N B N I O G H T H W
What’s New
There are only three basic units of a robot: the Input, the Processing and the Output.
Same as a computer, right? The processing unit is the main part of a robot. In the world of
robotics this processing unit is known as the microcontroller. The microcontrollers are
programmed and it works as directed. There are many types of microcontrollers like
Arduino, PIC, and AVR etc. As you are a newbie in robotics, I would highly recommend
you to learn Arduino. Arduino is the easiest microcontroller which is the perfect one for
learning.
What is It
Arduino was introduced back in 2005 in Italy by Massimo Banzi as a way for none
engineers to have access to a low cost, simple tool for creating hardware projects. Since
the board is open-source, it is released under a Creative Commons license which allows
anyone to produce their own board. If you search the web, you will find there are hundreds
of Arduino compatible clones and variations available but the only official boards have
Arduino in its name.
In the next section, we’re going to discuss a few of the Arduino boards available and
how they differ from each other.
Arduino is a great platform for prototyping projects and inventions but can be
confusing when having to choose the right board. If you’re brand new to this, you might
have always thought that there was just one “Arduino” board and that’s it. In reality, there
are many variations of the official Arduino boards and then there are hundreds more from
competitors who offer clones. But don’t worry, we’re going to show you which one to start
with later on in this tutorial.
Below are a few examples of the different types of Arduino boards out there. The
boards with the name Arduino on them are the official boards but there are also a lot of really
great clones on the market as well. One of the best reasons to buy a clone is the fact they
are generally less expensive than their official counterpart. Adafruit and Sparkfun for
example, sell variations of the Arduino boards which cost less but still have the same quality
of the originals. One word of caution, be careful when buying boards from companies you
don’t know.
Another factor to consider when choosing a board is the type of project you are
looking to do. For example, if you want to create a wearable electronic project, you might
want to consider the LilyPad board from Sparkfun. The LilyPad is designed to be easily
sewn into e-textiles and wearable projects. If your project has a small form factor, you might
want to use the Arduino Pro Mini which has a very small footprint compared to other boards.
Check out Sparkfun’s Arduino Comparison Guide for a breakdown and comparison of the
top boards out there.
Next, we’re going to focus on our favorite Arduino board which we recommend
beginners start with.
One of the most popular Arduino boards out there is the Arduino Uno. While it was
not actually the first board to be released, it remains to be the most actively used and most
widely documented on the market. Because of its extreme popularity, the Arduino Uno has
a ton of project tutorials and forums around the web that can help you get started or out of a
jam.
Board Breakdown
Here are the components that make up an Arduino board and what each of their
functions are.
1. Reset Button – This will restart any code that is loaded to the Arduino board.
2. AREF – It stands for “Analog Reference” and is used to set an external reference voltage.
3. Ground Pin – There are a few ground pins on the Arduino and they all work the same.
4. Digital Input/Output – Pins 0-13 can be used for digital input or output.
5. PWM – The pins marked with the (~) symbol can simulate analog output.
6. USB Connection – Used for powering up your Arduino and uploading sketches.
7. TX/RX – Transmit and receive data indication LEDs.
8. ATmega Microcontroller – This is the brains and is where the programs are stored.
9. Power LED Indicator – This LED lights up anytime the board is plugged in a power
source.
10. Voltage Regulator – This controls the amount of voltage going into the Arduino board.
11. DC Power Barrel Jack – This is used for powering your Arduino with a power supply.
The Arduino Uno needs a power source in order for it to operate and can be powered
in a variety of ways. You can do what most people do and connect the board directly to your
computer via a USB cable. If you want your project to be mobile, consider using a 9V battery
pack to give it juice. The last method would be to use a 9V AC power supply.
Arduino Breadboard
Another very important item when working with Arduino is a solderless breadboard.
This device allows you to prototype your Arduino project without having to permanently solder
the circuit together. Using a breadboard allows you to create temporary prototypes and
experiment with different circuit designs. Inside the holes (tie points) of the plastic housing,
are metal clips which are connected to each other by strips of conductive material.
Here is a visual of what a completed Arduino circuit looks like when connected to a
breadboard.
Once the circuit has been created on the breadboard, you’ll need to upload the
program (known as a sketch) to the Arduino. The sketch is a set of instructions that tells the
board what functions it needs to perform. An Arduino board can only hold and perform one
sketch at a time. The software used to create Arduino sketches is called the IDE which
stands for Integrated Development Environment. The software is free to download and can
be found at https://www.arduino.cc/en/Main/Software
• void setup () – Sets things up that have to be done once and then don’t happen again.
• void loop () – Contains the instructions that get repeated over and over until the board
is turned off.
Arduino Projects
You may be wondering what an Arduino board can do besides blink an LED. Below
are some example projects which help to showcase how truly amazing this board is and the
capabilities of it. If you’re looking for more project ideas, check out sites such as Instructables
or Make Magazine which are loaded with helpful tutorials.
Arduino Shields
If you want to add a very specific functionality to your Arduino, you will need to use a
shield. Arduino shields plug into the top of the Arduino board and can add capabilities such
as WiFi, Bluetooth, GPS and much more. There are literally hundreds of shields to choose
from and here are a few examples.
• WiFi Shield
• LCD Shield
• GPS Logger Shield
• MP3 Music Maker Shield
• Ethernet Shield
• Motor/Stepper/Servo Shield
Arduino Projects
In this module, we’re going to help you create a few simple Arduino projects that are
perfect for beginners. These basic projects will help you understand how to set up the
Arduino software and then connect the components to perform a specific action.
This guide was created for the absolute beginner and will help you to understand the
Arduino board along with its parts and components.
In order to complete the projects in this tutorial, you’ll need to make sure you have
the following items.
At this point, we’re ready to download the free software known as the IDE. The
Arduino IDE is the interface where you will write the sketches that tell the board what to do.
To install the software, you will need to click on the link that corresponds with your
computer’s operating system.
Arduino IDE
Once the software has been installed on your computer, go ahead and open it up.
This is the Arduino IDE and is the place where all the programming will happen. Take some
time to look around and get comfortable with it.
At this point you are ready to connect your Arduino to your computer. Plug one end
of the USB cable to the Arduino Uno and then the other end of the USB to your computer’s
USB port. Once the board is connected, you will need to go to Tools then Board then finally
select Arduino Uno.
To select the port, go to Tools then Port then select the port that says Arduino.
It’s finally time to do your first Arduino project. In this example, we are going to make
your Arduino board blink an LED.
If you need a refresher on the parts of the Arduino or how a breadboard works, check
out our previous tutorial called Arduino For Beginners.
You can build your Arduino circuit by looking at the breadboard image above or by
using the written description below. In the written description, we will use a letter/number
combo that refers to the location of the component. If we mention H19 for example, that
refers to column H, row 19 on the breadboard.
Step 1 – Insert black jumper wire into the GND (Ground) pin on the Arduino and then in the
GND rail of the breadboard row 15
Step 2 – Insert red jumper wire into pin 13 on the Arduino and then the other end into F7 on
the breadboard
Step 3 – Place the LONG leg of the LED into H7
Step 4 – Place the SHORT leg of the LED into H4
Step 5 – Bend both legs of a 220 Ohm resistor and place one leg in the GND rail around
row 4 and other leg in I4
Step 6 – Connect the Arduino Uno to your computer via USB cable
Now it’s time to upload the sketch (program) to the Arduino and tell it what to do. In
the IDE, there are built-in example sketches that you can use which make it easy for
beginners. To open the blink sketch, you will need to go to File > Examples > Basics >
Blink
Next, you need to click on the verify button (check mark) that’s located in the top left
of the IDE box. This will compile the sketch and look for errors. Once it says “Done
Compiling” you are ready to upload it. Click the upload button (forward arrow) to send the
program to the Arduino board.
Troubleshooting
If you ran into a problem don’t give up, check out the troubleshooting section at the
end for common ways to fix problems.
Before we go to the next project, lets change some of the code in the “Blink” sketch
to make it do something different. Playing around with the sketch will help you start to learn
how the code controls the board.
Keep the Arduino board connected and change the delay portion of the code from
(1000) to (200). Click the verify button on the top left of the IDE and then click upload. This
should make the LED on the breadboard blink faster.
NOTE – Arduino measures time in milliseconds and 1000 milliseconds = 1 second. The
original code (1000) turns on the LED for 1 second and then off for 1 second. By adjusting
the code from (1000) to (200) it shortens the time between on and off which makes it blink
faster.
Now it’s time to talk switches and how they can be incorporated into Arduino projects.
A switch is a electrical component that completes a circuit when pushed and breaks the
circuit when released. In this project, we will be using a small pushbutton switch to control
an LED.
Step 1 – Connect the blue jumper wire from the GND on the Arduino to the GND rail (blue
line) on the breadboard near A13
Step 2 – Connect the blue jumper wire from the GND rail on the breadboard near A17 to
H19
Step 3 – Connect the red jumper wire from the power rail on the breadboard around row
A27 to H26
Step 4 – Connect the green jumper wire from pin 2 on Arduino to J24 on the breadboard
Step 5 – Place one leg of a 10k Ohm resistor in G19 and the other leg in G24
Step 6 – Place the pushbutton switch into F24, F26, E24 and E26
Step 7 – Place one leg of a 220 Ohm resistor in D5 and the other leg in G5
Step 8 – Insert the short leg of the LED in the GND rail around A5 and the long leg in B5
Step 9 – Connect the black jumper wire from pin 13 on the Arduino to I5 on the
breadboard
Step 10 – Connect the red jumper wire from 5V on the Arduino to power rail (+) near A8
Step 11 – Connect the Arduino Uno to your computer via USB cable
Now it’s time to upload the sketch to the Arduino that will allow us to use a switch.
As with the blink sketch, there are example programs already loaded in the Arduino IDE
that we will be using.
In order to use a switch, we have to load the file called “Button” which can be found
here: File > Examples > Digital > Button
Press the button switch on the breadboard and you should be able to turn on and off
the LED.
Troubleshooting
If you are having any problems with the projects we did, make sure the following has
been checked.
1. Verify the LED is actually functional. Use a 3v coin cell battery and connect the LONG
leg of the LED to the (+) and SHORT leg to the (-) of the battery.
2. Verify the correct leg of the LED is connected properly. LONG leg to positive and
SHORT leg to negative.
3. Make sure the Arduino IDE shows the correct board. Go to Tools > Board then select
Arduino Uno.
4. Make sure the Arduino IDE shows the correct port. Go to Tools > Port then select the
port that says Arduino.
5. Verify all component connections are secure with the Arduino board and breadboard.
What’s More
Jumbled Words
Directions: Arrange the jumbled words to come up with the terms discussed in this lesson.
In the past, building robots was an expensive and tough task to handle due to the vast
number of parts and experience needed. However, with the availability of Arduino and the kits,
arms, and parts that go alongside it, robotics is now a fun and exciting process that’s very
much affordable.
Here is the list of components you’ll typically need to build a basic Arduino Robot:
• Arduino board; Arduino Uno/Arduino 101
• Motor driver: The intermediate device between you Arduino, a battery, and motors.
Provides current to ensure all components work appropriately
• Motors for rotation of wheels and allow the robot to move around
• Ultrasonic Distance Sensor: For the robot to detect when there’s an object nearing
• A USB cable: To upload software and used as a power source
• Connectivity modules; Arduino robot Bluetooth slaves, etc. that acts as a controller
• Vehicle kit/Robotic platform: The body of the robot, for mounting of parts.
As mentioned, the above list is only the minimal requirements to build the simplest
Arduino robot. However, there are a plethora of different parts out there applicable for Arduino
robot building.
What I Can Do
Learning Objectives:
1. Enumerate the basic parts of a basic Arduino robot and mention their
functions.
2. Build a simple robot project using standard Arduino.
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 sketch saves the sketch you New sketch saves the sketch you have
have opened? opened.
2. What button will restart any code that is 2. Restore button will restart any code that is
loaded to the Arduino board? loaded to the Arduino board.
3. What is used to set an external reference 3. PWM is used to set an external reference
voltage? voltage.
4. What will display the serial information of 4. Text Console will display the serial
your Arduino? information of your Arduino.
5. What controls the amount of voltage going 5. Power Supply controls the amount of
into the Arduino board? voltage going into the Arduino board.
6. What shows the details of an error 6. Code Area shows the details of an error
messages, size of the program that was messages, size of the program that was
compiled and additional info? compiled and additional info.
7. What compiles your code and checks for 7. Upload button compiles your code and
errors in spelling or syntax? checks for errors in spelling or syntax.
8. What port tells you what board is being 8. USB port tells you what board is being
used and what serial port it’s connected to? used and what serial port it’s connected to.
9. What button sends the code to the board 9 Verify button sends the code to the board
that’s connected such as Arduino Uno in this that’s connected such as Arduino Uno in
case? this case.
10. What is used for powering up your 10. 5V Pin is used for powering up your
Arduino and uploading sketches? Arduino and uploading sketches.
Assessment
Directions: Read each statement carefully. Choose the letter of the correct answer.
1. It gives you access to the tools needed for creating and saving Arduino sketches.
A. Menu Bar C. Text Console
B. Serial Monitor D. Upload Button
2. It shows the details of an error messages, size of the program that was compiled and
additional information.
A. Menu Bar C. Text Console
B. Serial Monitor D. Upload Button
5. This controls the amount of voltage going into the Arduino board.
A. Ground Pin C. Reset Button
B. Power Supply D. Voltage Regulator
Book:
Warren, J., Adams, J. & Molle, H. (2011). Arduino robotics. New York, USA: Springer
Science+Business Media, LLC.
Online Sources:
Shawn. (n. d). How to build an arduino robot? kits and projects to get started. Retrieved from
https://www.seeedstudio.com/blog/2019/12/26/how-to-build-an-arduino-robot-kits-
and-projects-to-get-started/
TahmidZubayer. (n.d). How to make a DIY robot – introduction to robotics. Retrieved from
https://www.instructables.com/How-to-Make-a-DIY-Robot-Introduction-to-Robotics/