Arduino Learning Kit Manual
Arduino Learning Kit Manual
Arduino Learning Kit Manual
By Anonimouse
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
Activity 11 LM35
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.
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.
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
Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.
External
Interrupts 2, 3 To trigger an interrupt.
10 (SS), 11
SPI (MOSI), 12 Used for SPI communication.
(MISO) and 13
(SCK)
A4 (SDA), A5 (SCA)
TWI Used for TWI communication.
Property of www.anonimouse.tech
Arduino Uno Technical Specifications
Operating Voltage 5V
Recommended Input
Voltage 7-12V
SRAM 2 KB
EEPROM 1 KB
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.
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
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.
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.
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.
Materials
BREADBOARD
ARDUINO UNO
AND USB CABLE
MALE TO MALE
DUPONT WIRES
Property of www.anonimouse.tech
To do so, we must first follow the schematics below:
Now that your connections are done, we may now create a program that will help you control the blinking of your LED.
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 check if your connections are right, please follow these steps below:
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
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 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.
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
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 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.
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
Property of www.anonimouse.tech
Instructions
Our objective in this activity is to control the color of the RGB LED with a button.
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.
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
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.
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.
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
To avoid high temperature damage to the sensor. Also, its detection distance is up to 100cm.
Materials
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.
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.
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
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 ensure that your connections are right, here are some steps you may follow:
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
Joysticks are often used to control video games, and usually have one or more push-buttons
Materials
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.
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.
Materials
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.
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
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.
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
Materials
IR RECEIVER REMOTE
Property of www.anonimouse.tech
Activity 13
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
Property of www.anonimouse.tech
Instructions
Our objective in this activity is to control an LED through clapping.
To check if your connections are correct, please follow these steps below:
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.
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
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
Materials
Property of www.anonimouse.tech
Instructions
Our goal in this activity is to turn this 4x4 keypad into these keys correspondingly.
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.
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.
Property of www.anonimouse.tech
Activity 15
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
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.
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
the steering wheel of your car. You can precisely control the speed and the direction you’re heading to.
Materials
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.
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.
Property of www.anonimouse.tech
Activity 17
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
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
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.
In order to check if your connections are right, follow these steps below:
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
Property of www.anonimouse.tech
#define NOTE_FS4 370
Property of www.anonimouse.tech
#define NOTE_A6 1760
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
The resistor will pull the sensor trace value high until a drop of water shorts the sensor trace to the grounded trace.
Materials
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.
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:
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
Materials
1602 DISPLAY
Property of www.anonimouse.tech
Instructions
Our objective in this activity is to display texts in our 1602 Display.
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:
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
measure the surrounding air, and sends out a digital signal on the data pin. It’s simple to use, but requires careful
Materials
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
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
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.
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.
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.
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.
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.
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”.
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.
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