NodeMCU Based Relay
NodeMCU Based Relay
Fault Detection
An IoT Project
WHAT WE WILL BE COVERING?
What is NodeMCU and Why do we use them?
Communication Protocols
Power: USB
Developer: ESP8266 Open source Community
Memory: 128kBytes
Storage: 4MBytes
CPU: ESP8266(LX106)
Introductory Price: Rs. 620/- (approx.)
Communication
Protocols
UART
I2C
SPI
01 02 03 04
Universal Bidirectional, Consist of two 3 ways to operate
Asynchronous asynchronous data lines, TX for Simplex,
Reception and (No Clock), and transmitting and Half-duplex,
Transmission. serial data RX for Full-duplex.
transmission. Receiving.
UART (continued)
Transmitting UART converts parallel
data from master device into serial data
to receiving UART.
Number of devices Up to 2 devices Up to 127, but gets complex Many, but gets complex
Number of wires 1 2 4
No. of masters and slaves Single to Single Multiple slaves and masters 1 master, multiple slaves
Pin
Configuration
Pin Category Name Description
Power Micro-USB, 3.3V, GND, Micro-USB: NodeMCU can be powered through the USB port
Vin
3.3V: Regulated 3.3V can be supplied to this pin to power the board
GND: Ground pins
Vin: External Power Supply
Control Pins EN, RST The pin and the button resets the microcontroller
GPIO Pins GPIO1 to GPIO16 NodeMCU has 16 general purpose input-output pins on its board
SPI Pins SD1, CMD, SD0, CLK NodeMCU has four pins available for SPI communication.
UART Pins TXD0, RXD0, TXD2, NodeMCU has two UART interfaces, UART0 (RXD0 & TXD0) and UART1
RXD2 (RXD1 & TXD1). UART1 is used to upload the firmware/program.
I2C Pins NodeMCU has I2C functionality support but due to the internal functionality of
these pins, you have to find which pin is I2C.
Programming Kit
Software to be used Hardware to be used