The iLab Experience a blended learning hands-on course concept you - - PowerPoint PPT Presentation

the ilab experience
SMART_READER_LITE
LIVE PREVIEW

The iLab Experience a blended learning hands-on course concept you - - PowerPoint PPT Presentation

The iLab Experience a blended learning hands-on course concept you set the focus Smart Space Orchestration (s2o) Part I: Hardware Nov 29, 2017 Three parts DIY HW DIY SW P2P Measurements 3 System Orchestration ID card-based


slide-1
SLIDE 1

you set the focus

The iLab Experience

a blended learning hands-on course concept

Smart Space Orchestration (s2o) Part I: Hardware

Nov 29, 2017

slide-2
SLIDE 2

Three parts

  • DIY HW
  • DIY SW
  • P2P Measurements
slide-3
SLIDE 3

ds2os.org/

Orchestration Distributed Smart 2pace System

ID card-based Reconfiguration of a Smart Room

3
slide-4
SLIDE 4

Profile mop Profile b Profile Standby

The ID cards can be used to configure Smart Environments

Profile Store

4
slide-5
SLIDE 5

Profile mop Profile b Profile Standby

ID card Profile Store Profile mop Profile b Profile Standby

The ID cards can be used to configure Smart Environments

alarm ceiling light PC shutters …

5
slide-6
SLIDE 6 6
slide-7
SLIDE 7

“So what?”

7
slide-8
SLIDE 8

DIY Hardware

13€ 60€ 10€ 40€

<200€

8
slide-9
SLIDE 9

Dave Mellis Tom Igoe Gianluca Martino David Cuartielles Massimo Banzi time 2005 Creating your own hardware is difficult. Creating your own hardware is easy. *HW Maker Culture

9
slide-10
SLIDE 10

Orchestration Distributed Smart 2pace System

TWO DIY Maker Cultures

DIY Hardware

DIY Software

Arduino DS2OS Smart Device Smart Space App time 2016

A computing system that is typically embedded, interfaces its environment via sensors and actuators, and can be remotely managed.

2005

Portable easy-to-program applications that manage smart environments.

10

Creating your own IoT Software Apps is difficult. Creating your own IoT Software Apps is easy.

slide-11
SLIDE 11

Orchestration Distributed Smart 2pace System

DIY Hardware

DIY Hardware

DIY Software Arduino DS2OS Smart Device Smart Space App time 2016

slide-12
SLIDE 12

ds2os.org/

Orchestration Distributed Smart 2pace System

s2o - hardware

Marc-Oliver Pahl

slide-13
SLIDE 13

Orchestration Distributed Smart 2pace System

What is this about?

Smart Devices

A hardware device that can sense and interact with its environment via sensors and actuators, and that can be managed remotely using software is called Smart Device.

Smart Spaces

A physical space that contains smart devices is called Smart Space.

Smart Space Orchestration

Monitoring and controlling (managing) Smart Devices within a Smart Space with software is called Smart Space Orchestration.

slide-14
SLIDE 14

Orchestration Distributed Smart 2pace System

Creating Hardware

time 2005 Creating your own hardware is difficult. Creating your own hardware is easy.

slide-15
SLIDE 15

Orchestration Distributed Smart 2pace System

Massimo Banzi - one of the creators of Arduino 2012 TED talk

slide-16
SLIDE 16
slide-17
SLIDE 17

Orchestration Distributed Smart 2pace System

Arduino Video

  • Arduino
  • Created 2005 at IVREA for simplifying interaction design class
  • Industrie 3.0 (create objects on your own)
  • Open Source Hardware => Makers Movement
  • “you have unlocked” … “I just feel overwhelmed” … “going into

every field you could imagine”

slide-18
SLIDE 18

Orchestration Distributed Smart 2pace System

Do It Yourself (DIY) Hardware

You will experience it in this lab…

slide-19
SLIDE 19

Orchestration Distributed Smart 2pace System

Introduction to Electronics

The electrical engineering details will not be part of the exam.

slide-20
SLIDE 20

Orchestration Distributed Smart 2pace System

Electrical Engineering Basics / Refreshment with Alexander Güssow

slide-21
SLIDE 21

Agenda

  • Introduction to Electronics

– Voltage and current – Units and parameters – Resistance: Ohms Law and Kirchhoff's Laws – (Light Emitting) Diodes

  • Common Sensor types

2

slide-22
SLIDE 22

Voltage in practice

  • Voltage 𝒗 𝒖 : ℝ → ℝ
  • Always measured between two points
  • 𝑣 𝑢 = 𝑑 where 𝑑 ∈ ℝ

DC Voltage

  • 𝑣 𝑢 = û sin 2𝜌𝑔𝑢

AC Voltage

  • Touching >50V AC or >120V DC can harm you

7

slide-23
SLIDE 23

Voltmeters measure static and fluctuating voltages

Source: Fluke 80 Series V User Manual, May 2004 Rev.2, 11/08, page 14 8

slide-24
SLIDE 24

Oscilloscopes display time-variant voltage curves

Source: https://www.adafruit.com/products/2145, 18.11.2015

slide-25
SLIDE 25

Current

  • Voltage sources: Pump analogy
  • Closing the circuit

– Charge Flow?

Current is the charge flow rate in a circuit in Coulomb/s.

10

slide-26
SLIDE 26

Current in practice

  • Current 𝒋 𝒖 : ℝ → ℝ
  • Different charged particles
  • Actual direction unknown
  • Closed electric circuit
  • Stopping large currents quickly is dangerous

11

slide-27
SLIDE 27

Ammeters measure static and fluctuating currents

Source: Fluke 80 Series V User Manual, May 2004 Rev.2, 11/08, page 25 12

slide-28
SLIDE 28

Voltage and Current

Measurements

14 Source: https://commons.wikimedia.org/wiki/File:Masc henregel.svg, 19.11.15 Source: Adapted from http://www.elektronik-kompendium.de/sites/grd/0201113.htm, 19.11.15

slide-29
SLIDE 29

Common units and parameters

15

Name Symbol SI-Unit Formula Voltage U or u(t) or V V Current I or i(t) A Electric Power P W 𝑄 = 𝑉 ⋅ 𝐽 Electric Energy W Ws, J 𝑋 = 𝑄 ⋅ 𝑢 Electrical resistance R Ohm (Ω) 𝑆 = 𝑉/𝐽

slide-30
SLIDE 30

Ohms Law

  • R is constant
  • One free variable remains
  • Intrinsic property
  • Physical device: Resistor
  • Color of the rings encodes

their value

Resistance

𝑆 = 𝑉 𝐽 Resistor (circuit symbol) Resistor (picture)

slide-31
SLIDE 31

Source: Adapted from https://upload.wikimedia.org/wikipedia/commons/d/d7/FourIVcurves.svg, 19.11.15

𝐽(𝑉) = 𝑉 ⋅ 1 𝑆

Resistor Current-Voltage characteristic

slide-32
SLIDE 32

Resistor color codes

Source: http://www.digikey.com/- /media/Images/Marketing/Resources/Calcul ators/resistor-color-chart.jpg, 19.11.15 18

slide-33
SLIDE 33

Kirchhoffs 1st Law

„The sum of currents into and out of any single node of a network is always zero.“ Pay attention to the direction of the current-arrows:

  • Arrows into a node are positive
  • Arrows out of a node are negative

Kirchhoffs 1st law holds for all nodes in a circuit.

𝑗𝑙

𝑜 𝑙=1

= 0

Source: http://www.elektronik-kompendium.de/sites/grd/0608011.htm, 19.11.2015

𝐽 − 𝐽1 − 𝐽2 − 𝐽3 = 0

Source: https://commons.wikimedia.org/wiki/File:Kirchhoff%27s_Current_Law.svg, 19.11.2015

slide-34
SLIDE 34

Kirchhoffs 2nd Law

„The sum of Voltages in any closed loop through a cirquit is always zero.“ Source: http://www.elektronik-kompendium.de/sites/grd/0608011.htm, as of 19.11.2015

𝑉2 + 𝑉1 − 𝑉𝑟1 − 𝑉𝑟2 = 0

Source: https://en.wikipedia.org/wiki/File:Kirshhoff-example.svg, as of 19.11.2015

𝜁1 − 𝑆1 ⋅ 𝑗1

𝑃ℎ𝑛𝑡 𝑀𝑏𝑥

− 𝑆2 ⋅ 𝑗2 = 0 𝜁2 − 𝜁1 − 𝑆2 ⋅ 𝑗2 − 𝑆3 ⋅ 𝑗3 = 0

slide-35
SLIDE 35

Resistor superposition

Series circuit 𝑆𝑢𝑝𝑢𝑏𝑚 = 𝑆𝑙

𝑜 𝑙=1

Parallel circuit 𝑆𝑢𝑝𝑢𝑏𝑚 = 1 1 𝑆𝑙

𝑜 𝑙=1

Source: http://www.iris.uni-stuttgart.de/lehre/eggenberger/eti/, Chapter 8, as of 19.11.2015

slide-36
SLIDE 36

Voltage divider circuit

Known: U Wanted: R1 and R2 such that U1 and U2 are what we want

  • Choose two of: I, R1, R2
  • Then solve:

𝑉1 = 𝑉 𝑆1 𝑆𝑘

𝑜 𝑘=0

  • Loading the output also

changes U1 and U2

Source: https://commons.wikimedia.org/wiki/File:Einfacher- unbelasteter-Spannungsteiler.svg, as of 19.11.2015

slide-37
SLIDE 37

Current divider circuit

Given I, R1 and R2, what are I1 and I2? 𝐽1 = 𝐽 1/ 1/𝑆𝑘

𝑜 𝑘=0

𝑆1

Source: https://commons.wikimedia.org/wiki/File:Stromteiler.svg, as of 19.11.2015

slide-38
SLIDE 38

(Light Emitting) Diodes – I-V Diagram

Source: http://electronics.stackexchange.com/questions/76367/accounting-for- led-resistance, as of 19.11.15

slide-39
SLIDE 39

LEDs I-V Diagram, Case specs

Source: http://www.electronics.dit.ie/staff/tscarff/DT089_Physical_Computing_1 /LEDS/Leds.htm, as of 19.11.15

slide-40
SLIDE 40

How to actually use LEDs

  • 𝐽𝐸𝑗𝑝𝑒𝑓 𝑊

𝐸 = 𝐽𝑇 𝑓

𝑊𝐸 𝑜⋅𝑊𝑈 − 1

  • Current rises exponentially with voltage
  • Diodes will break if the 𝐽𝐺 current is exceeded
  • Linearize & shift this using a Resistor in Series
  • Kirchhoff‘s 1st gives: 𝐽𝑀𝐹𝐸 = 𝐽𝑆 so let 𝐽 = 𝐽𝐺

𝑛𝑏𝑦

  • Choose suitable R such that the LED is only at about

80% 𝐽𝐺

𝑛𝑏𝑦 when the circuit is operating

slide-41
SLIDE 41

Resistor-Diode and Diode I-V Diagram

Source: Own work using LTSpice simulation program, IN4148 Diode

slide-42
SLIDE 42

Common Sensors

Resistive type

  • Used like a resistor
  • Resistance will change

with measure

  • Correlation can be non-

linear Digital type

  • Analog – Digital

conversion on-chip

  • Digital signal

– PWM (Automotive) – Manufacturer specific protocol – Bus (I2C, CAN, ...)

slide-43
SLIDE 43

Microcontroller interfaces

I2C / TWI GND, TCL, SDA Master-Slave-Bus GPIOs PxN, i.e. PB1

29

UART / Serial TIA-232-F GND, Rx, Tx Point-to-Point SPI SCLK, MOSI, MISO, nSS / nCS Master-Slave-Bus Selected Star or Daisy-Chaining

slide-44
SLIDE 44

Using Manufacturer Specific Interfaces

  • Read Datasheet

– Voltage levels – Timing requirements – Sample comm diagrams

  • Debugging tools (multimeter, oscilloscope

protocol analyzer)

  • Real time requirements
slide-45
SLIDE 45

(Embedded) Computer Architecture

Bare metal

  • Avoid non-determination
  • Get maximum run time
  • Similar to OS-like solutions

– Preemption – Priorities – Cyclic approach – Event driven approach

Operating system

  • Desktop OS are non-

deterministic

  • Real time OS (RTOS)

– Priority Scheduling – Preemptive Scheduling

  • System libraries run time is

known / bounded

slide-46
SLIDE 46

Arduino Mega 2560

  • 16 MHz ATmega2560
  • 8 kB RAM
  • GPIO, max. 1 MHz
  • UART, I2C, SPI
  • ADC, (PWMDAC)
  • Bare Bones

34

slide-47
SLIDE 47

Arduino Hardware Architecture

36

ATmegaX: 8-Bit Harvard RISC

Source(s): https://nishantnath.com/2012/03/23/introduction-to-atmega-microcontrollers/, as of 23.05.16

USB/Programmer (ATmega16U2)