0% found this document useful (0 votes)
13 views77 pages

Week 2

The document outlines the fundamentals of physical computing and electronics, emphasizing the need for electronic circuits to enhance Arduino functionalities through sensors and actuators. It explains key concepts such as electricity, voltage, current, resistance, and various electronic components, including transistors and integrated circuits. Additionally, it provides practical guidance for creating circuits and cautions against potential hazards in electronic projects.

Uploaded by

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

Week 2

The document outlines the fundamentals of physical computing and electronics, emphasizing the need for electronic circuits to enhance Arduino functionalities through sensors and actuators. It explains key concepts such as electricity, voltage, current, resistance, and various electronic components, including transistors and integrated circuits. Additionally, it provides practical guidance for creating circuits and cautions against potential hazards in electronic projects.

Uploaded by

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

SM2716 Physical Computing & Tangible Media

Kening Zhu (Ken)


Assistant Professor
School of Creative Media
City University of Hong Kong
Email: [email protected]
Before we go deep .
Why we need to make electronic circuits if
we already have an Arduino?

=
=> we need to give the Arduino
eyes, voice, hands, legs...
• Interfacing with an analog/real world
- sensors (switch, light...)
- actuators (lamps, speakers, motors...)

• Power
- battery, solar cell, dynamo...

• Enhanced functions:
- More memory and speed
- real time clock,
- wireless communication (Wifi, GPS,
GSM…)
- even face recognition!
Electronics 101: Introduction

4
Why Electronics?
• Everything needs power.
• Power need to be controlled….to be interactive.
What is Electronics?
What is Electronics? (Cont.)
Electricity: the hydraulic analogy

... its all about many many droplets that move


and flock together !
Electricity: the hydraulic analogy

6
We have mastered electricity exactly like water!
• we can guide electricity
• extract its energy
• use it for heating or work (computing is work…)

7
43
a) we can extract or store energy
b) we can guide it where we need it:
c) we can transmit information (here digital)

“A Hands-On Model of the Internet”


Miraikan (Museum of Science, Japan)
”Serial paintings”
https://www.youtube.com/watch?v=B4auh-YFFfE
Cassinelli & Saakes 2013
d) ...and even compute things of course!
Anderson’s
digital Water
Computer
(2018)

MONIAC (Monetary
National Income
Analogue Computer)
an analog hydraulic
computer (1949)
Electronics VS. Electricity
Electricity
Electronics

Atom Circuits
Microwave ovens
use electronics to
control electricity
for heating up food
Electronics
• The art of creating “pluming installations” to transport electricity
• The “pipes” carrying electricity are called wires or traces.

• The whole “plumbing installation” is called an electronic circuit .


• Electronic components are like homes in a city, receiving water, doing something with it
(taking a shower?) and... as a consequence affecting the rest of the people down the
road.
Generator, Voltage, Current and Resistance

it’s all about a sort of “electrical water” ...


a) how to put the water in motion?
We need to generate pressure on the pipes right?

A battery is a
chemically based
“electric pump”

Water pumps

An electric generator (battery, transformer or dynamo) is an electrical pump


b) Voltage: the differential pressure on the pipes

We can measure the water pressure on a pipe with a pressure gauge...

high pressure

• Voltage is the difference of “pressure of the electricity” between two points on the pipe.
• It creates a flow, or ”current” in the cables (pipes) if it can (circuit is not open)
• Measured in Volts (V)
c) Current (and polarity)
• The ”flow” of electricity is the electrical current, measured in
Amperes (A)
• As explained, it is generated by a difference of voltage (electrical
pressure) between two points in the “pipes” (the circuit)

A + - B

A B
Water pressure in A is higher than B Voltage in A is larger than in B
(then water moves from A to B) Then, electric current flows from A to B
How to indicate current.
• Unit: Amperes or Amps (A)
Batteries and polarity: what is that?

• It signals the voltage difference (voltage at “+” is higher than ”-”)


• It indicate then direction of the current: from + to –
• (For a battery, it has to be understood as + to – outside it in the circuit);
• Some components are polarized, some others not.
what makes electron flow…
• Electric Potential Difference!
• Similar to water.
• Water flows when there is a height difference.
Checking our understanding...
• Can we have voltage without current?
• Can we have current without voltage?
Electric Potential Difference
• There is an electric potential difference between the positive (+) terminal and
the negative (-) terminal of the power source (battery).
• Electron will then flow from the + to the -, and make electric current.
How to indicate potential difference.
• Unit: Voltages or Volts (V)
Refining our
understanding...

• To maintain this difference in pressure, a generator must work continuously;


• If there is no flow (the circuit is not closed), then the battery does not
“discharge”
What are those ”pipes”?
• Materials that are “good conductors”, called metals

a metal
always
conduct

• ...but it can flow on anything else, A large air


gap can
provided that the “pressure” is high conduct too..
enough! (high voltage) with a billion
volts
Resistance
• A thin pipe limits the current: we say that the pipe resists the
passage of the water.
• Most materials (*), even metals resist electrical current (and
heat in the process)
• Resistance is measured in Ohms (Ω): a material whose
resistance is 1 Ohms means (by definition) that when we
apply a voltage of 1V to it, it lets a flow of 1A through.

... not all pipes are born equal!


Ohm’s “Law” (Relation between voltage, current and resistance)
It should be clear by now:
• If for the same voltage (“pressure difference”) the current is small, then the resistance is
large, and vice-versa;
• The resistance of a conductor is in fact defined as:

high voltage produces little flow => R large


R =V / I
low voltage produces big flow => R small

The discovery that this ratio is a constant for most


conductor, takes the name of “Ohms Law”

• Resistors are components designed to provide a precise resistance.


Do Volts or Amps Kill You? Voltage, Current and Resistance

https://youtu.be/9iKD7vuq-rY
The circuit

• The flow of electrons moves the motor


• The flow of electrons heat the filament, and the bulb lights up
• The switch is like a tap stopping or allowing the flow to pass
Schematic circuits: a way to avoid insanity
=

30
Series and parallel circuits: “Kirchhoff's laws”

Series:
• Components “in series” with each other through the wires
• The current flowing through them is therefore be the same!

Parallel:
• Components “in parallel” over two points of the circuit
• The voltage they see must therefore be the same!
Calculate the total resistance

40
Calculate the total resistance

41
Electronic components: overview

can you find


them?

• An “active” component can control the flow of a pipe… depending on the flow
on another one! (like a valve)
• An active electronic component may not have a constant resistance:
transistor!!
Switches

Momentary switches Toggle switches


Remain closed only WHILE being pressed Stay closed AFTER being pressed
Resistors - a look inside
Resistors
• Electronic components designed to have
precise values of resistances

• Made of different materials and capacity


to dissipate heat while “resisting”

50W

Note: for the same voltage, a low resistance will produce a large current => large
heat. Therefore, low resistances can burn your hand even with 5V!! beware.
45
Resistors

46
Potentiometers – variable resistors (manually)
Turning the wheel changes the resistance: manual control of the resistance

... for the same voltage, you are controlling the current: dimming a light!

47
iconductors
amily of Sem
The F

Clockwise from top: A chip, an LED and a transistor are all made
from semiconductor material.
Diodes

A device with two terminals that only allow the


flow of current in one direction only

• If the “pressure” (voltage) is exerted in reverse (“reverse


polarity”), it will act as an open circuit: no current. The device is
“polarized”

• This is an example of a component for which ”resistance” cannot


be consistently defined... 49
Light-emitting Diodes - LEDs

• Just diode that emits light when the current


circulates

• As with diodes, it needs a tiny voltage (in the


correct polarity) to start emitting/conducting

• Easy to use and super fun for beginners!

• Most common LEDs require a forward


operating voltage of between approximately
1.2 to 3.6 volts with a forward current rating
of about 10 to 30 mA, with 12 to 20 mA being
the most common range.

50
Transistor: an example of an active component
• a switch controlled by the current (or voltage) => a revolution!!
• A transistor can be used to amplify and switch electronic
signals and electrical power.
Note on using a transistor
• There are three pins in a transistor.
• Identify each pin in the real component by reading the
datasheet.
Note on using a transistor (Cont.)
• Important Parameter Ratings.
Why can a transistor be a controllable
switch?
Why can a transistor be a controllable
switch?

Vbe
-
Use a transistor as a switch
Integrated Circuit (IC)
• An integrated circuit is a set of electronic circuits on one
small plate ("chip") of semiconductor material, normally
silicon. This can be made much smaller than a discrete
circuit made from independent components.
How to use an IC chip
• Follow the datasheet.
• Identify pins.
Common ICs
• Voltage Regulator
• Logic Gates
• 555 Timer IC
• Microcontroller
Power supplies

Source: Nicolai Marquardt, University College London


43
All together: a complete circuit and its water analog

If you understand this (at least you are not scared anymore), then congratulations:

You know everything you need to do some fun electronic plumbing!


Hands on
Words of caution

• Avoid short circuits (a circuit with very low resistance)


• In a short circuit we would have very large current and power, which is very
dangerous, may burn components and cause fire
• Some electronic components will be damaged by a wrong polarity (think about the
water mill: it may not work in reverse and breaks)
• You are a conductor with a large resistance, but 220V is enough to
create a current that may kill you. So, stay clear of outlets and use
batteries when possible.
Tools: the multimeter
Measure continuity
Measure resistor and potentiometer
A simple circuit with an LED

Danger!! Mind the resistor!


Don’t put the LED directly!

• A led cannot handle more than 20 or 30mA. It has a forward voltage of about 2V..
so you need a resistor to limit the current or it will burn!

• How to choose the resistor? => Ohm’s Law!


The handy breadboard and jumpers!
Example circuit: prototyping stages You can use Autodesk TinkerCad
to draw and simulate your circuit
schematics prototyping board (schematics) www.tinkercad.com

simplified schematics
prototyping board (real)
Soldered Printed Circuit Board (PCB)
Details protoboard circuit
(a)

(c)
(a)

(b)

9V (b)
(c)
Note:
• the LED polarity
• how the protoboard rows are connected
• how the columns (on the sides) are connected
• the corresponding points (a, b, c) from the schematic and the protoboard
Voltages at different points

9.0
(-)
9V
(+) “GND”

Voltages between:
2V • battery terminals: 9V
• LED terminals: 2V 2V is the operating
7V voltage of an LED
• Resistor: 7V
Calculate the needed resistor value:
R = 7V / 0.02 A
= 350 Ohms 20mA is the forward
current of an LED
LEDs in parallel and in series

Note the different values for the resistors (in series, it is smaller).
Try this: adding a switch
Add a push-button switch to the resistor-led circuit
Individual Hands-on Tasks (will be graded)

• First try by yourself


• Try to finish individually
• Tell me when you finish and I will check
• The faster finish, the higher grade J
• I will show solutions slowly :D
[In-class Task 1]
Make a parallel circuit with one battery, two resistors, two LEDs and two buttons. Each
button controls one LED.

9v

GND
[In-class Task 2]
Make a circuit using one battery, one resistor, one potentiometer and one
LED. Turn the potentiometer to dim the light.

ATTENTION: how to be sure you will not burn it? ADD the resistor you used in previous
tasks and put it in series with the potentiometer!
78

Next week

Arduino
Coding

You might also like