SlideShare a Scribd company logo
We Power
Connected Things
Hardware development at the speed of software. www.wildernesslabs.co
slideshare.net/bryancostanich
The Hardware Revolution,
10 years ago, the iPhone launched.
Today, we have cars that drive themselves.
10 years from now, nearly every new
device will be connected, and much of
them will be automated.
Consumers will demand sophisticated
hardware. June Oven, Tovala, and other.
3 types of IoT: Consumer,
Commercial, and Industrial
GE predicts $60T in Industrial IoT
alone in the next 15 years.
a career opportunity.
© 2018, Wilderness Labs, Inc.
Future Tech
Connected fridge of tomorrow:
- Inventory + automated grocery ordering.
- Meal & diet plan, recipe assistant.
- User recognition, experience tailoring.
- Allergy, food expiration, etc. warnings.
- Integration with oven, microwave, etc.
Winning Commercial & Industrial IoT devices will be just as sophisticated.
© 2018, Wilderness Labs, Inc.
Microcontrollers will make the revolution possible.
Commodity chips. $2-$10
Low-energy, high-performance.
General Purpose Input-Output (GPIO)
Digital + Analog
Built-in Protocol Support (SPI, I2C, Serial,
CAN, and others)
Analog-to-Digital (ADC) Converters
Digital-to-Analog Converters
Gateway Connectivity (BLE, WiFi, others)
Real IoT is powered by microcontrollers (MCUs).
Netduino = Arduino form factor running the
.Net MicroFramework.
Visual Studio (Windows + Mac)
Debugging, events, etc.
Building a vNext connected things platform.
Prototype with Netduino.
Go to market with Meadow.
meadow
© 2018, Wilderness Labs, Inc.
developer.wildernesslabs.co
community.wildernesslabs.co
Demo
Connected Dehydrator
household mains electricity
PID controllers
LCD menu UI
web API
mobile app
Hacking Connected Appliances
Start building the hardware of tomorrow, today.
Enclosure
github.com/wildernesslabs/3D_Print_Designs
Netduino
Breadboard
Relay
Power Distribution
LCD + Rotary Encoder
Nugetized hardware
and peripheral
framework API
Power Control Household electricity (110V/240V) is
controlled by a relay.
Relays are electromechanical and isolate
circuits.
Controlled by a simple on/off via a digital
I/O pin.
Baseboard @ 3D_Print_Designs repo
OutputPort relay =
new OutputPort(Pins.GPIO_PIN_D2, false);
relay.Write(true);
var relay = new Relay(N.Pins.GPIO_PIN_D1);
relay.IsOn = true;
relay.Toggle()
Netduino.Foundation:
TextDisplayMenu
JSON-powered
Use with any LCD via Netduino.Foundation (GPIO,
I2C, Serial, SPI)
Navigate with IRotaryEncoder, or IButtons.
Editable Items.
Using
TextDisplayMenu
protected void InitializeMenu()
{
// initialize menu
_menu = new Menu(_display, _encoder,
Resources.GetBytes(Resources.BinaryResources.menu),
true);
_menu.ValueChanged += HandleMenuValueChange;
_menu.Selected += HandleMenuSelected;
_menu.Exited += (s, e) => {
this._inMenu = false;
this.DisplayInfoScreen();
};
_menu.UpdateItemValue("power", "Turn on");
}
protected void HandleMenuSelected(object sender,
MenuSelectedEventArgs e)
{
switch (e.Command)
{
case "power":
Debug.Print("menu power");
TogglePower();
break;
case "Exit":
this.DisplayInfoScreen();
break;
}
}
protected void HandleMenuValueChange(object sender,
ValueChangedEventArgs e)
{
switch (e.ItemID) {
case "temperature":
_targetTemp = (float)(double)e.Value; //smh
_dehydrator.TargetTemperature = _targetTemp;
break;
case "timer":
_runTime = (TimeSpan)e.Value;
break;
}
}
PID
Proportional, Integral, Derivative
StandardPIDController
IdealPIDController
Netduino.Foundation
PID Guide
PID in Action - Controller ctor
public DehydratorController (AnalogTemperature tempSensor, SoftPwm heater, Relay fan,
ITextDisplay display)
{
_tempSensor = tempSensor;
_heaterRelayPwm = heater;
_fanRelay = fan;
_display = display;
_pidController = new StandardPidController();
_pidController.ProportionalComponent = .5f; // proportional
_pidController.IntegralComponent = .55f; // integral time minutes
_pidController.DerivativeComponent = 0f; // derivative time in minutes
_pidController.OutputMin = 0.0f; // 0% power minimum
_pidController.OutputMax = 1.0f; // 100% power max
_pidController.OutputTuningInformation = false;
}
PID in Action - Temperature Thread
protected void StartRegulatingTemperatureThread()
{
_tempControlThread = new Thread(() => {
while (this._running) {
_pidController.ActualInput = _tempSensor.Temperature;
_pidController.TargetInput = this.TargetTemperature;
var powerLevel = _pidController.CalculateControlOutput();
this._heaterRelayPwm.DutyCycle = powerLevel;
// sleep for a while.
Thread.Sleep(_powerUpdateInterval);
}
});
_tempControlThread.Start();
}
Web Server
Purpose-built for Netduino.
Modern, RESTful Web API/
Built-in JSON Support.
Maple Web Server Host
public delegate void TurnOnHandler(int targetTemp);
public event TurnOnHandler TurnOn = delegate { };
public void postTurnOn() {
try {
int targetTemp = 0;
var prm = "targetTemp";
if (this.Body[prm] == null && this.Form[prm] == null && this.QueryString[prm] == null) {
StatusResponse(ContentTypes.Application_Text, 400, prm + " is required");
return;
}
try {
var temp = this.Body[prm] ?? this.Form[prm] ?? this.QueryString[prm];
targetTemp = int.Parse(temp.ToString());
} catch(Exception ex) {
StatusResponse(ContentTypes.Application_Text, 400, "Invalid " + prm + " value");
}
TurnOn(targetTemp);
StatusResponse(200);
} catch (Exception ex) {
StatusResponse(ContentTypes.Application_Text, 500, ex.Message);
}
}
get:/Status
post:/TurnOn
post:/TurnOff
Dehydrator App Solution Architecture
Main() launches App.
App instantiates peripherals
Features managed by
controllers.
Xamarin Mobile App
Xamarin.Forms + HttpClient
async private Task<bool> PowerCommand(string command) {
HttpClient client = new HttpClient();
client.BaseAddress = new Uri("http://" + _hostAddress + "/" + _apiBase);
var response = await client.PostAsync(command, null);
if (response.IsSuccessStatusCode) {
if (command == "turnon") {
App.ApplianceStatus = ApplianceStatus.On;
} else {
App.ApplianceStatus = ApplianceStatus.Off;
}
}
return response.IsSuccessStatusCode;
}
What future tech will you build?
Bay Area MakerFaire next week! May 18th-20th
Hardware Hackers Portland June (date TBD)
PADNUG July 3rd
Hardware Hackers July Roadshow (BC, Seattle, Portland, SF, LA,
Phoenix).
Upcoming Events
Thanks.
www.wildernesslabs.co
Code here
newsletter: bit.ly/2rBfP4Y
slideshare.net/bryancostanich
Github.com/WildernessLabs/Netduino_Samples/Netduino.Foundation/

More Related Content

Similar to Teardown Conference: hacking appliances with netduino + xamarin (20)

PDF
Residential and Official Extension of IOT Enabled Building Automation System
Associate Professor in VSB Coimbatore
 
PDF
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...
Year of the X
 
PPTX
Smart invocation.pptx
JagadeepVinay
 
PPTX
Smart invocation.pptx
JagadeepVinay
 
PPT
IoT with Arduino
Arvind Singh
 
PDF
IRJET- IoT based Industrial Automation
IRJET Journal
 
PPTX
2015 02 28 DotNetSpain IoT Fight
Bruno Capuano
 
PDF
IRJET- Power Monitoring with Time Controlling & Data Logging
IRJET Journal
 
PDF
IRJET- Multi Plug Control using Internet of Things
IRJET Journal
 
PPTX
SMART SIMINAR HALL.pptx
JagadeepVinay
 
PPTX
ESP32 IoT presentation @ dev.bg
Martin Harizanov
 
PDF
IOT Based Home Appliance Control System, Location Tracking and Energy Monitoring
rahulmonikasharma
 
PDF
Node MCU Fun
David Bosschaert
 
DOCX
Report Home automation using arduino
Ikram Arshad
 
PDF
Industrial Automation Monitor and Control using IoT
IRJET Journal
 
PPTX
Engineering Presentation for final years
KHALID078
 
PDF
IRJET- Voice-Activated Home Automation using NodeMCU
IRJET Journal
 
PDF
A Review on Smart Generator Control using Android Application
IRJET Journal
 
PDF
Home automation with javascript
Arnav Gupta
 
DOCX
11.arduino android bluetooth home control + app - hc-05 4 - ac light's 2 ...
svsembedded
 
Residential and Official Extension of IOT Enabled Building Automation System
Associate Professor in VSB Coimbatore
 
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...
Year of the X
 
Smart invocation.pptx
JagadeepVinay
 
Smart invocation.pptx
JagadeepVinay
 
IoT with Arduino
Arvind Singh
 
IRJET- IoT based Industrial Automation
IRJET Journal
 
2015 02 28 DotNetSpain IoT Fight
Bruno Capuano
 
IRJET- Power Monitoring with Time Controlling & Data Logging
IRJET Journal
 
IRJET- Multi Plug Control using Internet of Things
IRJET Journal
 
SMART SIMINAR HALL.pptx
JagadeepVinay
 
ESP32 IoT presentation @ dev.bg
Martin Harizanov
 
IOT Based Home Appliance Control System, Location Tracking and Energy Monitoring
rahulmonikasharma
 
Node MCU Fun
David Bosschaert
 
Report Home automation using arduino
Ikram Arshad
 
Industrial Automation Monitor and Control using IoT
IRJET Journal
 
Engineering Presentation for final years
KHALID078
 
IRJET- Voice-Activated Home Automation using NodeMCU
IRJET Journal
 
A Review on Smart Generator Control using Android Application
IRJET Journal
 
Home automation with javascript
Arnav Gupta
 
11.arduino android bluetooth home control + app - hc-05 4 - ac light's 2 ...
svsembedded
 

More from bryan costanich (7)

PPTX
Futures in Computing
bryan costanich
 
PPT
Advanced android app lifecycle + Patterns
bryan costanich
 
PPT
C# rocks
bryan costanich
 
PPT
Cross Platform Mobile Development with Xamarin
bryan costanich
 
KEY
Going mobile - A Technical Job Prep for Vassar Students
bryan costanich
 
PPT
Cross-Platform Mobile Development in Visual Studio
bryan costanich
 
KEY
Cross Platform Development with Xamarin
bryan costanich
 
Futures in Computing
bryan costanich
 
Advanced android app lifecycle + Patterns
bryan costanich
 
C# rocks
bryan costanich
 
Cross Platform Mobile Development with Xamarin
bryan costanich
 
Going mobile - A Technical Job Prep for Vassar Students
bryan costanich
 
Cross-Platform Mobile Development in Visual Studio
bryan costanich
 
Cross Platform Development with Xamarin
bryan costanich
 

Recently uploaded (20)

PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
July Patch Tuesday
Ivanti
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
July Patch Tuesday
Ivanti
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Python basic programing language for automation
DanialHabibi2
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 

Teardown Conference: hacking appliances with netduino + xamarin

  • 1. We Power Connected Things Hardware development at the speed of software. www.wildernesslabs.co slideshare.net/bryancostanich
  • 2. The Hardware Revolution, 10 years ago, the iPhone launched. Today, we have cars that drive themselves. 10 years from now, nearly every new device will be connected, and much of them will be automated. Consumers will demand sophisticated hardware. June Oven, Tovala, and other. 3 types of IoT: Consumer, Commercial, and Industrial GE predicts $60T in Industrial IoT alone in the next 15 years. a career opportunity. © 2018, Wilderness Labs, Inc.
  • 3. Future Tech Connected fridge of tomorrow: - Inventory + automated grocery ordering. - Meal & diet plan, recipe assistant. - User recognition, experience tailoring. - Allergy, food expiration, etc. warnings. - Integration with oven, microwave, etc. Winning Commercial & Industrial IoT devices will be just as sophisticated. © 2018, Wilderness Labs, Inc.
  • 4. Microcontrollers will make the revolution possible. Commodity chips. $2-$10 Low-energy, high-performance. General Purpose Input-Output (GPIO) Digital + Analog Built-in Protocol Support (SPI, I2C, Serial, CAN, and others) Analog-to-Digital (ADC) Converters Digital-to-Analog Converters Gateway Connectivity (BLE, WiFi, others) Real IoT is powered by microcontrollers (MCUs).
  • 5. Netduino = Arduino form factor running the .Net MicroFramework. Visual Studio (Windows + Mac) Debugging, events, etc. Building a vNext connected things platform. Prototype with Netduino. Go to market with Meadow. meadow © 2018, Wilderness Labs, Inc.
  • 8. household mains electricity PID controllers LCD menu UI web API mobile app Hacking Connected Appliances Start building the hardware of tomorrow, today.
  • 11. Power Control Household electricity (110V/240V) is controlled by a relay. Relays are electromechanical and isolate circuits. Controlled by a simple on/off via a digital I/O pin. Baseboard @ 3D_Print_Designs repo OutputPort relay = new OutputPort(Pins.GPIO_PIN_D2, false); relay.Write(true); var relay = new Relay(N.Pins.GPIO_PIN_D1); relay.IsOn = true; relay.Toggle() Netduino.Foundation:
  • 13. JSON-powered Use with any LCD via Netduino.Foundation (GPIO, I2C, Serial, SPI) Navigate with IRotaryEncoder, or IButtons. Editable Items. Using TextDisplayMenu protected void InitializeMenu() { // initialize menu _menu = new Menu(_display, _encoder, Resources.GetBytes(Resources.BinaryResources.menu), true); _menu.ValueChanged += HandleMenuValueChange; _menu.Selected += HandleMenuSelected; _menu.Exited += (s, e) => { this._inMenu = false; this.DisplayInfoScreen(); }; _menu.UpdateItemValue("power", "Turn on"); } protected void HandleMenuSelected(object sender, MenuSelectedEventArgs e) { switch (e.Command) { case "power": Debug.Print("menu power"); TogglePower(); break; case "Exit": this.DisplayInfoScreen(); break; } } protected void HandleMenuValueChange(object sender, ValueChangedEventArgs e) { switch (e.ItemID) { case "temperature": _targetTemp = (float)(double)e.Value; //smh _dehydrator.TargetTemperature = _targetTemp; break; case "timer": _runTime = (TimeSpan)e.Value; break; } }
  • 16. PID in Action - Controller ctor public DehydratorController (AnalogTemperature tempSensor, SoftPwm heater, Relay fan, ITextDisplay display) { _tempSensor = tempSensor; _heaterRelayPwm = heater; _fanRelay = fan; _display = display; _pidController = new StandardPidController(); _pidController.ProportionalComponent = .5f; // proportional _pidController.IntegralComponent = .55f; // integral time minutes _pidController.DerivativeComponent = 0f; // derivative time in minutes _pidController.OutputMin = 0.0f; // 0% power minimum _pidController.OutputMax = 1.0f; // 100% power max _pidController.OutputTuningInformation = false; }
  • 17. PID in Action - Temperature Thread protected void StartRegulatingTemperatureThread() { _tempControlThread = new Thread(() => { while (this._running) { _pidController.ActualInput = _tempSensor.Temperature; _pidController.TargetInput = this.TargetTemperature; var powerLevel = _pidController.CalculateControlOutput(); this._heaterRelayPwm.DutyCycle = powerLevel; // sleep for a while. Thread.Sleep(_powerUpdateInterval); } }); _tempControlThread.Start(); }
  • 18. Web Server Purpose-built for Netduino. Modern, RESTful Web API/ Built-in JSON Support.
  • 19. Maple Web Server Host public delegate void TurnOnHandler(int targetTemp); public event TurnOnHandler TurnOn = delegate { }; public void postTurnOn() { try { int targetTemp = 0; var prm = "targetTemp"; if (this.Body[prm] == null && this.Form[prm] == null && this.QueryString[prm] == null) { StatusResponse(ContentTypes.Application_Text, 400, prm + " is required"); return; } try { var temp = this.Body[prm] ?? this.Form[prm] ?? this.QueryString[prm]; targetTemp = int.Parse(temp.ToString()); } catch(Exception ex) { StatusResponse(ContentTypes.Application_Text, 400, "Invalid " + prm + " value"); } TurnOn(targetTemp); StatusResponse(200); } catch (Exception ex) { StatusResponse(ContentTypes.Application_Text, 500, ex.Message); } } get:/Status post:/TurnOn post:/TurnOff
  • 20. Dehydrator App Solution Architecture Main() launches App. App instantiates peripherals Features managed by controllers.
  • 21. Xamarin Mobile App Xamarin.Forms + HttpClient async private Task<bool> PowerCommand(string command) { HttpClient client = new HttpClient(); client.BaseAddress = new Uri("http://" + _hostAddress + "/" + _apiBase); var response = await client.PostAsync(command, null); if (response.IsSuccessStatusCode) { if (command == "turnon") { App.ApplianceStatus = ApplianceStatus.On; } else { App.ApplianceStatus = ApplianceStatus.Off; } } return response.IsSuccessStatusCode; }
  • 22. What future tech will you build?
  • 23. Bay Area MakerFaire next week! May 18th-20th Hardware Hackers Portland June (date TBD) PADNUG July 3rd Hardware Hackers July Roadshow (BC, Seattle, Portland, SF, LA, Phoenix). Upcoming Events