cover photo

COURSEWORK

Manish's IOT-001 course work. Lv 1

Manish K BAUTHORACTIVE
This Report is yet to be approved by a Coordinator.

IoT Level 1 Report

30 / 4 / 2022


Task 1: Getting Started with ESP32 About the task - This is a prerequisite task which will help us in upcoming tasks. - This task helps us learn the basics of interfacing the ESP32 microcontroller with the Arduino IDE. - This task will teach us to blink the onboard LED in the ESP32. Materials Used - ESP32 Module - USB cable - Arduino IDE What did I learn? - This task taught to me to setup an ESP32 board and Arduino IDE for coding the microcontroller. - Basic codes to implement simple tasks Project Video: https://drive.google.com/file/d/1lnC0yeOWhE7Cy8wQj9w_4HP5turpGIWz/view?usp=sharing Task 2: Connect the ESP32 to the internet. Build a simple clock which displays time on an OLED screen using NTP About the task - This task involves use of ESP32 to fetch time from internet using NTP (Network Time Protocol) and UDP (User Datagram Protocol) to fetch Time from the internet using Wi-Fi. - Network Time Protocol (NTP) is a networking protocol used for synchronization of time between systems and Data networks. About the code: - NTPClient.h library is used to connect with the time server. It takes time from a NTP server and keep it in sync. And Hhre WiFiUdp.h library is used to send and receive UDP messages. UDP is a protocol which sends and receive short messages from our system to NTP server. - timeClient.update() function takes updated time from NTP in the form of string and stores it in a variable. Then display it on OLED using display.println() function. - Complete code: https://circuitdigest.com/microcontroller-projects/esp32-internet-clock Materials Used: - ESP32 - 12864 OLED display - Breadboard - Jumper wires What did I learn? - I learnt how to use an OLED display with an ESP32 board. - Installing the required libraries for OLED display. - I tried displaying images and small animations on the OLED display. - Connect ESP32 to the internet and fetch the data from NTP. - Initially I faced difficulties in displaying the text in the correct position. - I learnt to change the display properties such as font and font size of the text on the OLED display. - I also did the LCD display task of the older course. Here I learnt to solder the header pins to the LCD display module and control contrast and other properties using a potentiometer. Project video: https://drive.google.com/file/d/1RKPPbmkH0Ar1Nth-zCfQruKHkhM1BMp7/view Task 3: Controlling ESP32 using Telegram bot. About the task - This task involves controlling GPIO Pins through Telegram Chat. - We will be controlling a LED with the Telegram bot, the LED is connected to the ESP32 board. - A bot will be created using Botfather which is a pre-built Telegram bot that lets us create, manage, and delete our bots. - To establish communication Telegram bot, Universal Telegram Bot Library is used. It is an Arduino IDE library for using Telegram Bot API. - Schematic Diagram: https://iotdesignpro.com/projects/telegram-bot-with-esp32-control-gpio-pins-through-telegram-chat. - After the completion of the task, a command /led_on turns on the led connected to the ESP32 board and /led_off turns it off. Material Requirements: ESP32 Development board What did I learn? - Initially it was difficult setting up the project. Sometimes it was the problem with the bot and sometimes it was problem with the code. - Just the wrong chat ID made the project not work. - After all was sorted the ESP32 responded to the Telegram messages(commands). Project Video: https://drive.google.com/file/d/1QzFdw_M7yOaJkaFZD2lZwuBWEZjLJpgU/view?usp=sharing Task 4: Use a web server to wirelessly control the direction and speed of a servo motor via the ESP32. About the task - Here we control the motion of the servo motor without using a potentiometer.We use a web server to control to the servo motor. - We will use built-in WiFi Library for connectivity, as well as the ESP32Servo library. - A HTML code will be needed to create the web interface. - We also add CSS, JavaScript and JQuery to this HTML code. - Materials required - ESP32 board - Servo motor - Jumper wires - Bread Board What did I learn? - Learnt to use and control servo motor - I had to learn some more web development concepts to create the slider for the servo. - Initially the servo did not respond to the slider, it stayed stationary. There were some problems in the connections. After correcting the corrections the servo responded. Project Video: https://drive.google.com/file/d/1SPumdiNYElPjxY8k2NXFZW_aonUE8KKV/view?usp=drivesdk Task 6: Interface a simple keypad with the ESP32. About the task - A keypad consists of group of buttons arranged in the form of a matrix. - 34 and 44 keypads are the commonly used configurations. - In this project 44 keypad is used. - It consists of numbers 0- , -D - Keypad library is needed to interact with the keypad. - The key pressed can be seen in the serial monitor. Materials required - ESP32 - Jumper wires - Keypad - What did I learn -I learnt to use keypad which can find its applications in making a password protected door lock, projects involving input from users etc. - I did not face any major challenges while making this project. Project Video: https://drive.google.com/file/d/1lnPVZA_SliMCAZzpIVvcUNOnrO4wigRt/view?usp=drivesdk Task 7:Obtain data from an ultrasonic sensor using the ESP32. About the task - This project uses a HC-SR04 sensor to measure the distance and display it in the serial monitor. - It has a range of 2cm-400cm with an accuracy of 0.3cm. - The ultrasound transmitter (trig pin) emits a high-frequency sound (40 kHz). - The sound travels through the air. If it finds an object, it bounces back to the module. - The ultrasound receiver (echo pin) receives the reflected sound (echo). - Taking into account the sound’s velocity in the air and the travel time (time passed since the transmission and reception of the signal) we can calculate the distance to an object. Materials required - HC-SR04 Ultrasonic Sensor - ESP32 - Breadboard - Jumper wires What did I learn - Use an ultrasonic sensor for measuring distance. - This finds its applications in obstacle avoiding robots, air drums etc. Project Video: https://drive.google.com/file/d/1Rnb2oavJBL_buYtoRSVB0Bs-WTtujQ0X/view?usp=drivesdk Task 8:Install the Raspbian operating system on the raspberry pi 3 About the task - The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor and uses a standard keyboard and mouse. - It can't be used for interacting with sensors, coding, IoT etc - In this task we will install Raspberry Pi OS using a Raspberry Pi Imager and a microSD card. - The OS needs to be installed into a microSD card using a computer, a microSD card reader, and the imager software. Materials required - Raspberry Pi - Computer with Raspberry Pi Imager - Micro HDMI cable What did I learn - Installation process was simple. - But despite installing the OS the display remained black. - I tried installing again but same problem - The following solution worked for me. https://learn.sparkfun.com/tutorials/setting-up-raspbian-and-doom/setup-raspbian#:~:text=If%2C%20after%20installing%20Raspbian%2C%20you pecific%20to%20the%20Raspbian%20install.&text=As%20soon%20as%20you%20se hift%20to%20enter%20recovery%20mode. Project Photos: https://drive.google.com/drive/folders/1lZ1EQNXS1ok0qrfn8VULbTApi8k5tsCw Task 9: Using Raspberry Pi to blink an LED About the task This task involves writing a python script that will make an LED blink. Materials required - Raspberry Pi 3 setup with monitor and USB Mouse & Keyboard - Breadboard - Jumper wires - Resistor - LED What did I learn - I learnt to use Raspberry Pi for coding. - Wrote a python code which interacts with the GPIO pins of the Raspberry Pi Project Video: https://drive.google.com/file/d/1lYg2EHYNIbXTZmXJmzzRdRTos1N-czlQ/view?usp=sharing

UVCE,
K. R Circle,
Bengaluru 01