KEMBAR78
Electronics Microcontrollers for IoT applications | PPTX
Electronics
Microcontrollers for IoT Applications
Leopoldo Armesto
Senior Lecturer
Universitat Politècnica de València
1
Outline
Microcontroller
Signals
Memory
Architecture
Alternatives
Electronics for IoT
ESP Processors
Examples
2
Microcontroller signals
Digital vs. Analog: A digital signal varies between two possible states HIGH or LOW, while an
signal that can take any value within a range of voltages.
Digital Input: An external device controls the voltage and the microcontroller ‘monitor’ its
changes, so we can read it as HIGH or LOW.
Digital Output: The microcontroller can set a HIGH or LOW voltage.
Analog Input: An internal ADC converts the analog value into a decimal number (typically
discrete values with 10-bit to 16 bit resolution).
3
Microcontroller signals
PWM (Pulse modulated width): A periodic signal with variable HIGH/LOW times. Typically used
to control transistors, generate frequencies, etc... They can be seen as ‘analog’ signals for
components with slow dynamics, such as motors or analog filters.
Interrupts: Special signals that will interrupt the current program flow so that a higher priority
task can be executed.
External: External signals can generate an interrupt on specific pins.
Timers: Most microcontrollers include timers to measure time or to execute tasks
periodically.
4
Microcontroller signals
Bus signals: Used to transmit digital data between the microcontroller and another
external device.
UART: Serial communication with two lines (RX and TX) between two devices.
I2C: Serial communication with two lines (SDA and SCK). Master-slave
architecture.
SPI: Serial full-duplex communication with four lines (CLK, MOSI, MISO,SS).
Master-slave architecture.
5
Microcontroller memory
Programmemory(Flashmemory):
Where we store our code, non-volatile.
Large, compared to data memory, because is cheap.
Datamemory:
RAM (SRAM): Where we store variables that we use in our code. It is deleted on start-up (volatile).
Special Function Registers (SFR) are connected to specific peripherals such as de ADC or Timers.
ROM (EEPROM): Where we store long-term variables. Usually is even shorter than SRAM, because is expensive.
6
Microcontroller architecture
MCUClock
Program
Memory
Data Memory
GPIO
Bus Peripherals
Timers
Interrupts
ADC
7
Microcontroller alternatives
Microcontroller
• Simple to use
• Low consumption
Microprocessor
• OS
• Computational
Power
• Compatible with
many external
devices
DSP
• Similar to uC, but
specialized for
signal processing
• Requires
advanced
knowledge.
FPGA
• Very fast
• Need to think as a
circuit designer.
• Deployment is
much slower.
8
Arduino Uno WiFi Rev.2 Raspberry Pi 3B+ TI DSP Alhambra board
Electronics for IoT
Arduino Uno WiFi
• Easy to use.
• Expensive compared to other alternatives.
ESP8266
• Cheap
• Programmed with Arduino IDE
• WiFi
ESP32
• Cheap
• Programmed with Arduino IDE
• WiFi
• Faster than ESP8266
Raspberry Pi 3 B+
• More expensive than Raspberry Pi Zero W
• Ethernet connection.
• SC Card
• Camera
Raspberry Pi ZeroW
• Quite cheap.
• WiFi & Bluetooth.
• SD Card.
• Camera
9
ESP8266
ESP-01 :
Very-low cost Wi-Fi module
Can extend Wi-Fi capabilities of Arduino Uno (and similar) through UART connection.
4 GPIO available.
ESP-12E:
17 GPIO available (13 in NodeMCU)
1 analog input (0V~1.6V)
10
ESP-01
NodeMCU
ESP-12E
ESP8266MOD
Wemos D1 R2
A development board using ESP8266 compatible with Arduino Shields.
Characteristics:
WiFi 802.11
13 GPIO. 1 analog input (3.3V max).
4Mb Flash Memory
80Mhz/160Mhz clock speed
Micro USB (programming and serial communication).
Power jack, 9~24V. 11
Wemos D1 R2
ESP32
Wi-Fi & bluetooth (BLE)
32 GPIO available
18 Analog inputs channels (12 bits)
10 Touch inputs
2 DACs
4 SPI, 2 I2C and 3 UART interfaces
SD controller, Ethernet, CAN, IR, Motor PWM, LED PWM
12
ESP32-WROOM-32
Wemos D1 R32
A development board using ES32 compatible with Arduino Shields.
Characteristics:
WiFi 802.11
Bluetooth: v4.2 BR/EDR BLE
18 GPIO & 6analog input (3.3V max).
4Mb Flash Memory. 520KB RAM
240Mhz clock speed
Micro USB (programming and serial communication).13
Wemos D1 R32
Examples
Relay remote control using ESP-01
Requires an external USB-UART interface for programming
Ideal for simple home automation projects
14
Examples
Weather station:
Measures: Temperature & Humidity DHT11/22, Pressure, Altitude & Temperature BMP180, Light intensity LDR;
Rain value (Rain sensor).
IoT Cloud server for logging data.
15
Examples
Starter kit for IoT:
Basic I/O: 2 push buttons, 2 LEDs, 1 RGB LED, 1 Potentiometer
Sensors: Humidity & Temperature Sensor (DHT11), Analog Temperature Sensor (LM35), Light sensor (LDR)
IR communications
Buzzer.
OLED Screen: 128x64 pixels
16
Wemos D1 R32
Multi-sensor shield
OLED screen 128x64
Electronics
Microcontrollers for IoT Applications
Leopoldo Armesto
Senior Lecturer
Universitat Politècnica de València
17

Electronics Microcontrollers for IoT applications

  • 1.
    Electronics Microcontrollers for IoTApplications Leopoldo Armesto Senior Lecturer Universitat Politècnica de València 1
  • 2.
  • 3.
    Microcontroller signals Digital vs.Analog: A digital signal varies between two possible states HIGH or LOW, while an signal that can take any value within a range of voltages. Digital Input: An external device controls the voltage and the microcontroller ‘monitor’ its changes, so we can read it as HIGH or LOW. Digital Output: The microcontroller can set a HIGH or LOW voltage. Analog Input: An internal ADC converts the analog value into a decimal number (typically discrete values with 10-bit to 16 bit resolution). 3
  • 4.
    Microcontroller signals PWM (Pulsemodulated width): A periodic signal with variable HIGH/LOW times. Typically used to control transistors, generate frequencies, etc... They can be seen as ‘analog’ signals for components with slow dynamics, such as motors or analog filters. Interrupts: Special signals that will interrupt the current program flow so that a higher priority task can be executed. External: External signals can generate an interrupt on specific pins. Timers: Most microcontrollers include timers to measure time or to execute tasks periodically. 4
  • 5.
    Microcontroller signals Bus signals:Used to transmit digital data between the microcontroller and another external device. UART: Serial communication with two lines (RX and TX) between two devices. I2C: Serial communication with two lines (SDA and SCK). Master-slave architecture. SPI: Serial full-duplex communication with four lines (CLK, MOSI, MISO,SS). Master-slave architecture. 5
  • 6.
    Microcontroller memory Programmemory(Flashmemory): Where westore our code, non-volatile. Large, compared to data memory, because is cheap. Datamemory: RAM (SRAM): Where we store variables that we use in our code. It is deleted on start-up (volatile). Special Function Registers (SFR) are connected to specific peripherals such as de ADC or Timers. ROM (EEPROM): Where we store long-term variables. Usually is even shorter than SRAM, because is expensive. 6
  • 7.
  • 8.
    Microcontroller alternatives Microcontroller • Simpleto use • Low consumption Microprocessor • OS • Computational Power • Compatible with many external devices DSP • Similar to uC, but specialized for signal processing • Requires advanced knowledge. FPGA • Very fast • Need to think as a circuit designer. • Deployment is much slower. 8 Arduino Uno WiFi Rev.2 Raspberry Pi 3B+ TI DSP Alhambra board
  • 9.
    Electronics for IoT ArduinoUno WiFi • Easy to use. • Expensive compared to other alternatives. ESP8266 • Cheap • Programmed with Arduino IDE • WiFi ESP32 • Cheap • Programmed with Arduino IDE • WiFi • Faster than ESP8266 Raspberry Pi 3 B+ • More expensive than Raspberry Pi Zero W • Ethernet connection. • SC Card • Camera Raspberry Pi ZeroW • Quite cheap. • WiFi & Bluetooth. • SD Card. • Camera 9
  • 10.
    ESP8266 ESP-01 : Very-low costWi-Fi module Can extend Wi-Fi capabilities of Arduino Uno (and similar) through UART connection. 4 GPIO available. ESP-12E: 17 GPIO available (13 in NodeMCU) 1 analog input (0V~1.6V) 10 ESP-01 NodeMCU ESP-12E ESP8266MOD
  • 11.
    Wemos D1 R2 Adevelopment board using ESP8266 compatible with Arduino Shields. Characteristics: WiFi 802.11 13 GPIO. 1 analog input (3.3V max). 4Mb Flash Memory 80Mhz/160Mhz clock speed Micro USB (programming and serial communication). Power jack, 9~24V. 11 Wemos D1 R2
  • 12.
    ESP32 Wi-Fi & bluetooth(BLE) 32 GPIO available 18 Analog inputs channels (12 bits) 10 Touch inputs 2 DACs 4 SPI, 2 I2C and 3 UART interfaces SD controller, Ethernet, CAN, IR, Motor PWM, LED PWM 12 ESP32-WROOM-32
  • 13.
    Wemos D1 R32 Adevelopment board using ES32 compatible with Arduino Shields. Characteristics: WiFi 802.11 Bluetooth: v4.2 BR/EDR BLE 18 GPIO & 6analog input (3.3V max). 4Mb Flash Memory. 520KB RAM 240Mhz clock speed Micro USB (programming and serial communication).13 Wemos D1 R32
  • 14.
    Examples Relay remote controlusing ESP-01 Requires an external USB-UART interface for programming Ideal for simple home automation projects 14
  • 15.
    Examples Weather station: Measures: Temperature& Humidity DHT11/22, Pressure, Altitude & Temperature BMP180, Light intensity LDR; Rain value (Rain sensor). IoT Cloud server for logging data. 15
  • 16.
    Examples Starter kit forIoT: Basic I/O: 2 push buttons, 2 LEDs, 1 RGB LED, 1 Potentiometer Sensors: Humidity & Temperature Sensor (DHT11), Analog Temperature Sensor (LM35), Light sensor (LDR) IR communications Buzzer. OLED Screen: 128x64 pixels 16 Wemos D1 R32 Multi-sensor shield OLED screen 128x64
  • 17.
    Electronics Microcontrollers for IoTApplications Leopoldo Armesto Senior Lecturer Universitat Politècnica de València 17