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 Reconfiguration of a Smart Room 2pace Distributed Smart ds2os.org/
4 The ID cards can be used to configure Smart Environments Profile Store Profile b Profile mop Profile Standby
5 The ID cards can be used to configure Smart Environments Profile b Profile mop Profile Standby Profile mop alarm ceiling light ID card Profile Store Profile b … PC shutters Profile Standby
6
7 “So what?”
8 DIY Hardware 40 € 60 € 13 € <200 € 10 €
Dave Mellis Tom Igoe 9 *HW Maker Culture Creating your own hardware is easy . time 2005 Creating your own hardware is difficult . Massimo Banzi Gianluca Martino David Cuartielles
10 TWO DIY Maker Cultures System Orchestration A computing system that is typically embedded, interfaces its environment via sensors and actuators, and can be remotely managed. Smart Space App DIY Hardware Arduino 2pace Smart Device Distributed Smart DIY Software DS2OS Portable easy-to-program applications that manage smart environments. Creating your own IoT Creating your own IoT Software Apps is difficult . Software Apps is easy . 2005 2016 time
DIY Hardware System Orchestration Smart Space App DIY Hardware Arduino 2pace Smart Device Distributed Smart DIY Software DS2OS 2016 time
System Orchestration s2o - hardware 2pace Marc-Oliver Pahl Distributed Smart ds2os.org/
What is this about? System Smart Devices Orchestration 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 . 2pace Smart Spaces Distributed Smart 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.
Creating Hardware System Orchestration 2pace Creating your own hardware Distributed Smart is easy . time 2005 Creating your own hardware is difficult .
System Orchestration 2pace Distributed Smart Massimo Banzi - one of the creators of Arduino 2012 TED talk
Arduino Video System Orchestration • Arduino • Created 2005 at IVREA for simplifying interaction design class • Industrie 3.0 (create objects on your own) 2pace Distributed Smart • Open Source Hardware => Makers Movement • “you have unlocked” … “I just feel overwhelmed” … “going into every field you could imagine”
Do It Yourself (DIY) Hardware System Orchestration 2pace Distributed Smart You will experience it in this lab…
System Orchestration Introduction to Electronics 2pace The electrical engineering details will not be part of the exam. Distributed Smart
System Orchestration Electrical Engineering Basics / Refreshment with Alexander Güssow 2pace Distributed Smart
Agenda • Introduction to Electronics – Voltage and current – Units and parameters – Resistance: Ohms Law and Kirchhoff's Laws – (Light Emitting) Diodes • Common Sensor types 2
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
Voltmeters measure static and fluctuating voltages Source: Fluke 80 Series V User Manual, May 2004 Rev.2, 11/08, page 14 8
Oscilloscopes display time-variant voltage curves Source: https://www.adafruit.com/products/2145, 18.11.2015
Current • Voltage sources: Pump analogy • Closing the circuit – Charge Flow? Current is the charge flow rate in a circuit in Coulomb/s. 10
Current in practice • Current 𝒋 𝒖 : ℝ → ℝ • Different charged particles • Actual direction unknown • Closed electric circuit • Stopping large currents quickly is dangerous 11
Ammeters measure static and fluctuating currents Source: Fluke 80 Series V User Manual, May 2004 Rev.2, 11/08, page 25 12
Voltage and Current Measurements 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 14
Common units and parameters 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 (Ω) 15
𝑆 = 𝑉 • R is constant 𝐽 Ohms Law • One free variable remains Resistance • Intrinsic property • Physical device: Resistor Resistor (circuit symbol) • Color of the rings encodes their value Resistor (picture)
Resistor Current-Voltage characteristic Source: Adapted from https://upload.wikimedia.org/wikipedia/commons/d/d7/FourIVcurves.svg, 19.11.15 𝐽(𝑉) = 𝑉 ⋅ 1 𝑆
Resistor color codes Source: http://www.digikey.com/- /media/Images/Marketing/Resources/Calcul ators/resistor-color-chart.jpg, 19.11.15 18
𝑜 𝐽 − 𝐽 1 − 𝐽 2 − 𝐽 3 = 0 𝑗 𝑙 = 0 Kirchhoffs 1st Law 𝑙=1 „The sum of currents into and out of any single node of a network is always zero.“ Source: http://www.elektronik-kompendium.de/sites/grd/0608011.htm, Pay attention to the direction of the 19.11.2015 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. Source: https://commons.wikimedia.org/wiki/File:Kirchhoff%27s_Current_Law.svg, 19.11.2015
𝑉2 + 𝑉1 − 𝑉 𝑟1 − 𝑉 𝑟2 = 0 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 𝑃ℎ𝑛𝑡 𝑀𝑏𝑥 𝜁 1 − 𝑆 1 ⋅ 𝑗 1 − 𝑆 2 ⋅ 𝑗 2 = 0 𝜁 2 − 𝜁 1 − 𝑆 2 ⋅ 𝑗 2 − 𝑆 3 ⋅ 𝑗 3 = 0 Source: https://en.wikipedia.org/wiki/File:Kirshhoff-example.svg, as of 19.11.2015
Resistor superposition Source: http://www.iris.uni-stuttgart.de/lehre/eggenberger/eti/, Chapter 8, as of 19.11.2015 Series circuit Parallel circuit 𝑜 1 𝑆 𝑢𝑝𝑢𝑏𝑚 = 𝑆 𝑢𝑝𝑢𝑏𝑚 = 𝑆 𝑙 1 𝑜 𝑆 𝑙 𝑙=1 𝑙=1
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
Current divider circuit Given I, R1 and R2, what are I1 and I2? 𝑜 1/ 1/𝑆 𝑘 𝑘=0 𝐽 1 = 𝐽 𝑆 1 Source: https://commons.wikimedia.org/wiki/File:Stromteiler.svg, as of 19.11.2015
(Light Emitting) Diodes – I-V Diagram Source: http://electronics.stackexchange.com/questions/76367/accounting-for- led-resistance, as of 19.11.15
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
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
Resistor-Diode and Diode I-V Diagram Source: Own work using LTSpice simulation program, IN4148 Diode
Common Sensors Resistive type Digital type • Used like a resistor • Analog – Digital conversion on-chip • Resistance will change • Digital signal with measure – PWM (Automotive) • Correlation can be non- – Manufacturer specific linear protocol – Bus (I2C, CAN, ...)
Microcontroller interfaces UART / Serial TIA-232-F I2C / TWI GND, Rx, Tx GND, TCL, SDA Point-to-Point Master-Slave-Bus SPI SCLK, MOSI, MISO, nSS / nCS GPIOs Master-Slave-Bus PxN, i.e. PB1 Selected Star or Daisy-Chaining 29
Using Manufacturer Specific Interfaces • Read Datasheet – Voltage levels – Timing requirements – Sample comm diagrams • Debugging tools (multimeter, oscilloscope protocol analyzer) • Real time requirements
(Embedded) Computer Architecture Bare metal Operating system • Avoid non-determination • Desktop OS are non- deterministic • Get maximum run time • Real time OS (RTOS) • Similar to OS-like solutions – Priority Scheduling – Preemption – Preemptive Scheduling – Priorities • System libraries run time is – Cyclic approach known / bounded – Event driven approach
Arduino Mega 2560 • 16 MHz ATmega2560 • 8 kB RAM • GPIO, max. 1 MHz • UART, I2C, SPI • ADC, (PWMDAC) • Bare Bones 34
Recommend
More recommend