Top Banner
A Brief Introduction to Making your own Thing. Stephen Harrison @TinamousSteve
30

A brief introduction to making your own (Internet of Things) Thing

Nov 19, 2014

Download

Software

TinamousSteve

The Internet of Things is exploding and it's a great time to join in: more and more devices like the Arduino, Netduino and Gadgeteer are becoming available. The question is, how do I get started?

We will look at what is available in terms of popular hardware for building your Thing, and a demo of how to develop for the Arduino, followed by an introduction to the Gadgeteer and .Net Micro Framework, hopefully finishing up with a fairly simple but connected Gadgeteer based Thing (Wifi Allowing!).
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A brief introduction to making your own (Internet of Things) Thing

A Brief Introduction toMaking your own

Thing.Stephen Harrison@TinamousSteve

Page 2: A brief introduction to making your own (Internet of Things) Thing

A Brief Introduction to Me• Stephen Harrison @TinamousSteve• 20 years ago connecting blood gas analysers using

RS232 to Q-Pro• C# Contractor developing connectivity solutions for

medical devices.• Founder of Tinamous.com • A Private Twitter like platform for People and Things.

Page 3: A brief introduction to making your own (Internet of Things) Thing

Aim

• Introduction to IoT• Look at some embedded platforms ideal for IoT• Introduction to the world of Arduino• See how to develop a Thing using an Arduino• Introduction to the Gadgeteer• Getting started coding and debug the Gadgeteer

Page 4: A brief introduction to making your own (Internet of Things) Thing

Internet of Things

• What is a (IoT) Thing?• Major Hype• At the Peak of Inflated Expectations• Next stop… • Trough of Disillusionment • Twitter -> #IoT #Lots!

• Large Maker community• Developing hardware can be great fun • But also a special kind of hell…

Page 5: A brief introduction to making your own (Internet of Things) Thing

Selecting a board?

• Real time OS• Power

• Fairy dust, Battery, Solar, USB, PoE, Wall Wart?

• Internet• Wired, WiFi, BLE, XBee, SD Card

• Infield updates• Can you update the code when deployed?

• 5V / 3V3 IO• Component/shield compatibility

• Processor and Ram• Enclosure

Page 6: A brief introduction to making your own (Internet of Things) Thing

The Arduino

• Main form factors• Standard – Note the wonky pinout!• Mini• Due/Mega• Many other (LilyPad / Nano / Fio)

• Uses stackable shields to extend functionality• Boot loader so it is easy to connect and program.• Plug in USB and go.

Page 7: A brief introduction to making your own (Internet of Things) Thing

Arduino Uno R3

• 16MHz• 32KB Flash• 2k SRAM• 1KB EEPROM• 14 Digital IO

• LEDs, Switches, etc.• 40mA per IO Pin• 6 PWM

• 6 Analog Inputs• Light, temperature etc.• 10 bits 4.9mV resolution

• No on-board Ethernet/WiFi• £18

Page 8: A brief introduction to making your own (Internet of Things) Thing

Arduino Yún

• Built in Ethernet and WiFi• Supports Power over Ethernet.• 802.3af – 15W – 12.5W usable.

• Has a second processor running OpenWrt• 16MHz + 400MHz• 2.5K + 64MB Ram• 20x 5V 40mA IO just like the Uno.

• £46

Page 9: A brief introduction to making your own (Internet of Things) Thing

Arduino – Custom Versions

• Open source hardware based on the Amtel Mega• Download Schema & PCB design from Arduino.cc

• Very simple to make your own board, ATmega328 available in through hole version.• Examples:• Rapiro• 3D Printers & CNC• Seeduino Stalker• Standalone Relay

Page 10: A brief introduction to making your own (Internet of Things) Thing

Seeduino Stalker

Page 11: A brief introduction to making your own (Internet of Things) Thing

Raspberry Pi

• Hopefully doesn’t need to much of an introduction!• Checkout CamJam.me and PiWars.org – 6th December in Cambridge.• 700MHz CPU• 512MB• On-board Ethernet• HDMI• USB Host (WiFi, Mouse, Keyboard etc.)• 40Way header for expansion (HAT)

• 8 GPIO• UART, I2C, SPI support.• Power (3v3 and 5v)• No Analog (ADC or DAC)

• Not real time• £24

Photo: http://www.raspberrypi.org/

Page 12: A brief introduction to making your own (Internet of Things) Thing

Spark Core

• Cortex M3 (32Bit, 82MHz)• 128KB Flash, 20KB ram • WiFi only

• Spark Web IDE• Node.js, Ruby, Python and more!• Command line interface• Optional self hosting

• 8 Digital IO• 8 Analog• £34• https://www.spark.io/

Page 13: A brief introduction to making your own (Internet of Things) Thing
Page 14: A brief introduction to making your own (Internet of Things) Thing

Teensy

• Cortex M4 – 72 MHz• 64KB Ram• 256K Flash• Great IO

• 9 Touch• 34 Digital IO• 21 Analog Inputs (2 ADCs)• 3v3. Most pins 5V tolerant• 12 Bit DAC• CAN Bus

• Supported by Arduino IDE• No on-board internet• £18

Page 15: A brief introduction to making your own (Internet of Things) Thing

Microsoft and IoT

• Microsoft developed a Smart Watch (ca. 2004!)• Are smart watches cool yet?

• SPOT watch became .Net Micro Framework• .Net Micro Framework went open source• .Net Micro Framework + Arduino form factor = ?

Page 16: A brief introduction to making your own (Internet of Things) Thing

Netduino

• STMicro 168MHz Cortex M4• 384KB Flash + 100KB RAM• 10M wired Ethernet• 20 IO (14 Digital + 6 Analog)

• 25mA per pin• 3v3 but 5V tolerant• 2 UARTS• 6 PWM

• Open software and hardware• £38• http://Netduino.com

Page 17: A brief introduction to making your own (Internet of Things) Thing

Gadgeteer

• MSR Cambridge• .Net Micro Framework platform• Standard rules for sockets and boards• Boards from various companies:

• GHI Electronics• Mountaineer

• Solderless design• Some connector boards

• 10 Pin IDC connector. • Not 0.1” pitch

• Open Source

Page 18: A brief introduction to making your own (Internet of Things) Thing

FEZ Cerberus

• 168MHz Cortex M4• 384KB Flash• 104K Ram• 8 Sockets

• 44 GPIO • 2 UARTS• 9 Analog• Doesn’t support WiFi module• No native Ethernet• No RGBT display

• Open Source Hardware• £15

• https://www.ghielectronics.com/catalog/product/349

Page 19: A brief introduction to making your own (Internet of Things) Thing

FEZ Spider

• 72MHz ARM7• 2.5MB Flash• 11MB Ram• 14 Sockets

• 74 GPIO• 6 Analog• 4 UART• Touch Display Support (RGB+T)• Native Ethernet support

• £75 (Now $60 from GHI)

• https://www.ghielectronics.com/catalog/product/269

Page 20: A brief introduction to making your own (Internet of Things) Thing

So many other IoT boards…• Probably a new one since I started!• Microsoft introducing new boards• Sharks Cove• MinnowBoard Max

• Intel• TI• Kickstarter• Many more Arduino variants• Find the one(s) that works for you!• You can use more than one in a project

Picture stolen from minnowboard.org

Page 21: A brief introduction to making your own (Internet of Things) Thing

Arduino Coding

• Based on Processing (C/C++)• Pointers!• Arduino IDE.

• Plugins for Visual Studio & Eclipse

• Getting Started• Software: 10 Print “Hello World”• Hardware: BlinkLED(); • IoT: ReadTemperature();

• Example: Hello World++• NeoPixel LEDs• Single signal wire + Power• But… VERY timing sensitive – needs RTOS

Page 22: A brief introduction to making your own (Internet of Things) Thing
Page 23: A brief introduction to making your own (Internet of Things) Thing
Page 24: A brief introduction to making your own (Internet of Things) Thing

Gadgeteer Coding

• C# and VB.Net• .Net Micro Framework

• Similar to .Net 1.x• No Generics, Nullables (int?) or Anonymous types• Open Sourced on CodePlex • Very limited functionality• No NUnit support

• Uses VS2012• R# works• NuGet works

• Not real time• Uses GC• Can’t drive some things like NeoPixels

Page 25: A brief introduction to making your own (Internet of Things) Thing

Gadgeteer Example

• Automated Sprinkler System• Use water from water butt• Water when ground is dry• Water only when dark• Or when instructed from Tinamous message• Record Moisture and Light levels

• VS2012 + GHI SDK + .Net Micro Framework 4.3• FEZ Cerberus board with:

• X1 Relay• DP USB Client Power• Moisture Sensor• Light Sensor• ENC28 Ethernet

Page 26: A brief introduction to making your own (Internet of Things) Thing

The set-up

Page 27: A brief introduction to making your own (Internet of Things) Thing

Enhance the Sprinkler

• Check if it’s going to rain in the next 2 hours• Internet weather service• Netatmo API – see if it is raining locally• Measure humidity

• Multiple moisture sensors • Measure water level in water butt

• Top-up if needed from tap.• Water is it is about to over flow

• Measure Temperature, Humidity, UV levels etc.• Monitor soil chemistry (pH etc.)

• Add dosages of chemicals as needed.

Page 28: A brief introduction to making your own (Internet of Things) Thing

Summary

• We looked at some of the boards available• Made a Arduino project• Made a Gadgeteer project

Page 29: A brief introduction to making your own (Internet of Things) Thing

Homework

• GitHub.com/Tinamous• Node Red -> http://nodered.org• MQTT -> http://MQTT.org• Tinamous.com

• https://Demo.Tinamous.com

• Sharks Cove • MinnowBoard Max• https://www.ghielectronics.com• https://www.tindie.com/• http://www.CoolComponents.co.uk• Cambridge MakeSpace -> http://makespace.org

Page 30: A brief introduction to making your own (Internet of Things) Thing

Thank You!Questions -> @TinamousSteve

Don’t forget to drop by the Tinamous Stand.

We have Haribo!