Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hack the way to your future home

Hack the way to your future home

Slides for my talk at the Open Tech School Conference in Dortmund, 15.08.2015

Martin Schuhfuss

August 15, 2015
Tweet

More Decks by Martin Schuhfuss

Other Decks in Technology

Transcript

  1. Hack the way to your future home Open Tech School

    Conference 2015
 Dortmund Martin Schuhfuß – @usefulthink
  2. Hi!

  3. $$$

  4. $$$

  5. But there is hope. Nothing these things do is magic.

    It's all just simple* electronics. *(more or less, depends on who you ask)
  6. Contents • Overview of Microcontrollers and small-scale Computers • A

    (very) short introduction to Hardware-Programming • Building a WiFi-Controlled Powerstrip
  7. Arduino UNO ATMega328p MCU 16MHz / 8Bit / 2kB RAM

    1kB EEPROM / 32kB Flash no Operating System Tessel2 Mediatek MT7620n 580MHz / 64MB RAM 32MB Flash Linux / OpenWRT OS Raspberry PI2 ARMv7 QuadCore
 900MHz / 1 GB RAM SD-Card (several GB) regular Operating-System ESP12 Espressif ESP8266EX 80MHz / 64kB + 96 kB RAM 4MB Flash no Operating System Computers & MCUs Microcontroller Single board computer (any device with a display contains something like this) (comparable to a WiFi- router) (comparable to a decent smartphone)
  8. Arduino UNO Programmed in C/C++ USB (device), GPIO minimal power-consumption

    Tessel2 mainly JS/Python/Rust USB, WiFi, LAN, GPIO, … runs node.js! Raspberry PI2 It's a complete computer
 USB, LAN, GPIO, HDMI, … runs everything
 ESP12 C/C++, LUA UART, GPIO, WiFi ultra-small (15x23mm) Computers & MCUs ~25€ ~2€ ~30€ ~40€ Microcontroller Single board computer (bare module) ~10€ (prototype board)
  9. GPIO / General Purpose Input and Output / can be

    used as output or input / Logic-Levels: HIGH (on) or LOW (off) / HIGH Voltage is either 5V (Arduino) or 3.3V (all other) / communication with digital protocols like UART, I2C or SPI GPIO-Pins
  10. ESP8266 / tiny, versatile, has WiFi and is incredibly cheap

    / bare modules are not very beginner friendly: / soldering and additional components are required / no USB interface: needs USB to UART converter to program / development boards with USB are available (nodemcu DevKit) / best option for electronics-projects you want to keep
  11. Building a WiFi Powerstrip with the ESP12 ESP12e Screw terminals

    (220V AC) 5V USB-Charger
 (ripped apart & shrinkwrapped) Programming adapter (USB <-> Serial) Relays
 (+more stuff) "Debugging" Interface
  12. RELAYS / Mechanical Switch operated by an electromagnet / Control-

    and load-circuit are fully seperated / Switch high loads with a low control-voltage / needs additional amplification to drive the coil if used with very low power devices Magnetic Coil Switching Contacts Transistor (Amplifier) Screw Terminals
  13. nodemcu http://nodemcu.com/index_en.html / Firmware for the ESP8266-family running a Lua-interpreter

    / API modeled after node.js, provides Filesystem, GPIO, JSON, Networking and other modules for communication / very limited resources (around 25kB heap available after boot)
  14. Programming with nodemcu / micro HTTP-Server written in Lua /

    Rest-oriented interface for the sockets / full source-code on github:
 https://github.com/usefulthink/nodemcu-powerstrip http://nodemcu.com/index_en.html switching the relays connect to a network
 (simplified) handle http-requests
 (my implementation)
  15. / Get an Arduino / Tessel / Raspberry / You'll

    need a Breadboard, some jumper-wires and an idea what to do / Buy from Chinese sellers, delivery takes longer but it's way cheaper / Find people to help you or join a Hackerspace* near you How to get started? *(see
  16. Thanks! Martin Schuhfuß – [email protected] – @usefulthink (contact me if

    you have any questions, even after the conference) https://github.com/usefulthink/ama