3. Tentative Lesson Plan:
1. Introduction to IoT and Getting started with NodeMCU/ESP8266, Sensors, Actuators.
2. Creating the Workspace, Common Libraries, LED blink/fade code.
3. Creating an Access Point(connect to Wi-Fi) & Web Server(Create own Hotspot).
4. Controlling LEDs and Relays using Webpage.
5. Controlling LEDs and Relays using Blynk.
6. Sending Data to the Cloud. (Example: ThingSpeak)
7. To be decided
8. Mini Project: Example: COVID-19 Real-Time Data Tracker (India).
4. How does Internet work?
Youtube video> stored in Data center at Google> Transmit how? Satellites?
No! Because Satellite is ~35000 km above the earth's surface. 70000 km in total.
- Latency: Delay after which data transfer begins after the execution of an instruction.
Hence, this is unacceptable.
Done with a complicated network of optical fiber cables which forms an optical fiber network. Since light is the
fastest traveling form of energy. These cables are connected between the data centers and your device.
Your device i.e your phone can be connected to a router or wifi router.
But how is this done?
To understand this, let us learn about the concept of IP Address. It is a string of numbers which is used to identify
every device that is connected to the internet. It is similar to that of your home address. For example, every letter
addressed to you comes only to your home because of the address. You enter a domain name for example
facebook.com or youtube.com but from where does the internet get the IP Address from the domain name? DNS
Server. Your internet service provider or other organizations can manage the DNS Server.
5. Recap
Domain name in browser> Request to the DNS Server to get IP Address> forwards request to
data center more specifically to the respective server.
Once the server receives the request to access a particular website, the data flow starts in
digital format via optical fiber cables in the form of light pulses. These light pulses reach your
router and it converts them into electrical pulses which is transmitted by the ethernet cable and
if it reaches a phone tower, it gets converted into em waves which is captured by your phone.
This data is sent in the form of 0s and 1s and is divided into smaller chunks. If some packet is
missing, the device will send an acknowledgement that the packet is missing so that it can be
sent again. To manage this data flow, various protocols are implemented like HTTP, MQTT, RTP,
TCP/IP, etc.
6. What is a Microcontroller?
A microcontroller is a computer on a single chip that includes a processor core,
memory, and I/O peripherals, and it is typically used for a specific function in an
embedded system. For instance, you can use microcontrollers to operate sensors,
record data, control LEDs, communicate with other microcontrollers, and much
more. A microcontroller’s memory, I/O ports, and ROM/RAM are located within the
chip.
For example: A simple vending machine.
A microcontroller-based vending machine mainly consists of 3 parts, the first part
is coin/money insertion, second is coin/money detection that is basically
programming which is implemented through microcontroller and the last stage is
giving out the product according to the amount inserted.
10. What is ESP8266 and NodeMCU?
The ESP8266 is a low-cost Wi-Fi chip developed by Espressif Systems with TCP/IP protocol.
NodeMCU is a Firmware on ESP8266. Firmware is a software program or set of instructions
programmed on a hardware device. It's basically an SoC (System on Chip). A System on Chip
(SoC) is an integrated circuit that integrates all components of a computer or other electronic
systems.
13. Digital and Analog Signals
An analog signal is a continuous signal that represents physical measurements.
A digital signal is a signal that is being used to represent data as a sequence of discrete values.
Examples of analog signals are Human voice, Thermometer, Analog phones etc.
Examples of digital signals are Computers, Digital Phones, Digital pens, etc.
14. What are Sensors?
A sensor is a device that measures physical input from its environment and converts it into data that can be
interpreted by either a human or a machine.
Sensors modules have extra electronic circuitry along with sensor and are electronic devices that detect and
convert the physical signal to electrical signal.
Modules: Number of ports? Adjust sensitivity?
15. What are Actuators?
An actuator is a device that uses a form of power to convert a control signal into mechanical
motion. From electric door locks in automobiles, to ailerons on aircraft, buzzers, servo motors,
motors, etc actuators are all around us.
Example: DC Motors
For high current and voltage requirements a motor driver is used along with the NodeMCU to
drive the motors effectively.
17. Setting up the IDE:
Select your os properly and install the latest version of Arduino IDE.
https://www.arduino.cc/en/software
Install the current upstream Arduino IDE at the 1.8.9 level or later. The current version is on the
Arduino website.
Start Arduino and open the Preferences window.
Enter https://arduino.esp8266.com/stable/package_esp8266com_index.json into the
File>Preferences>Additional Boards Manager URLs field of the Arduino IDE. You can add multiple
URLs, separating them with commas.
Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to
select your ESP8266 board from Tools > Board menu after installation).