You are on page 1of 115

Cl

ass6

Publ
is
hedby
Class- 6
STEMROBO DIGITAL LEARNING CURRICULUM Class-6
LEARNING
Session No. LEARNING CONCEPT & DETAILS
PLATFORM

STEM/
Day- 1
Robotics Introduction

BREADBOARD KIT
LEARNING
Session No. LEARNING CONCEPT & DETAILS
PLATFORM
Introduction to Breadboard and basics of electronic
Breadboard Electronics
Day- 2 components.
Kit

Introduction to Linear Voltage Regulator 7805 IC.

Regulator
Breadboard electronics
Day-3
Kit

LED glowing simple circuit on breadboard.


Breadboard electronics
Day- 4
Kit

RGB LED and its circuit on breadboard.


Breadboard electronics
Day- 5
Kit

Arduino Kit
LEARNING
Session No. Activity / Projects
PLATFORM
Controller Board
Day- 6
(Arduino Uno)
installation and its application.
Controller Board
Day- 7
(Arduino Uno)
Controller Board
Day- 8
(Arduino Uno) board.
Controller Board
Day- 9
(Arduino Uno) Display.

Day- 10 1-Advanced Project


SESSION-1

STEM
STEM stands for Science Technology Engineering Mathematics and STEM Education refers to studying
these areas with theoretical as well as a practical approach. A STEM curriculum is designed to provide
its students with maximum possible practical exposure and hands-on experience in a particular field. It
offers a perfect blend of course modules with a few mandatory lab assignments and group projects,
which help in learning through practical implementation of theoretical knowledge. This kind of
vocational training is being introduced at the K-12 level in many schools worldwide.

ROBOTICS
Robotics is the intersection of science, engineering and technology that produces machines, called
robots, that substitute for (or replicate) human actions. Robots were originally built to handle
monotonous tasks (like building cars on an assembly line), but have since expanded well beyond their
initial uses to perform tasks like fighting fires, cleaning homes and assisting with incredibly intricate
surgeries. Each robot has a differing level of autonomy, ranging from human-controlled bots that carry
out tasks that a human has full control over to fully autonomous bots that perform tasks without any
external influences

Q1.What robots can do?


1. Automate manual or repetitive activities in corporate or industrial settings.
2. Work in unpredictable or hazardous environments to spot hazards like gas leaks.
3. Process and deliver reports for enterprise security.
4. Fill out pharmaceutical prescriptions and prep IVs.
5. Deliver online orders, room service and even food packets during emergencies.
6. Assist during surgeries. Robots can also make music, monitor shorelines for dangerous predators,
help with search and rescue and even assist with food preparation.

1. Perform surgeries but not soothe scared patients.


2. Sense furtive footsteps in a closed-off area, but not take action against gate-crashers.
3. Lead exercise sessions for the elderly but not ease their loneliness.
4. help medical professionals with diagnoses, but not empathize with patients.
5. learn from data, but not correctly respond to unexpected situations.

Q3.How are robots useful?


Robots are used in multiple areas, especially where they can alleviate strenuous tasks or complete
missions that are dangerous for a human to undertake. Robots eliminate dangerous jobs for humans
because they are capable of working in hazardous environments. They can handle lifting heavy loads,
toxic substances and repetitive tasks. This has helped companies to prevent many accidents, also
saving time and money. In the medical field robots are used for intricate surgeries such as prostate
cancer surgery. Robots are able to reach and fit where human hands cannot, allowing greater accuracy.
Robotic benefits in the medical field can be less invasive procedures and reduce pain for the patient
when recovering.
Q4.How robots are different from machines?

be otherwise laborious. A robot is a machine that carries out tasks or groups of tasks that have been
pre-programmed in it. Robots are machines with additional features hence more functionality.
SESSION-2

BREADBOARD
A breadboard is used to build and test circuits quickly before finalizing any circuit design. The
breadboard has many holes into which circuit components like ICs and resistors can be inserted.
A typical breadboard is shown below:

The bread board has strips of metal which run underneath the board and connect the holes on the top
of the board. The metal strips are laid out as shown below. Note that the top and bottom rows of holes
are connected horizontally while the remaining holes are connected vertically.

To use the bread board, the legs of components are placed in the holes. Each set of holes connected by
a metal strip underneath forms a node. A node is a point in a circuit where two components are
connected. Connections between different components are formed by putting their legs in a common
node. The long top and bottom row of holes are usually used for power supply connections. The rest of
the circuit is built by placing components and connecting them together with jumper wires. ICs are
placed in the middle of the board so that half of the legs are on one side of the middle line and half on
the other.
A completed circuit might look like the following:
Types of breadboard:
There are mainly 3 types of breadboard, they are as follows:-
1.Full size breadboard
2.Half size breadboard
3.Mini size breadboard

Breadboarding tips:
It is important to breadboard a circuit neatly and systematically, so that one can debug it and get it
running easily and quickly. It also helps when someone else needs to understand and inspect the
circuit. Here are some tips:
1. Always use the side-lines for power supply connections. Power the chips from the side-lines and
not directly from the power supply.
2. Use black wires for ground connections (0V), and red for other power connections.
3. Keep the jumper wires on the board flat, so that the board does not look cluttered.
4. Route jumper wires around the chips and not over the chips. This makes changing the chips when
needed easier.
5. You could trim the legs of components like resistors, transistors and LEDs, so that they fit in snugly
and do not get pulled out by accident.

Advantages of breadboard:
1.It require soldering to connect the components on board.
2.If the circuit is not working properly then, we can easily check and rectify them by taking out the
components and replace them easily.
SESSION-3

LED
A light-emitting diode (LED) is a semiconductor device that emits light when an electric current flows
through it. When current passes through an LED, the electrons recombine with holes emitting light in
the process. LEDs allow the current to flow in the forward direction and blocks the current in the reverse
direction

Fig.. LED and its symbol

VOLTAGE REGULATOR
The voltage regulator IC 7805 is actually a member of the 78xx series of voltage regulator ICs. It is a fixed
linear voltage regulator. The xx present in 78xx represents the value of the fixed output voltage that the
particular IC provides. For 7805 IC, it is +5V DC regulated power supply. This regulator IC also adds a
provision for a heat sink. The input voltage to this voltage regulator can be up to 35V, and this IC can give
a constant 5V for any value of input less than or equal to 35V which is the threshold limit.

Fig.. LM7805 voltage regulator and its pinout


SESSION-4
SESSION-5
SESSION-6
SESSION-7
SESSION-8
SESSION-9
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-

-
-
-
-

-
-

-
-

-
-
-
-

-
-

-
-

-
-
-

-
-
-

- -

-
-

-
Arduino Starter Kit v1.0

Activity 10:- Disco Light

Learning Objective:-

What is the full form of RGB?, How can we define RGB?, How can we
produce different spectrum of colors using RGB Led?, How can we make
different color patterns?

Discussion:-

We have seen a lot of disco light patterns around us. Have you ever thought
of how it actually works? We have already interfaced a normal LED with the
Arduino. Lets try to make a Disco Light by using RGB LED.

Lets Start:-

In this activity we will learn how to make the disco light with the help of a
RGB LED and a Arduino. We will be making different color combinations by
intermixing of Primary colors in which one color will glow at a particular
moment like disco light after delay of 500ms.We can change the duration of
delay as per our requirement.

Components Required:-

1. Arduino UNO x1
2. USB Cable x1
3. RGB LED x1
4. Male to Male jumper wires x5
5. Resistors ( or x3
6. Breadboard x1

www.stemrobo.com
Arduino Starter Kit v1.0

Circuit Diagram:-

Common Cathode RGB

Programming Logic:-

void setup() { delay(1000);


// Used a common cathode RGB digitalWrite(11,LOW);
pinMode(11,OUTPUT); digitalWrite(10,HIGH); // For cyan
pinMode(10,OUTPUT); digitalWrite(9,HIGH);
pinMode(9,OUTPUT); } delay(1000);
void loop() { digitalWrite(11,HIGH);
digitalWrite(11,HIGH); // For red digitalWrite(10,LOW); // For magenta
digitalWrite(10,LOW); digitalWrite(9,HIGH);
digitalWrite(9,LOW); delay(1000);
delay(1000); digitalWrite(11,HIGH);
digitalWrite(11,LOW); digitalWrite(10,HIGH); // For yellow
digitalWrite(10,HIGH); // For green digitalWrite(9,LOW);
digitalWrite(9,LOW); delay(1000);
delay(1000); digitalWrite(11,HIGH);
digitalWrite(11,LOW); digitalWrite(10,HIGH); // For white
digitalWrite(10,LOW); // For blue digitalWrite(9,HIGH);
digitalWrite(9,HIGH); delay(1000); } // End of the code
1 2

www.stemrobo.com
Arduino Starter Kit v1.0

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

2. With a wire, connect the ground from the Arduino (labeled GND) to the
second last row of the breadboard.

3. Insert RGB LED into the breadboard in such a manner that from the left
side, second pin of RGB will be the common pin (as shown in circuit
diagram).

4. Connect one end of the each resistor to the Red, Green & Blue pins of
the RGB LED respectively & the other end of the those resistors anywhere
over the breadboard (as shown in the circuit diagram).

5. Connect wires from the digital pin 11,10,9 of the Arduino & connect it to
the red, green & blue colour pin of RGB LED respectively through resistors
(as shown in the circuit diagram).

6. Plug power into the Arduino.

7. The RGB should light up. If it unplug the power from the
Arduino, check all of your connections and make sure you have not
plugged the RGB in backwards & power it again.

Learning Outcomes:- Applications:-


Students learnt about the working 1. It is used in cathode ray tubes,
of a RGB LED, How to control LCD displays, and LED
flashing of RGB using Arduino, display such as television,
Role of delay() Function in computer monitor or large
programming. screens .

www.stemrobo.com
Arduino Starter Kit v1.0

Activity 11:- Flashing Decorative Lights

Learning Objective:-

How can we interface the multiple LEDs?, How can we make patterns
using LEDs?, How can we make decorative lights of different colors?

Discussion:-

We have seen a lot of decorative lightning patterns around us. Have you
ever thought of how it actually works? Lets try to make an Alternate LED
flashing pattern.

Lets Start:-

In this activity we will learn how to make the flashing decorative light with the
help of the LEDs and Arduino. How to add on delay at the right position for
better execution of the code. We will be making an Alternate flashing
pattern in which one LED will get switched OFF at a particular moment. This
pattern will shift from one side to another and so on.

Components Required:-

1. Arduino UNO x1
2. USB cable x1
3. LEDs x4
4. Male to Male jumper wires x5
5. Resistors( or x4
6. Breadboard x1

www.stemrobo.com
Arduino Starter Kit v1.0

Circuit Diagram:-

Programming Logic:-

// In this code we will be making digitalWrite(2,LOW);


patterns based upon 4 LEDs delay(500);
void setup() digitalWrite(2,HIGH);
{ delay(500);
//defining pins for different LEDs digitalWrite(3,LOW);
pinMode(2,OUTPUT); delay(500);
pinMode(3,OUTPUT); digitalWrite(3,HIGH);
pinMode(4,OUTPUT); delay(500);
pinMode(5,OUTPUT); digitalWrite(4,LOW);
} delay(500);
void loop() digitalWrite(4,HIGH);
{ delay(500);
digitalWrite(2,HIGH); digitalWrite(5,LOW);
digitalWrite(3,HIGH); delay(500);
digitalWrite(4,HIGH); digitalWrite(5,HIGH);
digitalWrite(5,HIGH); delay(500);
delay(1000); } // End of the code
1 2

www.stemrobo.com
Arduino Starter Kit v1.0

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

2. With a wire, connect the ground from the Arduino (labeled as GND) to
the second last row of the breadboard.

3. Connect the 4 resistors with one end in the ground and the other end
anywhere on the breadboard (as shown in the circuit diagram).

4. Connect the cathode (shorter pin (-ve)) to the resistor. (Repeat


this step for all the 4 LEDs).

5. Connect the anode (longer pin (+ve) ) to the nearby columns.

6. Connect a wire from digital pin 2,3,4,5 of the Arduino to the column in
which the anode of the each LED is connected respectively (as shown in
circuit diagram).

7. Plug power into the Arduino.

8. The LED should light up. If it unplug the power from the
Arduino, check all of your connections and make sure you have not
plugged the LED in backwards. Then try power again.

Learning Outcomes:- Applications:-


Students learnt about how to 1. It can be used in night lighting,
make different patterns using art lighting and outdoor lighting.
multiple LEDs, Role of delay() in 2. It can be used as indicator in
making patterns, etc. any electronic device.

www.stemrobo.com
Arduino Starter Kit v1.0

Activity 12:- Multi - Color Mood light

Learning Objective:-

What is a Potentiometer?, How can we produce the different spectrum of


colors using RGB Led?, How can we control the RGB LED using the
Potentiometer?

Discussion:-

We have seen lots of multi-color decorative lightning pattern around us.


Have you ever thought of how it actually works? Lets try to make a Multi-
Color Mood light.

Lets Start:-

In this activity we will learn how to make a Multi-color Mood light with the
help of a RGB LED, a Potentiometer & Arduino. In this activity we will be
reading the values from the Potentiometer and mapping it over the RGB
LED.

Components Required:-

1. Arduino UNO x1
2. USB Cable x1
3. RGB LED x1
4. Potentiometer x1
5. Male to Male jumper wires x8
6. Resistors( or x1
7. Breadboard x1

www.stemrobo.com
Arduino Starter Kit v1.0

Circuit Diagram:-

Common Cathode RGB LED

Programming Logic:-

// In this code we will be controlling pinMode(redPin, OUTPUT);


the color patterns of RGB LED pinMode(greenPin, OUTPUT);
using Potentiometer
pinMode(bluePin, OUTPUT);
const int redPin = 11;
}
const int greenPin = 10;
void loop()
const int bluePin = 9;
{
// Analog input from the
potentiometer int potValue = map(analogRead
(potPin), 0, 1024, 0, 255);
const int potPin = A0;
Serial.println(potValue);
// Values for each pin of the RGB
LED. int RGBValue = map
((potPin),0,1024,0,255);
int Red;
analogWrite(redPin,RGBValue);
int Green;
analogWrite(greenPin,RGBValue);
int Blue;
analogWrite(bluePin,RGBValue);
void setup()
// map functions is used for
{ mapping the values of
Serial.begin(9600); potentiometer over the RGB LED.

1 2

*map() www.stemrobo.com
Arduino Starter Kit v1.0

if (potValue <= 42.5) if ((potValue > 170) && (potValue


{ <= 212.5))

Red = 255; {

Green = potValue * 6; Red = (potValue - 170) * 6;

Blue = 0; Green = 0;

} Blue = 255;

if ((potValue > 42.5) && (potValue }


<= 85)) if ((potValue > 212.5) && (potValue
{ <= 255))

Red = 255 - (potValue - 43) * 6; {

Green = 255; Red = 255;

Blue = 0; Green = 0;

} Blue = 255 - (potValue - 212.5) * 6;

if ((potValue > 85) && (potValue <= }


127.5)) analogWrite(redPin, Red);
{ analogWrite(bluePin, Blue);
Red = 0; analogWrite(greenPin, Green);
Green = 255; }
Blue = (potValue - 85) * 6; // End of the code
}
if ((potValue > 127.5) && (potValue
<= 170)) {
Red = 0;
Green = 255 - (potValue - 127.5) *
6;
Blue = 255;
}

1 2

www.stemrobo.com
Arduino Starter Kit v1.0

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

2. With a wire, connect the ground from the Arduino (labeled GND) to the
second last row of the breadboard.

3. Insert RGB LED into the breadboard in such a manner that from the left
side, second pin of RGB will be the common pin (as shown in circuit
diagram).

4. Connect one end of the resistor to the common pin of the RGB LED &
other end of the resistor to the GND line. (as it is Common Cathode RGB).

5. Connect wires from digital pin 11,10,9 of the Arduino & connect it to the
red, green & blue color pin of RGB LED respectively. (as shown in the
circuit diagram).

6. Connect the left most pin of the Potentiometer to the last row of
breadboard & right most pin to the second last row of the breadboard and
the middle pin ( i.e. the output pin) to the analog pin A0 pin of the Arduino.

7. Plug power into the Arduino.

8.
check all of your connections. The RGB should light up and it should
change colors according to the rotation of the Potentiometer.

Learning Outcomes:- Applications:-


Students learnt about the map() 1. It can be used in night lighting,
function, how to map values from art lighting and outdoor lighting
a sensor over an output device, or in decoration purpose.
etc.

www.stemrobo.com
Arduino Starter Kit v1.0

Activity 13:- Distance Calculator

Learning Objective:-

How to calculate the distance using an Ultrasonic sensor, How to print the
values obtained from a sensor over the LCD screen.

Discussion:-

We usually measure the distance using a measuring tape and a scale but
have you ever thought about calculating the distance from the initial point
only and not going to the final point. In this activity we will calculate the
distance from one point. Lets try making a Distance Calculator.

Lets Start:-

In this activity we will learn how to calculate the distance using an


Ultrasonic sensor & display it over the I2C LCD. Ultrasonic Sensor sends so-
nar which gets reflected back by any object in its path. Based upon this phe-
nomenon distance of an object can be calculated by using this formula:
Distance = (speed x time) Speed of sound = 340 m/s.

the time in Time will be divided by 2 to get


time travel of the wave from source to that object.

Components Required:-

1. Arduino UNO x1
2. USB Cable x1
3. I2C LCD x1
4. Ultrasonic Sensor x1
5. Male to Female jumper wires x8

www.stemrobo.com
Arduino Starter Kit v1.0

Circuit Diagram:-

Programming Logic:-

// In this code we will be calculating void loop() {


the distance using an Ultrasonic digitalWrite(trigPin, LOW);
Sensor & displaying that distance delayMicroseconds(2);
over the LCD. digitalWrite(trigPin, HIGH);
#include <Wire.h> delayMicroseconds(10);
#include <LiquidCrystal_I2C.h> digitalWrite(trigPin, LOW);
LiquidCrystal_I2C lcd(0x27, 16,2); duration = pulseIn(echoPin, HIGH);
// Defining pins & variables for distanceCm = duration * 0.0340 / 2;
the Ultrasonic sensor. distanceInch = duration * 0.01330 /
const int trigPin = 3; 2;
const int echoPin = 2; lcd.setCursor(0, 0);
long duration; lcd.print("Distance: ");
int distanceCm, distanceInch; Serial.println(distanceCm);
void setup() lcd.print(distanceCm);
{ lcd.print(" cm");
lcd.begin(); // Initializes the inter- lcd.setCursor(0, 1);
face to the LCD display lcd.print(" ");
lcd.backlight(); lcd.print(distanceInch);
pinMode(trigPin, OUTPUT); lcd.print(" inch");
pinMode(echoPin, INPUT); delay(1000);
Serial.begin(9600); } // End of the code
}
1 2

www.stemrobo.com
Arduino Starter Kit v1.0

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Download & Install the Arduino-LiquidCrystal-I2C-library & Wire library


from www.github.com, if already not pre-installed.

2. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

3. Connect a wire from GND pin of the Arduino to the ground pin of the I2C
LCD. Connect a wire from 5V of the Arduino to the VCC pin of the I2C
LCD.

4. Connect the SDA pin of the I2C LCD to the analog pin A4 of the Arduino
& Connect the SCL pin of the I2C LCD to the analog pin A5 of the
Arduino.

5. Connect the GND pin of an Ultrasonic Sensor to the ground pin of


the Arduino, VCC to the Vin pin of the Arduino ( if Arduino is powered up
through USB only), trig to the digital pin 3 of the Arduino and echo to the
digital pin 2 of the Arduino UNO (as show n in breadboard cir-

6. Plug power into the Arduino.

7. The LCD should light up & the Ultrasonic Sensor should start

check all of your connections & try again.

Learning Outcomes:- Applications:-


Students learnt about how to 1. It can be used in for calculating
calculate the distance using an the distance of an object from
Ultrasonic sensor & display it over the Source.
the LCD. 2. It can be used for making
height calculating device.

www.stemrobo.com
Arduino Starter Kit v1.0

Activity 14:- Intruders Alarm System

Learning Objective:-

How can we make Intruders Alarm or Security System using an IR Sensor,


few LEDs & Buzzer.

Discussion:-

We have seen a lot of Intruders Alarm System around us in the real world as
well as in the movies. Have you ever thought of how it actually works? Lets
try to make our own Intruders Alarm System.

Lets Start:-

In this activity we will learn how to make an Intruders Alarm System with the
help of an IR Sensor, some LEDs & a buzzer. The IR transmitter transmits
IR radiation which gets deflected back from an object and received by the
receiver of the IR Sensor indicating the presence of an object & switching on
the buzzer to indicate presence of the intruders in that area.

Components Required:-

1. Arduino UNO with USB Cable x1


2. LEDs x2 (Green, Red)
3. Buzzer x1
4. IR Sensor x1
5. Male to Male jumper wires x6
6. Male to Female jumper wires x3
7. Resistors( or x2
8. Breadboard x1

www.stemrobo.com
Arduino Starter Kit v1.0

Circuit Diagram:-

Programming Logic:-

// In this code we will be making an void loop()


Intruders Alarm System { data = digitalRead(IR);
// Defining pins for LEDs, Sensor & if(data == HIGH)
Buzzer
{ // If an IR Sensor detects
int IR= 5; something
int Red =4; digitalWrite(Red,HIGH);
int Alarm =3; digitalWrite(Alarm,HIGH);
int Green= 2; digitalWrite(Green,LOW);
int data=0; // For storing the value }
read by an IR Sensor
else
void setup()
{
{
digitalWrite(Red,LOW);
pinMode(Red, OUTPUT);
digitalWrite(Alarm,LOW);
pinMode(Green,OUTPUT);
digitalWrite(Green,HIGH);
pinMode(Alarm,OUTPUT);
}
pinMode(data,INPUT);
}
}
// End of the code
1 2

www.stemrobo.com
Arduino Starter Kit v1.0

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

2. With a wire, connect the ground (labeled GND) & the 5V from the
Arduino to the second last row & last row of the breadboard respectively.

3. Connect the GND pin of the IR Sensor to the GND pin of the Arduino.
Vcc pin of the IR Sensor to the 5V pin of the Arduino and the third pin,
output pin to the digital pin 5 of the Arduino.

4. Insert buzzer into the breadboard .Connect its negative pin to the GND
& positive pin to the digital pin 3 of the Arduino.

5. Insert the LEDs into the breadboard. Make connections as shown in the
circuit diagram.( Connecting cathode(-ve) pin of each LED to GND through
resistor & anode (+ve) pin of each LED to the digital pins 2,4 respectively.

6. Plug power into the Arduino.

7. When obstacles comes in-front of the IR Sensor then the Alarm and Red
LED will get activated else Green LED will glow. If it
power from the Arduino, check all of your connections & try again.

Learning Outcomes:- Applications:-


Students learnt about the working 1. It can be used in houses as a
of a IR Sensor, How to control the security alarm.
led and buzzer with IR Sensor 2. It can be used in Burglar Alarm
using Arduino. System.

www.stemrobo.com
Arduino Starter Kit v1.0

Activity 15:- Weather Monitoring System

Learning Objective:-

How to measure the current temperature & humidity with this smart device.
How to used it as an indicator in industries ?

Discussion:-

We have seen a lot Weather Monitoring Systems in air conditioners and in


packaging industries. Have you ever thought of how it actually works? Lets
try to check the current temperature and humidity around us .

Lets Start:-

In this activity we will learn about how to make the Weather Monitoring
System with the help of a DHT11, an I2C LCD and a Arduino. We will be
making a Weather Monitoring System in which the current temperature and
humidity will get displayed on the I2C LCD & on the basis of that different
color LEDs will be controlled.

Components Required:-

1. Arduino Uno with USB cable x1


2. LEDs x2
3. I2C LCD x1
4. DHT11 x1
5. Male to Male jumper wires x4
6. Male to Female jumper wires x7
7. Resistors 220 x2
8. Breadboard x1

www.stemrobo.com
Arduino Starter Kit v1.0

Circuit Diagram:-

Programming Logic:-

// In this code we will be making lcd.begin();


weather monitoring system Serial.begin(9600);
#include <Wire.h> Serial.println(" =========== ");
#include <LiquidCrystal_I2C.h> Serial.println(" || Welcome to Tem-
#include "DHT.h" perature and Humidity Detector ||");
#define DHTPIN 8 // Digital pin Serial.println(" =========== ");
connected to the DHT sensor }
#define DHTTYPE DHT11 void loop() {
// Creating object for class // Reading data from the sensor
DHT dht(DHTPIN, DHTTYPE); float h = dht.readHumidity();
LiquidCrystal_I2C lcd(0x27, 16, 2); float t = dht.readTemperature();
void setup() if (isnan(h) || isnan(t))
{ {
pinMode(3,OUTPUT); // Red LED Serial.println(F("Failed to read from
pinMode(5,OUTPUT); // Green LED DHT sensor!"));
lcd.backlight(); return; }
1 2

www.stemrobo.com
Arduino Starter Kit v1.0

Serial.print("Humidity: "); lcd.print(t);


Serial.print(h); lcd.print(" °C");
Serial.println(" %"); delay(2000);
lcd.clear(); if(t<25)
lcd.setCursor(0, 0); {
lcd.print("Humidity:"); digitalWrite(3,LOW);
lcd.print(h); digitalWrite(5,HIGH); }
lcd.print("%"); else
Serial.print("Temperature: "); {
Serial.print(t); digitalWrite(3,HIGH);
Serial.print("°C "); digitalWrite(5,LOW);
lcd.setCursor(0,1); }
lcd.print("Temp:"); } // End of the Code
3 4

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Download & Install the DHT-sensor-library, Adafruit_Sensor, Arduino-


LiquidCrystal-I2C-library & Wire libraries from www.github.com, if already
not pre-installed.

2. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

3. With a wire, connect the ground (labeled as GND) & 5V from the
Arduino to the second last row & last row of the breadboard respectively.

4. Connect a wire from the GND & the 5V line over the breadboard to the
ground pin & Vcc pin of the DHT11 respectively.

5. Connect a wire from the digital pin 8 of the Arduino to the output pin of
the DHT11 Sensor.

www.stemrobo.com
Arduino Starter Kit v1.0

6. Connect a wire from GND pin of Arduino to the ground pin of I2C LCD.
Connect a wire from 5V of Arduino to the VCC pin of I2C the LCD.

7. Connect the SDA pin of I2C LCD to the analog pin A4 of the Arduino &
Connect the SCL pin of I2C LCD to the analog pin A5 of the Arduino.

8. Insert the LEDs into the breadboard. Make connections as shown in the
circuit diagram. (Connecting cathode(-ve) pin of each LED to the GND line
through the resistor & anode (+ve) pin of each LED to the digital pins 3 &
5 respectively.

9. Plug power into the Arduino.

10. The LCD should light up & the DHT11 should start calculating

Arduino, check all of your connections & try again.

Learning Outcomes:- Applications:-


Students learnt about the working 1. It can be used in packaging
of a DHT11 & I2C LCD. How to industry.
monitor & display the Temperature
2. It can be used for maintaining
and the Humidity on the screen
the temperature and humidity in
using Arduino.
the room.

www.stemrobo.com
Arduino Starter Kit v1.0

Activity 16:- Digital Dice

Learning Objective:-

What is random function?, How to use it to generate random numbers,


How Seven Segment Display can be used to make digital dice?

Discussion:-

We have seen a lot of digital electronic toys around us. Have you ever
thought of how it actually works? Lets try to make a digital dice with the help
of a Seven Segment Display & a Push Button.

Lets Start:-

In this activity we will learn how to make a Digital Dice with the help of a
Seven Segment Display, a Push Button and a Arduino. On pressing the
Push Button a number out 1 to 6 will be displayed over the Seven Segment
Display just like throw of a dice.

Components Required:-

1. Arduino UNO with x1


2. USB cable x1
3. Seven Segment Display x1
4. Push button x1
5. Male to Male jumper wires x12
6. Resistor x1
7. Resistor x1
8. Breadboard x1

www.stemrobo.com 71
Arduino Starter Kit v1.0

Circuit Diagram:-

Programming Logic:-

// In this code we will be making void loop()


Digital Dice using Common Cath- {
ode Seven Segment Display
digitalWrite(2,HIGH);
int buttonState;
digitalWrite(3,HIGH);
long ran;
digitalWrite(4,HIGH);
void setup ()
digitalWrite(5,HIGH);
{ // Declaring pins
digitalWrite(6,HIGH);
pinMode(2,OUTPUT);
digitalWrite(7,HIGH);
pinMode(3,OUTPUT);
digitalWrite(8,LOW);
pinMode(4,OUTPUT);
buttonState = digitalRead(11);
pinMode(5,OUTPUT);
if (buttonState == HIGH)
pinMode(6,OUTPUT);
{ while(digitalRead(11)==HIGH);
pinMode(7,OUTPUT);
ran = random(1,7);
pinMode(8,OUTPUT);
// Random function will generate
pinMode(11,INPUT); random numbers between the
randomSeed(analogRead(0)); } range .
} 1 2

* randomSeed( ); random( ); www.stemrobo.com


Arduino Starter Kit v1.0

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

2. With a wire, connect the ground (labeled as GND) & 5V from the
Arduino to the second last row & last row of the breadboard respectively.

3. Insert a Seven Segment Display (using Common Cathode Display) into


the Breadboard. Connect the common pin (middle pin of seven segment
display) of the 7 segment to the ground pin of Arduino UNO with the help
of a resistor. (As shown in circuit diagram)

4. Connect a, b, c, d, e, f and g pin of the Seven Segment Display to the


digital pin 2, 3, 4, 5, 6, 7, 8 of the Arduino UNO (eg: take a wire
connect one side to pin a & other side to the digital pin 2 of the Arduino).

5. Insert a Push Button into the Breadboard and connect one pin of the
button to the 5V pin of the Arduino and other pin of the Button to the digital
pin 11 of the Arduino as shown in the circuit diagram.

6. Connect other end of the button (adjacent to 5V one) to the GND


through resistor as shown in the circuit diagram.

7. Plug power into the Arduino.

8.
Segment after that press dice button, any random number from 1 to 6 will
get displayed.

Learning Outcomes:- Applications:-


Students learnt about the working 1. It can be used in different
of a random() function used for games like Bingo, Snakes &
generating random numbers, etc. Ladder, etc.

www.stemrobo.com
Arduino Starter Kit v1.0

Activity 17:- Black and White Sorter

Learning Objective:-

How to differentiate between colors using an IR Sensor?, How to sort


materials using an IR sensor and moving items using servo motor.

Discussion:-

We have seen a lot of electronics sorting machines around us. Have you
ever thought of how it works? How it sorts different color materials?, Lets try
to make a Black and White Sorter.

Lets Start:-

In this activity we are going to use an IR sensor and a Servo motor to


differentiate between black and white object. When some black object
comes in front of the IR sensor no feedback is received by the IR sensor
hence servo moves to the right and when white object comes in front then
feedback is received and servo moves to the left.

Components Required:-

1. Arduino UNO with USB cable x1


2. LEDs x2
3. Servo Motor x1
4. IR Sensor x1
5. Male to Male jumper wires x7
6. Male to Female jumper wires x3
7. Resistor x2
8. Breadboard x1

www.stemrobo.com
Arduino Starter Kit v1.0

Circuit Diagram:-

Programming Logic:-

// In this code we will be making a { // If white is detected


black & white sorter digitalWrite(2,HIGH);
#include <Servo.h> digitalWrite(3,LOW);
Servo myservo; // create servo myservo.write(0); // Servo to move
object to control a servo to 0 degrees
void setup() { delay(3000); // Waits for servo to
reach the position
Serial.begin(9600); }
pinMode(7, INPUT); else { // If black is detected
pinMode(2, OUTPUT); digitalWrite(3,HIGH);
digitalWrite(2,LOW);
pinMode(3,OUTPUT); // Servo to move to 170 degrees
myservo.attach(11); // attaches the myservo.write(170);
servo on pin 11 delay(3000);
} }}
void loop() { // End of the code
myservo.write(90);
//Checking the object
if(digitalRead(7)==1)
1 2

www.stemrobo.com 76
Arduino Starter Kit v1.0

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

2. With a wire, connect the ground (labeled as GND) & 5V from the
Arduino to the second last row & last row of the breadboard respectively.

3. Connect a wire, from 5V & GND pin from Arduino to the Vcc (red) &
GND (black) wire of the Servo Motor respectively.

4. Connect the remaining wire on the servo connector to a digital pin 11 on


the Arduino. (as shown in circuit diagram).

5. Insert the LEDs into the breadboard. Make connections as shown in the
circuit diagram. (Connecting cathode(-ve) pin of each LED to the GND
through the resistor & anode (+ve) pin of each LED to the digital pins 2 &
3 respectively.

6. Connect the GND pin of the IR Sensor to the GND pin of the Arduino.
Vcc pin of the IR Sensor to the 5V pin of the Arduino and the third pin,
output pin to the digital pin 7 of the Arduino.

7. Plug power into the Arduino.

8. Servo motor should be come to zero position & sensor should get
powered up when Arduino is powered up.
from the Arduino, check all of your connections again & try again.

Learning Outcomes:- Applications:-


Students learnt about how 1. We can use this method to
differentiate between colors, how remove object to particular
to move objects using Servo position by differentiating their
Motor, etc. black and white appearance.

www.stemrobo.com
Arduino Starter Kit v1.0

Activity 18:- Remote Controlled LED

Learning Objective:-

What is a Tsop?, How does a remote sends different data to the different
devices?, How can we control different devices using Tsop & IR Remote.

Discussion:-

We have seen a lot of remote controlled devices around us. Have you ever
thought of how it actually works?, How does a remote controls different
devices. Lets try to control a LED with the IR Remote and a Tsop.

Lets Start:-

In this activity we will learn how to control a LED with the help of a Tsop and
the IR Remote. We will learn about the concept of Tsop. How Tsop affects
our output. How does a remote sends different values on pressing different
buttons. We will be controlling LED ON/OFF with the help of a Tsop and
the IR Remote.

Components Required:-

1. Arduino UNO x1
2. USB cable x1
3. LED x1
4. Tsop x1
5. IR Remote x1
6. Male to Male jumper wires x7
7. Resistor ( or x1
8. Breadboard x1

www.stemrobo.com
Arduino Starter Kit v1.0

Circuit Diagram:-

Programming Logic:-

// CODE1: For getting frequency of void loop()


particular button of remote. {
//Before Uploading this code down- if (irrecv.decode(&results))
load IRremote.h library
{
#include <IRremote.h>
Serial.println(results.value, DEC);
int RECV_PIN = 3;
irrecv.resume();
IRrecv irrecv(RECV_PIN);
// Receive the next value
decode_results results;
}
void setup()
delay(100);
{
}
Serial.begin(9600);
// End of the code
irrecv.enableIRIn();
// Start the receiver
}

1 2

www.stemrobo.com
Arduino Starter Kit v1.0

Programming Logic:-

// CODE2: For controlling LED with void loop()


Remote. {
#include<IRremote.h> if (irrecv.decode(&results))
int RECV_PIN = 3;
// The pin where you connect the {
output pin of TSOP1838
if(results.value == code1)
int led = 2;
{ // Turn it off when button A is
int stat=0 ; //State variable, the pressed
initial state of LED is OFF (zero)
digitalWrite(led, LOW);
// Code received from button A, it
will change according to your data Serial.println("LED is Off");
received. }
#define code1 16728765 else if(results.value == code2)
// Code received from button B, it { // Turn it on when the button is
will change according to your data pressed
received. digitalWrite(led, HIGH);
#define code2 16758855 Serial.println("LED is On");
IRrecv irrecv(RECV_PIN); }
decode_results results; Serial.println(results.value);
void setup() // You can comment this line
{ // Start serial Communication for irrecv.resume();
using Serial Monitor
// Receive the next value
Serial.begin(9600);
} } // End of the Code
// Start the receiver
irrecv.enableIRIn();
pinMode(led, OUTPUT);
Serial.println("Waiting for the
Signal");
}

1 2

www.stemrobo.com
Arduino Starter Kit v1.0

Serial Monitor

Code 1:

Code 2:

www.stemrobo.com
Arduino Starter Kit v1.0

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Download & Install the Arduino-IRremote library from www.github.com ,


if already not pre-installed.

2. To control this Tsop module, use the above mentioned Library .Upload
Library using menu Sketch >> Include Library >> Add .ZIP File

3. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

4. With a wire, connect the ground (labeled as GND) & the 5V from the
Arduino to the second last row & last row of the breadboard respectively.

5. Insert a LED into the breadboard with both the pins in two separate
columns. Connect the cathode (-ve pin) to the GND through
connecting wire.

6. Connect one end of the 220 resistor to the Anode (+ve pin) of the LED
& other end of the resistor to the digital pin 2 of the Arduino as shown in
the circuit diagram.

8. Insert a Tsop1838 in the Breadboard. Connect 1st pin of Tsop to digital


pin 3 of Arduino, 2nd pin to the GND and 3rd pin to the 5V line over
the breadboard. (as shown in the circuit diagram).

8. Upload the Code1 first note down the values received on clicking
different buttons & use those values in Code2 to control a LED.

Learning Outcomes:- Applications:-


Students learnt about the working 1. The main application of Tsop is
of a Tsop, How to read values from in IR Remote control.
a Tsop, etc. 2. It can used for controlling the
switching of devices.

www.stemrobo.com
Arduino Starter Kit v1.0

Activity 19:- Weather Station using DHT11

Learning Objective:-

What is a DHT11 Sensor?, How it works?, How to interface a DHT11


Sensor with Arduino?, How to measure Temperature & Humidity using
DHT11.

Discussion:-

We have seen a lot of temperature and humidity measurement devices like


weather monitoring system . Have you ever thought of how it actually works?
Lets try to make this temperature and humidity measuring device .

Lets Start:-

In this activity we will learn how to interface DHT11 with the Arduino IDE.
We will learn about the interfacing of a DHT11. How a DHT11 Sensor
works?, This sensor can be easily interfaced with any microcontroller like
Arduino, Raspberry pi, etc to measure humidity and temperature
instantaneously.

Components Required:-

1. Arduino UNO x1
2. USB cable x1
3. DHT11 x1
4. Male to Female jumper wires x3

www.stemrobo.com 46
Arduino Starter Kit v1.0

Circuit Diagram:-

Programming Logic:-

// Before Uploading this code void loop() {


download (Adafruit_Sensor.h) & delay(2000);
(DHT.h) & library, if not installed.
float h = dht.readHumidity();
#include "DHT.h"
// Read temperature as Celsius
#define DHTPIN 8 // Digital pin (the default)
connected to the DHT sensor
float t = dht.readTemperature();
#define DHTTYPE DHT11
// Read temperature as Fahrenheit
// Creating object for class (isFahrenheit = true)
DHTTYPE
float f = dht.readTemperature(true);
DHT dht(DHTPIN, DHTTYPE);
// Check if any reads failed and exit
void setup() early (to try again).
{ if (isnan(h) || isnan(t) || isnan(f))
Serial.begin(9600); {
Serial.println("DHTxx test!"); Serial.println(F("Failed to read from
dht.begin(); DHT sensor!"));
} return;
}
1 2

www.stemrobo.com
Arduino Starter Kit v1.0

Serial.print("Humidity: "); Serial.print(t);


Serial.print(h); Serial.print("°C ");
Serial.println(" %"); Serial.print(f);
Serial.print("Temperature: "); Serial.println("°F ");
3 } // End of the code 4

Serial Monitor:

ABCDEAASE

Instructions:- XAGAGANTX
KJSTEMTHJK
RPSINGHLM
EEIAHAKDH

1. Download & Install the DHT-sensor-library & Adafruit_Sensor library from


www.github.com , if already not pre-installed.

2. To control this DHT11 , use the above mentioned Libraries. Upload


Libraries using menu Sketch >> Include Library >> Add .ZIP File

3. Connect your Arduino with the Computer System & upload the code into
the Arduino. After uploading the code disconnect the Arduino.

www.stemrobo.com
Arduino Starter Kit v1.0

4. Connect a wire from the GND & the 5V pin of the Arduino to the ground
pin & the Vcc pin of the DHT11 respectively.

5. Connect a wire from the digital pin 8 of the Arduino to the output pin of
the DHT11 Sensor.

6. Now all the pin of DHT11 has been connected to the specified pin of the
Arduino.

7. Plug power into the Arduino.

8. The DHT11 will start measuring the current temperature and humidity of

connections and make sure about the connections. Then try again.

Learning Outcomes:- Applications:-


Students learnt about the working 1. It can be used to measure the
of a DHT11 and learnt how to current temperature & humidity
measure the current temperature of the room.
and humidity inside the room, etc. 2. It can be used in weather
prediction system.

www.stemrobo.com
Abo
utS
TEMR
OBO

STE
MROBOT ECHNOL OGIESPVT
.LT
D.
B-
32,Sect
or-63,
Noi
da,U.P.
INDI A-201301
Websi
te:www. stemrobo.c
om
Email
:sa
les@s temrobo.c
om

You might also like