SlideShare a Scribd company logo
Mission possible:
DIY smart home
hub/controller
Martin Harizanov
Sofia, February 5th 2019
Agenda
● Agenda
● About me
● Goals
● Mission possible: DIY smart home
hub/controller
● Q/A
About
Martin Harizanov
Supervisor, Systems Engineering
Visteon
What problem does this project solve?
Gateway ActuatorsSensors
Cloud
Phone app
Control hub
● Home automation control without
internet connection
● Shared controls access
● Cost reduction by having control hubs
and ‘dumb’ sensors/actuators
Requirements
● Control hub that integrates with the existing home automation
● Works regardless of the internet connectivity
● Visual and acoustic feedback
● Easy to use
● Reliable
● Low cost
Analysis steps
Customer Requirements
System Architecture
System Requirements HW
architecture
SW
architecture
Software Design
Requirements
Software functional
requirements
Mechanical
Hardware
Requirements
Mechanical
Requirements
Non-Functional requirements
Architecture Hardware Software Mechanics Design/UX
Localization, easy initial
setup, wireless
Color TFT with touch,
dimming, ambient light
sensing; buttons
Precise touch
detection/calibration
Option to hang on wall,
magnetic attachment,
compact size
Graphical HMI with
touch, buttons;
Antialiased fonts;
Usability
Ease with which the user is able to learn, operate, prepare inputs and interpret outputs through
interaction with the system
Multi-language
Localization
(TZ, units)SmartConfig
AP web config
WiFi config GUI Touch
calibration GUI
Touch
calibration in
flash
GUI library
Configurable
“skins”
Non-Functional requirements
Architecture Hardware Software Mechanics Design/UX
Watchdog, OTA
recovery, safe mode,
degraded operation
mode, crash recovery,
task
isolation/prioritization
Thermal, EMI
consideration
Power management Durable moving parts
Reliability
Extent to which the system consistently performs the specified functions without failure
Non-Functional requirements
Architecture Hardware Software Mechanics Design/UX
TLS, RF encryption,
mutual authentication,
provisioning, access
PIN
Encryption chip Authentication on APIs,
DDoS rate limiter,
encrypted vFS, NVS
Reflashing port not
available without
product disassembly
Security
Extent to which the system is safeguarded against deliberate and intrusive faults from internal and
external sources
Non-Functional requirements
Architecture Hardware Software Mechanics Design/UX
Connections manager,
operational state
manager , fallback to
backup connection.
Revert to factory app
HW RTC to ensure time
availability regardless
of network availability,
RF control as
alternative to WiFi
Degraded (fail safe)
mode
Availability
Degree to which users can depend on the system to be up and able to function during normal operating
times
Non-Functional requirements
Architecture Hardware Software Mechanics Design/UX
Piezo buzzer for
acoustic feedback.
RGB LED for visual
feedback
Buttons easily
pressable
Large contrast icons,
color selection,
acoustic feedback,
visual feedback from
distance, lighting
sensing and brightness
adjustment
Accessibility
Extent to which the system can be used by people with the widest range of capabilities
..and more requirements
Non-functional
● Integrity
● Safety
● Environmental
● Flexibility
● Scalability
● Maintainability
● Performance
● Storage
● Regulatory
● .. and more
Functional
● Time & Date
● Temperature, Humidity, ambient light
● Configuration
● Connectivity management
● Diagnostics
● Security functions
● Power management
● Input devices
.. and more functional requirements
● Acoustic feedback
● Multi-language
● RF comms
● OTA
● Charts
● Thermostat
● HMI
● API
What is HMI?
Sensory stimuli
Visual/acoustic/
vibration etc
Controls
Responses (motor,
acoustic)
Machine
State
Human
Information
processing and
decision making
Human MachineInterface
System functions diagram
OTA
GUI
security
env. sensing
power
diagnostics
clock/date
communication
protocols
communications
operating state data storage
visual feedback
audio
display
in-dev
illumination
Internal data
localization
application logic
System function allocation diagram
System function block example
SWCs design
SW time & date
manager
Enabled, TZ, DST, TimeFormat
rtc_datetime
ntp_datetime
api_datetime
● Signals include STATE e.g. VALID, ERR,
TMO, SNA
● SWC has cycle time, this particular runs every
1000ms
set_TZ
set_DST
set_TimeFormat
timestamp
hour
minute
second
day
DOW
month
year
DST
TZ
timeFormat
ampmFlag
Layered Architecture
IO Peripherals Memories CoresWiFi basebandBT Baseband
FreeRTOS
Drivers Bootloader
Middleware
Application
Communication Protocol StacksGUISW
HW
Fact break
78,337 lines of code as of todayThis project has
Partitions
● Flash layout
○ NVS for factory and user apps
○ Factory + user apps
○ VFS (SPIFFS, FAT etc)
App NVS
Factory NVS
Factory App
User App 1
User App 2
VFS
Bootloader
User Application
Operational states
Fail safe
Init
Normal
Configuration
OTA
Power-save
Degraded
mode
Factory
app
Power management strategies
● Dynamic Frequency Shifting
● Modem light sleep
● Variable WiFi transmission power
● Screen dimming
● GUI refresh rate reducing
● Peripheral sleep mode, whenever possible
● Overall: interrupt driven functionality vs polling
As a result: power consumption is ~60mA while
maintaining WiFi connection and being fully operational
OTA strategies
● OTA over web portal
● OTA over HTTPs
● OTA over MQTTs
● Compressed image OTA
● OTA rollback
○ Image verification
○ Tracking restarts due to crash
● Queued OTA
● OTA resume
DMA SPI and double buffering to speed up GUI rendering
DMA SPI VB2
VB1 VB2 VB1
DMA SPI VB1 DMA SPI VB2
VB
2
DMA SPI VB1
VB1
30ms 30ms
SPI HW
CPU
30ms
Integrated Development Framework choice
● ESP-IDF using FreeRTOS
● Eclipse
● Github private repository
Fact break
7 months to developThis project took
Physical architecture
UController
TFT
ILI9341
Buttons
RF comms
RFM69
RGB LED
WS2812b
Temperature/
Humidity
HTU21D
Light sensor
LDR
FTDI
programming
interface
RTC
DS1338
Piezo Buzzer
WiFiBLE
1 PWM
1 RMT
SPI1 + CS + D/C
+ RST
1 UART
1 I2C
1 ADC
1 SPI2 + CS
2 GPIO+2 GPIO with ADC and
IRQ
Touch
4-wire resistive
4 GPIO
HW encryption
module
ATSHA204
Flash
Screen
dimming
1 PWM
● GPIO 10 total (2 for touch + 3 for
TFT CS, D/C and RST + 4 buttons +1
for RF CS)
● PWM 2 total (1 for piezo, 1 for screen
dimming)
● RMT 1 total (1 for LED)
● SPI 2 SPI interfaces or 5 pins (1 for
TFT CLK, MOSI only and 1 for RF
CLS, MOSI, MISO)
● I2C 1 total or 2 pins
● ADC 3 total (1 for LDR and 2 for
touch screen)
● UART - 1 total or 2 pins (RX/TX)
~23 GPIO pins needed
SoC choice
● ESP32 is dual core containing a Protocol CPU (known
as CPU 0 or PRO_CPU) and an Application CPU
(known as CPU 1 or APP_CPU). The two cores are
identical in practice and share the same memory. This
allows the two cores to run tasks interchangeably
between them.
HW design
HW prototypes
Final version … after six PCB revisions
Mechanics - 3D PCB model for enclosure design
Mechanics - 3D printable enclosure
Mechanics - 3D printable enclosure
HMI Use cases
Setup
WiFi
Calibrate
Touch
Dimming
setup
About
Time/date
settings
Units
setup
Language
select
OTA
Thermost
at
Provisioni
ng
Reset to
Factory
View
charts
Thermost
at
schedule
Sound
setup
Clock
Pairing
Menu structure
Settings
WiFi
Manual
Smartconfig
Web portal
Display
Brightness
Screensaver
Wifi
On/Off
Calibration
*Manual
*Auto
Localization
Language
Time & date
Units
Sound
About
FW update
LED
Charts
Thermost
at
Clock
Schedule
More
settings
RF Pairing
Reset
Menu design
Main menu
Item Item Item
Item Item Settings
Sub-menu
Back Item Item
Item ItemItem
Menu design
App
Back Next
Thermostat
Back
21.5*C
Manual
Boost
18.2*C
Off
Schedule
Menu design
WiFi settings
Back Next
List of networks
Select network
WiFi settings
Back Next
**********
Enter password
QWERTY keyboard
Challenges
● Driver conversion to FreeRTOS
● Temperature skew
● Enclosure design
● DMA, double video buffers
● Overall R&D process, as this is my first project using ESP32
Future plans
● Larger 3.5” TFT
● LoRa support
● No buttons, thin frame
● More powerful ESP32 package
with PSRAM support
● Improved firmware functions
Questions?

More Related Content

What's hot (20)

ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guide
handson28
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
Michal Sedlak
 
Distance measurement using Ultrasonic sensor on Arduino Uno
Distance measurement using Ultrasonic sensor on Arduino UnoDistance measurement using Ultrasonic sensor on Arduino Uno
Distance measurement using Ultrasonic sensor on Arduino Uno
Aswin KP
 
Electronics Notice Board Notice board using Wi-Fi Report
Electronics Notice Board Notice board using Wi-Fi ReportElectronics Notice Board Notice board using Wi-Fi Report
Electronics Notice Board Notice board using Wi-Fi Report
Vaibhav Pandey
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
Gaurav Verma
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Pantech ProLabs India Pvt Ltd
 
IoT with Arduino
IoT with ArduinoIoT with Arduino
IoT with Arduino
Arvind Singh
 
Introduction to Node MCU
Introduction to Node MCUIntroduction to Node MCU
Introduction to Node MCU
Amarjeetsingh Thakur
 
Introduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin Control
Pradip Bhandari
 
lesson2 - Nodemcu course - NodeMCU dev Board
 lesson2 - Nodemcu course - NodeMCU dev Board lesson2 - Nodemcu course - NodeMCU dev Board
lesson2 - Nodemcu course - NodeMCU dev Board
Elaf A.Saeed
 
axi protocol
axi protocolaxi protocol
axi protocol
Azad Mishra
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
roadster43
 
Unit v. HDL Synthesis Process
Unit v. HDL Synthesis ProcessUnit v. HDL Synthesis Process
Unit v. HDL Synthesis Process
Principal,Guru Nanak Institute of Technology, Nagpur
 
Interrupts in 8085
Interrupts in 8085Interrupts in 8085
Interrupts in 8085
Hetauda City College
 
What is Arduino ?
What is Arduino ?What is Arduino ?
What is Arduino ?
Niket Chandrawanshi
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
creatjet3d labs
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Richard Rixham
 
SPI Bus Protocol
SPI Bus ProtocolSPI Bus Protocol
SPI Bus Protocol
Sudhanshu Janwadkar
 
Bluetooth controlled robot
Bluetooth controlled robotBluetooth controlled robot
Bluetooth controlled robot
UVSofts Technologies
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
Eueung Mulyana
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guide
handson28
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
Michal Sedlak
 
Distance measurement using Ultrasonic sensor on Arduino Uno
Distance measurement using Ultrasonic sensor on Arduino UnoDistance measurement using Ultrasonic sensor on Arduino Uno
Distance measurement using Ultrasonic sensor on Arduino Uno
Aswin KP
 
Electronics Notice Board Notice board using Wi-Fi Report
Electronics Notice Board Notice board using Wi-Fi ReportElectronics Notice Board Notice board using Wi-Fi Report
Electronics Notice Board Notice board using Wi-Fi Report
Vaibhav Pandey
 
Introduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin Control
Pradip Bhandari
 
lesson2 - Nodemcu course - NodeMCU dev Board
 lesson2 - Nodemcu course - NodeMCU dev Board lesson2 - Nodemcu course - NodeMCU dev Board
lesson2 - Nodemcu course - NodeMCU dev Board
Elaf A.Saeed
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
roadster43
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Richard Rixham
 

Similar to ESP32 IoT presentation @ dev.bg (20)

System Level Solutions (SLS) Introduction
System Level Solutions (SLS) IntroductionSystem Level Solutions (SLS) Introduction
System Level Solutions (SLS) Introduction
Jigar Shah
 
NI Compact RIO Platform
NI Compact RIO PlatformNI Compact RIO Platform
NI Compact RIO Platform
jlai
 
Touchless Biometric Devices.pdf
Touchless Biometric Devices.pdfTouchless Biometric Devices.pdf
Touchless Biometric Devices.pdf
Tiptop Platform Pvt Ltd
 
Bio lynx - Biometric attendance machine
Bio lynx - Biometric attendance machineBio lynx - Biometric attendance machine
Bio lynx - Biometric attendance machine
Star Link Communication Pvt Ltd
 
Track rf link access control
Track rf link   access controlTrack rf link   access control
Track rf link access control
trfl
 
INTELLIGENT ACCESS CONTROL. TIME & ATTENDANCE SYSTEM
INTELLIGENT ACCESS CONTROL. TIME & ATTENDANCE SYSTEMINTELLIGENT ACCESS CONTROL. TIME & ATTENDANCE SYSTEM
INTELLIGENT ACCESS CONTROL. TIME & ATTENDANCE SYSTEM
wisdom0313
 
Micro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application DevelopmentMicro-controllers (PIC) based Application Development
Micro-controllers (PIC) based Application Development
Emertxe Information Technologies Pvt Ltd
 
Android at the Airport -- Mobile Tech Con 2014
Android at the Airport -- Mobile Tech Con 2014Android at the Airport -- Mobile Tech Con 2014
Android at the Airport -- Mobile Tech Con 2014
Sven Niedner
 
IoT and connected devices: an overview
IoT and connected devices: an overviewIoT and connected devices: an overview
IoT and connected devices: an overview
Pascal Bodin
 
Blaze embedded services presentation nov 2013
Blaze embedded services presentation nov 2013Blaze embedded services presentation nov 2013
Blaze embedded services presentation nov 2013
Blaze_Hyd
 
Fingerprintattendancesystem 131016052949-phpapp01
Fingerprintattendancesystem 131016052949-phpapp01Fingerprintattendancesystem 131016052949-phpapp01
Fingerprintattendancesystem 131016052949-phpapp01
Muhammad Tahir Mehmood
 
Embedded system design with microcontrollers in waayoo.com
Embedded system design with microcontrollers in waayoo.comEmbedded system design with microcontrollers in waayoo.com
Embedded system design with microcontrollers in waayoo.com
Praveen Pandey
 
Embedded system design with microcontrollers in waayoo.com
Embedded system design with microcontrollers in waayoo.comEmbedded system design with microcontrollers in waayoo.com
Embedded system design with microcontrollers in waayoo.com
Praveen Pandey
 
Aadhar enabled biometric attendance system
Aadhar enabled biometric attendance systemAadhar enabled biometric attendance system
Aadhar enabled biometric attendance system
rajesh tammisetti
 
Webinar: Future Sensor Shield e Renesas Synergy, Perfeita Sinergia para IOT
Webinar: Future Sensor Shield e Renesas Synergy, Perfeita Sinergia para IOTWebinar: Future Sensor Shield e Renesas Synergy, Perfeita Sinergia para IOT
Webinar: Future Sensor Shield e Renesas Synergy, Perfeita Sinergia para IOT
Embarcados
 
Bio stamp 2c_-_bst2c02
Bio stamp 2c_-_bst2c02Bio stamp 2c_-_bst2c02
Bio stamp 2c_-_bst2c02
Reslient Technologies
 
Biometric Access and Attendance Terminal
Biometric Access and Attendance TerminalBiometric Access and Attendance Terminal
Biometric Access and Attendance Terminal
smart-i Electronics Systems Pvt Ltd.
 
home autimation using GSM
home autimation using GSMhome autimation using GSM
home autimation using GSM
ramraj meena
 
Presentation file gta 2014 q4_en
Presentation file gta 2014 q4_enPresentation file gta 2014 q4_en
Presentation file gta 2014 q4_en
GTAdanielsu
 
Fingerprint Time Attendance Systems with SUPREMA Bio Entry Plus
Fingerprint Time Attendance Systems with SUPREMA Bio Entry PlusFingerprint Time Attendance Systems with SUPREMA Bio Entry Plus
Fingerprint Time Attendance Systems with SUPREMA Bio Entry Plus
Abdullah Al Masum
 
System Level Solutions (SLS) Introduction
System Level Solutions (SLS) IntroductionSystem Level Solutions (SLS) Introduction
System Level Solutions (SLS) Introduction
Jigar Shah
 
NI Compact RIO Platform
NI Compact RIO PlatformNI Compact RIO Platform
NI Compact RIO Platform
jlai
 
Track rf link access control
Track rf link   access controlTrack rf link   access control
Track rf link access control
trfl
 
INTELLIGENT ACCESS CONTROL. TIME & ATTENDANCE SYSTEM
INTELLIGENT ACCESS CONTROL. TIME & ATTENDANCE SYSTEMINTELLIGENT ACCESS CONTROL. TIME & ATTENDANCE SYSTEM
INTELLIGENT ACCESS CONTROL. TIME & ATTENDANCE SYSTEM
wisdom0313
 
Android at the Airport -- Mobile Tech Con 2014
Android at the Airport -- Mobile Tech Con 2014Android at the Airport -- Mobile Tech Con 2014
Android at the Airport -- Mobile Tech Con 2014
Sven Niedner
 
IoT and connected devices: an overview
IoT and connected devices: an overviewIoT and connected devices: an overview
IoT and connected devices: an overview
Pascal Bodin
 
Blaze embedded services presentation nov 2013
Blaze embedded services presentation nov 2013Blaze embedded services presentation nov 2013
Blaze embedded services presentation nov 2013
Blaze_Hyd
 
Fingerprintattendancesystem 131016052949-phpapp01
Fingerprintattendancesystem 131016052949-phpapp01Fingerprintattendancesystem 131016052949-phpapp01
Fingerprintattendancesystem 131016052949-phpapp01
Muhammad Tahir Mehmood
 
Embedded system design with microcontrollers in waayoo.com
Embedded system design with microcontrollers in waayoo.comEmbedded system design with microcontrollers in waayoo.com
Embedded system design with microcontrollers in waayoo.com
Praveen Pandey
 
Embedded system design with microcontrollers in waayoo.com
Embedded system design with microcontrollers in waayoo.comEmbedded system design with microcontrollers in waayoo.com
Embedded system design with microcontrollers in waayoo.com
Praveen Pandey
 
Aadhar enabled biometric attendance system
Aadhar enabled biometric attendance systemAadhar enabled biometric attendance system
Aadhar enabled biometric attendance system
rajesh tammisetti
 
Webinar: Future Sensor Shield e Renesas Synergy, Perfeita Sinergia para IOT
Webinar: Future Sensor Shield e Renesas Synergy, Perfeita Sinergia para IOTWebinar: Future Sensor Shield e Renesas Synergy, Perfeita Sinergia para IOT
Webinar: Future Sensor Shield e Renesas Synergy, Perfeita Sinergia para IOT
Embarcados
 
home autimation using GSM
home autimation using GSMhome autimation using GSM
home autimation using GSM
ramraj meena
 
Presentation file gta 2014 q4_en
Presentation file gta 2014 q4_enPresentation file gta 2014 q4_en
Presentation file gta 2014 q4_en
GTAdanielsu
 
Fingerprint Time Attendance Systems with SUPREMA Bio Entry Plus
Fingerprint Time Attendance Systems with SUPREMA Bio Entry PlusFingerprint Time Attendance Systems with SUPREMA Bio Entry Plus
Fingerprint Time Attendance Systems with SUPREMA Bio Entry Plus
Abdullah Al Masum
 
Ad

Recently uploaded (20)

Pruebas y Solucion de problemas empresariales en redes de Fibra Optica
Pruebas y Solucion de problemas empresariales en redes de Fibra OpticaPruebas y Solucion de problemas empresariales en redes de Fibra Optica
Pruebas y Solucion de problemas empresariales en redes de Fibra Optica
OmarAlfredoDelCastil
 
ACEP Magazine Fifth Edition on 5june2025
ACEP Magazine Fifth Edition on 5june2025ACEP Magazine Fifth Edition on 5june2025
ACEP Magazine Fifth Edition on 5june2025
Rahul
 
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
BeHappy728244
 
A Comprehensive Investigation into the Accuracy of Soft Computing Tools for D...
A Comprehensive Investigation into the Accuracy of Soft Computing Tools for D...A Comprehensive Investigation into the Accuracy of Soft Computing Tools for D...
A Comprehensive Investigation into the Accuracy of Soft Computing Tools for D...
Journal of Soft Computing in Civil Engineering
 
Principles of Building planning and its objectives.pptx
Principles of Building planning and its objectives.pptxPrinciples of Building planning and its objectives.pptx
Principles of Building planning and its objectives.pptx
PinkiDeb4
 
PREDICTION OF ROOM TEMPERATURE SIDEEFFECT DUE TOFAST DEMAND RESPONSEFOR BUILD...
PREDICTION OF ROOM TEMPERATURE SIDEEFFECT DUE TOFAST DEMAND RESPONSEFOR BUILD...PREDICTION OF ROOM TEMPERATURE SIDEEFFECT DUE TOFAST DEMAND RESPONSEFOR BUILD...
PREDICTION OF ROOM TEMPERATURE SIDEEFFECT DUE TOFAST DEMAND RESPONSEFOR BUILD...
ijccmsjournal
 
Irja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus - Beyond Pass and Fail - DevTalks.pdfIrja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus
 
Axial Capacity Estimation of FRP-strengthened Corroded Concrete Columns
Axial Capacity Estimation of FRP-strengthened Corroded Concrete ColumnsAxial Capacity Estimation of FRP-strengthened Corroded Concrete Columns
Axial Capacity Estimation of FRP-strengthened Corroded Concrete Columns
Journal of Soft Computing in Civil Engineering
 
IOt Based Research on Challenges and Future
IOt Based Research on Challenges and FutureIOt Based Research on Challenges and Future
IOt Based Research on Challenges and Future
SACHINSAHU821405
 
Class-Symbols for vessels ships shipyards.pdf
Class-Symbols for vessels ships shipyards.pdfClass-Symbols for vessels ships shipyards.pdf
Class-Symbols for vessels ships shipyards.pdf
takisvlastos
 
May 2025: Top 10 Cited Articles in Software Engineering & Applications Intern...
May 2025: Top 10 Cited Articles in Software Engineering & Applications Intern...May 2025: Top 10 Cited Articles in Software Engineering & Applications Intern...
May 2025: Top 10 Cited Articles in Software Engineering & Applications Intern...
sebastianku31
 
Research_Sensitization_&_Innovative_Project_Development.pptx
Research_Sensitization_&_Innovative_Project_Development.pptxResearch_Sensitization_&_Innovative_Project_Development.pptx
Research_Sensitization_&_Innovative_Project_Development.pptx
niranjancse
 
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghjfHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
yadavshivank2006
 
May 2025 - Top 10 Read Articles in Artificial Intelligence and Applications (...
May 2025 - Top 10 Read Articles in Artificial Intelligence and Applications (...May 2025 - Top 10 Read Articles in Artificial Intelligence and Applications (...
May 2025 - Top 10 Read Articles in Artificial Intelligence and Applications (...
gerogepatton
 
Software Developer Portfolio: Backend Architecture & Performance Optimization
Software Developer Portfolio: Backend Architecture & Performance OptimizationSoftware Developer Portfolio: Backend Architecture & Performance Optimization
Software Developer Portfolio: Backend Architecture & Performance Optimization
kiwoong (daniel) kim
 
Environmental Engineering Wastewater.pptx
Environmental Engineering Wastewater.pptxEnvironmental Engineering Wastewater.pptx
Environmental Engineering Wastewater.pptx
SheerazAhmed77
 
"The Enigmas of the Riemann Hypothesis" by Julio Chai
"The Enigmas of the Riemann Hypothesis" by Julio Chai"The Enigmas of the Riemann Hypothesis" by Julio Chai
"The Enigmas of the Riemann Hypothesis" by Julio Chai
Julio Chai
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Computer_vision-photometric_image_formation.pdf
Computer_vision-photometric_image_formation.pdfComputer_vision-photometric_image_formation.pdf
Computer_vision-photometric_image_formation.pdf
kumarprem6767merp
 
Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401
Unknown
 
Pruebas y Solucion de problemas empresariales en redes de Fibra Optica
Pruebas y Solucion de problemas empresariales en redes de Fibra OpticaPruebas y Solucion de problemas empresariales en redes de Fibra Optica
Pruebas y Solucion de problemas empresariales en redes de Fibra Optica
OmarAlfredoDelCastil
 
ACEP Magazine Fifth Edition on 5june2025
ACEP Magazine Fifth Edition on 5june2025ACEP Magazine Fifth Edition on 5june2025
ACEP Magazine Fifth Edition on 5june2025
Rahul
 
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
Direct Current circuitsDirect Current circuitsDirect Current circuitsDirect C...
BeHappy728244
 
Principles of Building planning and its objectives.pptx
Principles of Building planning and its objectives.pptxPrinciples of Building planning and its objectives.pptx
Principles of Building planning and its objectives.pptx
PinkiDeb4
 
PREDICTION OF ROOM TEMPERATURE SIDEEFFECT DUE TOFAST DEMAND RESPONSEFOR BUILD...
PREDICTION OF ROOM TEMPERATURE SIDEEFFECT DUE TOFAST DEMAND RESPONSEFOR BUILD...PREDICTION OF ROOM TEMPERATURE SIDEEFFECT DUE TOFAST DEMAND RESPONSEFOR BUILD...
PREDICTION OF ROOM TEMPERATURE SIDEEFFECT DUE TOFAST DEMAND RESPONSEFOR BUILD...
ijccmsjournal
 
Irja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus - Beyond Pass and Fail - DevTalks.pdfIrja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus - Beyond Pass and Fail - DevTalks.pdf
Irja Straus
 
IOt Based Research on Challenges and Future
IOt Based Research on Challenges and FutureIOt Based Research on Challenges and Future
IOt Based Research on Challenges and Future
SACHINSAHU821405
 
Class-Symbols for vessels ships shipyards.pdf
Class-Symbols for vessels ships shipyards.pdfClass-Symbols for vessels ships shipyards.pdf
Class-Symbols for vessels ships shipyards.pdf
takisvlastos
 
May 2025: Top 10 Cited Articles in Software Engineering & Applications Intern...
May 2025: Top 10 Cited Articles in Software Engineering & Applications Intern...May 2025: Top 10 Cited Articles in Software Engineering & Applications Intern...
May 2025: Top 10 Cited Articles in Software Engineering & Applications Intern...
sebastianku31
 
Research_Sensitization_&_Innovative_Project_Development.pptx
Research_Sensitization_&_Innovative_Project_Development.pptxResearch_Sensitization_&_Innovative_Project_Development.pptx
Research_Sensitization_&_Innovative_Project_Development.pptx
niranjancse
 
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghjfHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
fHUINhKG5lM1WBBk608.pptxfhjjhhjffhiuhhghj
yadavshivank2006
 
May 2025 - Top 10 Read Articles in Artificial Intelligence and Applications (...
May 2025 - Top 10 Read Articles in Artificial Intelligence and Applications (...May 2025 - Top 10 Read Articles in Artificial Intelligence and Applications (...
May 2025 - Top 10 Read Articles in Artificial Intelligence and Applications (...
gerogepatton
 
Software Developer Portfolio: Backend Architecture & Performance Optimization
Software Developer Portfolio: Backend Architecture & Performance OptimizationSoftware Developer Portfolio: Backend Architecture & Performance Optimization
Software Developer Portfolio: Backend Architecture & Performance Optimization
kiwoong (daniel) kim
 
Environmental Engineering Wastewater.pptx
Environmental Engineering Wastewater.pptxEnvironmental Engineering Wastewater.pptx
Environmental Engineering Wastewater.pptx
SheerazAhmed77
 
"The Enigmas of the Riemann Hypothesis" by Julio Chai
"The Enigmas of the Riemann Hypothesis" by Julio Chai"The Enigmas of the Riemann Hypothesis" by Julio Chai
"The Enigmas of the Riemann Hypothesis" by Julio Chai
Julio Chai
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Computer_vision-photometric_image_formation.pdf
Computer_vision-photometric_image_formation.pdfComputer_vision-photometric_image_formation.pdf
Computer_vision-photometric_image_formation.pdf
kumarprem6767merp
 
Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401Universal Human Values and professional ethics Quantum AKTU BVE401
Universal Human Values and professional ethics Quantum AKTU BVE401
Unknown
 
Ad

ESP32 IoT presentation @ dev.bg

  • 1. Mission possible: DIY smart home hub/controller Martin Harizanov Sofia, February 5th 2019
  • 2. Agenda ● Agenda ● About me ● Goals ● Mission possible: DIY smart home hub/controller ● Q/A
  • 4. What problem does this project solve? Gateway ActuatorsSensors Cloud Phone app Control hub ● Home automation control without internet connection ● Shared controls access ● Cost reduction by having control hubs and ‘dumb’ sensors/actuators
  • 5. Requirements ● Control hub that integrates with the existing home automation ● Works regardless of the internet connectivity ● Visual and acoustic feedback ● Easy to use ● Reliable ● Low cost
  • 6. Analysis steps Customer Requirements System Architecture System Requirements HW architecture SW architecture Software Design Requirements Software functional requirements Mechanical Hardware Requirements Mechanical Requirements
  • 7. Non-Functional requirements Architecture Hardware Software Mechanics Design/UX Localization, easy initial setup, wireless Color TFT with touch, dimming, ambient light sensing; buttons Precise touch detection/calibration Option to hang on wall, magnetic attachment, compact size Graphical HMI with touch, buttons; Antialiased fonts; Usability Ease with which the user is able to learn, operate, prepare inputs and interpret outputs through interaction with the system Multi-language Localization (TZ, units)SmartConfig AP web config WiFi config GUI Touch calibration GUI Touch calibration in flash GUI library Configurable “skins”
  • 8. Non-Functional requirements Architecture Hardware Software Mechanics Design/UX Watchdog, OTA recovery, safe mode, degraded operation mode, crash recovery, task isolation/prioritization Thermal, EMI consideration Power management Durable moving parts Reliability Extent to which the system consistently performs the specified functions without failure
  • 9. Non-Functional requirements Architecture Hardware Software Mechanics Design/UX TLS, RF encryption, mutual authentication, provisioning, access PIN Encryption chip Authentication on APIs, DDoS rate limiter, encrypted vFS, NVS Reflashing port not available without product disassembly Security Extent to which the system is safeguarded against deliberate and intrusive faults from internal and external sources
  • 10. Non-Functional requirements Architecture Hardware Software Mechanics Design/UX Connections manager, operational state manager , fallback to backup connection. Revert to factory app HW RTC to ensure time availability regardless of network availability, RF control as alternative to WiFi Degraded (fail safe) mode Availability Degree to which users can depend on the system to be up and able to function during normal operating times
  • 11. Non-Functional requirements Architecture Hardware Software Mechanics Design/UX Piezo buzzer for acoustic feedback. RGB LED for visual feedback Buttons easily pressable Large contrast icons, color selection, acoustic feedback, visual feedback from distance, lighting sensing and brightness adjustment Accessibility Extent to which the system can be used by people with the widest range of capabilities
  • 12. ..and more requirements Non-functional ● Integrity ● Safety ● Environmental ● Flexibility ● Scalability ● Maintainability ● Performance ● Storage ● Regulatory ● .. and more Functional ● Time & Date ● Temperature, Humidity, ambient light ● Configuration ● Connectivity management ● Diagnostics ● Security functions ● Power management ● Input devices .. and more functional requirements ● Acoustic feedback ● Multi-language ● RF comms ● OTA ● Charts ● Thermostat ● HMI ● API
  • 13. What is HMI? Sensory stimuli Visual/acoustic/ vibration etc Controls Responses (motor, acoustic) Machine State Human Information processing and decision making Human MachineInterface
  • 14. System functions diagram OTA GUI security env. sensing power diagnostics clock/date communication protocols communications operating state data storage visual feedback audio display in-dev illumination Internal data localization application logic
  • 17. SWCs design SW time & date manager Enabled, TZ, DST, TimeFormat rtc_datetime ntp_datetime api_datetime ● Signals include STATE e.g. VALID, ERR, TMO, SNA ● SWC has cycle time, this particular runs every 1000ms set_TZ set_DST set_TimeFormat timestamp hour minute second day DOW month year DST TZ timeFormat ampmFlag
  • 18. Layered Architecture IO Peripherals Memories CoresWiFi basebandBT Baseband FreeRTOS Drivers Bootloader Middleware Application Communication Protocol StacksGUISW HW
  • 19. Fact break 78,337 lines of code as of todayThis project has
  • 20. Partitions ● Flash layout ○ NVS for factory and user apps ○ Factory + user apps ○ VFS (SPIFFS, FAT etc) App NVS Factory NVS Factory App User App 1 User App 2 VFS Bootloader
  • 21. User Application Operational states Fail safe Init Normal Configuration OTA Power-save Degraded mode Factory app
  • 22. Power management strategies ● Dynamic Frequency Shifting ● Modem light sleep ● Variable WiFi transmission power ● Screen dimming ● GUI refresh rate reducing ● Peripheral sleep mode, whenever possible ● Overall: interrupt driven functionality vs polling As a result: power consumption is ~60mA while maintaining WiFi connection and being fully operational
  • 23. OTA strategies ● OTA over web portal ● OTA over HTTPs ● OTA over MQTTs ● Compressed image OTA ● OTA rollback ○ Image verification ○ Tracking restarts due to crash ● Queued OTA ● OTA resume
  • 24. DMA SPI and double buffering to speed up GUI rendering DMA SPI VB2 VB1 VB2 VB1 DMA SPI VB1 DMA SPI VB2 VB 2 DMA SPI VB1 VB1 30ms 30ms SPI HW CPU 30ms
  • 25. Integrated Development Framework choice ● ESP-IDF using FreeRTOS ● Eclipse ● Github private repository
  • 26. Fact break 7 months to developThis project took
  • 27. Physical architecture UController TFT ILI9341 Buttons RF comms RFM69 RGB LED WS2812b Temperature/ Humidity HTU21D Light sensor LDR FTDI programming interface RTC DS1338 Piezo Buzzer WiFiBLE 1 PWM 1 RMT SPI1 + CS + D/C + RST 1 UART 1 I2C 1 ADC 1 SPI2 + CS 2 GPIO+2 GPIO with ADC and IRQ Touch 4-wire resistive 4 GPIO HW encryption module ATSHA204 Flash Screen dimming 1 PWM ● GPIO 10 total (2 for touch + 3 for TFT CS, D/C and RST + 4 buttons +1 for RF CS) ● PWM 2 total (1 for piezo, 1 for screen dimming) ● RMT 1 total (1 for LED) ● SPI 2 SPI interfaces or 5 pins (1 for TFT CLK, MOSI only and 1 for RF CLS, MOSI, MISO) ● I2C 1 total or 2 pins ● ADC 3 total (1 for LDR and 2 for touch screen) ● UART - 1 total or 2 pins (RX/TX) ~23 GPIO pins needed
  • 28. SoC choice ● ESP32 is dual core containing a Protocol CPU (known as CPU 0 or PRO_CPU) and an Application CPU (known as CPU 1 or APP_CPU). The two cores are identical in practice and share the same memory. This allows the two cores to run tasks interchangeably between them.
  • 31. Final version … after six PCB revisions
  • 32. Mechanics - 3D PCB model for enclosure design
  • 33. Mechanics - 3D printable enclosure
  • 34. Mechanics - 3D printable enclosure
  • 36. Menu structure Settings WiFi Manual Smartconfig Web portal Display Brightness Screensaver Wifi On/Off Calibration *Manual *Auto Localization Language Time & date Units Sound About FW update LED Charts Thermost at Clock Schedule More settings RF Pairing Reset
  • 37. Menu design Main menu Item Item Item Item Item Settings Sub-menu Back Item Item Item ItemItem
  • 39. Menu design WiFi settings Back Next List of networks Select network WiFi settings Back Next ********** Enter password QWERTY keyboard
  • 40. Challenges ● Driver conversion to FreeRTOS ● Temperature skew ● Enclosure design ● DMA, double video buffers ● Overall R&D process, as this is my first project using ESP32
  • 41. Future plans ● Larger 3.5” TFT ● LoRa support ● No buttons, thin frame ● More powerful ESP32 package with PSRAM support ● Improved firmware functions

Editor's Notes

  • #5: No internet: No HVAC system control No hot water
  • #8: https://docs.google.com/spreadsheets/d/1qh0FFg8FVvWqPQiCQqMijkuaBa461PhQDRTuFa0cq0E/edit#gid=0
  • #14: Edge devices Actuators Relay Sensors
  • #15: Communications management Manages WiFi connectivity & related events Connection and reconnection (smart) WiFi scan functions Failover to alternative connection, then revert to primary SmartConfig & WPS Manages RF connections Manages incoming / outgoing message queues Manages UART connection Manages BLE connections Manages internal message queues Manages signal states e.g. VALID, TMO, ERR, SNA E2E protection Manages message queues rate limiters Power management Detects BOD conditions DFS - CPU clock speed management Monitors internal CPU temperature Sets WiFi transmission power levels Sets WiFi power saving modes Peripheral sleep Manages power-saving mode by monitoring interaction with system Security management Secure boot Firmware verification Certificate management Credentials management Operating state management Different system states based on predefined conditions (normal, degraded, power save, OTA, safe mode etc) Clock/Date management Provides reliable time & date information Illumination management Handles display and status LED brightness based on environmental and time factors OTA management Provides over the air updates functionality Data storage management Non-Volatile Storage (“key-value” storage with mirroring, CRC) RTC memory, survives restarts SPIFFS ESPFS SD card storage Input devices management Buttons manager (press, long press, double click and other combinations) Touch management (TS driver, touch calibration) Environmental sensing Ambient temperature Ambient humidity Ambient light Communication protocols management NTP client MQTT (s) HTTP server Websocket server Captive DNS HTTP(s) client mDNS Diagnostics Configuration API System state information Debug output redirection Debug verbosity GUI LittlevGL Display ILI9431 library Audio Buzzer driver Visual feedback WS2812b control Localization Translation strings Units Time zone
  • #16: https://docs.google.com/drawings/d/1OLnj0uhegQvToHiTKmKudzg55ssnaHQAPkx850cZKoQ/edit
  • #19: Peripherals ADC CAN DAC GPIO (including RTC low power I/O) I2C I2S LED Control MCPWM Pulse Counter Remote Control SDMMC Host SD SPI Host SDIO Slave Sigma-delta Modulation SPI Master SPI Slave Timer Touch Sensor UART