SlideShare a Scribd company logo
1 of 124
Download to read offline
SEUNet 2017 - Rome
Design and implementation of a low-cost modular sensor
Augusto Ciuffoletti - Univ. of Pisa (Italy)
October 9th 2017
Sensors in urban environments
• In order to control an urban environment we need to
interconnect many different sensors
• Many: an overwhelming number of aspects needs to be
monitored, measuring parameters of detecting events
• Different: each aspect is characterized by a different
monitoring technology and devices
• Interconnected: they exchange data and control with other
data aggregators and processors
• Sensors need to be cheap, simple and reusable:
• A high cost excludes a significant scale
• The design should be affordable for the technical staff of
the urban district
• Reusability allows a flexible design in a fast evolving
environment
Sensors in urban environments
• In order to control an urban environment we need to
interconnect many different sensors
• Many: an overwhelming number of aspects needs to be
monitored, measuring parameters of detecting events
• Different: each aspect is characterized by a different
monitoring technology and devices
• Interconnected: they exchange data and control with other
data aggregators and processors
• Sensors need to be cheap, simple and reusable:
• A high cost excludes a significant scale
• The design should be affordable for the technical staff of
the urban district
• Reusability allows a flexible design in a fast evolving
environment
Sensors in urban environments
• In order to control an urban environment we need to
interconnect many different sensors
• Many: an overwhelming number of aspects needs to be
monitored, measuring parameters of detecting events
• Different: each aspect is characterized by a different
monitoring technology and devices
• Interconnected: they exchange data and control with other
data aggregators and processors
• Sensors need to be cheap, simple and reusable:
• A high cost excludes a significant scale
• The design should be affordable for the technical staff of
the urban district
• Reusability allows a flexible design in a fast evolving
environment
Sensors in urban environments
• In order to control an urban environment we need to
interconnect many different sensors
• Many: an overwhelming number of aspects needs to be
monitored, measuring parameters of detecting events
• Different: each aspect is characterized by a different
monitoring technology and devices
• Interconnected: they exchange data and control with other
data aggregators and processors
• Sensors need to be cheap, simple and reusable:
• A high cost excludes a significant scale
• The design should be affordable for the technical staff of
the urban district
• Reusability allows a flexible design in a fast evolving
environment
Sensors in urban environments
• In order to control an urban environment we need to
interconnect many different sensors
• Many: an overwhelming number of aspects needs to be
monitored, measuring parameters of detecting events
• Different: each aspect is characterized by a different
monitoring technology and devices
• Interconnected: they exchange data and control with other
data aggregators and processors
• Sensors need to be cheap, simple and reusable:
• A high cost excludes a significant scale
• The design should be affordable for the technical staff of
the urban district
• Reusability allows a flexible design in a fast evolving
environment
Sensors in urban environments
• In order to control an urban environment we need to
interconnect many different sensors
• Many: an overwhelming number of aspects needs to be
monitored, measuring parameters of detecting events
• Different: each aspect is characterized by a different
monitoring technology and devices
• Interconnected: they exchange data and control with other
data aggregators and processors
• Sensors need to be cheap, simple and reusable:
• A high cost excludes a significant scale
• The design should be affordable for the technical staff of
the urban district
• Reusability allows a flexible design in a fast evolving
environment
Sensors in urban environments
• In order to control an urban environment we need to
interconnect many different sensors
• Many: an overwhelming number of aspects needs to be
monitored, measuring parameters of detecting events
• Different: each aspect is characterized by a different
monitoring technology and devices
• Interconnected: they exchange data and control with other
data aggregators and processors
• Sensors need to be cheap, simple and reusable:
• A high cost excludes a significant scale
• The design should be affordable for the technical staff of
the urban district
• Reusability allows a flexible design in a fast evolving
environment
Sensors in urban environments
• In order to control an urban environment we need to
interconnect many different sensors
• Many: an overwhelming number of aspects needs to be
monitored, measuring parameters of detecting events
• Different: each aspect is characterized by a different
monitoring technology and devices
• Interconnected: they exchange data and control with other
data aggregators and processors
• Sensors need to be cheap, simple and reusable:
• A high cost excludes a significant scale
• The design should be affordable for the technical staff of
the urban district
• Reusability allows a flexible design in a fast evolving
environment
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Design principles
• Limit the presence of ad hoc components
• use COTS components as far as possible
• Do not overkill the problem
• tailor the computational capabilities on the real needs
• Modularize the architecture
• the design is more agile
• exploit concurrency
• improve reusability
• Use standard interfaces
• improve reusability
• Use inexpensive and widely diffused components
Typical architecture of a (smart) sensor
• Modularize the (smart) sensor
• Dumb device: hardware measurement or enactment
• Dumb device/Processor interface
• Processor: controls dumb devices according to a logic
• Processor/Network Module interface
• Network Module
• We concentrate on Processor and Network Module
Typical architecture of a (smart) sensor
• Modularize the (smart) sensor
• Dumb device: hardware measurement or enactment
• Dumb device/Processor interface
• Processor: controls dumb devices according to a logic
• Processor/Network Module interface
• Network Module
• We concentrate on Processor and Network Module
Typical architecture of a (smart) sensor
• Modularize the (smart) sensor
• Dumb device: hardware measurement or enactment
• Dumb device/Processor interface
• Processor: controls dumb devices according to a logic
• Processor/Network Module interface
• Network Module
• We concentrate on Processor and Network Module
Typical architecture of a (smart) sensor
• Modularize the (smart) sensor
• Dumb device: hardware measurement or enactment
• Dumb device/Processor interface
• Processor: controls dumb devices according to a logic
• Processor/Network Module interface
• Network Module
• We concentrate on Processor and Network Module
Typical architecture of a (smart) sensor
• Modularize the (smart) sensor
• Dumb device: hardware measurement or enactment
• Dumb device/Processor interface
• Processor: controls dumb devices according to a logic
• Processor/Network Module interface
• Network Module
• We concentrate on Processor and Network Module
Typical architecture of a (smart) sensor
• Modularize the (smart) sensor
• Dumb device: hardware measurement or enactment
• Dumb device/Processor interface
• Processor: controls dumb devices according to a logic
• Processor/Network Module interface
• Network Module
• We concentrate on Processor and Network Module
Typical architecture of a (smart) sensor
• Modularize the (smart) sensor
• Dumb device: hardware measurement or enactment
• Dumb device/Processor interface
• Processor: controls dumb devices according to a logic
• Processor/Network Module interface
• Network Module
• We concentrate on Processor and Network Module
Meta ex-cursus: about this paper
• Principles are the foundations, but I quickly go to practice
• Maybe too much in an "Instructables" style, but possibly
useful
• one of the reviewers did not appreciate that, sorry
• Scientific approach, though:
• full details of the experiment (reproducible)
• discussion of the results
• not the end of the story
• you can just improve this (I did...)
Meta ex-cursus: about this paper
• Principles are the foundations, but I quickly go to practice
• Maybe too much in an "Instructables" style, but possibly
useful
• one of the reviewers did not appreciate that, sorry
• Scientific approach, though:
• full details of the experiment (reproducible)
• discussion of the results
• not the end of the story
• you can just improve this (I did...)
Meta ex-cursus: about this paper
• Principles are the foundations, but I quickly go to practice
• Maybe too much in an "Instructables" style, but possibly
useful
• one of the reviewers did not appreciate that, sorry
• Scientific approach, though:
• full details of the experiment (reproducible)
• discussion of the results
• not the end of the story
• you can just improve this (I did...)
Meta ex-cursus: about this paper
• Principles are the foundations, but I quickly go to practice
• Maybe too much in an "Instructables" style, but possibly
useful
• one of the reviewers did not appreciate that, sorry
• Scientific approach, though:
• full details of the experiment (reproducible)
• discussion of the results
• not the end of the story
• you can just improve this (I did...)
Meta ex-cursus: about this paper
• Principles are the foundations, but I quickly go to practice
• Maybe too much in an "Instructables" style, but possibly
useful
• one of the reviewers did not appreciate that, sorry
• Scientific approach, though:
• full details of the experiment (reproducible)
• discussion of the results
• not the end of the story
• you can just improve this (I did...)
Meta ex-cursus: about this paper
• Principles are the foundations, but I quickly go to practice
• Maybe too much in an "Instructables" style, but possibly
useful
• one of the reviewers did not appreciate that, sorry
• Scientific approach, though:
• full details of the experiment (reproducible)
• discussion of the results
• not the end of the story
• you can just improve this (I did...)
Meta ex-cursus: about this paper
• Principles are the foundations, but I quickly go to practice
• Maybe too much in an "Instructables" style, but possibly
useful
• one of the reviewers did not appreciate that, sorry
• Scientific approach, though:
• full details of the experiment (reproducible)
• discussion of the results
• not the end of the story
• you can just improve this (I did...)
Meta ex-cursus: about this paper
• Principles are the foundations, but I quickly go to practice
• Maybe too much in an "Instructables" style, but possibly
useful
• one of the reviewers did not appreciate that, sorry
• Scientific approach, though:
• full details of the experiment (reproducible)
• discussion of the results
• not the end of the story
• you can just improve this (I did...)
The Processor: Arduino Nano
• Similar to the Arduino Uno, but smaller size (18x45 mm)
• Onboard ADC, PWM, Digital I/O, UART
• Easily programmable in C
• Often used in high school teaching
• Open design
• Inexpensive (available for less than 5 euros)
The Processor: Arduino Nano
• Similar to the Arduino Uno, but smaller size (18x45 mm)
• Onboard ADC, PWM, Digital I/O, UART
• Easily programmable in C
• Often used in high school teaching
• Open design
• Inexpensive (available for less than 5 euros)
The Processor: Arduino Nano
• Similar to the Arduino Uno, but smaller size (18x45 mm)
• Onboard ADC, PWM, Digital I/O, UART
• Easily programmable in C
• Often used in high school teaching
• Open design
• Inexpensive (available for less than 5 euros)
The Processor: Arduino Nano
• Similar to the Arduino Uno, but smaller size (18x45 mm)
• Onboard ADC, PWM, Digital I/O, UART
• Easily programmable in C
• Often used in high school teaching
• Open design
• Inexpensive (available for less than 5 euros)
The Processor: Arduino Nano
• Similar to the Arduino Uno, but smaller size (18x45 mm)
• Onboard ADC, PWM, Digital I/O, UART
• Easily programmable in C
• Often used in high school teaching
• Open design
• Inexpensive (available for less than 5 euros)
The Processor: Arduino Nano
• Similar to the Arduino Uno, but smaller size (18x45 mm)
• Onboard ADC, PWM, Digital I/O, UART
• Easily programmable in C
• Often used in high school teaching
• Open design
• Inexpensive (available for less than 5 euros)
The Network Module: Espressif ESP-01
• Tiny 8 pins board (14x25 mm)
• Based on the ESP8266: WiFi client or access point
• Onboard UART
• Not immediate to program, but shipped with a serial API
• Growing popularity among hobbists
• Inexpensive (available for less than 5 euros)
The Network Module: Espressif ESP-01
• Tiny 8 pins board (14x25 mm)
• Based on the ESP8266: WiFi client or access point
• Onboard UART
• Not immediate to program, but shipped with a serial API
• Growing popularity among hobbists
• Inexpensive (available for less than 5 euros)
The Network Module: Espressif ESP-01
• Tiny 8 pins board (14x25 mm)
• Based on the ESP8266: WiFi client or access point
• Onboard UART
• Not immediate to program, but shipped with a serial API
• Growing popularity among hobbists
• Inexpensive (available for less than 5 euros)
The Network Module: Espressif ESP-01
• Tiny 8 pins board (14x25 mm)
• Based on the ESP8266: WiFi client or access point
• Onboard UART
• Not immediate to program, but shipped with a serial API
• Growing popularity among hobbists
• Inexpensive (available for less than 5 euros)
The Network Module: Espressif ESP-01
• Tiny 8 pins board (14x25 mm)
• Based on the ESP8266: WiFi client or access point
• Onboard UART
• Not immediate to program, but shipped with a serial API
• Growing popularity among hobbists
• Inexpensive (available for less than 5 euros)
The Network Module: Espressif ESP-01
• Tiny 8 pins board (14x25 mm)
• Based on the ESP8266: WiFi client or access point
• Onboard UART
• Not immediate to program, but shipped with a serial API
• Growing popularity among hobbists
• Inexpensive (available for less than 5 euros)
The interface: Espressif AT interface
• The ESP-01 board comes pre-flashed with an API
accessible through an onboard UART (aka serial line)
• The API allows all sorts of network related operations:
from IP address configuration to TCP connections
• The API implementation is open source, and extensible
• The commands are sent through the serial line as (quite
verbose) series of characters.
• e.g., to connect to an AP
AT+CWJAP_CUR="room123","the psk"
• The Network Module returns a response
• a plain OK for success, more complex in case of error
The interface: Espressif AT interface
• The ESP-01 board comes pre-flashed with an API
accessible through an onboard UART (aka serial line)
• The API allows all sorts of network related operations:
from IP address configuration to TCP connections
• The API implementation is open source, and extensible
• The commands are sent through the serial line as (quite
verbose) series of characters.
• e.g., to connect to an AP
AT+CWJAP_CUR="room123","the psk"
• The Network Module returns a response
• a plain OK for success, more complex in case of error
The interface: Espressif AT interface
• The ESP-01 board comes pre-flashed with an API
accessible through an onboard UART (aka serial line)
• The API allows all sorts of network related operations:
from IP address configuration to TCP connections
• The API implementation is open source, and extensible
• The commands are sent through the serial line as (quite
verbose) series of characters.
• e.g., to connect to an AP
AT+CWJAP_CUR="room123","the psk"
• The Network Module returns a response
• a plain OK for success, more complex in case of error
The interface: Espressif AT interface
• The ESP-01 board comes pre-flashed with an API
accessible through an onboard UART (aka serial line)
• The API allows all sorts of network related operations:
from IP address configuration to TCP connections
• The API implementation is open source, and extensible
• The commands are sent through the serial line as (quite
verbose) series of characters.
• e.g., to connect to an AP
AT+CWJAP_CUR="room123","the psk"
• The Network Module returns a response
• a plain OK for success, more complex in case of error
The interface: Espressif AT interface
• The ESP-01 board comes pre-flashed with an API
accessible through an onboard UART (aka serial line)
• The API allows all sorts of network related operations:
from IP address configuration to TCP connections
• The API implementation is open source, and extensible
• The commands are sent through the serial line as (quite
verbose) series of characters.
• e.g., to connect to an AP
AT+CWJAP_CUR="room123","the psk"
• The Network Module returns a response
• a plain OK for success, more complex in case of error
The interface: Espressif AT interface
• The ESP-01 board comes pre-flashed with an API
accessible through an onboard UART (aka serial line)
• The API allows all sorts of network related operations:
from IP address configuration to TCP connections
• The API implementation is open source, and extensible
• The commands are sent through the serial line as (quite
verbose) series of characters.
• e.g., to connect to an AP
AT+CWJAP_CUR="room123","the psk"
• The Network Module returns a response
• a plain OK for success, more complex in case of error
The interface: Espressif AT interface
• The ESP-01 board comes pre-flashed with an API
accessible through an onboard UART (aka serial line)
• The API allows all sorts of network related operations:
from IP address configuration to TCP connections
• The API implementation is open source, and extensible
• The commands are sent through the serial line as (quite
verbose) series of characters.
• e.g., to connect to an AP
AT+CWJAP_CUR="room123","the psk"
• The Network Module returns a response
• a plain OK for success, more complex in case of error
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Limits of the AT library
• Commands are verbose
• negligible impact on serial line traffic,
• heavy footprint on program size (strings need to be
buffered)
• No documented support for TSL
• No support for HTTP(S)
• many REST-ful IoT servers exist
• WebSockets look very promising for IoT applications
• The interface is complex to manage
• Buffer management
• Timeouts
• Variable response formats
Our purpose
• Design the simplest hardware for coupling the Nano and
the ESP-01
• Write a wrapper for the serial API interface:
• plain behavior (object oriented with side effects on global
buffers)
• transparent wrap of AT commands (library not dependent
from API details)
• Add HTTP Rest operation
TARGET
A 10 Euro thing that can interact with a
ThingSpeak server with limited programming
effort
Our purpose
• Design the simplest hardware for coupling the Nano and
the ESP-01
• Write a wrapper for the serial API interface:
• plain behavior (object oriented with side effects on global
buffers)
• transparent wrap of AT commands (library not dependent
from API details)
• Add HTTP Rest operation
TARGET
A 10 Euro thing that can interact with a
ThingSpeak server with limited programming
effort
Our purpose
• Design the simplest hardware for coupling the Nano and
the ESP-01
• Write a wrapper for the serial API interface:
• plain behavior (object oriented with side effects on global
buffers)
• transparent wrap of AT commands (library not dependent
from API details)
• Add HTTP Rest operation
TARGET
A 10 Euro thing that can interact with a
ThingSpeak server with limited programming
effort
Our purpose
• Design the simplest hardware for coupling the Nano and
the ESP-01
• Write a wrapper for the serial API interface:
• plain behavior (object oriented with side effects on global
buffers)
• transparent wrap of AT commands (library not dependent
from API details)
• Add HTTP Rest operation
TARGET
A 10 Euro thing that can interact with a
ThingSpeak server with limited programming
effort
Our purpose
• Design the simplest hardware for coupling the Nano and
the ESP-01
• Write a wrapper for the serial API interface:
• plain behavior (object oriented with side effects on global
buffers)
• transparent wrap of AT commands (library not dependent
from API details)
• Add HTTP Rest operation
TARGET
A 10 Euro thing that can interact with a
ThingSpeak server with limited programming
effort
Our purpose
• Design the simplest hardware for coupling the Nano and
the ESP-01
• Write a wrapper for the serial API interface:
• plain behavior (object oriented with side effects on global
buffers)
• transparent wrap of AT commands (library not dependent
from API details)
• Add HTTP Rest operation
TARGET
A 10 Euro thing that can interact with a
ThingSpeak server with limited programming
effort
Hardware design
The electrical layout (complicated by different technologies)
The library
• Use the SoftwareSerial library to interact with the ESP-01
• leave Nano UART available for software testing and
debugging
• Headers of the six functions:
The library
• Use the SoftwareSerial library to interact with the ESP-01
• leave Nano UART available for software testing and
debugging
• Headers of the six functions:
The library
• Use the SoftwareSerial library to interact with the ESP-01
• leave Nano UART available for software testing and
debugging
• Headers of the six functions:
The library
• Use the SoftwareSerial library to interact with the ESP-01
• leave Nano UART available for software testing and
debugging
• Headers of the six functions:
ESP(SoftwareSerial *mySerial, int baudrate); // The constructor
The library
• Use the SoftwareSerial library to interact with the ESP-01
• leave Nano UART available for software testing and
debugging
• Headers of the six functions:
ESP(SoftwareSerial *mySerial, int baudrate); // The constructor
void reset(); // Cleaning after problems
The library
• Use the SoftwareSerial library to interact with the ESP-01
• leave Nano UART available for software testing and
debugging
• Headers of the six functions:
ESP(SoftwareSerial *mySerial, int baudrate); // The constructor
void reset(); // Cleaning after problems
int state(); // Inspect current state
The library
• Use the SoftwareSerial library to interact with the ESP-01
• leave Nano UART available for software testing and
debugging
• Headers of the six functions:
ESP(SoftwareSerial *mySerial, int baudrate); // The constructor
void reset(); // Cleaning after problems
int state(); // Inspect current state
int atflush(); // Serial buffer cleanup
The library
• Use the SoftwareSerial library to interact with the ESP-01
• leave Nano UART available for software testing and
debugging
• Headers of the six functions:
ESP(SoftwareSerial *mySerial, int baudrate); // The constructor
void reset(); // Cleaning after problems
int state(); // Inspect current state
int atflush(); // Serial buffer cleanup
// atcmd: the cmd buffer contains the AT command to be executed,
// the ESP-01 response is returned in the same buffer
int atcmd(char cmd[], int size, int timeout);
The library
• Use the SoftwareSerial library to interact with the ESP-01
• leave Nano UART available for software testing and
debugging
• Headers of the six functions:
ESP(SoftwareSerial *mySerial, int baudrate); // The constructor
void reset(); // Cleaning after problems
int state(); // Inspect current state
int atflush(); // Serial buffer cleanup
// atcmd: the cmd buffer contains the AT command to be executed,
// the ESP-01 response is returned in the same buffer
int atcmd(char cmd[], int size, int timeout);
// session: the header and body buffers contain the request,
// the (truncated) response from the server is returned in the same buffer
int session(char header[], int headersize,
char body[], int bodysize, int timeout);
Using the library (setup and declaration)
// constants
#define CMDSIZE 50
#define HEADERSIZE 200
#define BODYSIZE 100
#define HOST "api.thingspeak.com"
#define PORT 80
#define PERIOD 30
// variables definitions
...
// setup
...
All debug printout on hardware serial has been removed
Using the library (setup and declaration)
// constants
...
// variables definitions
SoftwareSerial mySerial(2,3);
ESP esp1(&mySerial,19200);
char *cmd;
char *header;
char *body;
int v=0;
// setup
...
All debug printout on hardware serial has been removed
Using the library (setup and declaration)
// constants
...
// variables definitions
...
// setup
void setup() {
cmd=(char *) malloc(CMDSIZE);
header=(char *) malloc(HEADERSIZE);
body=(char *) malloc(BODYSIZE);
do {
esp1.reset();
delay(1000);
do { sprintf(cmd,"ATE0"); } while (esp1.atcmd(cmd,CMDSIZE,5) < 0); // no echo
sprintf(cmd,"AT+CWMODE_CUR=1"); esp1.atcmd(cmd,CMDSIZE,5); // station mode
sprintf(cmd,"AT+CIPMUX=0"); esp1.atcmd(cmd,CMDSIZE,5); // single TCP
sprintf(cmd,"AT+CWJAP_CUR="%s","%s"",ESSID,PASSWORD);
esp1.atcmd(cmd,CMDSIZE,20); // join
} while ( esp1.state() != 2); // until connected to the AP
delay(1000);
}
All debug printout on hardware serial has been removed
Using the library (the loop)
void loop() {
// prepare HTTP request
sprintf(body,"api_key=%s&field1=%d", CHANNEL_KEY,v++);
sprintf(header,"POST /update HTTP/1.1rn");
sprintf(header+strlen(header),"Host: %srn",HOST);
sprintf(header+strlen(header),"Content-Type: application/x-www-form-urlencodedrn");
sprintf(header+strlen(header),"Content-Length: %drn",strlen(body));
// connect to server
do {
sprintf(cmd,"AT+CIPSTART="TCP","%s",%d",HOST,PORT);
esp1.atcmd(cmd,CMDSIZE,10);
} while ( esp1.state() != 3 );
// prepare send operation
do {
sprintf(cmd,"AT+CIPSENDEX=%d",strlen(header)+2+strlen(body));
} while ( esp1.atcmd(cmd,CMDSIZE,5)<0 );
// send request
esp1.session(header,HEADERSIZE,body,BODYSIZE,10);
// close connection (should be already closed)
if ( esp1.state() == 3 ) {
sprintf(cmd,"AT+CIPCLOSE");
esp1.atcmd(cmd,CMDSIZE,5);
}
esp1.atflush();
}
Program footprint
• An MCU has a very limited storage
• libraries, buffers, constants etc.
• The demo program above is only overhead
• all that is done is to increment and send an integer
• So we have an estimate of atlib overhead (w.r.t. Arduino
Nano)
• 7604 bytes (24%) of program memory
• 681 bytes (33%) of global storage
• another 350 bytes of global storage are for buffers
• The remaining space is available for driving sensors and
actuators
Program footprint
• An MCU has a very limited storage
• libraries, buffers, constants etc.
• The demo program above is only overhead
• all that is done is to increment and send an integer
• So we have an estimate of atlib overhead (w.r.t. Arduino
Nano)
• 7604 bytes (24%) of program memory
• 681 bytes (33%) of global storage
• another 350 bytes of global storage are for buffers
• The remaining space is available for driving sensors and
actuators
Program footprint
• An MCU has a very limited storage
• libraries, buffers, constants etc.
• The demo program above is only overhead
• all that is done is to increment and send an integer
• So we have an estimate of atlib overhead (w.r.t. Arduino
Nano)
• 7604 bytes (24%) of program memory
• 681 bytes (33%) of global storage
• another 350 bytes of global storage are for buffers
• The remaining space is available for driving sensors and
actuators
Program footprint
• An MCU has a very limited storage
• libraries, buffers, constants etc.
• The demo program above is only overhead
• all that is done is to increment and send an integer
• So we have an estimate of atlib overhead (w.r.t. Arduino
Nano)
• 7604 bytes (24%) of program memory
• 681 bytes (33%) of global storage
• another 350 bytes of global storage are for buffers
• The remaining space is available for driving sensors and
actuators
Program footprint
• An MCU has a very limited storage
• libraries, buffers, constants etc.
• The demo program above is only overhead
• all that is done is to increment and send an integer
• So we have an estimate of atlib overhead (w.r.t. Arduino
Nano)
• 7604 bytes (24%) of program memory
• 681 bytes (33%) of global storage
• another 350 bytes of global storage are for buffers
• The remaining space is available for driving sensors and
actuators
Program footprint
• An MCU has a very limited storage
• libraries, buffers, constants etc.
• The demo program above is only overhead
• all that is done is to increment and send an integer
• So we have an estimate of atlib overhead (w.r.t. Arduino
Nano)
• 7604 bytes (24%) of program memory
• 681 bytes (33%) of global storage
• another 350 bytes of global storage are for buffers
• The remaining space is available for driving sensors and
actuators
Program footprint
• An MCU has a very limited storage
• libraries, buffers, constants etc.
• The demo program above is only overhead
• all that is done is to increment and send an integer
• So we have an estimate of atlib overhead (w.r.t. Arduino
Nano)
• 7604 bytes (24%) of program memory
• 681 bytes (33%) of global storage
• another 350 bytes of global storage are for buffers
• The remaining space is available for driving sensors and
actuators
Program footprint
• An MCU has a very limited storage
• libraries, buffers, constants etc.
• The demo program above is only overhead
• all that is done is to increment and send an integer
• So we have an estimate of atlib overhead (w.r.t. Arduino
Nano)
• 7604 bytes (24%) of program memory
• 681 bytes (33%) of global storage
• another 350 bytes of global storage are for buffers
• The remaining space is available for driving sensors and
actuators
Program footprint
• An MCU has a very limited storage
• libraries, buffers, constants etc.
• The demo program above is only overhead
• all that is done is to increment and send an integer
• So we have an estimate of atlib overhead (w.r.t. Arduino
Nano)
• 7604 bytes (24%) of program memory
• 681 bytes (33%) of global storage
• another 350 bytes of global storage are for buffers
• The remaining space is available for driving sensors and
actuators
What I did that others do not
• Use the AT library
• mostly used for demo purposes
• with UART pins attached to PC tty
• unconfortable to use as an API
• many prefer to reflash standalone applications
• exciting hack, but limited possibilities (3 GPIO pins)
• Use dynamic memory allocation
• may be dangerous, because of heap fragmentation
• with some care may give extra possibilities
• the usual advice is do not malloc()
What I did that others do not
• Use the AT library
• mostly used for demo purposes
• with UART pins attached to PC tty
• unconfortable to use as an API
• many prefer to reflash standalone applications
• exciting hack, but limited possibilities (3 GPIO pins)
• Use dynamic memory allocation
• may be dangerous, because of heap fragmentation
• with some care may give extra possibilities
• the usual advice is do not malloc()
What I did that others do not
• Use the AT library
• mostly used for demo purposes
• with UART pins attached to PC tty
• unconfortable to use as an API
• many prefer to reflash standalone applications
• exciting hack, but limited possibilities (3 GPIO pins)
• Use dynamic memory allocation
• may be dangerous, because of heap fragmentation
• with some care may give extra possibilities
• the usual advice is do not malloc()
What I did that others do not
• Use the AT library
• mostly used for demo purposes
• with UART pins attached to PC tty
• unconfortable to use as an API
• many prefer to reflash standalone applications
• exciting hack, but limited possibilities (3 GPIO pins)
• Use dynamic memory allocation
• may be dangerous, because of heap fragmentation
• with some care may give extra possibilities
• the usual advice is do not malloc()
What I did that others do not
• Use the AT library
• mostly used for demo purposes
• with UART pins attached to PC tty
• unconfortable to use as an API
• many prefer to reflash standalone applications
• exciting hack, but limited possibilities (3 GPIO pins)
• Use dynamic memory allocation
• may be dangerous, because of heap fragmentation
• with some care may give extra possibilities
• the usual advice is do not malloc()
What I did that others do not
• Use the AT library
• mostly used for demo purposes
• with UART pins attached to PC tty
• unconfortable to use as an API
• many prefer to reflash standalone applications
• exciting hack, but limited possibilities (3 GPIO pins)
• Use dynamic memory allocation
• may be dangerous, because of heap fragmentation
• with some care may give extra possibilities
• the usual advice is do not malloc()
What I did that others do not
• Use the AT library
• mostly used for demo purposes
• with UART pins attached to PC tty
• unconfortable to use as an API
• many prefer to reflash standalone applications
• exciting hack, but limited possibilities (3 GPIO pins)
• Use dynamic memory allocation
• may be dangerous, because of heap fragmentation
• with some care may give extra possibilities
• the usual advice is do not malloc()
What I did that others do not
• Use the AT library
• mostly used for demo purposes
• with UART pins attached to PC tty
• unconfortable to use as an API
• many prefer to reflash standalone applications
• exciting hack, but limited possibilities (3 GPIO pins)
• Use dynamic memory allocation
• may be dangerous, because of heap fragmentation
• with some care may give extra possibilities
• the usual advice is do not malloc()
Up and running...
Experimental results
• The prototype consumes around 150mA at 5V, and can be
powered across the same USB port used for programming
• I ran one 40 hours experiment to check the stability of the
prototype
• I used the demo code shown above to post an incremental
value to the public ThingSpeak server
RESULTS
• The program resiliency to networking problems is poor,
• easy to fix, but requires additional code
• with a stable WiFi the operation is stable
• However I noticed many "Bad Request" responses (with
loss of the sample value)
Experimental results
• The prototype consumes around 150mA at 5V, and can be
powered across the same USB port used for programming
• I ran one 40 hours experiment to check the stability of the
prototype
• I used the demo code shown above to post an incremental
value to the public ThingSpeak server
RESULTS
• The program resiliency to networking problems is poor,
• easy to fix, but requires additional code
• with a stable WiFi the operation is stable
• However I noticed many "Bad Request" responses (with
loss of the sample value)
Experimental results
• The prototype consumes around 150mA at 5V, and can be
powered across the same USB port used for programming
• I ran one 40 hours experiment to check the stability of the
prototype
• I used the demo code shown above to post an incremental
value to the public ThingSpeak server
RESULTS
• The program resiliency to networking problems is poor,
• easy to fix, but requires additional code
• with a stable WiFi the operation is stable
• However I noticed many "Bad Request" responses (with
loss of the sample value)
Experimental results
• The prototype consumes around 150mA at 5V, and can be
powered across the same USB port used for programming
• I ran one 40 hours experiment to check the stability of the
prototype
• I used the demo code shown above to post an incremental
value to the public ThingSpeak server
RESULTS
• The program resiliency to networking problems is poor,
• easy to fix, but requires additional code
• with a stable WiFi the operation is stable
• However I noticed many "Bad Request" responses (with
loss of the sample value)
Experimental results
• The prototype consumes around 150mA at 5V, and can be
powered across the same USB port used for programming
• I ran one 40 hours experiment to check the stability of the
prototype
• I used the demo code shown above to post an incremental
value to the public ThingSpeak server
RESULTS
• The program resiliency to networking problems is poor,
• easy to fix, but requires additional code
• with a stable WiFi the operation is stable
• However I noticed many "Bad Request" responses (with
loss of the sample value)
Experimental results
• The prototype consumes around 150mA at 5V, and can be
powered across the same USB port used for programming
• I ran one 40 hours experiment to check the stability of the
prototype
• I used the demo code shown above to post an incremental
value to the public ThingSpeak server
RESULTS
• The program resiliency to networking problems is poor,
• easy to fix, but requires additional code
• with a stable WiFi the operation is stable
• However I noticed many "Bad Request" responses (with
loss of the sample value)
Experimental results
• The prototype consumes around 150mA at 5V, and can be
powered across the same USB port used for programming
• I ran one 40 hours experiment to check the stability of the
prototype
• I used the demo code shown above to post an incremental
value to the public ThingSpeak server
RESULTS
• The program resiliency to networking problems is poor,
• easy to fix, but requires additional code
• with a stable WiFi the operation is stable
• However I noticed many "Bad Request" responses (with
loss of the sample value)
Experimental results
• The prototype consumes around 150mA at 5V, and can be
powered across the same USB port used for programming
• I ran one 40 hours experiment to check the stability of the
prototype
• I used the demo code shown above to post an incremental
value to the public ThingSpeak server
RESULTS
• The program resiliency to networking problems is poor,
• easy to fix, but requires additional code
• with a stable WiFi the operation is stable
• However I noticed many "Bad Request" responses (with
loss of the sample value)
Bad Responses
• I counted the number of "Bad Responses" during the
experiment
00:00:00
06:00:00
12:00:00
18:00:00
00:00:00
06:00:00
12:00:00
18:00:00
00:00:00
0
100
200
300
400
• I noticed a regularity in the number of events, since they
are concentrated (synchronized with USA working hours)
• I conclude that the sensor is not responsible
Bad Responses
• I counted the number of "Bad Responses" during the
experiment
00:00:00
06:00:00
12:00:00
18:00:00
00:00:00
06:00:00
12:00:00
18:00:00
00:00:00
0
100
200
300
400
• I noticed a regularity in the number of events, since they
are concentrated (synchronized with USA working hours)
• I conclude that the sensor is not responsible
Bad Responses
• I counted the number of "Bad Responses" during the
experiment
00:00:00
06:00:00
12:00:00
18:00:00
00:00:00
06:00:00
12:00:00
18:00:00
00:00:00
0
100
200
300
400
• I noticed a regularity in the number of events, since they
are concentrated (synchronized with USA working hours)
• I conclude that the sensor is not responsible
Conclusions
• We have shown how to make a small sensor with
• simple, reproducible design
git clone http://bitbucket.org/augusto_ciuffoletti/wifinano
• limited programming effort using atlib
git clone http://bitbucket.org/augusto_ciuffoletti/atlib
• low cost
• Arduino programming environment
• The pros and cons
• stable operation with Bad Requests
• power consumption not compatible with battery operation
Conclusions
• We have shown how to make a small sensor with
• simple, reproducible design
git clone http://bitbucket.org/augusto_ciuffoletti/wifinano
• limited programming effort using atlib
git clone http://bitbucket.org/augusto_ciuffoletti/atlib
• low cost
• Arduino programming environment
• The pros and cons
• stable operation with Bad Requests
• power consumption not compatible with battery operation
Conclusions
• We have shown how to make a small sensor with
• simple, reproducible design
git clone http://bitbucket.org/augusto_ciuffoletti/wifinano
• limited programming effort using atlib
git clone http://bitbucket.org/augusto_ciuffoletti/atlib
• low cost
• Arduino programming environment
• The pros and cons
• stable operation with Bad Requests
• power consumption not compatible with battery operation
Conclusions
• We have shown how to make a small sensor with
• simple, reproducible design
git clone http://bitbucket.org/augusto_ciuffoletti/wifinano
• limited programming effort using atlib
git clone http://bitbucket.org/augusto_ciuffoletti/atlib
• low cost
• Arduino programming environment
• The pros and cons
• stable operation with Bad Requests
• power consumption not compatible with battery operation
Conclusions
• We have shown how to make a small sensor with
• simple, reproducible design
git clone http://bitbucket.org/augusto_ciuffoletti/wifinano
• limited programming effort using atlib
git clone http://bitbucket.org/augusto_ciuffoletti/atlib
• low cost
• Arduino programming environment
• The pros and cons
• stable operation with Bad Requests
• power consumption not compatible with battery operation
Conclusions
• We have shown how to make a small sensor with
• simple, reproducible design
git clone http://bitbucket.org/augusto_ciuffoletti/wifinano
• limited programming effort using atlib
git clone http://bitbucket.org/augusto_ciuffoletti/atlib
• low cost
• Arduino programming environment
• The pros and cons
• stable operation with Bad Requests
• power consumption not compatible with battery operation
Conclusions
• We have shown how to make a small sensor with
• simple, reproducible design
git clone http://bitbucket.org/augusto_ciuffoletti/wifinano
• limited programming effort using atlib
git clone http://bitbucket.org/augusto_ciuffoletti/atlib
• low cost
• Arduino programming environment
• The pros and cons
• stable operation with Bad Requests
• power consumption not compatible with battery operation
Conclusions
• We have shown how to make a small sensor with
• simple, reproducible design
git clone http://bitbucket.org/augusto_ciuffoletti/wifinano
• limited programming effort using atlib
git clone http://bitbucket.org/augusto_ciuffoletti/atlib
• low cost
• Arduino programming environment
• The pros and cons
• stable operation with Bad Requests
• power consumption not compatible with battery operation
Conclusions
• We have shown how to make a small sensor with
• simple, reproducible design
git clone http://bitbucket.org/augusto_ciuffoletti/wifinano
• limited programming effort using atlib
git clone http://bitbucket.org/augusto_ciuffoletti/atlib
• low cost
• Arduino programming environment
• The pros and cons
• stable operation with Bad Requests
• power consumption not compatible with battery operation
not the end of the story
V2.0
• Hardware and library re-designed:
• Mini/3.3V instead of Nano
• Hardware is simpler and more compact
• 50% storage footprint, comparable program footprint
• More robust (no Bad Requests?!)
• HTTP response parsing
• Power saving (48hrs operation with 3 AAA NiMH)
• https://bitbucket.org/augusto_ciuffoletti/wifimini/

More Related Content

Similar to Design and implementation of a low-cost modular sensor

Presentation buro cite english
Presentation buro cite english Presentation buro cite english
Presentation buro cite english
Buro CITE
 
Monitoring-Docker-Container-and-Dockerized-Applications
Monitoring-Docker-Container-and-Dockerized-ApplicationsMonitoring-Docker-Container-and-Dockerized-Applications
Monitoring-Docker-Container-and-Dockerized-Applications
Satya Sanjibani Routray
 

Similar to Design and implementation of a low-cost modular sensor (20)

System design techniques and networks
System design techniques and networksSystem design techniques and networks
System design techniques and networks
 
Villa Construction Dubai PPT.pptx
Villa Construction Dubai PPT.pptxVilla Construction Dubai PPT.pptx
Villa Construction Dubai PPT.pptx
 
Zero to ten million daily users in four weeks: sustainable speed is king
Zero to ten million daily users in four weeks: sustainable speed is kingZero to ten million daily users in four weeks: sustainable speed is king
Zero to ten million daily users in four weeks: sustainable speed is king
 
TEMS iBuildNet
TEMS iBuildNetTEMS iBuildNet
TEMS iBuildNet
 
MongoDB.local Atlanta: MongoDB @ Sensus: Xylem IoT and MongoDB
MongoDB.local Atlanta: MongoDB @ Sensus: Xylem IoT and MongoDBMongoDB.local Atlanta: MongoDB @ Sensus: Xylem IoT and MongoDB
MongoDB.local Atlanta: MongoDB @ Sensus: Xylem IoT and MongoDB
 
Optimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptxOptimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptx
 
SRS and PMP of Smart Bio- Waste Management System
SRS and PMP of Smart Bio- Waste Management SystemSRS and PMP of Smart Bio- Waste Management System
SRS and PMP of Smart Bio- Waste Management System
 
Chapter 6 design
Chapter 6 designChapter 6 design
Chapter 6 design
 
Take control of your FTTH network design
Take control of your FTTH network designTake control of your FTTH network design
Take control of your FTTH network design
 
Presentation buro cite english
Presentation buro cite english Presentation buro cite english
Presentation buro cite english
 
Unlocking Smart Building Potential with the RealEstateCore Ontology
Unlocking Smart Building Potential with the RealEstateCore OntologyUnlocking Smart Building Potential with the RealEstateCore Ontology
Unlocking Smart Building Potential with the RealEstateCore Ontology
 
Monitoring-Docker-Container-and-Dockerized-Applications
Monitoring-Docker-Container-and-Dockerized-ApplicationsMonitoring-Docker-Container-and-Dockerized-Applications
Monitoring-Docker-Container-and-Dockerized-Applications
 
Monitoring docker container and dockerized applications
Monitoring docker container and dockerized applicationsMonitoring docker container and dockerized applications
Monitoring docker container and dockerized applications
 
Monitoring docker-container-and-dockerized-applications
Monitoring docker-container-and-dockerized-applicationsMonitoring docker-container-and-dockerized-applications
Monitoring docker-container-and-dockerized-applications
 
How to get the most out of your existing DCS
How to get the most out of your existing DCSHow to get the most out of your existing DCS
How to get the most out of your existing DCS
 
Chapter 6-Process Selection and Facility Layout.pptx
Chapter 6-Process Selection and Facility Layout.pptxChapter 6-Process Selection and Facility Layout.pptx
Chapter 6-Process Selection and Facility Layout.pptx
 
Software engineering 17 architectural design
Software engineering 17 architectural designSoftware engineering 17 architectural design
Software engineering 17 architectural design
 
Digital cavity 1.1
Digital cavity 1.1Digital cavity 1.1
Digital cavity 1.1
 
Demo Poster_Renuka
Demo Poster_RenukaDemo Poster_Renuka
Demo Poster_Renuka
 
Diksha sda presentation
Diksha sda presentationDiksha sda presentation
Diksha sda presentation
 

More from Augusto Ciuffoletti

Grid Infrastructure Architecture A Modular Approach from CoreGRID
Grid Infrastructure Architecture A Modular Approach from CoreGRIDGrid Infrastructure Architecture A Modular Approach from CoreGRID
Grid Infrastructure Architecture A Modular Approach from CoreGRID
Augusto Ciuffoletti
 
Scalable concurrency control in a dynamic membership
Scalable concurrency control  in a dynamic membershipScalable concurrency control  in a dynamic membership
Scalable concurrency control in a dynamic membership
Augusto Ciuffoletti
 
Prototype Implementation of a Demand Driven Network Monitoring Architecture
Prototype Implementation of a Demand Driven Network Monitoring ArchitecturePrototype Implementation of a Demand Driven Network Monitoring Architecture
Prototype Implementation of a Demand Driven Network Monitoring Architecture
Augusto Ciuffoletti
 

More from Augusto Ciuffoletti (20)

An open-source testbed for IoT systems
An open-source testbed for IoT systemsAn open-source testbed for IoT systems
An open-source testbed for IoT systems
 
0 basic
0 basic0 basic
0 basic
 
Thingspeak: integrazione
Thingspeak: integrazioneThingspeak: integrazione
Thingspeak: integrazione
 
Thingspeak: fondamenti
Thingspeak: fondamentiThingspeak: fondamenti
Thingspeak: fondamenti
 
ZHAW 2016 - OCCI for monitoring
ZHAW 2016 - OCCI for monitoringZHAW 2016 - OCCI for monitoring
ZHAW 2016 - OCCI for monitoring
 
Open Cloud Computing Interface
Open Cloud Computing InterfaceOpen Cloud Computing Interface
Open Cloud Computing Interface
 
Laboratorio Openstack
Laboratorio OpenstackLaboratorio Openstack
Laboratorio Openstack
 
Automated deployment of a microservice based monitoring architecture
Automated deployment of a microservice based monitoring architectureAutomated deployment of a microservice based monitoring architecture
Automated deployment of a microservice based monitoring architecture
 
OCCI Monitoring at OGF42 - Concepts and demo
OCCI Monitoring at OGF42 - Concepts and demoOCCI Monitoring at OGF42 - Concepts and demo
OCCI Monitoring at OGF42 - Concepts and demo
 
Extending the OCCI API with monitoring capabilities
Extending the OCCI API with monitoring capabilitiesExtending the OCCI API with monitoring capabilities
Extending the OCCI API with monitoring capabilities
 
2013 03 occi-monitoring
2013 03 occi-monitoring2013 03 occi-monitoring
2013 03 occi-monitoring
 
Monitoring a virtual network infrastructure - An IaaS perspective
Monitoring a virtual network infrastructure - An IaaS perspectiveMonitoring a virtual network infrastructure - An IaaS perspective
Monitoring a virtual network infrastructure - An IaaS perspective
 
Collision avoidance using a wandering token in the PTP protocol
Collision avoidance using a wandering token in the PTP protocolCollision avoidance using a wandering token in the PTP protocol
Collision avoidance using a wandering token in the PTP protocol
 
TIP: a course about IP convergence technology
TIP: a course about IP convergence technologyTIP: a course about IP convergence technology
TIP: a course about IP convergence technology
 
Design of a secure "Token Passing" protocol
Design of a secure "Token Passing" protocolDesign of a secure "Token Passing" protocol
Design of a secure "Token Passing" protocol
 
The wandering token
The wandering tokenThe wandering token
The wandering token
 
Network Monitoring in the age of the Cloud
Network Monitoring in the age of the CloudNetwork Monitoring in the age of the Cloud
Network Monitoring in the age of the Cloud
 
Grid Infrastructure Architecture A Modular Approach from CoreGRID
Grid Infrastructure Architecture A Modular Approach from CoreGRIDGrid Infrastructure Architecture A Modular Approach from CoreGRID
Grid Infrastructure Architecture A Modular Approach from CoreGRID
 
Scalable concurrency control in a dynamic membership
Scalable concurrency control  in a dynamic membershipScalable concurrency control  in a dynamic membership
Scalable concurrency control in a dynamic membership
 
Prototype Implementation of a Demand Driven Network Monitoring Architecture
Prototype Implementation of a Demand Driven Network Monitoring ArchitecturePrototype Implementation of a Demand Driven Network Monitoring Architecture
Prototype Implementation of a Demand Driven Network Monitoring Architecture
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 

Design and implementation of a low-cost modular sensor

  • 1. SEUNet 2017 - Rome Design and implementation of a low-cost modular sensor Augusto Ciuffoletti - Univ. of Pisa (Italy) October 9th 2017
  • 2. Sensors in urban environments • In order to control an urban environment we need to interconnect many different sensors • Many: an overwhelming number of aspects needs to be monitored, measuring parameters of detecting events • Different: each aspect is characterized by a different monitoring technology and devices • Interconnected: they exchange data and control with other data aggregators and processors • Sensors need to be cheap, simple and reusable: • A high cost excludes a significant scale • The design should be affordable for the technical staff of the urban district • Reusability allows a flexible design in a fast evolving environment
  • 3. Sensors in urban environments • In order to control an urban environment we need to interconnect many different sensors • Many: an overwhelming number of aspects needs to be monitored, measuring parameters of detecting events • Different: each aspect is characterized by a different monitoring technology and devices • Interconnected: they exchange data and control with other data aggregators and processors • Sensors need to be cheap, simple and reusable: • A high cost excludes a significant scale • The design should be affordable for the technical staff of the urban district • Reusability allows a flexible design in a fast evolving environment
  • 4. Sensors in urban environments • In order to control an urban environment we need to interconnect many different sensors • Many: an overwhelming number of aspects needs to be monitored, measuring parameters of detecting events • Different: each aspect is characterized by a different monitoring technology and devices • Interconnected: they exchange data and control with other data aggregators and processors • Sensors need to be cheap, simple and reusable: • A high cost excludes a significant scale • The design should be affordable for the technical staff of the urban district • Reusability allows a flexible design in a fast evolving environment
  • 5. Sensors in urban environments • In order to control an urban environment we need to interconnect many different sensors • Many: an overwhelming number of aspects needs to be monitored, measuring parameters of detecting events • Different: each aspect is characterized by a different monitoring technology and devices • Interconnected: they exchange data and control with other data aggregators and processors • Sensors need to be cheap, simple and reusable: • A high cost excludes a significant scale • The design should be affordable for the technical staff of the urban district • Reusability allows a flexible design in a fast evolving environment
  • 6. Sensors in urban environments • In order to control an urban environment we need to interconnect many different sensors • Many: an overwhelming number of aspects needs to be monitored, measuring parameters of detecting events • Different: each aspect is characterized by a different monitoring technology and devices • Interconnected: they exchange data and control with other data aggregators and processors • Sensors need to be cheap, simple and reusable: • A high cost excludes a significant scale • The design should be affordable for the technical staff of the urban district • Reusability allows a flexible design in a fast evolving environment
  • 7. Sensors in urban environments • In order to control an urban environment we need to interconnect many different sensors • Many: an overwhelming number of aspects needs to be monitored, measuring parameters of detecting events • Different: each aspect is characterized by a different monitoring technology and devices • Interconnected: they exchange data and control with other data aggregators and processors • Sensors need to be cheap, simple and reusable: • A high cost excludes a significant scale • The design should be affordable for the technical staff of the urban district • Reusability allows a flexible design in a fast evolving environment
  • 8. Sensors in urban environments • In order to control an urban environment we need to interconnect many different sensors • Many: an overwhelming number of aspects needs to be monitored, measuring parameters of detecting events • Different: each aspect is characterized by a different monitoring technology and devices • Interconnected: they exchange data and control with other data aggregators and processors • Sensors need to be cheap, simple and reusable: • A high cost excludes a significant scale • The design should be affordable for the technical staff of the urban district • Reusability allows a flexible design in a fast evolving environment
  • 9. Sensors in urban environments • In order to control an urban environment we need to interconnect many different sensors • Many: an overwhelming number of aspects needs to be monitored, measuring parameters of detecting events • Different: each aspect is characterized by a different monitoring technology and devices • Interconnected: they exchange data and control with other data aggregators and processors • Sensors need to be cheap, simple and reusable: • A high cost excludes a significant scale • The design should be affordable for the technical staff of the urban district • Reusability allows a flexible design in a fast evolving environment
  • 10. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 11. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 12. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 13. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 14. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 15. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 16. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 17. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 18. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 19. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 20. Design principles • Limit the presence of ad hoc components • use COTS components as far as possible • Do not overkill the problem • tailor the computational capabilities on the real needs • Modularize the architecture • the design is more agile • exploit concurrency • improve reusability • Use standard interfaces • improve reusability • Use inexpensive and widely diffused components
  • 21. Typical architecture of a (smart) sensor • Modularize the (smart) sensor • Dumb device: hardware measurement or enactment • Dumb device/Processor interface • Processor: controls dumb devices according to a logic • Processor/Network Module interface • Network Module • We concentrate on Processor and Network Module
  • 22. Typical architecture of a (smart) sensor • Modularize the (smart) sensor • Dumb device: hardware measurement or enactment • Dumb device/Processor interface • Processor: controls dumb devices according to a logic • Processor/Network Module interface • Network Module • We concentrate on Processor and Network Module
  • 23. Typical architecture of a (smart) sensor • Modularize the (smart) sensor • Dumb device: hardware measurement or enactment • Dumb device/Processor interface • Processor: controls dumb devices according to a logic • Processor/Network Module interface • Network Module • We concentrate on Processor and Network Module
  • 24. Typical architecture of a (smart) sensor • Modularize the (smart) sensor • Dumb device: hardware measurement or enactment • Dumb device/Processor interface • Processor: controls dumb devices according to a logic • Processor/Network Module interface • Network Module • We concentrate on Processor and Network Module
  • 25. Typical architecture of a (smart) sensor • Modularize the (smart) sensor • Dumb device: hardware measurement or enactment • Dumb device/Processor interface • Processor: controls dumb devices according to a logic • Processor/Network Module interface • Network Module • We concentrate on Processor and Network Module
  • 26. Typical architecture of a (smart) sensor • Modularize the (smart) sensor • Dumb device: hardware measurement or enactment • Dumb device/Processor interface • Processor: controls dumb devices according to a logic • Processor/Network Module interface • Network Module • We concentrate on Processor and Network Module
  • 27. Typical architecture of a (smart) sensor • Modularize the (smart) sensor • Dumb device: hardware measurement or enactment • Dumb device/Processor interface • Processor: controls dumb devices according to a logic • Processor/Network Module interface • Network Module • We concentrate on Processor and Network Module
  • 28. Meta ex-cursus: about this paper • Principles are the foundations, but I quickly go to practice • Maybe too much in an "Instructables" style, but possibly useful • one of the reviewers did not appreciate that, sorry • Scientific approach, though: • full details of the experiment (reproducible) • discussion of the results • not the end of the story • you can just improve this (I did...)
  • 29. Meta ex-cursus: about this paper • Principles are the foundations, but I quickly go to practice • Maybe too much in an "Instructables" style, but possibly useful • one of the reviewers did not appreciate that, sorry • Scientific approach, though: • full details of the experiment (reproducible) • discussion of the results • not the end of the story • you can just improve this (I did...)
  • 30. Meta ex-cursus: about this paper • Principles are the foundations, but I quickly go to practice • Maybe too much in an "Instructables" style, but possibly useful • one of the reviewers did not appreciate that, sorry • Scientific approach, though: • full details of the experiment (reproducible) • discussion of the results • not the end of the story • you can just improve this (I did...)
  • 31. Meta ex-cursus: about this paper • Principles are the foundations, but I quickly go to practice • Maybe too much in an "Instructables" style, but possibly useful • one of the reviewers did not appreciate that, sorry • Scientific approach, though: • full details of the experiment (reproducible) • discussion of the results • not the end of the story • you can just improve this (I did...)
  • 32. Meta ex-cursus: about this paper • Principles are the foundations, but I quickly go to practice • Maybe too much in an "Instructables" style, but possibly useful • one of the reviewers did not appreciate that, sorry • Scientific approach, though: • full details of the experiment (reproducible) • discussion of the results • not the end of the story • you can just improve this (I did...)
  • 33. Meta ex-cursus: about this paper • Principles are the foundations, but I quickly go to practice • Maybe too much in an "Instructables" style, but possibly useful • one of the reviewers did not appreciate that, sorry • Scientific approach, though: • full details of the experiment (reproducible) • discussion of the results • not the end of the story • you can just improve this (I did...)
  • 34. Meta ex-cursus: about this paper • Principles are the foundations, but I quickly go to practice • Maybe too much in an "Instructables" style, but possibly useful • one of the reviewers did not appreciate that, sorry • Scientific approach, though: • full details of the experiment (reproducible) • discussion of the results • not the end of the story • you can just improve this (I did...)
  • 35. Meta ex-cursus: about this paper • Principles are the foundations, but I quickly go to practice • Maybe too much in an "Instructables" style, but possibly useful • one of the reviewers did not appreciate that, sorry • Scientific approach, though: • full details of the experiment (reproducible) • discussion of the results • not the end of the story • you can just improve this (I did...)
  • 36. The Processor: Arduino Nano • Similar to the Arduino Uno, but smaller size (18x45 mm) • Onboard ADC, PWM, Digital I/O, UART • Easily programmable in C • Often used in high school teaching • Open design • Inexpensive (available for less than 5 euros)
  • 37. The Processor: Arduino Nano • Similar to the Arduino Uno, but smaller size (18x45 mm) • Onboard ADC, PWM, Digital I/O, UART • Easily programmable in C • Often used in high school teaching • Open design • Inexpensive (available for less than 5 euros)
  • 38. The Processor: Arduino Nano • Similar to the Arduino Uno, but smaller size (18x45 mm) • Onboard ADC, PWM, Digital I/O, UART • Easily programmable in C • Often used in high school teaching • Open design • Inexpensive (available for less than 5 euros)
  • 39. The Processor: Arduino Nano • Similar to the Arduino Uno, but smaller size (18x45 mm) • Onboard ADC, PWM, Digital I/O, UART • Easily programmable in C • Often used in high school teaching • Open design • Inexpensive (available for less than 5 euros)
  • 40. The Processor: Arduino Nano • Similar to the Arduino Uno, but smaller size (18x45 mm) • Onboard ADC, PWM, Digital I/O, UART • Easily programmable in C • Often used in high school teaching • Open design • Inexpensive (available for less than 5 euros)
  • 41. The Processor: Arduino Nano • Similar to the Arduino Uno, but smaller size (18x45 mm) • Onboard ADC, PWM, Digital I/O, UART • Easily programmable in C • Often used in high school teaching • Open design • Inexpensive (available for less than 5 euros)
  • 42. The Network Module: Espressif ESP-01 • Tiny 8 pins board (14x25 mm) • Based on the ESP8266: WiFi client or access point • Onboard UART • Not immediate to program, but shipped with a serial API • Growing popularity among hobbists • Inexpensive (available for less than 5 euros)
  • 43. The Network Module: Espressif ESP-01 • Tiny 8 pins board (14x25 mm) • Based on the ESP8266: WiFi client or access point • Onboard UART • Not immediate to program, but shipped with a serial API • Growing popularity among hobbists • Inexpensive (available for less than 5 euros)
  • 44. The Network Module: Espressif ESP-01 • Tiny 8 pins board (14x25 mm) • Based on the ESP8266: WiFi client or access point • Onboard UART • Not immediate to program, but shipped with a serial API • Growing popularity among hobbists • Inexpensive (available for less than 5 euros)
  • 45. The Network Module: Espressif ESP-01 • Tiny 8 pins board (14x25 mm) • Based on the ESP8266: WiFi client or access point • Onboard UART • Not immediate to program, but shipped with a serial API • Growing popularity among hobbists • Inexpensive (available for less than 5 euros)
  • 46. The Network Module: Espressif ESP-01 • Tiny 8 pins board (14x25 mm) • Based on the ESP8266: WiFi client or access point • Onboard UART • Not immediate to program, but shipped with a serial API • Growing popularity among hobbists • Inexpensive (available for less than 5 euros)
  • 47. The Network Module: Espressif ESP-01 • Tiny 8 pins board (14x25 mm) • Based on the ESP8266: WiFi client or access point • Onboard UART • Not immediate to program, but shipped with a serial API • Growing popularity among hobbists • Inexpensive (available for less than 5 euros)
  • 48. The interface: Espressif AT interface • The ESP-01 board comes pre-flashed with an API accessible through an onboard UART (aka serial line) • The API allows all sorts of network related operations: from IP address configuration to TCP connections • The API implementation is open source, and extensible • The commands are sent through the serial line as (quite verbose) series of characters. • e.g., to connect to an AP AT+CWJAP_CUR="room123","the psk" • The Network Module returns a response • a plain OK for success, more complex in case of error
  • 49. The interface: Espressif AT interface • The ESP-01 board comes pre-flashed with an API accessible through an onboard UART (aka serial line) • The API allows all sorts of network related operations: from IP address configuration to TCP connections • The API implementation is open source, and extensible • The commands are sent through the serial line as (quite verbose) series of characters. • e.g., to connect to an AP AT+CWJAP_CUR="room123","the psk" • The Network Module returns a response • a plain OK for success, more complex in case of error
  • 50. The interface: Espressif AT interface • The ESP-01 board comes pre-flashed with an API accessible through an onboard UART (aka serial line) • The API allows all sorts of network related operations: from IP address configuration to TCP connections • The API implementation is open source, and extensible • The commands are sent through the serial line as (quite verbose) series of characters. • e.g., to connect to an AP AT+CWJAP_CUR="room123","the psk" • The Network Module returns a response • a plain OK for success, more complex in case of error
  • 51. The interface: Espressif AT interface • The ESP-01 board comes pre-flashed with an API accessible through an onboard UART (aka serial line) • The API allows all sorts of network related operations: from IP address configuration to TCP connections • The API implementation is open source, and extensible • The commands are sent through the serial line as (quite verbose) series of characters. • e.g., to connect to an AP AT+CWJAP_CUR="room123","the psk" • The Network Module returns a response • a plain OK for success, more complex in case of error
  • 52. The interface: Espressif AT interface • The ESP-01 board comes pre-flashed with an API accessible through an onboard UART (aka serial line) • The API allows all sorts of network related operations: from IP address configuration to TCP connections • The API implementation is open source, and extensible • The commands are sent through the serial line as (quite verbose) series of characters. • e.g., to connect to an AP AT+CWJAP_CUR="room123","the psk" • The Network Module returns a response • a plain OK for success, more complex in case of error
  • 53. The interface: Espressif AT interface • The ESP-01 board comes pre-flashed with an API accessible through an onboard UART (aka serial line) • The API allows all sorts of network related operations: from IP address configuration to TCP connections • The API implementation is open source, and extensible • The commands are sent through the serial line as (quite verbose) series of characters. • e.g., to connect to an AP AT+CWJAP_CUR="room123","the psk" • The Network Module returns a response • a plain OK for success, more complex in case of error
  • 54. The interface: Espressif AT interface • The ESP-01 board comes pre-flashed with an API accessible through an onboard UART (aka serial line) • The API allows all sorts of network related operations: from IP address configuration to TCP connections • The API implementation is open source, and extensible • The commands are sent through the serial line as (quite verbose) series of characters. • e.g., to connect to an AP AT+CWJAP_CUR="room123","the psk" • The Network Module returns a response • a plain OK for success, more complex in case of error
  • 55. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 56. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 57. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 58. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 59. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 60. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 61. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 62. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 63. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 64. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 65. Limits of the AT library • Commands are verbose • negligible impact on serial line traffic, • heavy footprint on program size (strings need to be buffered) • No documented support for TSL • No support for HTTP(S) • many REST-ful IoT servers exist • WebSockets look very promising for IoT applications • The interface is complex to manage • Buffer management • Timeouts • Variable response formats
  • 66. Our purpose • Design the simplest hardware for coupling the Nano and the ESP-01 • Write a wrapper for the serial API interface: • plain behavior (object oriented with side effects on global buffers) • transparent wrap of AT commands (library not dependent from API details) • Add HTTP Rest operation TARGET A 10 Euro thing that can interact with a ThingSpeak server with limited programming effort
  • 67. Our purpose • Design the simplest hardware for coupling the Nano and the ESP-01 • Write a wrapper for the serial API interface: • plain behavior (object oriented with side effects on global buffers) • transparent wrap of AT commands (library not dependent from API details) • Add HTTP Rest operation TARGET A 10 Euro thing that can interact with a ThingSpeak server with limited programming effort
  • 68. Our purpose • Design the simplest hardware for coupling the Nano and the ESP-01 • Write a wrapper for the serial API interface: • plain behavior (object oriented with side effects on global buffers) • transparent wrap of AT commands (library not dependent from API details) • Add HTTP Rest operation TARGET A 10 Euro thing that can interact with a ThingSpeak server with limited programming effort
  • 69. Our purpose • Design the simplest hardware for coupling the Nano and the ESP-01 • Write a wrapper for the serial API interface: • plain behavior (object oriented with side effects on global buffers) • transparent wrap of AT commands (library not dependent from API details) • Add HTTP Rest operation TARGET A 10 Euro thing that can interact with a ThingSpeak server with limited programming effort
  • 70. Our purpose • Design the simplest hardware for coupling the Nano and the ESP-01 • Write a wrapper for the serial API interface: • plain behavior (object oriented with side effects on global buffers) • transparent wrap of AT commands (library not dependent from API details) • Add HTTP Rest operation TARGET A 10 Euro thing that can interact with a ThingSpeak server with limited programming effort
  • 71. Our purpose • Design the simplest hardware for coupling the Nano and the ESP-01 • Write a wrapper for the serial API interface: • plain behavior (object oriented with side effects on global buffers) • transparent wrap of AT commands (library not dependent from API details) • Add HTTP Rest operation TARGET A 10 Euro thing that can interact with a ThingSpeak server with limited programming effort
  • 72. Hardware design The electrical layout (complicated by different technologies)
  • 73. The library • Use the SoftwareSerial library to interact with the ESP-01 • leave Nano UART available for software testing and debugging • Headers of the six functions:
  • 74. The library • Use the SoftwareSerial library to interact with the ESP-01 • leave Nano UART available for software testing and debugging • Headers of the six functions:
  • 75. The library • Use the SoftwareSerial library to interact with the ESP-01 • leave Nano UART available for software testing and debugging • Headers of the six functions:
  • 76. The library • Use the SoftwareSerial library to interact with the ESP-01 • leave Nano UART available for software testing and debugging • Headers of the six functions: ESP(SoftwareSerial *mySerial, int baudrate); // The constructor
  • 77. The library • Use the SoftwareSerial library to interact with the ESP-01 • leave Nano UART available for software testing and debugging • Headers of the six functions: ESP(SoftwareSerial *mySerial, int baudrate); // The constructor void reset(); // Cleaning after problems
  • 78. The library • Use the SoftwareSerial library to interact with the ESP-01 • leave Nano UART available for software testing and debugging • Headers of the six functions: ESP(SoftwareSerial *mySerial, int baudrate); // The constructor void reset(); // Cleaning after problems int state(); // Inspect current state
  • 79. The library • Use the SoftwareSerial library to interact with the ESP-01 • leave Nano UART available for software testing and debugging • Headers of the six functions: ESP(SoftwareSerial *mySerial, int baudrate); // The constructor void reset(); // Cleaning after problems int state(); // Inspect current state int atflush(); // Serial buffer cleanup
  • 80. The library • Use the SoftwareSerial library to interact with the ESP-01 • leave Nano UART available for software testing and debugging • Headers of the six functions: ESP(SoftwareSerial *mySerial, int baudrate); // The constructor void reset(); // Cleaning after problems int state(); // Inspect current state int atflush(); // Serial buffer cleanup // atcmd: the cmd buffer contains the AT command to be executed, // the ESP-01 response is returned in the same buffer int atcmd(char cmd[], int size, int timeout);
  • 81. The library • Use the SoftwareSerial library to interact with the ESP-01 • leave Nano UART available for software testing and debugging • Headers of the six functions: ESP(SoftwareSerial *mySerial, int baudrate); // The constructor void reset(); // Cleaning after problems int state(); // Inspect current state int atflush(); // Serial buffer cleanup // atcmd: the cmd buffer contains the AT command to be executed, // the ESP-01 response is returned in the same buffer int atcmd(char cmd[], int size, int timeout); // session: the header and body buffers contain the request, // the (truncated) response from the server is returned in the same buffer int session(char header[], int headersize, char body[], int bodysize, int timeout);
  • 82. Using the library (setup and declaration) // constants #define CMDSIZE 50 #define HEADERSIZE 200 #define BODYSIZE 100 #define HOST "api.thingspeak.com" #define PORT 80 #define PERIOD 30 // variables definitions ... // setup ... All debug printout on hardware serial has been removed
  • 83. Using the library (setup and declaration) // constants ... // variables definitions SoftwareSerial mySerial(2,3); ESP esp1(&mySerial,19200); char *cmd; char *header; char *body; int v=0; // setup ... All debug printout on hardware serial has been removed
  • 84. Using the library (setup and declaration) // constants ... // variables definitions ... // setup void setup() { cmd=(char *) malloc(CMDSIZE); header=(char *) malloc(HEADERSIZE); body=(char *) malloc(BODYSIZE); do { esp1.reset(); delay(1000); do { sprintf(cmd,"ATE0"); } while (esp1.atcmd(cmd,CMDSIZE,5) < 0); // no echo sprintf(cmd,"AT+CWMODE_CUR=1"); esp1.atcmd(cmd,CMDSIZE,5); // station mode sprintf(cmd,"AT+CIPMUX=0"); esp1.atcmd(cmd,CMDSIZE,5); // single TCP sprintf(cmd,"AT+CWJAP_CUR="%s","%s"",ESSID,PASSWORD); esp1.atcmd(cmd,CMDSIZE,20); // join } while ( esp1.state() != 2); // until connected to the AP delay(1000); } All debug printout on hardware serial has been removed
  • 85. Using the library (the loop) void loop() { // prepare HTTP request sprintf(body,"api_key=%s&field1=%d", CHANNEL_KEY,v++); sprintf(header,"POST /update HTTP/1.1rn"); sprintf(header+strlen(header),"Host: %srn",HOST); sprintf(header+strlen(header),"Content-Type: application/x-www-form-urlencodedrn"); sprintf(header+strlen(header),"Content-Length: %drn",strlen(body)); // connect to server do { sprintf(cmd,"AT+CIPSTART="TCP","%s",%d",HOST,PORT); esp1.atcmd(cmd,CMDSIZE,10); } while ( esp1.state() != 3 ); // prepare send operation do { sprintf(cmd,"AT+CIPSENDEX=%d",strlen(header)+2+strlen(body)); } while ( esp1.atcmd(cmd,CMDSIZE,5)<0 ); // send request esp1.session(header,HEADERSIZE,body,BODYSIZE,10); // close connection (should be already closed) if ( esp1.state() == 3 ) { sprintf(cmd,"AT+CIPCLOSE"); esp1.atcmd(cmd,CMDSIZE,5); } esp1.atflush(); }
  • 86. Program footprint • An MCU has a very limited storage • libraries, buffers, constants etc. • The demo program above is only overhead • all that is done is to increment and send an integer • So we have an estimate of atlib overhead (w.r.t. Arduino Nano) • 7604 bytes (24%) of program memory • 681 bytes (33%) of global storage • another 350 bytes of global storage are for buffers • The remaining space is available for driving sensors and actuators
  • 87. Program footprint • An MCU has a very limited storage • libraries, buffers, constants etc. • The demo program above is only overhead • all that is done is to increment and send an integer • So we have an estimate of atlib overhead (w.r.t. Arduino Nano) • 7604 bytes (24%) of program memory • 681 bytes (33%) of global storage • another 350 bytes of global storage are for buffers • The remaining space is available for driving sensors and actuators
  • 88. Program footprint • An MCU has a very limited storage • libraries, buffers, constants etc. • The demo program above is only overhead • all that is done is to increment and send an integer • So we have an estimate of atlib overhead (w.r.t. Arduino Nano) • 7604 bytes (24%) of program memory • 681 bytes (33%) of global storage • another 350 bytes of global storage are for buffers • The remaining space is available for driving sensors and actuators
  • 89. Program footprint • An MCU has a very limited storage • libraries, buffers, constants etc. • The demo program above is only overhead • all that is done is to increment and send an integer • So we have an estimate of atlib overhead (w.r.t. Arduino Nano) • 7604 bytes (24%) of program memory • 681 bytes (33%) of global storage • another 350 bytes of global storage are for buffers • The remaining space is available for driving sensors and actuators
  • 90. Program footprint • An MCU has a very limited storage • libraries, buffers, constants etc. • The demo program above is only overhead • all that is done is to increment and send an integer • So we have an estimate of atlib overhead (w.r.t. Arduino Nano) • 7604 bytes (24%) of program memory • 681 bytes (33%) of global storage • another 350 bytes of global storage are for buffers • The remaining space is available for driving sensors and actuators
  • 91. Program footprint • An MCU has a very limited storage • libraries, buffers, constants etc. • The demo program above is only overhead • all that is done is to increment and send an integer • So we have an estimate of atlib overhead (w.r.t. Arduino Nano) • 7604 bytes (24%) of program memory • 681 bytes (33%) of global storage • another 350 bytes of global storage are for buffers • The remaining space is available for driving sensors and actuators
  • 92. Program footprint • An MCU has a very limited storage • libraries, buffers, constants etc. • The demo program above is only overhead • all that is done is to increment and send an integer • So we have an estimate of atlib overhead (w.r.t. Arduino Nano) • 7604 bytes (24%) of program memory • 681 bytes (33%) of global storage • another 350 bytes of global storage are for buffers • The remaining space is available for driving sensors and actuators
  • 93. Program footprint • An MCU has a very limited storage • libraries, buffers, constants etc. • The demo program above is only overhead • all that is done is to increment and send an integer • So we have an estimate of atlib overhead (w.r.t. Arduino Nano) • 7604 bytes (24%) of program memory • 681 bytes (33%) of global storage • another 350 bytes of global storage are for buffers • The remaining space is available for driving sensors and actuators
  • 94. Program footprint • An MCU has a very limited storage • libraries, buffers, constants etc. • The demo program above is only overhead • all that is done is to increment and send an integer • So we have an estimate of atlib overhead (w.r.t. Arduino Nano) • 7604 bytes (24%) of program memory • 681 bytes (33%) of global storage • another 350 bytes of global storage are for buffers • The remaining space is available for driving sensors and actuators
  • 95. What I did that others do not • Use the AT library • mostly used for demo purposes • with UART pins attached to PC tty • unconfortable to use as an API • many prefer to reflash standalone applications • exciting hack, but limited possibilities (3 GPIO pins) • Use dynamic memory allocation • may be dangerous, because of heap fragmentation • with some care may give extra possibilities • the usual advice is do not malloc()
  • 96. What I did that others do not • Use the AT library • mostly used for demo purposes • with UART pins attached to PC tty • unconfortable to use as an API • many prefer to reflash standalone applications • exciting hack, but limited possibilities (3 GPIO pins) • Use dynamic memory allocation • may be dangerous, because of heap fragmentation • with some care may give extra possibilities • the usual advice is do not malloc()
  • 97. What I did that others do not • Use the AT library • mostly used for demo purposes • with UART pins attached to PC tty • unconfortable to use as an API • many prefer to reflash standalone applications • exciting hack, but limited possibilities (3 GPIO pins) • Use dynamic memory allocation • may be dangerous, because of heap fragmentation • with some care may give extra possibilities • the usual advice is do not malloc()
  • 98. What I did that others do not • Use the AT library • mostly used for demo purposes • with UART pins attached to PC tty • unconfortable to use as an API • many prefer to reflash standalone applications • exciting hack, but limited possibilities (3 GPIO pins) • Use dynamic memory allocation • may be dangerous, because of heap fragmentation • with some care may give extra possibilities • the usual advice is do not malloc()
  • 99. What I did that others do not • Use the AT library • mostly used for demo purposes • with UART pins attached to PC tty • unconfortable to use as an API • many prefer to reflash standalone applications • exciting hack, but limited possibilities (3 GPIO pins) • Use dynamic memory allocation • may be dangerous, because of heap fragmentation • with some care may give extra possibilities • the usual advice is do not malloc()
  • 100. What I did that others do not • Use the AT library • mostly used for demo purposes • with UART pins attached to PC tty • unconfortable to use as an API • many prefer to reflash standalone applications • exciting hack, but limited possibilities (3 GPIO pins) • Use dynamic memory allocation • may be dangerous, because of heap fragmentation • with some care may give extra possibilities • the usual advice is do not malloc()
  • 101. What I did that others do not • Use the AT library • mostly used for demo purposes • with UART pins attached to PC tty • unconfortable to use as an API • many prefer to reflash standalone applications • exciting hack, but limited possibilities (3 GPIO pins) • Use dynamic memory allocation • may be dangerous, because of heap fragmentation • with some care may give extra possibilities • the usual advice is do not malloc()
  • 102. What I did that others do not • Use the AT library • mostly used for demo purposes • with UART pins attached to PC tty • unconfortable to use as an API • many prefer to reflash standalone applications • exciting hack, but limited possibilities (3 GPIO pins) • Use dynamic memory allocation • may be dangerous, because of heap fragmentation • with some care may give extra possibilities • the usual advice is do not malloc()
  • 104. Experimental results • The prototype consumes around 150mA at 5V, and can be powered across the same USB port used for programming • I ran one 40 hours experiment to check the stability of the prototype • I used the demo code shown above to post an incremental value to the public ThingSpeak server RESULTS • The program resiliency to networking problems is poor, • easy to fix, but requires additional code • with a stable WiFi the operation is stable • However I noticed many "Bad Request" responses (with loss of the sample value)
  • 105. Experimental results • The prototype consumes around 150mA at 5V, and can be powered across the same USB port used for programming • I ran one 40 hours experiment to check the stability of the prototype • I used the demo code shown above to post an incremental value to the public ThingSpeak server RESULTS • The program resiliency to networking problems is poor, • easy to fix, but requires additional code • with a stable WiFi the operation is stable • However I noticed many "Bad Request" responses (with loss of the sample value)
  • 106. Experimental results • The prototype consumes around 150mA at 5V, and can be powered across the same USB port used for programming • I ran one 40 hours experiment to check the stability of the prototype • I used the demo code shown above to post an incremental value to the public ThingSpeak server RESULTS • The program resiliency to networking problems is poor, • easy to fix, but requires additional code • with a stable WiFi the operation is stable • However I noticed many "Bad Request" responses (with loss of the sample value)
  • 107. Experimental results • The prototype consumes around 150mA at 5V, and can be powered across the same USB port used for programming • I ran one 40 hours experiment to check the stability of the prototype • I used the demo code shown above to post an incremental value to the public ThingSpeak server RESULTS • The program resiliency to networking problems is poor, • easy to fix, but requires additional code • with a stable WiFi the operation is stable • However I noticed many "Bad Request" responses (with loss of the sample value)
  • 108. Experimental results • The prototype consumes around 150mA at 5V, and can be powered across the same USB port used for programming • I ran one 40 hours experiment to check the stability of the prototype • I used the demo code shown above to post an incremental value to the public ThingSpeak server RESULTS • The program resiliency to networking problems is poor, • easy to fix, but requires additional code • with a stable WiFi the operation is stable • However I noticed many "Bad Request" responses (with loss of the sample value)
  • 109. Experimental results • The prototype consumes around 150mA at 5V, and can be powered across the same USB port used for programming • I ran one 40 hours experiment to check the stability of the prototype • I used the demo code shown above to post an incremental value to the public ThingSpeak server RESULTS • The program resiliency to networking problems is poor, • easy to fix, but requires additional code • with a stable WiFi the operation is stable • However I noticed many "Bad Request" responses (with loss of the sample value)
  • 110. Experimental results • The prototype consumes around 150mA at 5V, and can be powered across the same USB port used for programming • I ran one 40 hours experiment to check the stability of the prototype • I used the demo code shown above to post an incremental value to the public ThingSpeak server RESULTS • The program resiliency to networking problems is poor, • easy to fix, but requires additional code • with a stable WiFi the operation is stable • However I noticed many "Bad Request" responses (with loss of the sample value)
  • 111. Experimental results • The prototype consumes around 150mA at 5V, and can be powered across the same USB port used for programming • I ran one 40 hours experiment to check the stability of the prototype • I used the demo code shown above to post an incremental value to the public ThingSpeak server RESULTS • The program resiliency to networking problems is poor, • easy to fix, but requires additional code • with a stable WiFi the operation is stable • However I noticed many "Bad Request" responses (with loss of the sample value)
  • 112. Bad Responses • I counted the number of "Bad Responses" during the experiment 00:00:00 06:00:00 12:00:00 18:00:00 00:00:00 06:00:00 12:00:00 18:00:00 00:00:00 0 100 200 300 400 • I noticed a regularity in the number of events, since they are concentrated (synchronized with USA working hours) • I conclude that the sensor is not responsible
  • 113. Bad Responses • I counted the number of "Bad Responses" during the experiment 00:00:00 06:00:00 12:00:00 18:00:00 00:00:00 06:00:00 12:00:00 18:00:00 00:00:00 0 100 200 300 400 • I noticed a regularity in the number of events, since they are concentrated (synchronized with USA working hours) • I conclude that the sensor is not responsible
  • 114. Bad Responses • I counted the number of "Bad Responses" during the experiment 00:00:00 06:00:00 12:00:00 18:00:00 00:00:00 06:00:00 12:00:00 18:00:00 00:00:00 0 100 200 300 400 • I noticed a regularity in the number of events, since they are concentrated (synchronized with USA working hours) • I conclude that the sensor is not responsible
  • 115. Conclusions • We have shown how to make a small sensor with • simple, reproducible design git clone http://bitbucket.org/augusto_ciuffoletti/wifinano • limited programming effort using atlib git clone http://bitbucket.org/augusto_ciuffoletti/atlib • low cost • Arduino programming environment • The pros and cons • stable operation with Bad Requests • power consumption not compatible with battery operation
  • 116. Conclusions • We have shown how to make a small sensor with • simple, reproducible design git clone http://bitbucket.org/augusto_ciuffoletti/wifinano • limited programming effort using atlib git clone http://bitbucket.org/augusto_ciuffoletti/atlib • low cost • Arduino programming environment • The pros and cons • stable operation with Bad Requests • power consumption not compatible with battery operation
  • 117. Conclusions • We have shown how to make a small sensor with • simple, reproducible design git clone http://bitbucket.org/augusto_ciuffoletti/wifinano • limited programming effort using atlib git clone http://bitbucket.org/augusto_ciuffoletti/atlib • low cost • Arduino programming environment • The pros and cons • stable operation with Bad Requests • power consumption not compatible with battery operation
  • 118. Conclusions • We have shown how to make a small sensor with • simple, reproducible design git clone http://bitbucket.org/augusto_ciuffoletti/wifinano • limited programming effort using atlib git clone http://bitbucket.org/augusto_ciuffoletti/atlib • low cost • Arduino programming environment • The pros and cons • stable operation with Bad Requests • power consumption not compatible with battery operation
  • 119. Conclusions • We have shown how to make a small sensor with • simple, reproducible design git clone http://bitbucket.org/augusto_ciuffoletti/wifinano • limited programming effort using atlib git clone http://bitbucket.org/augusto_ciuffoletti/atlib • low cost • Arduino programming environment • The pros and cons • stable operation with Bad Requests • power consumption not compatible with battery operation
  • 120. Conclusions • We have shown how to make a small sensor with • simple, reproducible design git clone http://bitbucket.org/augusto_ciuffoletti/wifinano • limited programming effort using atlib git clone http://bitbucket.org/augusto_ciuffoletti/atlib • low cost • Arduino programming environment • The pros and cons • stable operation with Bad Requests • power consumption not compatible with battery operation
  • 121. Conclusions • We have shown how to make a small sensor with • simple, reproducible design git clone http://bitbucket.org/augusto_ciuffoletti/wifinano • limited programming effort using atlib git clone http://bitbucket.org/augusto_ciuffoletti/atlib • low cost • Arduino programming environment • The pros and cons • stable operation with Bad Requests • power consumption not compatible with battery operation
  • 122. Conclusions • We have shown how to make a small sensor with • simple, reproducible design git clone http://bitbucket.org/augusto_ciuffoletti/wifinano • limited programming effort using atlib git clone http://bitbucket.org/augusto_ciuffoletti/atlib • low cost • Arduino programming environment • The pros and cons • stable operation with Bad Requests • power consumption not compatible with battery operation
  • 123. Conclusions • We have shown how to make a small sensor with • simple, reproducible design git clone http://bitbucket.org/augusto_ciuffoletti/wifinano • limited programming effort using atlib git clone http://bitbucket.org/augusto_ciuffoletti/atlib • low cost • Arduino programming environment • The pros and cons • stable operation with Bad Requests • power consumption not compatible with battery operation not the end of the story
  • 124. V2.0 • Hardware and library re-designed: • Mini/3.3V instead of Nano • Hardware is simpler and more compact • 50% storage footprint, comparable program footprint • More robust (no Bad Requests?!) • HTTP response parsing • Power saving (48hrs operation with 3 AAA NiMH) • https://bitbucket.org/augusto_ciuffoletti/wifimini/