arduino and internet of thinks: shareit tm: march 2010, tm

Post on 28-Jan-2015

111 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

Arduino NetworkingAn IoT approach

Alexandru IOVANOVICITimisoara, march 2011

What is Arduino ?

What is Arduino ?

Platform for physical computing...

...and for tinkering;

Can run standalone or networked;

Cheap (~EUR30);

Extensible … very extensible;

Open source !

All shapes and sizes

What's on the board ?

Short version …

ATMEGA328 AVR microcontroller [or bigger];

Headers for pins (analogue, digital, serial, power);

USB port and USB-serial converter [quite expensive]

Power regulator: 5V@250mA and 3.3V;

Reset switch :)

Status LEDs (power, serial, debug): very useful :)

Reading the PHY world == Input

Sound (microphone);

Light (light dependant resistor);

Heat (thermistor);Motion/Force

(switches, dials, flex, pressure, accelerometer, Wii nunchuck, IR/ultrasound ranging) Remote events (BUTTONS serial input from computer);

Writing to the PHY world == Output

Sound (buzzer, speaker);

Light: visible, IR and UV (LEDs);

Motion (motors, servos);

Other power devices (using relays);

3D printer (Rep rap), CNC;

Remote events (serial output to computer);

OR NETWORKING !!!

It's programmable

Computer (Linux, Mac, Windows)

Arduino IDE; USB device cable; Arduino board.

Patience :)

Demo

Do you [really] want to see a blinking led ? :)

Type 1Wired Networks

Plain serial

I2C

Wire.h library;

I2C

Ethernet, the good, old Ethernet :)

Ethernet.h library

Exotic ones X10; DMX; CAN-BUS; OneWire-MicroLAN; MIDI;

Type 2Wireless networks

HopeRF

VirtualWire library; Chep and ... quite unreliable :) Worth investigating;

ZigBee - XBee

ZigBee - XBee

Demo moment

Let's play … or at least try :)

Bluetooth

802.11 ... what's that ? :)

GSM

Radioless

Exotic ones

Way too many :) NRF2401, PCR-1000, RSSS, W800RF32A, HT12E,

HomeEasy, EasyRadio

Have't use any of them :)

Developement

Prototyping; A lot of hacks and tinkering

some unorthodox shortcuts: 5 <-> 3.3

Architecture

Nodes: 2 LEDs + 2 buttons; Can send simple events: HUG, TWT;

Gateway: 2 LEDs Provide Twitter output;

Coordinator (?)

Packet structure

#ID|TYPE|MSG$Ex:

#1|IF|HLO$#1|EV|HUG$#1|EV|TWT$

Packet structure Serial processing of the packet:

If the ID is not OK then discard the packet; If I’m not receiving IF pkts then discard.

Check IDCheck ID

Check pkt typeCheck pkt type

Check valueCheck value

DO ACTIONDO ACTION

ENDEND

I/O• Node:

• Xbee conn: 11, 12;• D8, D9 – Button;• D10, D13 – LEDs;

• Gateway:• Xbee conn: 2, 3;• D6, D7 – LEDs;• D4, D5 – buttons; NOT USED

Implementation

• 1 man;• Two 4 hour sessions;• 2 ZigBee modules;• 2 Arduino 2009;• Custom ZigBee adaper;• Custom sheild

• messy

Issues

• Way too simple protocol:• Should be much more extendable and cusomizable• JSON vs. XML ???

• Quite slow communication:• 9600 bps;• Reliability issues;

• Higher level error detection and correction routines;

THE Issue

V&VAre we building the right

software [product] ?

THE Issue

• Lack of specifications• We know how to work with Arduino and

ZigBee ...• To do what ?

ZigBee

• Low power digital radio link: IEEE802.15• Low data rate;

• Personal Area Networks;• Simpler and less expensive than BT;• “low-cost” ? :)• Lots of specifications ans “alliances”• Vendor-dependent stack ... or free• ZB2007: two stacks:

• Simple and Pro;

ZigBee

• Device Types:• Coordinator: one in each network;• Router: passing data to nodes;• End Device: talk to parent node (RT or COORD)

top related