0% found this document useful (0 votes)
151 views122 pages

Introduction To Arduino - First Quarter - Sy 2021-2022

The document provides an introduction to Arduino. It describes Arduino as an affordable, small-scale computer that focuses on interacting with the outside world through sensors and outputs. Arduino allows users to measure environmental factors like temperature and light and convert those into motion, sound or light. It was originally developed to make electronics and physical computing accessible to designers and students who were not engineers. Arduino uses both hardware boards and software to read sensor input and control outputs like LEDs through code.

Uploaded by

Prek Dereq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views122 pages

Introduction To Arduino - First Quarter - Sy 2021-2022

The document provides an introduction to Arduino. It describes Arduino as an affordable, small-scale computer that focuses on interacting with the outside world through sensors and outputs. Arduino allows users to measure environmental factors like temperature and light and convert those into motion, sound or light. It was originally developed to make electronics and physical computing accessible to designers and students who were not engineers. Arduino uses both hardware boards and software to read sensor input and control outputs like LEDs through code.

Uploaded by

Prek Dereq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 122

Introduction to

ARDUINO

Quarter 1
ROBOTICS
What is Arduino?

Most simply, it is an affordable, small-scale, simple computer


that focuses on interaction with the outside world (Figure 1.1),
(Culkin & Hagan, 2017).

Most of the computers you are familiar with are controlled


almost exclusively through the keyboard and mouse,
touchscreen, or trackpad.
What is Arduino?
An Arduino allows you to take information
from the outside world with sensors that measure
temperature, light and sound levels, or even the
vibrations underneath your feet, and convert these
measurements into motion, sound, light, and more
(Culkin & Hagan, 2017).
What is Arduino?
The Arduino was originally developed by
teachers to make it possible for their design
students who were not engineers to create
interactive objects and environments.
What is Arduino?
Designers, educators, engineers, hobbyists, and
students have built all kinds of projects that sense
and respond to the world with Arduino (Culkin &
Hagan, 2017).
What is Arduino?
Designers, educators, engineers, hobbyists, and
students have built all kinds of projects that sense
and respond to the world with Arduino (Culkin &
Hagan, 2017).
What is Arduino?

Arduino is made up of both hardware and


software.
What is Arduino?

The Arduino board is a printed circuit board


(PCB) designed to use a microcontroller chip as
well as other input and outputs.
What is Arduino?

The board has many other electronic components


that are needed for the microcontroller to function
or to extend its capabilities (Nussey, 2018).
What is Arduino?

A microcontroller is a small computer contained in


a single, integrated circuit or computer chip.
What is Arduino?

Microcontrollers are an excellent way to program


and control electronics.
What is Arduino?

Microcontroller boards have a microcontroller


chip and other useful connectors and components
that allow a user to attach inputs and outputs.
What is Arduino?

Arduino also kept the naming convention from


Processing, calling its programs sketches.
What is Arduino?

You write code in the Arduino software to tell the


microcontroller what to to-do. For example, by writing a
line of code, you can tell an light-emitting diode (LED)
to blink on and off. If you connect a pushbutton and add
another line of code, you can tell the LED to turn on
only when the button is pressed.
What is Arduino?

Similar to a conventional computer, an Arduino can


perform a multitude of functions, but it’s not much use
on its own. It requires inputs or outputs to make it
useful. These inputs and outputs allow a computer —
and an Arduino — to sense objects in the world and to
affect the world (Nussey, 2018).
What is Arduino?

We do not assume that you already know programming


or electronics— we will show you what you need to
know to get up and running with the Arduino. It will
help if you are good at building and tinkering, and you
have a determined nature (Culkin & Hagan, 2017).
What is Arduino?
There are many versions of the Arduino, and each is
designed for a specific function. Figure 1.2 shows a few
of the Arduino boards.

Figure 1.2 There are many versions


of the Arduino, each designed for a
different function.
Arduino Uno Arduino Lilypad
What is Arduino?
The Arduino board (shown in Figure 1.2) can help you
find some of the answers to the mysteries of electronics
in a hands-on way. The original creation of Massimo
Banzi and David Cuartielles, the Arduino system
offers an inexpensive way to build interactive
projects, such as remote-controlled robots, GPS
tracking systems, and electronic games (Boxall,
2013).
What is Arduino?

To get a sense of the variety of Arduino projects in the


wild, you can simply search the Internet. You will find a
list of groups offering introductory programs and
courses with like-minded, creative people (Boxall,
2013).
Arduino started its life in Italy

Where did Interaction Design Institute Ivrea


(IDII), a graduate school for
Arduino interaction design that focuses on
come from? how people interact with digital
products, systems, and
environments and how they in
turn influence us (Nussey, 2018).
Where did Arduino come from?

The term interaction design was coined by Bill Verplank


and Bill Moggridge in the mid-1980s.
Where did Arduino come from?

The following sketch by Verplank illustrates the basic


premise of interaction design: If you do something, you
feel a change, and from that you can know something
about the world (Nussey, 2018).
Where did Arduino come from?

Figure 1.3 The


principle of
interaction design,
illustrated by Bill
Verplank
Where did Arduino come from?
Although interaction design is a general principle, it
more commonly refers specifically to how we interact
with conventional computers by using peripherals (such
as mice, keyboards, and touchscreens) to navigate a
digital environment that is graphically displayed on a
screen (Nussey, 2018).
Where did Arduino come from?
Another avenue, referred to as physical computing, is
about extending the range of these computer programs,
software, or systems through electronics. By using
electronics, computers can sense more about the world
and have a physical effect on the world themselves
(Nussey, 2018).
Where did Arduino come from?
The Arduino is used for building physical computing
projects.

What does that mean?


Physical computing refers to taking information from the
world around us by using inputs such as sensors and
switches and responding to that information with outputs
of some kind.
Where did Arduino come from?
It could be as simple as turning on an LED when a room
gets dark, or it could be a complex system of sound and
light that responds to the position of a person in a room.
Where did Arduino come from?
An Arduino can act as the “brains” of this kind of a
system, handling the information coming in and the
response going out (Culkin & Hagan, 2017).
Where did Arduino come from?
Both areas — interaction design and physical computing
— require prototypes to fully understand and explore the
interactions, which presented a hurdle for non- technical
design students (Nussey, 2018).
Where did Arduino come from?
In 2001, a project called Processing, started by Casey Reas and
Benjamin Fry, aimed to get non-programmers into programming
by making it quick and easy to produce onscreen visualizations
and graphics. The project gave the user a digital sketchbook on
which to try ideas and experiment with a small investment of
time. This project in turn inspired a similar project for
experimenting in the physical world (Nussey, 2018).
Where did Arduino come from?

In 2003, building on the same principles as Processing,


Hernando Barragán started developing a microcontroller board
called Wiring. This board was the predecessor to Arduino
(Nussey, 2018).
Where did Arduino come from?

In common with the Processing project, the Wiring project also


aimed to involve artists, designers, and other non-technical
people. However, Wiring was designed to get people into
electronics as well as programming.
Where did Arduino come from?

The Wiring board (shown in Figure 1-2) was less expensive than
some other microcontrollers, such as the PIC and the Basic
Stamp, but it was still a sizable investment for students (Nussey,
2018).
Where did Arduino come from?

In 2005, the Arduino project began in response to the need for


affordable and easy-to-use devices for interaction design students
to use in their projects.
Where did Arduino come from?

It is said that Massimo Banzi and David Cuartielles named the


project after Arduin of Ivrea, an Italian king, but according from
a reliable sources that it also happens to be the name of the local
pub near the university, which may have been of more
significance to the project (Nussey, 2018).
Where did Arduino come from?

The Arduino project drew from many of the experiences of both


Wiring and Processing. For example, an obvious influence from
Processing is the graphic user interface (GUI) in the Arduino
software.
Where did Arduino come from?

This GUI was initially “borrowed” from Processing, and even


though it still looks similar, it has since been refined to be more
specific to Arduino (Nussey, 2018).
Where did Arduino come from?

Figure 1.4: An early


Wiring board.
Where did Arduino come from?

Arduino also kept the naming convention from


Processing, calling its programs sketches. In the same
way that Processing gives people a digital sketchbook to
create and test programs quickly, Arduino gives people a
way to sketch their hardware ideas as well (Nussey,
2018).
Learning by Doing

People have used technology in many ways to achieve


their own goals without needing to delve into the details
of electronics. Following are just a few related schools
of thought that have allowed people to play with
electronics (Nussey, 2018).
Patching

Patching is a technique for experimenting with systems


using wires. The earliest popular example of patching is
in phone switchboards. For an operator to put you
through to another line, he or she had to physically
attach a cable (Nussey, 2018).
Hacking

Hacking is a term that typically refers to the subversive


use of technology. More generally, though, it refers to
exploring systems and making full use of them or
repurposing them to suit your needs (Nussey, 2018).
Hacking

Hacking in this sense is possible in hardware


as well as software.
Hacking

A great example of hardware hacking is a keyboard hack. Say


that you want to use a big red button to move through a
slideshow. Most software programs contain keyboard short- cuts,
and most PDF viewers move to the next page in a slideshow
when the user presses the spacebar. If you know this, you ideally
want a keyboard with only a spacebar (Nussey, 2018).
Circuit Bending

Circuit bending flies in the face of traditional education and is all


about spontaneous experimentation. Children’s toys are the
staple diet of circuit benders (Nussey, 2018).
What is an open
source hardware?
The Arduino is
defined on its
website as an open
source electronics
prototyping
platform.
Open Source Hardware

In the open source hardware movement, technologists share their


hardware and software to foster development of new projects and
ideas.
Open Source Hardware

Source designs are shared in a format that can be


modified, and whenever possible, readily available
materials and open source tools are used to create the
designs (Culkin & Hagan, 2017).
Open Source Hardware

Open source software, in particular Processing,


has had a huge influence on Arduino development.
Open Source Hardware

In the world of computer software, open source is


a philosophy in which people share the details of a
program and encourage others to use, remix, and
redistribute it, as they like (Nussey, 2018).
Open Source Hardware

By encouraging the sharing of resources, the open


source hardware movement facilitates development of
new products and designs. Open source projects
emphasize the importance of documentation and sharing,
making the community of users a great resource for
learners (Culkin & Hagan, 2017).
Open Source Hardware

Just as the Processing software is open source, so are


Arduino software and hardware. This means that the
Arduino software and hardware are both released freely
to be adapted as needed. You find the same spirit of
openness also amongst the community on the Arduino
forums (Nussey, 2018).
Prototyping

The Arduino is a prototyping platform.


Prototyping

It is building a model of a system. It can involve many


phases, from initial sketches through detailed plans and a
series of refinements, to building a fully functional
model that can be replicated. Or it can be a quick one-off
that has put together rapidly to test an idea (Culkin &
Hagan, 2017).
End of Session
Getting to Know
the

2
ARDUINO
UNO
Getting to Know the Arduino Uno

No one definitive Arduino board exists; many types of


Arduino boards are available, each with its own design
to suit various applications. Deciding what board to use
can be a daunting prospect because the number of boards
is increasing, each with new and exciting prospects.
Getting to Know the Arduino Uno

However, one board can be considered the arche- type of


the Arduino hardware, the one that almost all people
start with and that is suitable for most applications. It is
the Arduino Uno (Nussey, 2018).
Getting to Know the Arduino Uno

There are several versions of the Arduino; it has been


around since 2005 and is constantly evolving.

Since the Arduino is open source, you might also


purchase a board that does not come directly from the
Arduino organization.
Getting to Know the Arduino Uno

Figure 5.1: The


Arduino Uno Board
 
Getting to Know the Arduino Uno

Uno is Italian for the number one, named for the release
of version 1.0 of the Arduino software.

R3 relates to the revision of the features on the board,


which includes updates, refinements, and fixes. In this
case, it is the third revision
Small Components of Arduino
The Brains: ATmega328P microcontroller
chip
You can think of the microcontroller chip
itself as the brains of the board. The chip used
in the Arduino Uno is the ATmega328P, made
by Atmel. It is the large, black component in
the center of the board. This chip is known as
an integrated circuit, or IC. It sits in a socket;
if you were to remove it, it would look like the
one shown in Figure 5.2 (Nussey, 2018).

Figure 5.2: An ATmega328P


microcontroller all by itself.
Small Components of Arduino
Header sockets
The microcontroller socket connects all the legs of the
ATmega328 microcontroller chip to other sockets,
referred to as header sockets, which are arranged around
the edge of the board and are labeled for ease of use.
These black sockets are divided into three main groups:
digital pins, analog input pins, and power pins (Nussey,
2018).
Small Components of Arduino
Header sockets
All these pins transfer a voltage, which can be either sent
as output or received as an input. Why are these pins
important? They allow you to connect additional
circuitry to the board quickly and easily when
prototyping with a breadboard and to design additional
boards, called shields, that fit neatly on top of your
Arduino board (Nussey, 2018).
Small Components of Arduino
Header sockets
This same process of sending and receiving electrical signals is
going on inside modern computers. But because they are so
advanced and refined compared to a humble Arduino, it is
difficult to directly link a computer accustomed to digital signals
(0s and 1s) to an electronic circuit that deals with a range of
voltages (0v to 5v in the ATmega328P’s case) (Nussey, 2018).
Small Components of Arduino
Header sockets
The Arduino (see the sketch in Figure 5.3) is special because it
can interpret these electric signals and convert them to digital
signals that your computer can understand — and vice versa. It
also enables you to write a program using software on a
conventional computer that the Arduino IDE (integrated
development environment) converts or compiles to electrical
signals that your circuit can understand (Nussey, 2018).
Small Components of Arduino
Header sockets

Figure 5.3: An Arduino Uno


with all the important parts
labeled.
Small Components of Arduino
Header sockets
By bridging this gap, it is possible to use a conventional
computer’s benefits — ease of use, user-friendly interfaces, and
code that is easy for humans to understand — to control a wide
range of electronic circuits and even give them complex
behaviors with relative ease (Nussey, 2018).
Small Components of Arduino
Digital Pins
You use digital pins (refer to Figure 5.3) to send and receive
digital signals. Digital implies that the pins have two states: off
or on. In electrical terms, these states translate to a value of 0 or 5
volts, but no values in between (Nussey, 2018).
Small Components of Arduino
Analog Pins
You use analog in pins (refer to Figure 5.3) to receive an analog
value. An analog value is taken from a range of values. In this
case, the range is the same 0V to 5V as with the digital pins, but
the value can be at any point — 0.1, 0.2, 0.3, and so on (Nussey,
2018).
Small Components of Arduino
What about Analog Out
The shrewd ones among you may have noticed that there seem to be no
analog out pins. In fact, the analog out pins are there, but they are hidden
among the digital pins marked as PWM using the ~ symbol. PWM stands
for pulse-width modulation, which is a technique you can use to give the
impression of an analog output using digital pins. The ~ symbol appears
next to digital pins 3, 5, 6, 9, 10, and 11, showing that you have six pins that
are capable of PWM (Nussey, 2018).
Small Components of Arduino
Power Pins
You use the power pins to distribute power to inputs and outputs
wherever power is needed.
Small Components of Arduino
Power Pins
Vin, which stands for voltage in, can be used to supply a voltage
(V) equal to the one supplied by the external supply jack (for
example, 12V). You can also use this pin to supply power to the
Arduino from another source (Nussey, 2018).
Small Components of Arduino
Power Pins

GND marks the ground pins, which are essential to complete


circuits. There is also a third ground by pin 13. All these pins are
linked and share the same (called common) ground (Nussey,
2018).
Small Components of Arduino
Power Pins

You can use 5V or 3.3V to supply a 5-volt or 3.3-volt power


supply, respectively, to components or circuits (Nussey, 2018).
Small Components of Arduino
USB Socket
To tell the microcontroller on the Arduino board what to do, you need to
send a program to it. On the Uno, you send programs primarily by a USB
connection. The large, metallic socket is a USB port for a USB A-B cable.
This cable is similar to the one used on your home printer or scanner, so you
may find a few around the house that can serve as handy spares. The
Arduino uses the USB both for power and to transfer data. Using a USB
cable is perfect for low-power applications and when data is being sent to or
received from a computer (Nussey, 2018).
Small Components of Arduino
Power Socket
Next to the USB socket is another socket; this one is for power. This socket
allows you to power your Arduino from an external power supply. The
supply could be from an AC-to-DC adaptor (similar to those used on other
consumer electronics), a battery, or even a solar panel (Nussey, 2018).
Small Components of Arduino
Power Socket
The connector needed is a 2.1 mm center positive plug. Center positive
simply means that the plug has an outside and an inside that fit the socket
and that the inside of the plug must be positive. You should be able to find
this plug among the standard connectors that come with most power
supplies; otherwise, you can buy the connector and attach it to bare wires
(Nussey, 2018).
Small Components of Arduino
Power Socket
If you connect a power supply that is the opposite (center negative), it is
known as having a reverse polarity. Components on the Arduino Uno will
resist your attempts to send voltage the wrong way around the board, but
those components can melt in the process of saving your board, depending
on how much power you are sending and how long it takes you to notice the
burning smell! If you reverse the polarity when using the Vin, 5V, or 3.3V
pins, you bypass this protection and almost instantly destroy several parts of
your board and the ATmega328P chip (Nussey, 2018).
Small Components of Arduino
Power Socket

The recommended voltage for the Uno board is 7–12V.


If you supply too little power, your board might not
function correctly. Or if you provide too much power,
your board might overheat and potentially be damaged
(Nussey, 2018).
Small Components of Arduino
LEDs

LEDs come in a variety of shapes and sizes and are


found in almost every modern piece of consumer
electronics, from bike lights to TVs to washing
machines. You see a lot more of them in numerous
examples.
Small Components of Arduino
LEDs

The components described in this section are tiny. The


Uno board has four LEDs (light-emitting diodes) labeled
L, RX, TX, and ON. An LED is a component that
produces light when electrical current flows through it
(Nussey, 2018).
Small Components of Arduino
LEDs

These four LEDs are used to indicate activity on the board, as


follows:

» ON is green and signifies that your Arduino is powered.


» RX and TX tell you that data is being received or transmitted
by the board.
» L is a special LED connected to digital pin 13. It is great for
testing to see whether your board is functioning as you want.
Small Components of Arduino
LEDs

If your Arduino is plugged in but you do not see any


lights, double-check that:

» Your USB cable is plugged in


» Your USB port is working — try another device in the
port
» Your cable is working — try another cable, if possible
Small Components of Arduino
LEDs

If the LED still doesn’t illuminate, something is


probably wrong with your Arduino. Your first
destination should be the Arduino troubleshooting page
at http://arduino.cc/en/Guide/troubleshooting. If you
still have no luck, request a replacement Arduino from
where you purchased the device.
Small Components of Arduino
Reset Button

The Uno board also has a button next to the USB socket
called the reset button. It resets the program on the
Arduino or stops it completely when held down for a
time. Connecting a wire between GND and the reset pin,
which is located next to the 3.3V, achieves the same
results.
Small Components of Arduino
Reset Button

The board has many other components, all of which


perform important jobs, but the ones described in this
section are the key ones for you to know for now.
End of Session
We will end here.
Next Week’s Lesson:
PARTS AND
TOOLS
Parts and Tools
Parts List

▨ Breadboard
▨ USB A-B cable
▨ 9-volt battery
▨ 9–12-volt power supply
▨ 9-volt battery cap or holder
▨ Assorted LEDs, a variety of colors
Parts and Tools
Parts List

▨ Assorted resistors
▨ 10K potentiometer
▨ 3 momentary switches/buttons
▨ Photoresistor
▨ Speaker, 8 ohm
▨ 2 servo motors
▨ Jumper wires
Parts and Tools

Electronic parts are often called


components, because they are
components in an electronic circuit.
Breadboard
A breadboard, is used to build and test circuits
quickly.

Figure 5.4: Breadboard


A USB A-B cable

A USB A-B cable,


shown in Figure 5.5,
connects the Arduino to a
computer so you can
program it. It will also
provide power.

Figure 5.5: USB A-B Cable


9-volt Battery

9-volt Battery can provide


power when the Arduino is
not attached to a computer

Figure 5.6: 9-volt Battery


Battery Cap

The battery cap, shown


in Figure 5.7, will be
used to attach a battery
to a breadboard.

Figure 5.7: Battery Cap


Power Adapter

The power adapter,


shown in Figure 5.8,
can power your
Arduino when it is not
attached to your
computer.
Figure 5.8: Power Adapter
Light-emitting diodes (LEDs),

Light-emitting diodes
(LEDs), shown in
Figure 5.9, emit light
when a voltage is
applied

Figure 5.9: LEDs


Resistors

Resistors, as you can


see in Figure 5.10,
limit the flow of
current in a circuit.

Figure 5.10: Resistors


Momentary Pushbutton

The momentary
pushbutton, shown in
Figure 5.11, is used to
make or break a
connection in a circuit.

Figure 5.11: Momentary Pushbutton


Potentiometer

Figure 5.12 shows a


potentiometer, a
variable resistor

Figure 5.12: Potentiometer


Photoresistor

A photoresistor, shown
in Figure 5.13, changes
its resistance when
exposed to different
levels of light.
Figure 5.13: Photoresistor
Speaker, 8 ohm

Figure 5.14 shows an 8-


ohm speaker, which
will play audio signals.

Figure 5.14: Speaker, 8 ohm


Servo Motor

The servo motor is an


easily controlled hobby
motor, as you can see in
Figure 5.15.

Figure 5.15: Servo Motor


Jumper Wires

Jumper wires, shown in Figure


5.16, are used to connect
components in a breadboard.
You can buy them or make
them yourselves with wire
strippers (Culkin & Hagan,
2017). Figure 5.16: Jumper wires
A Note
About LEDs
LEDs

LEDs come in a variety of


• Colors
• Style
• Sizes
LEDs

They will help demonstrate a number


of basic electronics and Arduino
concepts in a visual way
LEDs
One important thing to remember about LEDs is
that they have a polarity, or direction in which
they must be placed in order to work in a
project. If we place the LEDs backward, they
won’t light up. How do we know the orientation of
an LED?,
How do we know the
orientation of an LED?,
1. LEDs have two legs, or leads, which are different
lengths;
2. The longer lead is known as the anode, the side of
the LED that we will connect to power;
3. The shorter leg is called the cathode, which will be
pointed away from our power source.
How do we know the orientation of an
LED?,

Note If you
place the LED in
backward, it won’t
light up but it also Anode
will not damage long lead Cathode
attaches short
to power lead

Figure 5.17 Anode (positive lead) and


cathode (negative lead) of an LED
Tools

A multimeter will tell you everything you


need to know about the electrical properties
of a circuit, properties that are not
necessarily visible to your eye.
Multimeter
When you choose a multimeter,
make sure it is digital and has
removable leads, and that it is
fused (Culkin & Hagan, 2017).

Figure 5.18: Multimeter


Needle-nose pliers

Needle-nose pliers come in handy for pulling


components out of the breadboard when
you wish to make changes to a circuit.

They are also helpful for picking up small


components
Needle-nose pliers

Figure 5.19: Needle-nose pliers


Wire Strippers

Wire strippers, pictured in Figure 5.20, are used to pull


off the plastic insulating coating found on various
thicknesses of wire.

They will make your life a lot easier when using spools
of wire, since you will be able to cut and use custom
lengths of wire.
Wire Strippers

Figure 5.20: Wire strippers


Thank you.

You might also like