You are on page 1of 22

Electronics

ESP processors
Outline
About Espressif Systems

ESP8266 vs ESP32

Pinout

Shields

Setting up Arduino IDE

2
Espressif
The ESP8266 is made by a privately Chinese company called Espressif
Systems, a semiconductor company that just came out of nowhere and
shook up the whole industry.

In 2014, the Espressif Systems company launched the ESP8266, starting


with ESP-01, a small board at a very low cost.

ESP-01 came with a simple serial interface based on AT commands used in


modems. Because of its simplicity and price became very popular within
makers community using Arduino to extend Wi-Fi connectivity to Arduino ESP-01
Uno.

In 2015, Espressif released the API to be able to program their ESP8266


microcontroller.

3
Espressif
Also in 2015, a company-independent group of people develop a LUA
parser based on ESP8266 and their own board, known as NodeMCU.

Ivan Grokhotkov, adapt the API so it can be programmed with Arduino IDE
by developing the esptool. NodeMCU
(1st generation)
The API with libraries and tools is maintained by the community in GitHub:

https://github.com/esp8266/Arduino

4
Espressif
The ESP32 came out at the end of 2015 and overcomes ESP8266 limitations.

It is much faster. It has two cores and 520Kb RAM shared by the cores.

Wi-Fi encryption carried out by dedicated hardware. This extends the


possibility to use it for industrial and commercial uses.
ESP32-WROOM-32
Available API to program ESP32 with Arduino IDE in GitHub.

https://github.com/espressif/arduino-esp32

5
ESP-01
With up to 4 GPIO available (considering TX and RX).

Wi-Fi 802.11b/g/n

Includes 1Mb Flash (program memory)

AT-command interface: Wi-Fi management, such station mode, access


ESP-01 pinout
point, SSID, password, etc…

Can be used as a web-server, remotely control a device, etc.

We can upload our own firmware, but this procedure is complex and
requires a programmer. ESP-01
programmer

6
NodeMCU
1st generation came with a ESP-12 and 4Mb Flash memory.

2nd generation came with ESP-12E (improved version).

Currently the 3rd generation is being used. 1st and 2nd generations were
NodeMCU
considerably wider. Actually, officially there’s no 3rd generation. It is, (2nd generation)
simply a different version developed by Lolin/Wemos.

Similar alternatives: Wemos D1 R2, Wemos D1 mini, SparkFun ESP8266


Thing, Adafruit HUZZAH ESP8266 breakout, etc...
NodeMCU
(3rd generation)

Wemos D1 R2 Wemos D1 mini 7


SparkFun ESP8266 Adafruit HUZZAH
ESP8266 vs ESP32
Features ESP8266 ESP32
WiFi 802.11b/g/n 802.11b/g/n
Bluetooth - Bluetooth 4.2 & BLE
Clock 80Mhz 160Mhz
GPIO 17 36
PWM 8 channels 16 channels
ADC 1x10-bit 18x12-bit
SPI/I2C/UART 2/1/2 4/2/2
CAN, Ethernet, Touch, Temp,
Other features - Hall effect

8
NodeMCU v3 pinout

9
Wemos D1 R32 pinout
Wemos D1 R32 Arduino Uno
IO26 D2
IO25 D3
IO17 D4
IO16 D5
IO27 D6
IO14 D7
IO12 D8
IO13 D9
IO5 D10
IO23 D11
IO19 D12
IO18 D13
IO2 A0
IO4 A1
IO35 A2
IO34 A3
IO36 A4
Arduino Uno (Atmega328)
Wemos D1 R32 (based on ESP32) IO39 A5
1
0
NodeMCU v3 Shield

NodeMCU v3
Power pins: 3.3V, VUSB, VI Shield
Gnd: Ground pins
GPIO: D0-D8
Analog pin A0 (3.3V max)

1
1
Wemos D1 R2 with Shield

Wemos D1 R2

Power pins: 3.3V, VUSB, VI


Gnd: Ground pins
GPIO: D0-D8
Analog pin A0

Arduino Uno
Sensor Shield v5
1
2
Wemos D1 R32 with Shield

Wemos D1 R32

Power pins: 3.3V, VUSB, VI


Gnd: Ground pins
GPIO: D0-D8
Analog pin A0

Arduino Uno
Sensor Shield v5
1
3
Setting up Arduino IDE
1 Arduino IDE Preferences 2 In Tools access to the Boards Manager
Install the board esp32 by Espressif Systems and
Esp8266 by ESP8266 Community

3 Select Wemos LOLIN32 or NodeMCU 1.0


https://dl.espressif.com/dl/package_esp32_index.json
(ESP-12E Module)
http://arduino.esp8266.com/stable/package_esp8266com_index.json
1
4
NodeMCU(ESP8266)
 It is a low cost Wi-Fi microchip with full TCP/IP stack
 It’s a 32-bit microcontroller produced by Espressif Systems and
operates at 2.4GHz
NodeMCU(ESP8266) Operating modes

1. Station (STA) Mode


 In STA mode, ESP8266 acts as an end station just like our mobile
phone when it gets connected to a Wi-Fi network.
NodeMCU(ESP8266) Operating modes…

 Connecting ESP8266 to a Wi-Fi network

 WiFi.begin (ssid, password); //SSID – Service Set Identifier – Maximum length 32 characters
//Password – Minimum length 8 characters, maximum 64 characters

 wifiMulti.addAP ("access point 1", "password");


wifiMulti.addAP ("access point 2", " password");
wifiMulti.addAP ("access point 3", " password");

 Connecting ESP8266 to a Dynamic (wired) network

 WiFi.config (local_ip, gateway, subnet, dns1, dns2);


NodeMCU(ESP8266) Operating modes…
1. Access Point (AP) Mode
 In STA mode, ESP8266 acts as access point of the internet to which
other devices can be connected
NodeMCU(ESP8266) Operating modes…
 ESP8266 in AP mode

 WiFi.softAP (ssid, password);

 WiFi.mode(x); where x can be WIFI_AP, WIFI_STA, WIFI_AP_STA,


WIFI_OFF.

 The AP mode of ESP can be used as a range extender.

 At one time not more than five devices can access internet from one AP.
NodeMCU(ESP8266) Operating modes…
IoT Protocols
 An IoT protocol facilitates the movement of data between four different types of
connections:
(i) device to device
(ii) device to gateway
(iii) gateway to cloud
(iv) between clouds
 A device (intelligent) is a sensing system that measures the monitoring data.
 A gateway can be software or a physical device that acts as a bridge between the
cloud, the controller, and the sensor.
 A cloud is the platform for storing, processing, and forwarding (optional) the data
received from sensors through the gateway.
IoT Cloud Platforms
 List of open-source and licensed IoT cloud platforms

 A complete list of open-source and paid IoT clouds is beyond the scope of this
session

You might also like