Arduino Learning Kit Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 113

Arduino Learning Kit Manual

By Anonimouse

A beginner-friendly manual for starters who want to explore our Arduino


Learning Kit. Compiled and made by Anonimouse, use of this manual and/or
distribution without permission is punishable by law.

www.anonimouse.tech | info@anonimouse.tech
CONTENTS

INTRODUCTION TO ARDUINO
1 What is Arduino?
Arduino Uno Specifications
Setting up Integrated Development Environment(IDE)

ACTIVITIES
2 Activity 1

Activity 2
Blinking and Fading LED

LED Controlled by a Potentiometer

Activity 3 RGB LED Controlled by a Button

Activity 4 7-Segment Display

Activity 5 Displaying Numbers 0 to 9 Using 4-Digit


7-Segment LED Display

Activity 6 LED Matrix

Activity 7 Mini Fire Alarm System

Activity 8 Mini Emergency LED

Activity 9 Using Joystick

Activity 10 Tilt Alarm

Activity 11 LM35

Activity 12 Remote Controlled LED using IR Receiver


Activity 13 Control LED by a Clap

Activity 14 Using Matrix Button Keypad Module (4x4 Keypad)

Activity 15 Stepper Motor and Driver

Activity 16 Servo Motor

Activity 17 Active Buzzer

Activity 18 Water Level Sensor

Activity 19 16x2 Display

Activity 20 Temperature and Humidity Sensing using DHT11

Activity 21 DS1302 RTC Module

Activity 22 5V Relay

Activity 23 RFID

Activity 24 74HC595
What is Arduino?
Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger
on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what
to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the
Arduino Software (IDE), based on Processing.

What programming language does it use?

Arduino compiler/IDE accepts C and C++ as-is. In fact, most of libraries are written in C++.

However, there isn’t really an “Arduino Language”, It's just C++ with some domain-specific libraries. These add on various features, such as functions you can call
to control the hardware. If you didn't have those functions, you'd need to fiddle directly with special registers to control everything. That's how embedded
programming is usually done. It's fast, but it can be quite hard to learn and understand.

In addition to the functions, the libraries add alternative names for some types. For example, boolean and byte are not in the C++ standard. However, they are
directly equivalent to bool and unsigned char.

All of these things mean you can probably port general C++ code directly to Arduino without difficulty. However, going back the other way may require some
minor editing.

For this manual, we will be focusing on Arduino UNO R3.

Property of www.anonimouse.tech
Meet Arduino Uno!

Arduino Uno is a microcontroller board based on the ATmega328P. It has six analog inputs, a 16 MHz quartz crystal, a power jack, a USB
connection, an ICSP header, 14 digital input/output pins of which 6 of them can be used as PWM outputs, and a reset button.

It is an easy to use microcontroller, all you have to do is connect it to a computer with a USB cable or power it up with your own power bank. You can play with
your UNO without worrying too much about destroying it, because worst case scenario will just lead you to replacing the chip and start over again.

Property of www.anonimouse.tech
Pin Descriptions
Pin Category Pin Name Details

Vin: Input voltage to Arduino when using an external power


source.
5V: Regulated power supply used to power microcontroller
Vin, 3.3V, 5V, and other components on the board.
Power 3.3V: 3.3V supply generated by on-board voltage regulator.
GND
Maximum current draw is 50mA.
GND: ground pins.

Reset Reset Resets the microcontroller.

Analog Pins A0 – A5 Used to provide analog input in the range of 0-5V

Input/Output Pins Digital Pins 0 - 13


Can be used as input or output pins.

Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.

External
Interrupts 2, 3 To trigger an interrupt.

PWM 3, 5, 6, 9, 11 Provides 8-bit PWM output.

10 (SS), 11
SPI (MOSI), 12 Used for SPI communication.

(MISO) and 13
(SCK)

Inbuilt LED 13 To turn on the inbuilt LED.

A4 (SDA), A5 (SCA)
TWI Used for TWI communication.

AREF AREF To provide reference voltage for input voltage.

Property of www.anonimouse.tech
Arduino Uno Technical Specifications

Microcontroller ATmega328P – 8 bit AVR family microcontroller

Operating Voltage 5V

Recommended Input
Voltage 7-12V

Input Voltage Limits 6-20V

Analog Input Pins 6 (A0 – A5)

Digital I/O Pins 14 (Out of which 6 provide PWM output)

DC Current on I/O Pins 40 mA

DC Current on 3.3V Pin 50 mA

Flash Memory 32 KB (0.5 KB is used for Bootloader)

SRAM 2 KB

EEPROM 1 KB

Frequency (Clock Speed) 16 MHz

Property of www.anonimouse.tech
How to Download the Arduino IDE
The Arduino Software (IDE) makes it easy to create codes and upload it to the board. it runs on Windows, Linux and Mac OS X.
The environment is written in Java and based on Processing and other open source software.

To download the Arduino IDE, go to this link: https://www.arduino.cc/en/Main/Software

Choose what best suits on whatever you are working with

When the download finishes, proceed with the installation. Here’s a step by step procedure provided by this link:

https://www.arduino.cc/en/Guide/Windows

You choose the components to install

Property of www.anonimouse.tech
Choose the installation directory. If you want to change the default one, hit on Browse and navigate your desired location.

Let it extract and install all the required files.

Property of www.anonimouse.tech
Getting Started!
Property of www.anonimouse.tech
Once you are done downloading, open your Arduino IDE. A sketch is what we call to our created program in the Arduino IDE. In order to create your own sketch,
click on File then New.

A fresh sketch should open up for you, also your might also want to plug your Arduino Uno Board to the PC using the USB Cable and check on what board your
going to use. In order to do that, select Tools and under boards click on the board you are working with.

Since we are working with Arduino Uno, Select Arduino/Genuino Uno.

Property of www.anonimouse.tech
Also, you might want to check the port that you are using and in order to do that, click on Tools then under Ports click on the COM which indicated the board
you are using.

Property of www.anonimouse.tech
Let’s Get Started!
Try out the Activities to fully enjoy your Arduino Learning Kit

Property of www.anonimouse.tech
Activity 01: Blinking and Fading LED
A light-emitting diode (LED) is a two-lead semiconductor light source. It is a p-n junction
diode that emits light when activated. When a suitable current is applied to the leads, electrons
are able to recombine with electron holes within the device, releasing energy in the form of
photons, this effect is called electroluminescence, and the color of the light is determined by the
energy band gap of the semiconductor.

The Arduino board has one built-in on digital pin 13.

Materials

BREADBOARD
ARDUINO UNO
AND USB CABLE

MALE TO MALE
DUPONT WIRES

220Ω RESISTOR LED


Instructions
Our objective in this activity is to have a blinking led.

Property of www.anonimouse.tech
To do so, we must first follow the schematics below:

To check if your connections are right, follow these steps below:

1. Insert your LED into your breadboard.


2. A led has two legs, one long and one short. These legs denote the positive and negative pins of an LED. Now, insert the 220Ω resistor
in series with the longer leg of the LED.
3. Using a Male to Male Dupont wire, connect the “GND” pin of the Arduino and the shorter leg of the LED.
4. Using a Male to Male Dupont wire, connect the other leg of the 220Ω resistor and the “pin8” of the Arduino.

Now that your connections are done, we may now create a program that will help you control the blinking of your LED.

To do so, open your Arduino IDE and copy this sketch.

Property of www.anonimouse.tech
In order to do the fading activity, we need to move our Dupont wire connected to
“pin8” of the Arduino to “pin9” which is a PWM pin. Because in LED Fading, we will be using an analogWrite. It is used whenever you’ll be having an
output such as the brightness of the LED.

Property of www.anonimouse.tech
Lastly, plug the USB Cable to your PC. Then verify and upload the program.

Property of www.anonimouse.tech
Activity 02: LED Controlled by a Potentiometer
A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider.
If only two terminals are used, one end and the wiper, it acts as a variable resistor or a rheostat.

Materials

BREADBOARD
ARDUINO UNO
MALE TO MALE
AND USB CABLE DUPONT WIRES

LED
POTENTIOMETER 220Ω RESISTOR

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to control the brightness of the LED with a potentiometer.

To do so, we must first follow the schematics below:

To check if your connections are right, please follow these steps below:

1. Use the connection in the Activity 01 Blinking LED.


2. Insert the Potentiometer into the breadboard (place it in a way, that the knob of the potentiometer points at you).
3. Using a Male to Male Dupont Wire, connect the leftmost pin of the potentiometer and the “5v” of the Arduino.
4. Using a Male to Male Dupont Wire, connect the center pin of the potentiometer with the “A0” pin of the Arduino.
5. Using a Male to Male Dupont Wire, connect the rightmost ping of the potentiometer and the “GND” pin of the Arduino.

Now that you are done with the connections, we will now head on to creating a program.
Property of www.anonimouse.tech
Open your Arduino IDE and copy this sketch.

After copying the code, plug your USB cable then verify and upload your program. Once uploaded you

Property of www.anonimouse.tech
may now open the Serial Monitor of your Arduino IDE for you to observe what will happen when you turn the knob of your
potentiometer.

Property of www.anonimouse.tech
Activity 03: RGB LED Controlled by a Button
RGB LED modules can emit various colors of light.
They are manufactured by packaging three LEDs of red, green, and blue into a transparent or
semitransparent plastic shell and have four pins.

The three primary colors, red, green, and blue, can be mixed and compose of all kinds of colors
by brightness, so, you can make an RGB LED emit colorful light by controlling the circuit.

Materials

ARDUINO UNO MALE TO MALE DUPONT BREADBOARD


AND USB CABLE WIRES

Property of www.anonimouse.tech
RGB LED BUTTON RESISTOR 220Ω and 10Ω

Instructions
Our objective in this activity is to control the color of the RGB LED with a button.

To do so, we must first follow the schematics below:

To check if your connections are right, please follow these steps below:

1. Insert your RGB Module into the breadboard. Remember where the labels such as R, G, B, and GND is placed.
2. Connect one leg of a 220Ω resistor with the “R” pin of the RGB.
3. Using a Male to Male Dupont wire, connect other leg of the 220Ω resistor and
“pin9” of the Arduino.
4. Connect one leg of a 220Ω resistor with the “G” pin of the RGB.
Property of www.anonimouse.tech
5. Using a Male to Male Dupont wire, connect other leg of the 220Ω resistor and
“pin10” of the Arduino.
6. Connect one leg of a 220Ω resistor with the “B” pin of the RGB.
7. Using a Male to Male Dupont wire, connect other leg of the 220Ω resistor and
“pin11” of the Arduino.
8. Using a Male to Male Dupont wire, connect the “GND” pin of the RGB and the
“GND” pin of the Arduino.
9. Insert the button into the breadboard.
10. Using a Male to Male Dupont wire, connect the lower right leg of the button and the “GND” pin of the Arduino.
11. Using a Male to Male Dupont wire, connect the lower left leg of the button and the “pin3” of the Arduino.
12. Insert a resistor in series with the lower left leg of the button and the “5v” pin of the Arduino.
Now that you are done with the connections let us proceed in creating a program.

Open your Arduino IDE and start copying this sketch

Property of www.anonimouse.tech
Property of www.anonimouse.tech
Once you’re done, verify and upload your program. To switch the colors being displayed by the RGB module, just push the button.

Property of www.anonimouse.tech
Activity 04: 7-Segment Display

The 7-segment display, also written as “seven segment display”, consists of seven LEDs arranged in a rectangular
fashion. Each of the LEDs is called a segment because when illuminated the segment forms part of a numerical digit to
be displayed.
An additional 8th LED is sometimes used within the same package thus, allowing the indication of a decimal point.

Materials

Arduino UNO Male to Male Dupont Wires Breadboard

7-Segment Display
220Ω Resistor

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to display number 0 to 9 using the 7 segment led display.

To do so, we must first follow the schematics below:

To check if your connections are right, just follow these steps below:
1. The image on the right shows the pin configuration of the 7 segment LED display. Be familiar with the pin numbers.
2. Using a Male to Male Dupont wire, connect “pin7” of the 7 segment and the “pin2” of the Arduino.
3. Using a Male to Male Dupont wire, connect “pin6” of the 7 segment and the “pin3” of the Arduino.
4. Using a Male to Male Dupont wire, connect “pin4” of the 7 segment and the “pin4” of the Arduino.
5. Using a Male to Male Dupont wire, connect “pin2” of the 7 segment and the “pin5” of the Arduino.
6. Using a Male to Male Dupont wire, connect “pin1” of the 7 segment and the “pin6” of the Arduino.
7. Using a Male to Male Dupont wire, connect “pin9” of the 7 segment and the “pin8” of the Arduino.
8. Using a Male to Male Dupont wire, connect “pin10” of PIN CONFIGURATION the 7 segment and the “pin9” of the Arduino.

Property of www.anonimouse.tech
9. Using a Male to Male Dupont wire, connect “pin3” and “pin8” of the 7 segment, each connected with 220Ω resistors and the “GND” of the
Arduino.

Once you’re done with the connections. Open your Arduino IDE and copy this sketch.

Property of www.anonimouse.tech
Property of www.anonimouse.tech
The image below will help us to understand what does segment “a” to segment “g” means in our program.

Basically, our program is just composed of “if” statements that will help us tell when, does a specific segment inside the 7-segment led display is needed.
Just like for segment c, segment c is needed for all the numbers except for number 2.

Thus, having this part of the code.

Property of www.anonimouse.tech
Once you’re done copying the sketch, verify and upload your program.

Property of www.anonimouse.tech
Activity 05: Displaying Numbers 0 to 9 Using 4-Digit
7-Segment LED Display
It is a self-contained, compact common-cathode module Containing four 7-segment LED numeric displays.
Each segment in the display module is multiplexed, meaning it shares the same anode connections points.
and each of the four digits in the module have their own common cathode connection point. This allows
each digit to be turned on or off independently. Also, this multiplexing technique turns the massive amount
of microcontroller pins necessarily to control a display into just eleven or twelve (instead of 32).

Materials

Arduino Uno Male to Male Dupont Wires Breadboard

4 Digit 7-Segment Display

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to control the color of the RGB LED with a button.

To do so, we must first follow the schematics below:

Property of www.anonimouse.tech
To check if your connections are right, just follow these steps below:

The second picture above will serve us our guide through these steps.

1. Insert your 4-digit 7-segment LED display into your breadboard.


2. Using a Male to Male Dupont wire, connect “pin1” of the 4-digit 7-segment LED display and “pin6” of the Arduino.
3. Using a Male to Male Dupont wire, connect “pin2” of the 4-digit 7-segment LED display and “pin5” of the Arduino.
4. Using a Male to Male Dupont wire, connect “pin4” of the 4-digit 7-segment LED display and “pin4” of the Arduino.
5. Using a Male to Male Dupont wire, connect “pin5” of the 4-digit 7-segment LED display and “pin8” of the Arduino.
6. Using a Male to Male Dupont wire, connect “pin6” of the 4-digit 7-segment LED display and “pin12” of the Arduino.
7. Using a Male to Male Dupont wire, connect “pin7” of the 4-digit 7-segment LED display and “pin3” of the Arduino.
8. Using a Male to Male Dupont wire, connect “pin8” of the 4-digit 7-segment LED display and “pin11” of the Arduino.
9. Using a Male to Male Dupont wire, connect “pin9” of the 4-digit 7-segment LED display and “pin10” of the Arduino.
10. Using a Male to Male Dupont wire, connect “pin10” of the 4-digit 7-segment LED display and “pin7” of the Arduino.
11. Using a Male to Male Dupont wire, connect “pin11” of the 4-digit 7-segment LED display and “pin2” of the Arduino.
12. Using a Male to Male Dupont wire, connect “pin12” of the 4-digit 7-segment LED display and “pin9” of the Arduino.

Now that you are done with your connections, let us start creating your program. Open your Arduino IDE and start copying this sketch.

Property of www.anonimouse.tech
Property of www.anonimouse.tech
Property of www.anonimouse.tech
Once you’re done copying the code, verify and upload the program.
After uploading you will now be able to see all of the four digits of the 7-segment LED display counting from 0 to 9 all at the same time.

Property of www.anonimouse.tech
Activity 06: LED Matrix
A LED Matrix is a large, low resolution for of dot matrix display, useful both for commercial and industrial
information displays. It consists of 2-D diode matrix with their cathodes joined in rows and their anodes joined in
columns. By controlling the flow of electricity through each row and column pair it is possible to
control each LED individually.
By multiplexing, scanning across rows, it is possible to create characters or pictures to display information to the
user.

Materials

ARDUINO UNO MALE TO MALE BREADBOARD


AND USB CABLE DUPONT WIRES

8x8 LED MATRIX DISPLAY

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to display each letters of the word “Arduino”, using the 8x8 LED Matrix Display.

To do so, we must first follow the schematics below:

9 10 11 12 13 14 15 16

87654321

Property of www.anonimouse.tech
To check if your connections are right, let us refer to the second image as the LED Matrix pin configuration and follow these steps below:

1. Insert the LED Matrix to your breadboard (though you’ll be needing 2 breadboards because of the size of the Led Matrix). Ensure that the
side which has a label “1588BS” is facing at the bottom.
2. Using a Male to Male Dupont Wire, connect “pin1” of the Led Matrix to
“pin7” of the Arduino.
3. Using a Male to Male Dupont Wire, connect “pin2” of the Led Matrix to “pin4” of the Arduino.
4. Using a Male to Male Dupont Wire, connect “pin3” of the Led Matrix to “A0” pin of the Arduino.
5. Using a Male to Male Dupont Wire, connect “pin4” of the Led Matrix to “pin2” of the Arduino.
6. Using a Male to Male Dupont Wire, connect “pin5” of the Led Matrix to “pin12” of the Arduino.
7. Using a Male to Male Dupont Wire, connect “pin6” of the Led Matrix to “pin11” of the Arduino.
8. Using a Male to Male Dupont Wire, connect “pin7” of the Led Matrix to “pin3” of the Arduino.
9. Using a Male to Male Dupont Wire, connect “pin8” of the Led Matrix to “pin5” of the Arduino.
10. Using a Male to Male Dupont Wire, connect “pin9” of the Led Matrix to
“A3” pin of the Arduino.
11. Using a Male to Male Dupont Wire, connect “pin10” of the Led Matrix to
“A2” pin of the Arduino.
12. Using a Male to Male Dupont Wire, connect “pin11” of the Led Matrix to “pin8” of the Arduino.
13. Using a Male to Male Dupont Wire, connect “pin12” of the Led Matrix to “pin10” of the Arduino.
14. Using a Male to Male Dupont Wire, connect “pin13” of the Led Matrix to “pin6” of the Arduino.
15. Using a Male to Male Dupont Wire, connect “pin14” of the Led Matrix to “A1” pin of the Arduino.
16. Using a Male to Male Dupont Wire, connect “pin15” of the Led Matrix to “pin13” of the Arduino.
17. Using a Male to Male Dupont Wire, connect “pin16” of the Led Matrix to “pin9” of the Arduino.

Now that you are done with your connections, copy this sketch in your Arduino IDE.

You may also copy this sketch here: https://create.arduino.cc/projecthub/SAnwandter1/programming-8x8-led-matrix-23475a

Property of www.anonimouse.tech
Property of www.anonimouse.tech
Property of www.anonimouse.tech
Once you are done copying this sketch, verify and upload your program.
You should now be able to see each letter of the word “Arduino” being displayed in the 8x8 LED Matrix Display.

Property of www.anonimouse.tech
Activity 07: Mini Fire Alarm System
Mini Fire Alarm System
The flame sensor is the most sensitive to ordinary light

That is why its reaction is generally used as a flame

Alarm purposes. This module can detect flame or

Wavelength in 760 nm to 1100 nm range of light source.

The sensor and the flame should keep a certain distance

To avoid high temperature damage to the sensor. Also, its detection distance is up to 100cm.

Materials

ARDUINO UNO MALE TO MALE BREADBOARD


AND USB CABLE DUPONT WIRES

FLAME SENSOR PASSIVE BUZZER

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to make a mini fire alarm system by working with a buzzer and a flame sensor.

To do so, we must first follow the schematics below:

To check if your connections are right, follow these steps below:

1. Insert your flame sensor into the breadboard.


2. Insert a resistor in series with the longer leg of your flame sensor.
3. Using a Male to Male Dupont wire, connect the longer leg of your flame sensor and the “A0” pin of the Arduino.
4. Using a Male to Male Dupont wire, connect the shorter leg of your flame sensor and the “GND” pin of the Arduino.
5. Using a Male to Male Dupont wire, connect the other leg of your resistor and “5v” pin of the Arduino.
6. Insert your passive buzzer into the breadboard.
7. Using a Male to Male Dupont wire, connect the positive terminal of your buzzer and “pin8” of the Arduino.
8. Using a Male to Male Dupont wire, connect the negative terminal of your buzzer and “GND” pin of the Arduino.

Property of www.anonimouse.tech
Now that you’re done with your connections, let us now proceed in creating a program. Copy this sketch to your Arduino IDE.

Once you’re done plug your USB Cable to your PC, verify and upload your program.

Now to test our mini fire alarm system, you may light up a match stick or use a lighter and place the flame near the sensor.

(PLEASE PROCEED WITH CAUTION.)

Property of www.anonimouse.tech
Activity 08: Mini Emergency LED
LDR stands for Light Dependent Resistor or Photoresistor, which is a passive electronic component, basically a
resistor which has a resistance that varies depending of the light intensity. A photoresistor is made of a high
resistance semiconductor that absorbs photons and based
on the quantity and frequency of the absorbed photons the semiconductor material gives bound electrons
enough energy to jump into the conduction band.

Materials

ARDUINO UNO MALE TO MALE BREADBOARD


AND USB CABLE DUPONT WIRES

LED LIGHT DEPENDENT RESISTOR

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to make a mini emergency LED, that will light up the LED when the LDR senses that the environment is too dark.

To do so, we must first follow the schematics below:

To ensure that your connections are right, here are some steps you may follow:

1. Insert your LDR into the breadboard.


2. Insert a 10kΩ resistor in series with the right leg of your LDR.
3. Using a Male to Male Dupont wire, connect the right leg of your LDR and “A0” pin of the Arduino.
4. Using a Male to Male Dupont wire, connect the left leg of your LDR and “5v” pin of the Arduino.
5. Using a Male to Male Dupont wire, connect the right leg of your 10kΩ resistor and “GND” pin of the Arduino.
6. Insert your LED into the breadboard.
7. Insert a 330Ω resistor in series with the longer leg of your LED.
8. Using a Male to Male Dupont wire, connect the shorter leg of your LED and
“GND” pin of the Arduino.
9. Using a Male to Male Dupont wire, connect the other leg of your 330Ω resistor and “pin8” pin of the Arduino.

Property of www.anonimouse.tech
Now that you are done with your connections. Copy this sketch to your Arduino IDE.

Once you’re done with copying the sketch, verify and upload your program.
To test your program, you may want to cover the LDR with a ball pen cap or your hand to make an artificial dark environment for your LDR. Once the LDR
reaches a value lower than 20, it will light up the LED.

Property of www.anonimouse.tech
Activity 09: Using Joystick
A joystick is an input device consisting of a stick that pivots on a base and reports its

angle or direction to the device it is controlling.

Joysticks are often used to control video games, and usually have one or more push-buttons

whose state can also be read by the computer.

Materials

ARDUINO UNO MALE TO FEMALE BREADBOARD


AND USB CABLE DUPONT WIRES

JOYSTICK MODULE

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to use the joystick module and to display the values of its x-axis and y-axis on the serial monitor.

To do so, we must first follow the schematics below:

To check if your connections are right, follow these steps below:

1. Using a Male to Female Dupont wire, connect the “GND” pin of the joystick and the “GND” port of the Arduino.
2. Using a Male to Female Dupont wire, connect the “+5V” pin of the joystick and the “5V” port of the Arduino.
3. Using a Male to Female Dupont wire, connect the “VRx” pin of the joystick and the “A0” port of the Arduino.
4. Using a Male to Female Dupont wire, connect the “VRy” pin of the joystick and the “A1” port of the Arduino.
5. Using a Male to Female Dupont wire, connect the “SW” pin of the joystick and the “pin2” port of the Arduino.

Property of www.anonimouse.tech
Now that you are done with your connections let us proceed in creating a program. Open your Arduino IDE and copy this sketch.

Once you are done with creating your program, plug your USB Cable to your PC. Then, verify and upload your program.

To check if your program is working, click on the serial monitor to observe the values while you are moving the joystick.

If your Serial Monitor is unreadable, you might have set your baud rate to the wrong value.

To change the Baud Rate of your serial monitor, select the “115200 baud” in the drop-down menu on the left of the button labeled “Clear Output”.

Property of www.anonimouse.tech
Activity 10: Mini Tilt Alarm

A tilt sensor is a device that is mainly used for measuring the tilt in multiple axes of a reference plane. Tilt

sensors measure the tilting position with reference to gravity, and are used in numerous applications.

They enable the easy detection of inclination or orientation.

Materials

ARDUINO UNO MALE TO MALE DUPONT BREADBOARD


AND USB CABLE WIRES

TILT SENSOR LED PASSIVE BUZZER

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to create a mini tilt alarm. This tilt alarm will notify us when the tilt sensor is inclined.

To do so, we must first follow the schematics below:

To check if your connections are right, follow these steps below:

1. Insert the Passive Buzzer, LED and the Tilt Sensor into your breadboard.
2. Connect all the GND pin of the Passive Buzzer, LED and the Tilt Sensor in series with the “GND” port of the Arduino. You can identify which
terminal is the GND pin by selecting the shorter leg.
3. Using a Male to Male Dupont wire, connect the positive leg of the LED and
“pin13” of the Arduino.
4. Using a Male to Male Dupont wire, connect the positive terminal of the buzzer and “pin6” of the Arduino.
5. Using a Male to Male Dupont wire, connect the positive leg of the Tilt Sensor and “pin3” of the Arduino.
Note: You may add a resistor between the LED and “pin13” of the Arduino to protect your LED. Also, you may use a Male to Female Dupont wire, in
connecting your Tilt Sensor to your Arduino, for you to feel at ease when tilting it later for testing.

Property of www.anonimouse.tech
Now that you are done with your connections, you may now proceed to creating a program. Open your Arduino IDE and start copying this sketch.

After copying this sketch, verify and upload your program to your Arduino Uno Board. To test if your program is working, gently tilt your tilt sensor to see if
the LED will light up and also if the buzzer would produce a buzzing sound.

Property of www.anonimouse.tech
Activity 11: LM35
The LM35 series are precision integrated-circuit temperature devices with an output voltage linearly-proportional to the
Centigrade temperature.

The LM35 device has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to
subtract a large constant voltage from the output to obtain convenient Centigrade scaling

Materials

ARDUINO UNO MALE TO MALE BREADBOARD


AND USB CABLE DUPONT WIRES

LM35

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to convert and display the temperature readings of the LM35 into Celsius and Fahrenheit using the Serial Monitor.

To do so, we must first follow the schematics below:

To check if your connections are right, follow these steps below:


1. Insert your LM35 into the breadboard. Make sure that the flat side of the LM35 is facing you.
2. Using a Male to Male Dupont wire, connect “A1” port of the Arduino and the middle pin of the LM35.
3. Using a Male to Male Dupont wire, connect “5V” port of the Arduino and the leftmost pin of the LM35 (red wire in the diagram).
4. Using a Male to Male Dupont wire, connect “GND” port of the Arduino and the rightmost pin of the LM35 (gray wire in the diagram).

Property of www.anonimouse.tech
Now that you are done with your connections, open your Arduino IDE and copy this sketch.

After copying this sketch, verify and upload your program to your Arduino Uno Board. Check out the Serial Monitor to view the temperature in Celsius and
Fahrenheit.

Property of www.anonimouse.tech
Activity 12: Remote Controlled LED using IR Receiver

An infrared receiver, or IR receiver, is a hardware that sends information from an infrared remote control to

another device by receiving and decoding signals . In general, the receiver outputs a code to uniquely

identify the infrared signal that it receives.

Materials

ARDUINO UNO MALE TO MALE DUPONTBREADBOARD AND


AND USB CABLE WIRES 1 LED

IR RECEIVER REMOTE
Property of www.anonimouse.tech
Activity 13

Control LED by a Clap

The Sound Sensor Module provides an easy method to detect sound and is generally used for detecting sound intensity.
This module can be used for switch, security, and monitoring applications. Its accuracy can be easily adjusted for the
convenience of usage.

It has a microphone which supplies the input to an amplifier, peak detector and buffer. When it detects a sound, it
processes an output signal voltage which is sent to a microcontroller then performs necessary actions.

Materials

Arduino UNO and USB Male to Male Dupont Wires


Cable Breadboard and 1 LED Sound module

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to control an LED through clapping.

To do so, we must first follow the schematics below:

To check if your connections are correct, please follow these steps below:

1. Insert your sound sensor to your breadboard.


2. Using a Male to Male Dupont wire, connect “+” pin of the sound sensor and the “5v” port of the Arduino.
3. Using a Male to Male Dupont wire, connect “GND” pin of the sound sensor and the
“GND” port of the Arduino
4. Plug the USB Cable of your Arduino to your PC, you must be seeing two LED lighting up in your Big Sound Module.

Property of www.anonimouse.tech
5. We need the green LED to react only when there is sound just like the LED that we are going to attach at pin13. In order to control the green LED,
we must turn the potentiometer’s knob to the left(place the sound module at your hand, in a way that the microphone is at the left). Now, this
may take a while, you have to be patient until the green LED is off. To test if you are successful in this step, snap your fingers and check if the
green LED will blink together with your snap.

6. Unplug the USB Cable and continue with step 7.


7. Using a Male to Male Dupont wire, connect “DO” pin of the sound sensor and the “A2” port of the Arduino.
8. Insert your LED and connect its positive leg to “pin13” of Arduino and its negative to the “GND” of the Arduino.

Now that you are done with the connections, copy this sketch to your Arduino IDE.

Property of www.anonimouse.tech
Once you’re done copying the sketch, verify and upload your program to your Arduino Uno Board. To test if you have done the activity correctly, you may
clap your hands or snap your finger and check if the LED glows. If the LED reacts to a sound you create then you have successfully finished the activity.

Property of www.anonimouse.tech
Activity 14

Using Matrix Button Keypad Module (4x4 Keypad)

The Matrix Button Keypad Module (4x4 Keypad) is a 16-key button keypad in a 4x4 arrangement. It generally has

eight 0.1-inch male jumpers that you can easily use with your microcontroller projects like Arduino. Its PCB

dimensions are 39mm x 43mm x 7mm. This keypad also follows an encoding scheme which allows us to have less

output pins than there are keys. Notice how this keypad has 16 keys but only has 8 output pins. Normally, a linear

keypad would have 17 output pins (one for each key and a ground pin) in order to work. Thus, making a matrix

encoding scheme keypad more efficient compared to a linear keypad.

Materials

Arduino Uno 8 pcs of Male to 4x4 Keypad


Female Dupont Wires

Property of www.anonimouse.tech
Instructions
Our goal in this activity is to turn this 4x4 keypad into these keys correspondingly.

To do so, we must first follow the schematics below:

Property of www.anonimouse.tech
To check if your connections are right. Follow these instructions below:

1. Place your 4x4 keypad in a way that the output pins would be situated at the south part of its PCB board, as shown in the schematics above.
2. Be guided with the picture below:

Property of www.anonimouse.tech
Figure “Pin Guide”

1. Now get your female to male Dupont wires (note that the female connector of the Dupont wire has a hole in which you connect the pins of your
modules and the male connector of a Dupont wire has a pin in which you connect them to the pins of your Arduino).
2. Connect the Female connectors of your Dupont wire to the following pins of the 4x4 Keypad correspondingly: RED – Pin 1
• ORANGE – Pin 2
• YELLOW – Pin 3
• GREEN – Pin 4
• BLUE – Pin 5
• VIOLET – Pin 6
• GRAY – Pin 7
• WHITE – Pin 8
3. Lastly, connect the Male Pins of your Dupont wires to the following pins of the Arduino Uno correspondingly: RED – Pin 9
• ORANGE – Pin 8
• YELLOW – Pin 7
• GREEN – Pin 6
• BLUE – Pin 5
• VIOLET – Pin 4
• GRAY – Pin 3
• WHITE – Pin 2

Property of www.anonimouse.tech
Now, that we are done with your connections let us now create a program.

Open up a new Sketch in your Arduino IDE and begin copying these codes below:

Property of www.anonimouse.tech
Notice that there is a “#include <Keypad.h>” in the beginning of the code? This means that these set of codes demands a Keypad header file.

If your Arduino IDE doesn’t have the Keypad header file, follow the steps below:

1. Click on the Sketch Tab located on the upper part of your Arduino IDE.

2.

2. Click “Include Library”.

Property of www.anonimouse.tech
3. Click “Manage Libraries”. And this should pop up.

4. Search for “Keypad” and install “Keypad by Mark Stanley and Alexander Brevig”.

Property of www.anonimouse.tech
5. Once installed, you may now verify and upload your program.

6. To view the keys that you’ve pressed. Click on the Serial Monitor Button on the top left of your Arduino IDE.

7. The output of your program should look like this:

Property of www.anonimouse.tech
Activity 15

Using a Motor Driver and a 5V. Step Motor

Stepper motors are DC motors that move in discrete steps. They have multiple coils that are organized in groups called
“phases”. By energizing each phase in sequence, the motor will rotate, one at a time.
With a computer controlled stepping you can achieve very precise positioning and/or speed control. For this reason,

stepper motors are the motor of choice for many precision motion control applications.

Materials

STEPPER MOTOR MOTOR DRIVER ARDUINO UNO R3 & USB CABLE

MALE TO FEMALE DUPONT WIRES

Property of www.anonimouse.tech
Instructions
Our goal in this activity is to observe how the Step Motor rotates by using the Motor Driver in our Arduino Learning Kit.

In order to do that, we must first follow the schematics below:

Listed below are instructions to follow for you to check if your connections are right:

1. First of all, connect the 5V Step Motor to the Motor Driver. In order to do so, just connect the white connector of the stepper motor to the white port of
the Motor Driver. No need to understand the color-coded wiring of the schematics above between the stepper motor and the motor driver.
2. Connect one F-M Dupont Wire to the GND port of the Arduino and the (-) port of the Motor Driver located at the south of the motor driver.
3. Connect on F-M Dupont Wire to the 5V port of the Arduino and the (+) port of the Motor Driver located at the south of the motor driver.

Property of www.anonimouse.tech
Reference for steps 2 and 3.

4. Connect one M-F Dupont wire to the “IN1” port of the Motor Driver to pin 5 of the
Arduino.
5. Connect one M-F Dupont wire to the “IN2” port of the Motor Driver to pin 4 of the Arduino.
6. Connect one M-F Dupont wire to the “IN3” port of the Motor Driver to pin 3 of the Arduino.
7. Connect one M-F Dupont wire to the “IN4” port of the Motor Driver to pin 2 of the Arduino.

Once you’re done with the connections, you are now ready to create a program.

Property of www.anonimouse.tech
Once you’re done Verify and Upload your program to the Arduino. If you have observed that the Stepper Motor is vibrating and rotating, then your activity is
done!

Property of www.anonimouse.tech
Activity 16

Using SG90 Servo


A servo motor allows a precise control of the angular position, velocity and acceleration. It’s almost like you are behind

the steering wheel of your car. You can precisely control the speed and the direction you’re heading to.

The TowerPro SG90 Servo Motors are used as


actuators in many robots such as Biped Robot, hexapod etc. Commonly used for steering system in RC toys. Used in
Robots where position control is required without feedback.

Materials

TOWERPRO SG90 SERVO ARDUINO AND USB CABLE

MALE TO MALE DUPONT


WIRES

Property of www.anonimouse.tech
Instructions
Our goal in this activity is to observe how the Servo Motor rotates in a 180-degree manner and to control it through tweaking some codes.

In order to that we must first follow the schematics below:

Take into consideration that the color of the wires used in the image above is different from the actual wires of the Servo Motor that you will be provided with.
Here are some instructions that will help you complete this activity.

1. By looking at our TowerPro SG90 Servo Motor, we will observe that there will be three wires. (one brown, one red and one orange).
2. Connect the red wire of the Servo Motor to the “5v” port of the Arduino through a Male to Male Dupont wire.
3. Connect the black wire of the Servo Motor to the “GND” port of the Arduino through a Male to Male Dupont Wire.
4. Connect the orange wire of the Servo Motor to pin “9” of the Arduino through a Male to Male Dupont wire.

Now that you are ready with the connections, let us proceed with creating a program.

But before that, we must download the Servo library. In order to do that click on Sketch > Include Library > Manage Libraries > search for Servo > hit install. After
installing, copy this sketch to your Arduino IDE.

Property of www.anonimouse.tech
This program lets you set to where you want the servo motor to rotate. The reason behind the (0-180) range inside the code is that, our TowerPro SG90 Servo
Motor can only capable of a 180-degree turn.

Property of www.anonimouse.tech
Here’s another example of code in which you will fully see the 180-degree capability of the Servo Motor. You will also observe that it can do a left and right
rotation.

And that concludes our activity.

Property of www.anonimouse.tech
Activity 17

Using Active Buzzers


There are basically two types of buzzers, an active and a passive. But in this activity, we will use an Active buzzer. To identify

which one is which, place the pins face up and you can see the one with a green circuit board is a passive buzzer, while the

other with a black tape, instead of a board, is an active buzzer.

An active buzzer will buzz at a predefined frequency on its own even when you just apply steady DC power. Some people prefer

active buzzers since they can use them with steady DC power but also be able to produce some variety of tones by applying an

oscillating signal.

Materials

ARDUINO UNO R3 ACTIVE BUZZER BREADBOARD


& USB CABLE

MALE TO MALE DUPONT TACTILE BUTTON

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to produce a melody out of the buzzer and to control it using a tactile button.

First, follow the schematics below:

In order to check if your connections are right, follow these steps below:

1. Place your buzzer into the breadboard.


2. Place your tactile button into the middle of the breadboard just like in the schematics, for us to be synchronized in the latter steps.
3. Using a Male to Male Dupont wire, connect “pin8” of the Arduino and the positive (+) terminal of the buzzer. The longer leg of the buzzer is considered
to be the positive terminal of the buzzer while the shorter leg is the negative terminal of the buzzer.
4. Using a Male to Male Dupont wire, connect “GND” port of the Arduino and the negative terminal of the buzzer.
5. Connect the 10k resistor to the lower right leg of the tactile button.
6. Using a Male to Male Dupont wire, connect “GND” port of the Arduino and the other leg of the resistor.
7. Using a Male to Male Dupont wire, connect “5v” port of the Arduino and the lower left leg of the tactile button.
8. Using a Male to Male Dupont wire, connect “pin12” of the Arduino and the upper right leg of the tactile button.

Property of www.anonimouse.tech
Now that your connections are right, let us proceed in creating a program.

Property of www.anonimouse.tech
After copying the codes above, create a new tab. To create a new tab, click on this button located on the upper right of your Arduino IDE and right
below the Serial Monitor button.

Name the new tab as “pitches.h”. Next, copy these statements on your “pitches.h” tab. You may also access this site
https://www.arduino.cc/en/Tutorial/toneMelody to copy this notes.

/*************************************************

* Public Constants

*************************************************/

#define NOTE_B0 31

#define NOTE_C1 33

#define NOTE_CS1 35

#define NOTE_D1 37

#define NOTE_DS1 39

#define NOTE_E1 41

#define NOTE_F1 44

#define NOTE_FS1 46

#define NOTE_G1 49

#define NOTE_GS1 52

#define NOTE_A1 55

#define NOTE_AS1 58

#define NOTE_B1 62

#define NOTE_C2 65

#define NOTE_CS2 69
Property of www.anonimouse.tech
#define NOTE_D2 73

#define NOTE_DS2 78

#define NOTE_E2 82

#define NOTE_F2 87

#define NOTE_FS2 93

#define NOTE_G2 98

#define NOTE_GS2 104

#define NOTE_A2 110

#define NOTE_AS2 117

#define NOTE_B2 123 #define NOTE_C3 131

#define NOTE_CS3 139

#define NOTE_D3 147

#define NOTE_DS3 156

#define NOTE_E3 165 #define NOTE_F3 175

#define NOTE_FS3 185

#define NOTE_G3 196

#define NOTE_GS3 208

#define NOTE_A3 220

#define NOTE_AS3 233

#define NOTE_B3 247 #define NOTE_C4 262

#define NOTE_CS4 277

#define NOTE_D4 294

#define NOTE_DS4 311

#define NOTE_E4 330 #define NOTE_F4 349

Property of www.anonimouse.tech
#define NOTE_FS4 370

#define NOTE_G4 392

#define NOTE_GS4 415

#define NOTE_A4 440

#define NOTE_AS4 466

#define NOTE_B4 494 #define NOTE_C5 523

#define NOTE_CS5 554

#define NOTE_D5 587

#define NOTE_DS5 622

#define NOTE_E5 659 #define NOTE_F5 698

#define NOTE_FS5 740

#define NOTE_G5 784

#define NOTE_GS5 831

#define NOTE_A5 880

#define NOTE_AS5 932

#define NOTE_B5 988

#define NOTE_C6 1047

#define NOTE_CS6 1109

#define NOTE_D6 1175

#define NOTE_DS6 1245

#define NOTE_E6 1319 #define NOTE_F6 1397

#define NOTE_FS6 1480

#define NOTE_G6 1568

#define NOTE_GS6 1661

Property of www.anonimouse.tech
#define NOTE_A6 1760

#define NOTE_AS6 1865

#define NOTE_B6 1976 #define NOTE_C7 2093

#define NOTE_CS7 2217

#define NOTE_D7 2349

#define NOTE_DS7 2489 #define NOTE_E7 2637

#define NOTE_F7 2794

#define NOTE_FS7 2960

#define NOTE_G7 3136

#define NOTE_GS7 3322

#define NOTE_A7 3520

#define NOTE_AS7 3729

#define NOTE_B7 3951

#define NOTE_C8 4186

#define NOTE_CS8 4435

#define NOTE_D8 4699

#define NOTE_DS8 4978

You can change the notes inside your melody by choosing other notes locates inside your pitches tab.

Once you’re done, verify and upload your program. Lastly, push your tactile button and enjoy the melody that you’ve created.

Property of www.anonimouse.tech
Activity 18

Using Water Sensor


A water detection sensor is used to detect water leak, water level or rains. This is obtained by having a number of
parallel wires exposed traces, as you can see by the gold marks in the picture.

The sensor traces have a weak pull-up resistor of 1MΩ.

The resistor will pull the sensor trace value high until a drop of water shorts the sensor trace to the grounded trace.

Materials

Arduino UNO and Cable


Male to Female Dupont Breadboard

WATER

LED
Water Sensor

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to detect whether our water sensor is dripped with water or not.

To do so, we must first follow the schematics below:

Now for the LED, we just need to insert the LED at pin13 and GND of the Arduino.

To check if your connections are right, please follow these steps below:

1. Attach one LED to “pin13” and “GND” pin of the Arduino.


2. Using a Male to Female Dupont wire, connect the pin labeled “S” in the water sensor and the “A0” port of the Arduino.
3. Using a Male to Female Dupont wire, connect the pin labeled “+” in the water sensor and the “5v” port of the Arduino.
4. Using a Male to Female Dupont wire, connect the pin labeled “-” in the water sensor and the “A0” port of the Arduino.

Property of www.anonimouse.tech
Now that you are done with your connections, it’s time to create a program. This time, we would be using an example inside your Arduino IDE. To
access that example, all you need to is click the Files Tab > Examples > Analog > AnalogInOutSerial. If followed correctly, you should be able to see
this:

Just change the analogOutPin to Pin13 because we placed the LED at pin 13.

Once you have accessed and changed the example code, verify and upload the program to your Arduino Uno Board. To check if your program is working,
submerge half of the water sensor to a glass of water and check if the LED will turn ON. You may also, check the Serial Monitor to view the changing
values, regarding how much water was in contact with the sensor.

Property of www.anonimouse.tech
Activity 19

Displaying Messages using 1602 Display


The display has an LED backlight in order to view the text being displayed. It can display two rows with up to 16
characters on each row. You can see the rectangles for each character on the display and the pixels that make up
each character. Its display is just white on blue and is intended for showing text.

Materials

ARDUINO UNO MALE TO FEMALE DUPONT BREADBOARD


AND USB CABLE WIRES

1602 DISPLAY

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to display texts in our 1602 Display.

To do so, we must first follow the schematics below:

To check if your connections are right, please follow these steps below:

1. Using a Male to Female Dupont wire, connect the “VCC” pin of the display and the “5V” port of the Arduino.
2. Using a Male to Female Dupont wire, connect the “GND” pin of the display and the “GND” port of the Arduino.
3. Using a Male to Female Dupont wire, connect the “SDA” pin of the display and the “A4” port of the Arduino.
4. Using a Male to Female Dupont wire, connect the “SCL” pin of the display and the “A5” port of the Arduino.

Property of www.anonimouse.tech
Before proceeding to creating a program, please download NewliquidCrystal_1.3.4.zip library here:

https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/ Once you are done, copy this sketch below:

After copying the sketch, you may now verify and upload your program to your Arduino Uno Board. You may change the texts enclosed by quotation
marks to your desired texts and display them to the 1602 Display using the same block of codes.

Property of www.anonimouse.tech
Activity 20

Displaying Temperature and Humidity using DHT11


DHT 11 is a digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to

measure the surrounding air, and sends out a digital signal on the data pin. It’s simple to use, but requires careful

timing to grab data.

Materials

ARDUINO UNO MALE TO FEMALE BREADBOARD


AND USB CABLE DUPONT WIRES

DHT11

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to display temperature and humidity in our serial monitor To do so, we must first follow the schematics below:

To check if your connections are right, please follow these steps below:

1. Using a Male to Female Dupont wire, connect the “VCC” pin of the DHT11 and the “5V” port of the Arduino.
2. Using a Male to Female Dupont wire, connect the “GND” pin of the DHT11 and the “GND” port of the Arduino.
3. Using a Male to Female Dupont wire, connect the “DATA” pin of the DHT11 and the “A0” port of the Arduino.

Once you are done with the connections, copy this sketch to your Arduino IDE.

Property of www.anonimouse.tech
Don’t forget to download the DHT library before uploading this program. You may do so by clicking Sketch > Include library > Manage Libraries > search
dhtlib > hit install.

Once you are done copying the sketch, verify and upload your program to your Arduino Uno Board. To view the Temperature and Humidity at your
environment, click on the Serial Monitor located at the upper right corner of your Arduino IDE.

Property of www.anonimouse.tech
Activity 21

Using DS1302
DS1302 is a trickle-charge timekeeping chip that contains a real-time clock/calendar and 31 bytes of static

RAM. It communicates with a microprocessor via simple serial interface.

the real-time clock/calendar provides seconds,

minutes, hours, day, date, month, and year information. The end of the month is automatically adjusted for

Months with fewer than 31 days, including corrections for leap year.

Materials

ARDUINO UNO MALE TO FEMALE BREADBOARD


AND USB CABLE DUPONT WIRES

DS1302

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to display the date and time in our serial monitor To do so, we must first follow the schematics below:

To check if your connections are right, please follow these steps below:

1. Using a Male to Female Dupont wire, connect the “VCC” pin of the DS1302 and the “5V” port of the Arduino.
2. Using a Male to Female Dupont wire, connect the “GND” pin of the DS1302 and the “GND” port of the Arduino.
3. Using a Male to Female Dupont wire, connect the “CLK” pin of the DS1302 and the “pin6” port of the Arduino.
4. Using a Male to Female Dupont wire, connect the “DAT” pin of the DS1302 and the “pin7” port of the Arduino.
5. Using a Male to Female Dupont wire, connect the “RST” pin of the DS1302 and the “pin8” port of the Arduino.

Property of www.anonimouse.tech
Once you are done with the connections, copy this sketch to your Arduino IDE.

Remember to download the DS1302 library from https://drive.google.com/file/d/1GDuLWUANun5toL-


XsEaFfaw2tv0mvhjB/view?usp=sharing and add the zip file to your library.

Once you’re done, verify and upload it to your Arduino Uno Board and check the Serial Monitor to view the date and time. Also, don’t forget to comment
myRTC.setDS1302Time line of code once you’re done setting your date and time, for it will continue updating when you set it once.

Property of www.anonimouse.tech
Activity 22 (PROCEED WITH EXTRA CAUTION: HIGH VOLTAGE)

Using 5v Relay

A relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a
lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and they are
double throw (changeover) switches. A 5v relay means that you need 5v. to activate the relay, In other words, it means that
the voltage across the relay coil has to be 5v.

Arduino UNO and Male to Female Breadboard 1 Channel Relay Module


Cable Dupont Wires

Bulb Socket
PLUG and Wire

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to control a bulb using a 5v relay.

To do so, we must first follow the schematics below:

The bulb just like in the schematic above, should have one of its wires disconnected in order to be attached to the 5v relay.

The bulb just like in the schematic above, should have one of its wires disconnected in order to be attached to the 5v relay.

To check your connections, here are some instructions to follow:

1. Using a Male to Female Dupont wire, connect the “-“ pin of the 5v relay and the “GND” port of the Arduino.
2. Using a Male to Female Dupont wire, connect the “+“ pin of the 5v relay and the
“5v” port of the Arduino.
3. Using a Male to Female Dupont wire, connect the “S“ pin of the 5v relay and the “pin3” port of the Arduino.
4. Strip the two ends of the wire, and attach them to the screws underneath the bulb socket.
5. Notice that the wire you have connected to the bulb socket has two wires that are combined together so that it would look like one big wire? Now what
you need to do is to cut one of those wires in order for us to have a disconnected wire.

Property of www.anonimouse.tech
6. Strip the two ends of the wire that you just cut and attach them to the relay. To attach them to the relay, screw one end of the wire in the middle screw
of the wire and screw the other end of the wire in the left screw of the relay.

Now that your connections are right. Open you Arduino IDE and copy this sketch.

Once you’re done, verify and upload your program to your Arduino Uno Board.

Lastly, plug it to an outlet and check if the bulb turns on for 3 seconds and turns off for 5 seconds. If the bulb does turns ON for 3 seconds and OFF for 5 seconds,
then you have succeeded in our Activity 22.

Property of www.anonimouse.tech
Activity 22

Using RFID
Radio-Frequency Identification (RFID) uses electromagnetic fields to automatically identify and track tags attached to
objects. These tags contain electronically stored information. Different tags are usually attached to objects and when
we place that object in front of the reader, the reader reads the tags.

Materials

MALE TO MALE
ARDUINO UNO DUPONT WIRES BREADBOARD
AND USB CABLE

LED
RFID MODULE

Property of www.anonimouse.tech
Instructions
Our objective in this activity is to have a mini security system that will notify the user which card or tag is worthy to have access.

To do so, we must first follow the schematics below:

In this activity, I selected to have a Green LED to indicate an “Access Granted” for a correct card scanned and a Red LED for an “Access Denies”.

If you find the schematics confusing, here’s a guide to follow:


Property of www.anonimouse.tech
1. Using a Male to Male Dupont wire, connect the “SDA“ pin of the RFID Reader and “pin10” of the Arduino.

2. Using a Male to Male Dupont wire, connect the “SCK“ pin of the RFID Reader and “pin13” of the Arduino.
3. Using a Male to Male Dupont wire, connect the “MOSI“ pin of the RFID Reader and “pin11” of the Arduino.
4. Using a Male to Male Dupont wire, connect the “MISO“ pin of the RFID Reader and “pin12” of the Arduino.
5. Using a Male to Male Dupont wire, connect the “GND“ pin of the RFID Reader and “GND” of the Arduino.
6. Using a Male to Male Dupont wire, connect the “RST“ pin of the RFID Reader and “pin8” of the Arduino.
7. Using a Male to Male Dupont wire, connect the “3.3V“ pin of the RFID Reader and “3.3V” of the Arduino.
8. Using a Male to Male Dupont wire, connect the “+ “or the longer leg of the green LED and “pin4” of the Arduino.
9. Using a Male to Male Dupont wire, connect the resistor which in series with the “-
“or the shorter leg of the green LED and “GND” of the Arduino.
10. Using a Male to Male Dupont wire, connect the “+“or the longer leg of the red LED and “pin5” of the Arduino.
11. Using a Male to Male Dupont wire, connect the resistor which in series with the ““or the shorter leg of the red LED and “GND” of the Arduino.
You may also follow this below for your connections between the reader and Arduino.:

Property of www.anonimouse.tech
Now that you are ready with your connections, copy this sketch into your Arduino IDE.
But first you should download the MFRC522 library. In order to do that, click on Sketch>Include Library>Manage Libraries> Search for “MFRC522” and
click install.

Property of www.anonimouse.tech
Property of www.anonimouse.tech
Now that you are done copying the program, verify and upload it to your Arduino Uno Board. To fully enjoy this activity, we first need to identify the “tap card
key” of your available card or keychain. In order to do this, open the Serial Monitor of your Arduino IDE (located at the upper right corner, looks like a magnifying
glass) and tap your own card.

Once you have tapped your card, you must be seeing an output like this but with a different “Tap card key”:

Property of www.anonimouse.tech
Don’t worry if it says “Access Denied” for now, because as of the moment, my own tap cad key is copied in your code. Now to correct this, copy the number and
letter combination after the label “Tap card key” and replace the number and letter combination of your code in this part:

after the label “Tap card key” and replace the number and letter combination of your code in this part:

Replace that “D1:7E:2B:2D” with your own tap card key but don’t forget the quotation marks. Now that you have replaced my code, you should now be able to
see an output like this:

Of course, you will still be having a different card key. But now you should be able to read that “Authorized Access” and a blue LED should be notifying you that
you have tapped the right card. Now try, tapping a wrong card, to see if the red LED will notify you that you have tapped the wrong card.

Property of www.anonimouse.tech
Activity 23
Using 74HC595
The 74HC595 is a very useful IC used in many

Microcontroller projects. You clock in 8 bits of data (like lighting up 8 LEDs) using 2 lines and when you toggle a third line, it

pops these settings out on 8 outputs on the IC. So, you are basically trading 3 valuable ports of your microcontroller for 8

outputs.

Materials

MALE TO MALE
ARDUINO UNO
DUPONT WIRES BREADBOARD
AND USB CABLE

8PCS. OF LED
Property of www.anonimouse.tech
Instructions
Our objective in this activity is to light up all 8 LEDs one at a time using the 74HC595 Shift Register.

To do so, we must first follow the schematics below:

If you are having trouble following the schematics above, please follow these steps below:

1. Place the 74HC595 in your breadboard in a way that the little U-shaped notch is towards the top of the breadboard.
2. Place 8 LEDs in your breadboard as shown in the schematics above. You may also add resistors in this exercise for you to control LEDs brightness.
3. Connect the “GND” port to your breadboard just like in the schematics above. This was made for us to be able to connect other components to the GND
port.
Property of www.anonimouse.tech
4. Using a Male to Male Dupont wire connect the 1st pin on the right side of the 74HC595 IC to the “5v” port of the Arduino.
5. Using a Male to Male Dupont wire connect the 2nd pin on the right side of the 74HC595 IC to the first LED in your breadboard.
6. Using a Male to Male Dupont wire connect the 3rd pin on the right side of the 74HC595 IC to the “pin 4” port of the Arduino.
7. Using a Male to Male Dupont wire connect the 4th pin on the right side of the 74HC595 IC to your assigned ground in your breadboard.

8. Using a Male to Male Dupont wire connect the 5th pin on the right side of the 74HC595 IC to the “pin 5” port of the Arduino.
9. Using a Male to Male Dupont wire connect the 6th pin on the right side of the 74HC595 IC to the “pin 6” port of the Arduino.
10. Using a Male to Male Dupont wire connect the 7th pin on the right side of the 74HC595 IC to the 1st pin on the right side of the 74HC595 IC.
11. Using a Male to Male Dupont wire connect the 1st pin on the left side of the 74HC595 IC to the 2nd LED in your breadboard.
12. Using a Male to Male Dupont wire connect the 2nd pin on the left side of the
74HC595 IC to the 3rd LED in your breadboard.
13. Using a Male to Male Dupont wire connect the 3rd pin on the left side of the 74HC595 IC to the 4th LED in your breadboard.
14. Using a Male to Male Dupont wire connect the 4th pin on the left side of the 74HC595 IC to the 5th LED in your breadboard.
15. Using a Male to Male Dupont wire connect the 5th pin on the left side of the 74HC595 IC to the 6th LED in your breadboard.
16. Using a Male to Male Dupont wire connect the 6th pin on the left side of the 74HC595 IC to the 7th LED in your breadboard.
17. Using a Male to Male Dupont wire connect the 7th pin on the left side of the 74HC595 IC to the 8th LED in your breadboard.
18. Using a Male to Male Dupont wire connect the 8th pin on the left side of the 74HC595 IC to your assigned ground in your breadboard.

Now that you have finished copying the schematics, open your Arduino IDE and copy this sketch.

Property of www.anonimouse.tech
Once you are done, verify and upload your program to your Arduino Uno Board.

You should be able to see the 8 LEDs turning ON one by one until all of them is ON.

Property of www.anonimouse.tech

You might also like