RoboTek Arduino Level 2
RoboTek Arduino Level 2
Display
Arduino Level 2
After completing this module, a student should be able to
construct robotics projects with different input and output
devices using sensors and motors controlled and program
in an Arduino microcontroller.
How to establish a workplace safety?
Always remember and make sure that your hands are dry (use gloves if
necessary).
Target Outcomes
Engage
Guess the words:
+ + +
D
____ _________ _ TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools
+ + +
D
BIND SOLDERING
IRON
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools
Explore
Explain
Solder comes from the Latin word solidare which means “to make solid.”
To assemble any electronic project, one must learn the skill of soldering.
Soldering happens when two or more metal items are joined together to form an
electrical connection by melting a filler metal with a relatively low melting
point. The materials essential for soldering are: Soldering iron, Solder wire, and
Flux (Soldering paste).
Explain
Soldering Iron is a hand tool used in soldering. It supplies heat to melt a lead and solder a
wire to make an electrical connection.
Explain
PCB (Printed Circuit Board) is a board that connects various points together, it has layers of copper
laminated onto sheet layers of a non-conductive substrate.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools
Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON
Roofers use solder to fuse galvanized metal for flashing. They also use it to fuse
components of copper roofs. Because accuracy is less important than it is in other trades,
roofing soldering irons have broad tips that heat up quickly and the ability to retain heat
in windy conditions.
Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON
Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON
Electricians often use solder to splice wires when doing residential or commercial
wiring. The also sometimes use solder to fuse wires to electrical terminals inside
electrical devices or on control panels.
Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON
Soldering pencils, guns and irons that are adequate for home use are made in
abundance. Most are heated electrically and have tips that can be used with a propane
torch. The proper tool depends on the project, but tasks like joining wires and circuit-
board repairs may call for varying amounts of heat or more control.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools
Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON
Jewelers use soldering pens and soldering irons with interchangeable tips, and they
also use accurate torches that burn propane or butane. The solder has a high percentage of
silver, and jewelers typically use borax flux to reduce the metal oxides that form when
you apply heat to metal. Flux is an important component of any soldering job.
TechFactors Copyright 2020
Lesson 1: The Soldering Iron and Other Basic Electronics Tools
Elaborate
USES AND APPLICATIONS FOR A SOLDERING IRON
Solder isn't strong enough to make engine repairs but is used to fill irregular cavities,
smooth rough surfaces and tighten joints. It's also used to tin the edges of metal sheets, fill
up holes and fuse metal panels when doing auto body repair.
Evaluate
Direction: Fill in the table with the information needed.
Evaluate
Direction: Give instances when soldering is necessary and how you use it.
1.
2.
3.
4.
5.
Additional Assessment
Direction: Describe each material shown below:
1. 2. 3.
4. 5. 6.
Target Outcomes
Engage
Watch the video for a basic soldering guide. Take note of the important details in the video then
answer the questions.
https://www.youtube.com/watch?time_continue=279&v=BLfXXRfRIzY
Explore
Group Activity:
Explain
A wire is a long thin piece of metal that is used to fasten things or to carry electric
current, power or signals from one place to another.
- Stranded Wire
- Solid Wire
Explain
SAFETY PRECAUTIONS IN SOLDERING
Do not play with the soldering iron either if it’s plug in or not.
Be very careful while handling the soldering iron and soldering lead.
Use a medical mask to cover your nose and mouth while using it.
Make sure to place the hot soldering iron in a soldering
stand or in a flat surface.
Do not inhale the melted lead or the smoke.
Do not touch the tip of the soldering iron or melted lead.
Clean the tip of the soldering iron before reusing it.
TechFactors Copyright 2020
Lesson 2: Using Soldering Iron
Elaborate
Here are some examples of how the joint should look and common problems:
Elaborate
Follow the steps in soldering a wire.
1. Trim the wire – remove the insulator of the wire using pliers.
Elaborate
Follow the steps in soldering a wire.
2. Tin your wires – melt some solder into the filaments with your soldering iron.
Elaborate
Follow the steps in soldering a wire.
3. Apply lead – melt the lead to coat the end of the wire.
Elaborate
Follow the steps in soldering a wire.
4. Connect a soldered wire together – re-apply the soldering iron and solder the wires to each
other.
Evaluate
My Own Creation: Design and create your own project through soldering using any materials
that can be joined through soldering. Be creative in your design and in choosing the materials you
will use.
Additional Assessment
My Own Creation 2: Design and create your own project through soldering using any
materials that can be joined through soldering. Create a 3D art figure using wires connected to each
other. Example: stick figures, chair, table, etc.
Target Outcomes
Use the soldering iron to connect wires into the printed circuit board; and
Explore
Discussion of the KWL Chart:
Explain
Explain
Elaborate
Try this!
Materials:
Soldering iron
Soldering Lead
Soldering Pump
Wire
PCB
Switch
Elaborate
Try this!
Evaluate
Procedure
1. Prepare all the
materials needed.
2. Trim and tin the wire.
3. Add lead into the
switch terminal end.
4. Solder the wire into
the switch.
Procedure
1. Prepare all the
materials needed.
2. Trim and tin the wire.
3. Add lead into the
switch terminal end.
4. Solder the wire into
the switch.
Additional Assessment
Based on the activity you did last lesson, solder your 3D artwork on a piece of PCB to make it
as a stand. You can display your work inside your classroom and put your name on it.
Based on the activity you did last lesson, solder your 3D artwork on a piece of PCB to make it
as a stand. You can display your work inside your classroom and put your name on it.
Target Outcomes
Engage
What is your
favorite color?
TechFactors Copyright 2020
Lesson 4: RGB Module
Engage
Explore
Poking Fun at Color Mixing
Assembly
Put together your light source:
Try to get the light from the green and red bulbs to overlap. What do you
notice? What techniques or modifications produce overlapping colors? Make
sure you can get the colors to overlap before continuing.
Next, ask your partner to switch off the green light and turn on the blue light
(leaving the red light on). What do you notice?
Explore
Data Collection for Poking Fun at Color Mixing
Explain
Explain
Explain
The intensity of the light produced by each LED can be controlled by adjusting the value of
intensity for each color. By mixing or adjusting the intensity this primary colors of light almost all
colors can be produced.
Elaborate
Materials
Microcontroller USB Cable Jumper Wire
Breadboard 3 pc. 220 Ohms Resistors 1 pc. RGB Module
Procedure
1. Examine the RGB module prepared by your teacher.
2. Study the code that turns the RGB module light into RED.
Elaborate
RED
digitalWrite(RED_PIN, HIGH);
digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW);
delay(1000);
GREEN BLUE
digitalWrite(RED_PIN, LOW); digitalWrite(RED_PIN, LOW);
digitalWrite(GREEN_PIN, HIGH); digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW); digitalWrite(BLUE_PIN, HIGH);
delay(1000); delay(1000);
TechFactors Copyright 2020
Lesson 4: RGB Module
Elaborate
YELLOW PURPLE
digitalWrite(RED_PIN, HIGH); digitalWrite(RED_PIN, HIGH);
digitalWrite(GREEN_PIN, HIGH); digitalWrite(GREEN_PIN, LOW);
digitalWrite(BLUE_PIN, LOW); digitalWrite(BLUE_PIN, HIGH);
delay(1000); delay(1000);
CYAN WHITE
digitalWrite(RED_PIN, LOW); digitalWrite(RED_PIN, HIGH);
digitalWrite(GREEN_PIN, HIGH); digitalWrite(GREEN_PIN, HIGH);
digitalWrite(BLUE_PIN, HIGH); digitalWrite(BLUE_PIN, HIGH);
delay(1000); delay(1000);
TechFactors Copyright 2020
Lesson 4: RGB Module
Elaborate
3. Key in the code for each color using your RGB module.
Evaluate
1. Manipulate your RGB module and determine the code to produce RED, BLUE and GREEN
colors with different levels of brightness.
2. Complete the table by supplying the missing code for each level of brightness.
3. Answer the question: How will you set up the color intensity of your RGB module? (Type in the
specific value for each color).
Additional Assessment
Using the RGB LED, use these following RGB codes to program the microcontroller to see
what color that was programmed:
Using the RGB LED, use these following RGB codes to program the microcontroller to see
what color that was programmed:
Target Outcomes
Formulate codes to produce random colors with different intensity using the
RGB module;
Identify objects that utilizes an RGB LED to produce random colors with different
intensity.
Engage
RGB Color Model
https://www.khanacademy.org/partner-content/pixar/color/color-101/v/color-2
Explore
1. What are the special color receptor in our
eyes that we use in order to see colors?
2. How many color receptors do we have?
What color are they sensitive with?
3. How can we create different colors using
Red, Green, and Blue?
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module
Explain
The value of intensity of colors for each LED ranges from 0-255. By adjusting the
value for each color using the analogWrite function in programming.
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module
Explain
digitalWrite
Example: blinking LED
int led = 13;
The digital pins have only two
modes - ON (1) or OFF (0). We void setup() {
pinMode(led, OUTPUT); //digital pin as an output
use the constants HIGH (on) }
and LOW (off) since this makes
it easier to read code. Digital pin void loop() {
digitalWrite(led, HIGH); //tum the LED on
always gives the output power of delay(1000); //wait for a second
5V when HIGH and 0V when LOW. digitalWrite(led. LOW); // turn the LED off by making the voltage LOW
The pin need to be configured with delay(1000); //wait for a second
}
pinMode(). digitalWrite(pin,value)
//sets pin to value (LOW or HIGH)
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module
Explain
analogWrite
The digital pins 3,5,6,9, 10 and 11 have a special function called PWM(). For these pins we are using the
command analogWrite(). With the PWM mode we can transform the 5V output into a range of 255 possible
levels. Instead of going from 0V to 5V in one instance it goes from 0V to 5V in 255 steps.
analogWrite(pin, value); //writes 'value' to analog 'pin' //value = between 0(off) and 255 (on)
A value of 0 generates a steady 0 volts output at the specified pin; a value of 255 generates a steady 5 volts
output at the specified pin. For values in between 0 and 255, the pin rapidly alternates between 0 and 5
volts – the higher the value, the more often the pin is HIGH (5 volts). For example, a value of 64 will be 0
volts three-quarters of the time, and 5 volts one quarter of the time; a value of 128 will be at 0 half the
time; and a value of 192 will be 0 volts one quarter of the time and 5 volts three-quarters of the time.
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module
Elaborate
By mixing and adjusting the intensity of Red, Green, and Blue light, different colors can be
produced through the RGB module. Our knowledge in producing different colors with different
intensities can be used in lighting and can be beneficial to our lives.
1. RGB lighting is great for performance lighting. It’s bright, beautiful and enticing. It can
be placed in the kitchen and laundry room simply for the presence of color. They’re also
great in a kid’s playroom or bedroom for accent lighting.
2. Working as mood lighting, RGB lights are great for relaxation in a bedroom. For
example, the emission of green light is said to bring the sense of serenity and low stress
of calmness while blue light offers the feeling of calmness and blue rooms makes people
more productive.
TechFactors Copyright 2020
Lesson 5: Mixing Colors Using RGB Module
Elaborate
3. An article on Well + Good (https://www.wellandgood.com/good-looks/color-bathing-led-
lights-in-the-shower/) covers the benefits of having colored LEDs in the shower. It says
they are “emotionally therapeutic and potentially beneficial to your skin.” They’re
explained to have anti-inflammatory and antibacterial effects. This reason alone sounds
good enough! Green light supposedly reduces tension while pink is great for drawing in
the feeling of love.
4. You would think since RGB lighting is so vibrant and strong that they would emit a lot of
heat. Well, you’d be surprised to know that it’s actually the opposite. LEDs use less
energy, so naturally emit less heat (and are cheaper!) There’s always a benefit of
knowing you’re saving money and resources.
Evaluate
Changing Random Colors
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
3 pc. 220Ω Resistors
1 pc. RGB Module
Create a code that will display random colors for every 30 seconds with ten (10) repetition.
Evaluate
Changing Random Colors
Key in the code for changing random colors
Evaluate
Changing Color Spectrum
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
3 pcs. 220 Ohms Resistor
1 pc. RGB Module
Evaluate
Changing Color Spectrum
Key in the code for a changing random colors with different intensity
Additional Assessment
After generating the codes, write something about what you understand in the
changes of colors of LEDs?
After generating the codes, write something about what you understand in the
changes of colors of LEDs?
Target Outcomes
Engage
Engage
A seven-segment display
(SSD), or seven-segment indicator,
is a form of electronic display
device for displaying decimal
numerals.
Explore
Explore
Explain
4 digital tube is a chip to form a 4-digit numerical display module that are
sometimes called “Digital Tube”.
Explore
2. A well programmed digital tube will deliver information that is relevant to the
user.
3. Digital tube can be paired with sensors to trigger content based on external
stimuli. This lets the user interact with the display to present specific content or
play games.
Evaluate
Activity: Displaying Same Numbers in 4 Digital Tube
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pc. 220Ω Resistors
1 pc. 4 Digital Tube
Evaluate
Key in the code for the assigned numbers/letters in a 4 digital tube.
Additional Assessment
Form a group, using a 4 digital tube, perform a spelling bee game with a twist. The
groups should provide the code that was used in spelling the correct answer. First team to
spell correctly and show the code wins.
Form a group, using a 4 digital tube, perform a spelling bee game with a twist. The
groups should provide the code that was used in spelling the correct answer. First team to
spell correctly and show the code wins.
Target Outcomes
Explore
Discussion of the KWL Chart:
Explain
4 digital tubes are widely used in digital clocks, electronic meters, basic calculators, and other
electronic devices that display numerical information.
Elaborate
Activity 1: Type a Number to Display
Materials
Microcontroller
Breadboard
USB Cable
4 pcs. 220 Ohms Resistors
Jumper Wire
1 pc 4 Digital Tube
Elaborate
Activity 1: Type a Number to Display
Procedure:
1. Each group must form a circle.
2. Prepare your 4 digital tube.
3. Your teacher will ask questions. Display your answer using your 4 digital
tube.
4. The first group to give the correct answer will get the corresponding score.
5. The group with the highest accumulated score will get 30 points, the second
highest will get 25 points followed by 20, 15, and 10 points.
Elaborate
Answer the following questions using your 4 digital tube:
1. Ten apples was divided by five children. How many apples will each child have?
5. What do you call a system of words, letters, figures, or other symbols substituted
for other words, letters, etc., especially for the purposes of secrecy?
5. What do you call a system of words, letters, figures, or other symbols substituted
for other words, letters, etc., especially for the purposes of secrecy? CODE
TechFactors Copyright 2020
Lesson 7: Working with 4 Digital Tube
Evaluate
Using your 4 digital tube, code a two/three/four letter word. Write the code on the
space provided then share it with the class.
Additional Assessment
Solve the following math equations using your 4 digital tube:
1. 378 x 24 = ?
2. 89 x 51 - 706 = ?
2. 89 x 51 - 706 = 3833
Target Outcomes
Engage
Activity 1:
Think-Pair-Share.
Engage
Explore
SHARE
Explain
Explain
Explain
Explain
Parts of LDR
Explain
Elaborate
Fill in the table below. Add as many as examples as you can.
Device that uses LDR Uses and Applications
(How it works)
1.DSLR Cameras Controls the shutter and flash. If the
LDR detects that it is dark the flash
will automatically be turned on.
Same idea goes for the shutter.
2.
3.
2.
3.
Evaluate
Additional Assessment
Write an essay about the importance of LDRs in our daily life and how it affects us.
Write an essay about the importance of LDRs in our daily life and how it affects us.
Target Outcomes
Engage
Modified True or False: Write TRUE if the statement is true. If FALSE, change the
underlined word to make the statement correct.
1. FALSE, Resistor
2. TRUE
3. TRUE
4. FALSE, light
5. FALSE, decreases
Explore
Activity 1: LDR as a Light Sensor
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. LDR Sensor
1 pc. LED (Any Color)
Explore
1. What happens to the LED when the level of light that hits the surface of the LDR
decreases?
2. What happens to the LED when the level of light that hits the surface of the LDR
increases?
3. How will you describe the relationship between the amount of light that hits the LDR
to resistance based on LED’s response?
Explain
A Light Dependent Resistor may turn on and off when light changes its intensity. Thus, it
may be used as a light sensor. An LDR may also be used as a switch according to the ambient
light.
Light Sensors are photoelectric devices that convert light energy (photons) whether visible
or infra-red light into an electrical (electrons) signal.
A Light Sensor generates an output signal indicating the intensity of light by measuring the
radiant energy that exists in a very narrow range of frequencies basically called “light”, and
which ranges in frequency from “Infra-red” to “Visible” up to “Ultraviolet” light spectrum.
TechFactors Copyright 2020
Lesson 9: Working with LDR
Explain
Explain
Explain
int inPin = AO; //Pin the sensor is connected to
int sensorVal = 0; //Variable to store sensor data
void setup () {
Serial.begin(9600);
Serial.println("Serial Communication started... \n");
}
void loop () {
sensorVal = analogRead(inPin);
//analogRead will read the voltage on the pin specified and return it as a value between 0 and 1024.
Serial.printin(sensorVal);
//Print the sensor reading to the serial window so we can view the data.
}
TechFactors Copyright 2020
Lesson 9: Working with LDR
Explain
3. From what you have observed based on the values depending on the amount of
light, how will you use this concept in programming the LDR with another
device like LED?
3. From what you have observed based on the values depending on the amount of
light, how will you use this concept in programming the LDR with another
device like LED?
Evaluate
Activity 2: LDR Sensor with LED (Light Level Sensor)
Materials
Microcontroller
Jumper Wire
Breadboard
5 pcs. 220Ω Resistors
4 pcs. LED (Any Color)
1 pc. LDR Sensor
Procedure
1. Form a group with ___ members.
2. Follow the setup in the schematic and key in the code for this activity.
TechFactors Copyright 2020
Lesson 9: Working with LDR
Additional Assessment
Write something about what you have learned from the differences in LDR when
there is light and when there is none.
Write something about what you have learned from the differences in LDR when
there is light and when there is none.
Target Outcomes
Engage
Explore
Explore
An RGB module can be used together with a segment to emit various colors, numbers, and/or
letters effects in their projects. Each segment in a digit corresponds to a letter from A-G where codes
are used to display numbers and letters in a 4 digital tube.
It can be seen that to display any single digit number from 0 to 9 in binary or letters from A to
F in hexadecimal, we would require 7 separate segment connections plus one additional connection
for the LED’s “common” connection. Also as the segments are basically a standard light emitting
diode, the driving circuit would need to produce up to 20mA of current to illuminate each individual
segment and to display the number 8, all 7 segments would need to be lit resulting in a total current
of nearly 140mA, (8 x 20mA)
Elaborate
Arduino Tutorial: How to use an RGB LED with Arduino
Evaluate
Activity 1: RGB Module with 7 Segment Display (Modified Stop Light)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pcs. 220Ω Resistors
1 pc. RGB Module
1 pc 7 Segment
delay(1000);
Evaluate – Answer Keys digitalWrite(RED_PIN, HIGH); digitalWrite (pinA, HIGH); //1
digitalWrite(GREEN_PIN, HIGH);digitalWrite (pinB, LOW); digitalWrite (pinC,
digitalWrite (pinC, HIGH); digitalWrite(BLUE_PIN, LOW);LOW);
digitalWrite (pinD, LOW); digitalWrite (pinA, LOW); //3 digitalWrite (pinD, HIGH);
digitalWrite (pinE, LOW); digitalWrite (pinB, LOW); digitalWrite (pinE, HIGH); digitalWrite
digitalWrite (pinF, HIGH); digitalWrite (pinC, LOW); (pinF, HIGH);
digitalWrite (pinG, LOW); digitalWrite (pinD, LOW); digitalWrite (pinG, HIGH);
delay(1000); digitalWrite (pinE, HIGH); delay(1000);
digitalWrite (pinA, HIGH); //1 digitalWrite (pinF, HIGH); // Green (turn just the green LED on):
digitalWrite (pinB, LOW); digitalWrite (pinG, LOW); digitalWrite(RED_PIN, LOW);
digitalWrite (pinC, LOW); delay(1000); digitalWrite(GREEN_PIN, HIGH);
digitalWrite (pinD, HIGH); digitalWrite (pinA, LOW); //2 digitalWrite(BLUE_PIN, LOW);
digitalWrite (pinE, HIGH); digitalWrite (pinB, LOW); digitalWrite (pinA, LOW); //5
digitalWrite (pinF, HIGH); digitalWrite (pinC, HIGH); digitalWrite (pinB, HIGH); digitalWrite
digitalWrite (pinG, HIGH); digitalWrite (pinD, LOW); (pinC, LOW);
delay(1000); digitalWrite (pinE, LOW); digitalWrite (pinD, LOW); digitalWrite
// Yellow (turn red and green on) digitalWrite (pinF, HIGH); (pinE, HIGH);
digitalWrite (pinG, LOW);
TechFactors Copyright 2020
Lesson 10: Combination Project: RGB + 7 Segment Display
Additional Assessment
1. Which technology is similar to the sample activities you have done? Why?
2. In what other ways can you use your learnings from these activities?
3. Draw your own Arduino design project based on the previous sample activities and list
down the materials that will be used.
Draw a program flow using flowchart symbols.
2. Draw your own Arduino design project based on the previous sample activities and list
down the materials that will be used.
Draw a program flow using flowchart symbols.
Target Outcomes
Create a combined project using the RGB with Buzzer and the LDR with Buzzer.
Engage
Explore
Complete Turn Taking Activity
1. Have the entire class arrange themselves by group.
2. One student reads a question aloud. The student to their left then has one minute of
uninterrupted time to speak and give their thoughts. This person signals that they are
done speaking by saying, “OK, I’m done.”
3. The next person to the left goes, has one minute of uninterrupted time to speak, and
signals they are done by saying, “OK I’m done.” Finally, the third student to the left goes,
following the same pattern.
4. After three people have had a chance to speak, the conversation is opened up to the
whole group for two minutes of discussion.
The next student gets to ask a question, and this cycle continues.
Explain
The RGB module together with a buzzer can be used as an indicator for a specific
function in a device.
The LDR may act as a switch for the buzzer in which the presence of light will act as
a sensor for the buzzer to turn ON or OFF.
The buzzer’s output sound level may vary depending on the ambient light or
intensity of the light thrown on the LDR or the color being displayed by the RGB module.
Explain
Explain
Elaborate
Applications of LDRs
Lighting switch
The most obvious application for an LDR is to automatically turn on a light at a certain
light level. An example of this could be a streetlight or a garden light.
Elaborate
Activity 1: RGB Module with Buzzer (Alarm System Red + Green)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pcs. 220Ω Resistors
1 pc. RGB Module
1 pc. Buzzer
Evaluate
Activity 2: LDR with Buzzer (Light Identifier)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pcs. 220Ω Resistors
1 pc. Buzzer
1 pc. LED (Any Color)
void loop() {
Evaluate – Answer Keys int ldrStatus = analogRead(ldrpin);
// check if the ldr status is <=300
int buzzer= 2; //if it is , the LED is HIGH
int ledpin = 5; if (ldrStatus <=300) {
int ldrpin = A0; digitalWrite(ledpin, HIGH); //turn LED on
digitalWrite(buzzer, LOW); // NO Sound
void setup() { Serial.println("LDR is DARK, LED is ON");
pinMode(ledpin, OUTPUT); }
pinMode(buzzer, OUTPUT); else {
pinMode(ldrpin, INPUT); digitalWrite(ledpin, LOW); //turn LED off
digitalWrite(buzzer, HIGH); //produce sound
Serial.begin(9600);
Serial.println("--LED OFF—SOUND ON--");
// set baud rate at “9600”
}
} }
Additional Assessment
Reflect on the activities you’ve already done and make an assessment of yourself
based on what you’ve learned on this activity. Write it in a sheet of paper.
Reflect on the activities you’ve already done and make an assessment of yourself
based on what you’ve learned on this activity. Write it in a sheet of paper.
Target Outcomes
Recall the codes and commands about LDR and LED to be able to create a
combined project using the LDR + LED + buzzer.
Engage
Kapitang Kulay
Explore
Explore
Write down the steps in creating a project using LDR+LED+Buzzer based on the
pictures.
1. 2.
Explore
Write down the steps in creating a project using LDR+LED+Buzzer based on the
pictures.
3. 4.
Explain
The LDR can act as a light sensor in the project; when light shines on the LDR, the
buzzer will alarm and the led will start flashing.
Three components can be used together to perform individual functions that are
interconnected.
Elaborate
Evaluate
Activity 1: LDR with Buzzer (Light Identifier)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pcs. 220Ω Resistors
1 pc. Buzzer
5 pcs. LED (Any Color)
Additional Assessment
Create a program that will make a siren-like circuit. The lights will alternatively
blink while the buzzer will produce a sound with different intensities.
Create a program that will make a siren-like circuit. The lights will alternatively
blink while the buzzer will produce a sound with different intensities.
Target Outcomes
Engage
Activity 1: Recall the previous lesson about digital tube by completing the table
below.
Explore
Describe me!
Explain
Explain
The number displayed on a 4 digital tube can be controlled based on the value given
off by the potentiometer.
Elaborate
Evaluate
Activity 1: Adding Number with Potentiometer Control
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pc. 220Ω Resistors
1 pc. 4 Digital Tube
Potentiometer
} }
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer
digitalWrite(segC, SEGMENT_OFF);
Evaluate – Answer Keys digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_ON);
digitalWrite(segF, SEGMENT_ON); digitalWrite(segF, SEGMENT_OFF);
digitalWrite(segG, SEGMENT_OFF); digitalWrite(segG, SEGMENT_ON);
break; break;
case 1: case 3:
digitalWrite(segA, SEGMENT_OFF); digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_ON); digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON); digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_OFF); digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_OFF); digitalWrite(segE, SEGMENT_OFF);
digitalWrite(segF, SEGMENT_OFF); digitalWrite(segF, SEGMENT_OFF);
digitalWrite(segG, SEGMENT_OFF); digitalWrite(segG, SEGMENT_ON);
break; break;
case 2: case 4:
digitalWrite(segA, SEGMENT_ON); digitalWrite(segA, SEGMENT_OFF);
digitalWrite(segB, SEGMENT_ON); digitalWrite(segB, SEGMENT_ON);
TechFactors Copyright 2020
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer
case 6:
Evaluate – Answer Keys digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_OFF);
digitalWrite(segC, SEGMENT_ON); digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_OFF); digitalWrite(segD, SEGMENT_ON);
digitalWrite(segE, SEGMENT_OFF); digitalWrite(segE, SEGMENT_ON);
digitalWrite(segF, SEGMENT_ON); digitalWrite(segF, SEGMENT_ON);
digitalWrite(segG, SEGMENT_ON); digitalWrite(segG, SEGMENT_ON);
break; break;
case 5: case 7:
digitalWrite(segA, SEGMENT_ON); digitalWrite(segA, SEGMENT_ON);
digitalWrite(segB, SEGMENT_OFF); digitalWrite(segB, SEGMENT_ON);
digitalWrite(segC, SEGMENT_ON); digitalWrite(segC, SEGMENT_ON);
digitalWrite(segD, SEGMENT_ON); digitalWrite(segD, SEGMENT_OFF);
digitalWrite(segE, SEGMENT_OFF); digitalWrite(segE, SEGMENT_OFF);
digitalWrite(segF, SEGMENT_ON); digitalWrite(segF, SEGMENT_OFF);
digitalWrite(segG, SEGMENT_ON); digitalWrite(segG, SEGMENT_OFF);
break; break;
TechFactors Copyright 2020
Lesson 13: Combination Project: 4 Digital Tube + Potentiometer
Additional Assessment
Write something about what you have learned based on the activity you have done in
this lesson.
Write something about what you have learned based on the activity you have done in
this lesson.
Target Outcomes
Engage
Pictionary
Explore
Explore
Explore
The basic parts of a tilt switch:
Explore
Explain
The Uses and Applications of Tilt Switch
Roll Sensing
Tilt switches provide a rollover or tip over warning for applications like
construction equipment and lift vehicles that operate in rugged terrain. There are
several non-mercury types, but few are implemented due to sensitivity to shock and
vibration, causing false tripping. However, devices resistant to shock and vibration
do exist.
Explain
The Uses and Applications of Tilt Switch
Automotive Uses
Explain
The Uses and Applications of Tilt Switch
Fall Alarm
Explain
The Uses and Applications of Tilt Switch
Air Craft
Electrically driven attitude indicators typically use mercury switches to keep the
gyro axis vertical. When the gyro is off vertical, mercury switches trigger torque
motors that move the gyro position back to the correct position (air driven attitude
indicators use a different operating principle).
Explain
The Uses and Applications of Tilt Switch
Thermostat
Mercury switches were once common in bimetal thermostats. The weight of the
movable mercury drop provided some hysteresis by a degree of over-center action.
The bimetal spring had to move further to overcome the weight of the mercury,
tending to hold it in the open or closed position. The mercury also provided positive
on-off switching, and could withstand millions of cycles without contact
degradation.
Explain
The Uses and Applications of Tilt Switch
Doorbells
Some old doorbells, for example, the Soviet ZM-1U4, use mercury switches as
current interrupters.
Explain
The Uses and Applications of Tilt Switch
Vending Machines
Explain
The Uses and Applications of Tilt Switch
Bombs
A tilt switch can trigger a bomb. Mercury tilt switches can be found in some
bomb and landmine fuses, typically in the form of anti-handling devices, for
example, a variant of the VS-50 mine.
Elaborate
To what fields can you apply the concept of tilt switch? How tilt switches can be
used in the following fields?
Evaluate
Activity 1: Enumerate the uses, features and safety measures in handling a tilt or
mercury switch. Use the image below as your guide.
Features and Structure Safety Measures in
of Tilt Switch Handling Tilt Switch
Evaluate
Activity 2: Answer the given questions:
Additional Assessment
Describe each part of a tilt switch:
Target Outcomes
Engage
The Mystery Word
1. ATAAIAALAAT ASAAAWAAIAATACAAAH
2. QQQLQQQEQQAQQQD
3. MAIACAARAAOACAAOAANATRAOALAALAAEAARA
4. QQAQRQQDQQQUQQIQQQNQQO
2. QQQLQQQEQQAQQQD
3. MAIACAARAAOACAAOAANATRAOALAALAAEAARA
4. QQAQRQQDQQQUQQIQQQNQQO
Explore
Explain
If used with LEDs, a tilt switch may be used to turn a device ON or OFF whenever
there’s a change in inclination or orientation.
Elaborate
Draw a simple circuit. Apply the concept of tilt switch in your illustrated circuit and
explain your work.
Evaluate
Activity 1: Tilt Switch with LED
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
2 pcs. 220Ω Resistors
1 PC Tilt switch
LED
void loop() {
if (digitalRead(tpin) == true) {
digitalWrite(led, HIGH);
Additional Assessment
Based on the activity you have done, explain your experience on what you have
learned about tilt switch.
Based on the activity you have done, explain your experience on what you have
learned about tilt switch.
Target Outcomes
Engage
Explore
Servo Library
attach() - Attach the Servo variable to a pin.
write() - Writes a value to the servo, controlling the shaft accordingly.
writeMicroseconds() - Writes a value in microseconds (uS) to the servo,
controlling the shaft accordingly.
read() - Read the current angle of the servo (the value passed to the last call
to write().
attached() - Check whether the Servo variable is attached to a pin.
detach() - Detach the Servo variable from its pin.
TechFactors Copyright 2020
Lesson 16: Managing and Adding Library
Explore
SD Library
exists() - Tests whether a file or directory exists on the SD card.
mkdir() - Create a directory on the SD card.
Explain
Libraries are a collection of code that makes it easy for you to connect to a sensor, display,
module, etc.
It allows you to call functions that are already written. For example, the Stepper Motor library
contains all of the raw code to access the hardware, all you need to do is initialize it and call the
functions. A library does all the heavy lifting so you can use your modules quickly and easily.
Through the use of libraries, the Arduino can be extended just like most programming
platforms. It provides extra functionality for use in working with hardware or manipulating data.
Elaborate
Steps on How to Locate the Liquid Crystal Library
1. On the tool bar, navigate Sketch then click Include Library Menu.
Elaborate
Steps on How to Locate the Liquid Crystal Library
2. Click on Manage Library then choose Library Manager and the following window
will appear:
Elaborate
Steps on How to Locate the Liquid Crystal Library
You can then search by keyword for a library. For an example searched for Stepper
Motor. Once located it will now install into the library of your Arduino directory and once it is all
install completely into your Arduino directory you can use it any time.
Elaborate
Another Steps on How to Locate the Liquid Crystal Library
1. On the tool bar navigate Sketch click Include Library then choose Add .zip
Library.
Elaborate
Another Steps on How to Locate the Liquid Crystal Library
2. Locate and select the .zip File that will be added to the Arduino Directory
and then click Open.
Elaborate
Another Steps on How to Locate the Liquid Crystal Library
3. Once done go to File click Example Menu then locate the Added zip file
you included.
Evaluate
Activity: LCD Display
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD
Evaluate
Complete the table by keying in the correct code for the given emoticons.
Additional Assessment
Write an essay about each function of the SD Library and the Servo Library.
Write an essay about each function of the SD Library and the Servo Library.
Target Outcomes
Compare 1602 LCD with different LCDs of televisions, projectors and modern
mobile phones;
Engage
Explore
Activity: The class will be divided into four groups and will be assigned to share
their insights for each topic to the class:
Group 1: Discuss the meaning of LCD (including the historical background) and
how LCDs work or are constructed.
Explore
Activity: The class will be divided into four groups and will be assigned to share
their insights for each topic to the class:
Explore
Activity: The class will be divided into four groups and will be assigned to share
their insights for each topic to the class:
Group 3: Differences between CRT, LED, LCD, plasma and other display
technologies.
Explore
Activity: The class will be divided into four groups and will be assigned to share
their insights for each topic to the class:
Explain
Explain
IIC I2C Interface Adapter Module is used
for 16×2 LCD Display. It uses the PCF8574T IC
chip which converts I2C serial data to parallel
data for the LCD display. Also this interface
module simplifies connecting an Arduino to a
16×2 Liquid Crystal display using only 4 wires.
Elaborate
The LCD Pinout Pin No. Symbol Name Function
Evaluate
Activity 1: LCD Display (Hello World!)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD
How does the 1602 LCD differ from the LCD of the televisions, projectors, and
modern mobile phones?
Additional Assessment
Using a 1602 LCD, create a program that will (1) show your first name, (2) last
name, and (3) your age.
Using a 1602 LCD, create a program that will (1) show your first name, (2) last
name, and (3) your age.
Target Outcomes
Engage
Explore
Activity:
Materials:
I2C LCD adapter module
LCD display 16x2
Arduino Uno
Arduino IDE
Procedure: Make a connection from the LCD module to the Arduino board. Set the hardware
connections using the I2C adapter module. Connect the I2C LCD adapter to LCD display by simply
soldering the I2C adapter as shown in the image. Then, connect the adapter to Uno as follows: Vcc
to 5V, Gnd to Gnd, SDA to A4, SCL to A5.
TechFactors Copyright 2020
Lesson 18: LCD Display and the IIC I2C Adapter Module
Explore
What do you think is the main function of the I2C adapter module?
What do you noticed about the connections between Arduino and its LCD display when using
the I2C Module? Compare the number of connections in normal LCD display and I2C LCD display.
Using a small screw, manipulate the blue color component (potentiometer). What have you
noticed?
Explain
When the I2C adapter module is not present, the connection should be from the LCD
module to the Arduino board. With I2C adapter module, the LCD Module and Arduino
should be connected through the I2C Module.
The brightness on the LCD display can be adjusted using the potentiometer in an
LCD display without I2C adapter module.
Explain
IC/I2C Interface Adapter Module is used for 16×2 LCD Display. It uses the
PCF8574T IC chip which converts I2C serial data to parallel data for the LCD display.
Also this interface module simplifies connecting an Arduino to a 16×2 Liquid Crystal
display using only 4 wires.
Explain
Elaborate
Make a comparison on the circuit connections when we wire up the LCD to Arduino
without the I2C adapter and with the adapter.
Evaluate
Activity 1: LCD Display (Hello World!)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 1602 LCD with IIC
I2C Adapter Module
void setup() {
lcd.init(); //initialize the lcd
lcd.backlight(); //open backlight
lcd.print(" Hello World! "); //words will display at first line
lcd.setCursor (0, 1);
lcd.print(" welcome "); //words will display second line
delay(2000);
}
Evaluate
Activity 2: Answer the given question.
How does 1602 LCD with IIC I2C Adapter Module differ from the LCD of the
televisions, projectors, and modern mobile phones?
How does 1602 LCD with IIC I2C Adapter Module differ from the LCD of the
televisions, projectors, and modern mobile phones?
It uses the PCF8574T IC chip which converts I2C serial data to parallel
data for the LCD display.
Additional Assessment
Using the 1602 LCD with IIC I2C Adapter Module, create a program that will show
and replace “world” in “Hello world” with your pet’s name.
Using the 1602 LCD with IIC I2C Adapter Module, create a program that will show
and replace “world” in “Hello world” with your pet’s name.
Target Outcomes
Display characters in a 1602 LCD and make it move from left to right and
vice versa; and
Engage
Explore
Activity: Build Circuit
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
Arduino IDE
1 pc. 1602 LCD with IIC
I2C Adapter Module
Explore
Activity: Build Circuit
The Code
Explain
LCD with built in interface adapter module simplifies connection using only 4 wires.
The LCD module can be connected to an Arduino board in two ways:
Elaborate
Extra Functions
These are almost all of the current methods that you’re able to call for the
Arduino LCD display:
Auto-scroll: Shift text right and left.
autoscroll(); This will move the text one space to the left
whenever a new character is added.
noAutoscroll(); Turns off auto scrolling.
Cursor: This allows you to turn off and on the underscore cursor.
noCursor(); Turns off the underscore cursor.
Cursor(); Turns on the underscore cursor.
TechFactors Copyright 2020
Lesson 19: Making the LCD Characters Move
Elaborate
Extra Functions
Blink: Turns on and off the blinking of the block cursor.
noBlink(); Turns off the blinking cursor.
blink(); Turns on the blinking cursor.
Display: Make the display go blank without losing the current text.
noDisplay(); Turns off the display.
display(); Turns on the display.
Scroll: Allows you to scroll the text both left and right.
scrollDisplayLeft(); Will scroll one position to the left.
scrollDisplayRight(); Will scroll one position to the right.
TechFactors Copyright 2020
Lesson 19: Making the LCD Characters Move
Elaborate
Extra Functions
Serial Display: You can print the text sent through the serial port on the screen.
write(Serial.read());
Set Cursor: Sets the cursor to a specific position. (Location, Line)
setCursor(0, 0); Will set the cursor to be at the top left.
setCursor(15, 1); Will set the cursor to be at the bottom right.
Text Direction: Allows you to tell which way the text should flow from the
cursor.
rightToLeft(); Forces the text to flow from the left of the cursor.
leftToRight(); Forces the text to flow from the right of the cursor.
Evaluate
Activity 1: LCD Display (Serial Display)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 1602 LCD with IIC
I2C Adapter Module
Evaluate
Activity 2: LCD Display (Scroll Display)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 1602 LCD with IIC
I2C Adapter Module
Additional Assessment
Create a program that shows a popular quote using the moving LCD from right to
left.
Create a program that shows a popular quote using the moving LCD from right to
left.
Target Outcomes
Engage
Activity: Staring Contest
Explore
Study the other functions (Blink, cursor and display function) of the Liquid Crystal I2C library
below. Then try displaying your own name in the LCD. Apply the following concepts for your work.
Explain
The LCD with no built-in interface adapter module uses a breadboard that has a
separate potentiometer and a much complex connection.
An LCD with I2C adapter module connects through a bread board and uses a
separate potentiometer. The potentiometer can be used to adjust the brightness on the
LCD display to make it appear and disappear.
Elaborate
Activity:
Evaluate
Activity 1: LCD Display (Blink and Line Cursor!)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD
Evaluate
Activity 2: LCD Display (Display _ No Display Text)
Material
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD
Additional Assessment
a. Cursor
b. Blink
c. Display
Target Outcomes
Engage
Explore
Inside the RGB led, there are three more LED’s. So by changing the brightness of
these LED’s, we can obtain many other colors. To change brightness of RGB LED, we
can use the PWM pins of Arduino. The PWM pins will give signal different duty cycles to
the RGB LED to obtain different colors.
Explore
Activity 1:
Students will set up in the circuit
diagram and program or key in the code
for this activity. Students will configure
various colors by playing with different
values. Let students configure colors
generated from combined PWM values on
the 3 LEDs. They will adjust the RGB LED to
change to different colors by assigning different
values of brightness levels to 3 primary colors
using the function analogWrite(value).
Explore
Activity 1:
COLOR RED GREEN BLUE
RED
GREEN
BLUE
YELLOW
ORANGE
VIOLET
RASPBERRY
TURQUOISE
WHITE
TechFactors Copyright 2020
Lesson 21: Combination Project: RGB Module + LCD Display
Explore
Explain
An RGB LED is basically three LEDs’
in one. It has 4 leads, the red, green, blue
LED and the long lead in which all three LEDs
are connected through the same pin is the
common ground. The color can be controlled
based on the voltages you write to the different
control pins, they make a mixture and produce
several thousands of colors.
Explain
Two Types of RGB LEDS
Anode RGB LEDs -In a common anode RGB LED, the three LEDs share
a positive connection.
Common cathode RGB LEDs - all three LEDs share a negative
connection.
Elaborate
Elaborate
Activity: In Between Colors
Using the same group of students, try the “in between colors”. try mixing
colors play around with a program that will independently turn on and achieving the
following colors. Program the Arduino and RGB LED to display even more colors.
Cyan
Magenta
Yellow
Orange
Purple
Evaluate
Activity 1: RGB Module with LCD Display (Tri – Color Display)
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
4 pcs. 220Ω Resistors
1 pc. Potentiometer
1 pc. 1602 LCD
1 pc. RGB Module
Additional Assessment
Explain and write in a sheet of paper what is RGB and its two types.
Explain and write in a sheet of paper what is RGB and its two types.
Target Outcomes
Create a project using LCD display that can be manipulated using a tilt switch.
Engage
1. What are tilt sensors?
5. If tilt switch are used with LEDs, what is the main function of a tilt switch?
5. If tilt switch are used with LEDs, what is the main function of a tilt switch?
Explore
Think-Pair-Share.
What factors influence the functionality of tilt sensors? Enumerate and explain
its specification.
Explore
Think-Pair-Share.
Enumerate the different key applications of a tilt sensors
Explore
Think-Pair-Share.
Explain
Explain
When the switch is tilted in the appropriate direction, the contacts will be connected,
tilting the switch the opposite direction causes the metallic ball to move away from that
set of contacts, thus breaking that circuit.
Elaborate
Activity:
Evaluate
Activity 1: Tilt Switch with LCD Display
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
1 pc. 220Ω Resistor
1 pc. Tilt Switch
1 pc. I2C with LCD 1602
Additional Assessment
Create a program using tilt switch that when you switch on, the LCD will show a
happy reaction and when you switch off, the LCD will show a sad reaction.
Create a program using tilt switch that when you switch on, the LCD will show a
happy reaction and when you switch off, the LCD will show a sad reaction.
Target Outcomes
Engage
Activity 1
Solve the following to reveal words that you might encounter during the
lesson.
1. Microscope – scope + contact – act + roller =
Engage
Activity 2: Bring Me
Explain
Activity 3:
List down the steps on how these materials (microcontroller, LED, LCD,
Breadboard) work together.
Elaborate
Evaluate
Activity 1: LCD Display with LED Light
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
2 pcs. 220Ω Resistors
1 pc. I2C with LCD 1602
2 pcs. LED (Red and Green)
Additional Assessment
Write in a sheet of paper on what are the different colors of LED can be used in
showing the display in an LCD.
Write in a sheet of paper on what are the different colors of LED can be used in
showing the display in an LCD.
Target Outcomes
Apply the concepts from the previous lessons to create a single project.
Create a project that can count number per digit with tic sound and flashing light
Engage
Pass Me The Box
Explore
Our Project
Explain
Elaborate
How will you relate the lesson about combination project using 4 digital tube, LED,
and buzzer in digital counter?
Evaluate
Activity 1: Counting Number per Digit with TIC Sound and Flashing Light
Materials
Microcontroller
USB Cable
Jumper Wire
Breadboard
5 pc. 220Ω Resistors
1 pc. 4 Digital Tube
1 pc. Passive buzzer
1 pc. LED (Any Color)
Additional Assessment
a. Buzzer
b. 4 Digital Tube
c. LED