0% found this document useful (0 votes)
68 views

CT 01 Introduction To Arduino Uno

The document provides an introduction to the Arduino UNO board. It describes that the Arduino UNO is a single-board computer with an 8-bit microcontroller and includes memory, input/output pins, and basic components like a power supply. It also discusses electrical concepts like voltage, current, resistors, and circuits that are important for understanding how the Arduino UNO works. Several hands-on activities are presented to help learners measure electrical properties and observe circuit behavior using a simulation tool.

Uploaded by

Gu Gle
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

CT 01 Introduction To Arduino Uno

The document provides an introduction to the Arduino UNO board. It describes that the Arduino UNO is a single-board computer with an 8-bit microcontroller and includes memory, input/output pins, and basic components like a power supply. It also discusses electrical concepts like voltage, current, resistors, and circuits that are important for understanding how the Arduino UNO works. Several hands-on activities are presented to help learners measure electrical properties and observe circuit behavior using a simulation tool.

Uploaded by

Gu Gle
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Introduction

to
Arduino UNO
Arduino UNO Introduction

What is Arduino UNO

Arduino UNO is a
❑ Single-Board Computer (SBC)

8-bit CPU (Central Processing Unit) (ATmega328P microcontroller)


❑ RISC (Reduced Instruction Set Computer) (131 instructions)
❑ 32 registers (8-bit)
❑ Up to 20 MHz clock rate (20 MIPS operation)

Memory Arduino UNO board


❑ SRAM (Static Random-Access Memory) (up to 32K) (for program variables)
❑ Flash memory (up to 256K) (for program instructions)
❑ On-board EEPROM (up to 4K) (electrically erasable programmable read-only memory) (for parameters)

Peripheral I/O (Input/Output) Timers


❑ Digital or Analogic Counters
❑ Serial I/O
Arduino UNO Introduction

Arduino Microcontroller Board

Basic Parts of Arduino UNO


USB
Power Cord
Computer Technology Introduction

Arduino UNO Pins

Vcc = 5V DC
Ground

Voltage Out
❑ 5V DC Power In
❑ 3V DC ❑ by a power cord or
❑ by USB from computer
Arduino UNO Introduction

Arduino Simulator Dashboard

Delete Undo Redo Annotation Wire Color Wire Type Export to .BRD Share the Link

Rotate

Zoom to fit

Drag and Drop


Components
on Dashboard
Arduino UNO Introduction
Activity 1A: Start and Stop a Simulation

1. Create a new Circuit


2. Drag and drop the Arduino Uno R3
3. Start Simulation
4. Observe the LED L on the board
5. Stop Simulation
6. Click on Code and choose Text
7. Analyse the Code

8. Change the Code to:


9. Start Simulation
10. Observe any change
11. Stop Simulation
Arduino UNO Introduction

Electrical Energy Sources


Electrical Energy
Voltage:
How do Batteries Work? ❑ The amount of electric potential energy
❑ Unit of measurement is V (Volt)
How to Use a Multimeter to Measure Voltage

Electrical Sources

Wall Outlet Batteries


U = 120V AC U = 6V DC
(Alternative Current) (Direct Current) Symbol
f = 60Hz
Arduino UNO Introduction
Activity 1B: Measure a Voltage

1. Create a new Circuit


2. Drag and drop:
❑ Arduino Uno R3
❑ Battery 9V
❑ 2 Multimeters set as Voltmeters
3. Use Jump wires to complete the circuit
4. Start Simulation
5. Read the voltmeters
6. Stop Simulation
Arduino UNO Introduction

Electric Resistors

What is a resistor? How to Measure Ohms with a Multimeter?

Symbol

Resistance
❑ A measure of the opposition to current flow in an
electrical circuit
Unit:
❑  (OHM) ; 1k =1000 
Arduino UNO Introduction
Potentiometers

What is a Potentiometer? Potentiometer


❑ Has three terminals
❑ May be used as a variable resistor between 0 and R-max
❑ Output voltage is an analog variable between 0 and V-
Symbol
max and may be used as an analog input

❑ V-out is a fraction of Vcc


Arduino Potentiometer
Arduino UNO Introduction

Photoresistors and Thermistors

Light Dependent Resistors (LDR): Working Principle What is a thermistor and how does it work?

Photoresistor
Thermistor
❑ LDR: Light Dependant Resistor
❑ Thermally Sensitive Resistor
❑ Is a sensor of light
❑ Resistance decreases when temperature increases
❑ Resistance decreases when light increases

Symbol
Symbol
Arduino UNO Introduction
Activity 1C: Measure a Resistance

1. Create a new Circuit


2. Drag and drop:
❑ resistor
❑ photoresistor
❑ Potentiometer
❑ Piezo buzz
❑ 4 multimeters set as ohmmeters
3. Use jump wires to complete the circuit
4. Start Simulation
5. Read the ohmmeters
6. Change the dial on the potentiometer
7. Observe the change
8. Change the light on the photoresistor
9. Observe the change
10. Stop Simulation
Arduino UNO Introduction
Electric Current
Ohm’ Law
Electric Current
❑ Electric current intensity I is direct proportional
Measuring Current with a Digital Multimeter
to the electric voltage U
Electric Current: ❑ Electric current intensity I is inverse proportional
❑ a stream of charged particles, such as
electrons or ions, moving through
to the electric resistance R 𝑈
an electrical conductor or space
𝐼=
𝑅

Unit
❑ A (Ampere);
❑ 1mA = 0.001A

𝑉1 12𝑉 12𝑉 𝑉
𝐼= = = = 0.12 = 0.12𝐴
𝑅1 1𝐾Ω 1000Ω Ω
Arduino UNO Introduction
Activity 1D: Measure a Current

1. Create a new Circuit


2. Drag and drop:
❑ Resistor 1k
❑ Potentiometer 250k
❑ 2 voltmeters
❑ 2 amperemeters
❑ 2 batteries 9V
3. Use jump wires to complete the circuits
4. Start Simulation
5. Read the meters
6. Check the Ohm’ Law
7. Change the dial on potentiometer
8. Observe the change on the amperemeter
10. Stop Simulation
Arduino UNO Introduction

Serial and Parallel Circuits

Understanding Circuits: Series vs. Parallel

Serial Circuit Parallel Circuit


❑ Same current trough all components ❑ Same drop voltage for all components
❑ Voltage drops are added: 𝑉 = 𝑉1 + 𝑉2 ❑ Currents are added: 𝐼 = 𝐼1 + 𝐼2

𝑅1 𝑅2
𝐼1
𝑅1
𝑉1 𝑉2 𝑅2
𝐼2
𝐼

𝑉
Arduino UNO Introduction
Multimeters

Multimeter Tutorial
Amperemeter
Voltmeter
❑ measures electric current
❑ measures voltage drop
❑ is connected in series
❑ is connected in parallel to the component
❑ Works for DC and AC

Ohmmeter
❑ measures the electric resistance
❑ is connected at the resistor leads Probes DC stands for Direct Current (COM is negative)
❑ may be used to check continuity AC stands for Alternate Current ( ~ )
Arduino UNO Introduction
Activity 1E: Serial and Parallel Circuits

1. Create a new Circuit


2. Drag and drop:
❑ Resistors 1k, 2k
❑ Resistors 2k, 3k
❑ 2 voltmeters
❑ 3 amperemeters
❑ 2 batteries 9V
3. Use jump wires to complete the circuits
4. Start Simulation
5. Read the meters
6. Check the sum of the voltage drop
for the serial circuit
7. Check the sum of the currents
for the parallel circuit
8. Stop Simulation
Arduino UNO Introduction

Switches Switch has two states:


Switch types ❑ Open
❑ Closed

Push Button
Arduino Slide switch

SPST Button
Single Pole Single Throw connected

connected
Arduino Push Button

SPDT Button
Single Pole Double Throw
Arduino UNO Introduction
Diodes

Types of Diodes Diode LED


❑ one-way switch for current
❑ allows current to flow easily in one direction
❑ has low (ideally zero) resistance in one direction
❑ high (ideally infinite) resistance in the other
❑ longer lead is the anode (+)

Types Schematics
Photodiodes
Arduino UNO Introduction

How to Use a Breadboard

Web Tutorial

Breadboard
Arduino UNO Introduction
Activity 1F: Build a serial circuit on the breadboard

1. Create a new Circuit


2. Drag and drop:
❑ Resistor 1k Schematics
❑ LED
❑ photoresistor
❑ Slide switch
❑ Arduino Uno R3
❑ breadboard
3. Use jump wires to complete the circuits
4. Start Simulation
5. Close and open the circuit by using the slide switch
6. Observe the current (LED) by providing
less or more light to the photoresistor
7. Stop Simulation
Arduino UNO Introduction
Activity 1G: Build a parallel circuit on the breadboard

1. Create a new Circuit Schematics


2. Drag and drop:
❑ 2 Resistor 1k
❑ LED
❑ 2 Slide switches
❑ Arduino Uno R3
❑ breadboard
3. Use jump wires to complete the circuits
4. Start Simulation
5. Close and open the circuit
by using the slide switches
6. Observe the current (LED
in the main branch
7. Stop Simulation
Arduino UNO Introduction

Speakers
Microphones, Loudspeakers & Headphones

How does a buzzer work?

Speakers:
❑ Low Frequency (our bass Sound)
❑ Mid Frequency ( Sounds, and vocal sound)
Tweeters High Frequency
❑ High Frequency (treble and sharp Sound)
Piezoelectric Speaker
❑ 4. Have no Polarity

Speakers General Purpose

Woofers Low Frequency Arduino Piezo Buzzer


Magnetic Speaker
Arduino UNO Introduction

Activity 1H: Build a door buzz Schematics

1. Create a new Circuit


2. Drag and drop:
❑ Resistor 1k
❑ Push Button
❑ Arduino Uno R3
❑ Breadboard
❑ Piezo Buzz
3. Use jump wires to complete the circuits
4. Start Simulation
5. Push the button to turn on the speaker
6. Stop Simulation
Arduino UNO Introduction
Activity 1I: Build a Build a 2-way switch

Schematics
1. Create a new Circuit
2. Drag and drop:
❑ Resistor 1k
❑ LED
❑ 2 Slide switches
❑ Arduino Uno R3
❑ breadboard
3. Use jump wires to complete the circuits
4. Start Simulation
5. Use the slide switches to control the LED
6. Explain how this circuit works
7. Stop Simulation
Arduino UNO Introduction

Inductors
Inductors and Inductance
Inductors:
1. ability to resist changes in current
2. store energy in the form of a magnetic field
3. Inductance unit is the H (henry)

Schematics

Magnetic field
of an inductor
Arduino UNO Introduction

Capacitors
How Capacitors Work

Electric field of a capacitor

❑ Capacitance unit is F (Farad)


Schematics Capacitors
❑ 1mF=0.001F
❑ stores electric energy in an electric field
❑ 1F=0.000001F
❑ passive electronic component
❑ 1nF=0.000000001F
❑ Have two terminals
Arduino UNO Introduction
Motors

Choosing Motors & Servos Motor Controller


Complete Motor Guide for Robotics
❑ intermediate device between a microcontroller,
DC, Stepper, and Servo Motor Choosing the Right Arduino Motor a power supply or batteries, and the motors
❑ provide additional current
All About Servo Motors ❑ protects Arduino board
❑ Ex: L293D
All About DC Motors

DC Motor Servo Motors Stepper Motors


❑ most common type ❑ a simple DC motor with a position control ❑ used in 3D printers, scanners and CNC machines
❑ used in remote control cars, robots, etc service ❑ motor spin steps are accurately
❑ has a simple structure ❑ able to control the amount of shafts rotation ❑ an electric motor that divides a full rotation into a
❑ change its direction by switching voltage and move it to a specific position number of equal steps
polarity ❑ small dimension ❑ the amount of rotation per step is determined by the
❑ speed is directly controlled by the applied ❑ best choice for robotic arms motor structure
voltage ❑ has three terminal (two for power, one to ❑ have a very high accuracy
❑ there is a maximum tolerable voltage control rotation) ❑ has five terminals
❑ has two terminals
Arduino UNO Introduction
Activity 1J: Control a DC Motor by using a Potentiometer

1. Create a new Circuit Schematics


2. Drag and drop:
❑ Resistor 1k
❑ Potentiometer
❑ DC Motor (from All Components)
❑ Arduino Uno R3
❑ Breadboard
3. Use jump wires to complete the circuits
4. Start Simulation
5. Use the dial to change the speed
6. Change polarity to change direction
7. Stop Simulation
Arduino UNO Introduction
Activity 1K: Servo Motor

1. Create a new Circuit


2. Drag and drop:
❑ Micro Servo (from All Components)
❑ Arduino Uno R3
#include<Servo.h>
❑ Breadboard Servo Myservo;
3. Use jump wires to complete the circuits int pos;
void setup()
4. Start Simulation {
5. Observe the motor Myservo.attach(3);
}
6. Stop Simulation void loop()
7. Take a look at the code {
for(pos=0;pos<=180;pos++)
{
Myservo.write(pos);
delay(15);
}
delay(1000);
for(pos=180;pos>=0;pos--)
{
Myservo.write(pos);
delay(15);
}
delay(1000);
}
Arduino UNO Introduction
Activity 1L: Control a Servo Motor by a Potentiometer

1. Create a new Circuit


2. Drag and drop:
❑ Micro Servo (from All Components)
❑ Potentiometer
❑ Arduino Uno R3
❑ Breadboard
3. Use jump wires to complete the circuits
4. Start Simulation
5. Use the dial to control the motor
6. Stop Simulation
7. Take a look at the code
#include <Servo.h>
int potPin = 0;
int servoPin = 9;
Servo servo;
void setup() {
servo.attach(servoPin);
}
void loop() {
int reading = analogRead(potPin);
int angle = map(reading, 0, 1023, 0, 180);
servo.write(angle);
}
Symbols used in electric and electronic circuits

You might also like