Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
97 views76 pages

Traning Report 10

Uploaded by

varadkamble1111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views76 pages

Traning Report 10

Uploaded by

varadkamble1111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

SANJAY GHODAWAT INSTITUTE

MAHARASHTRA STATE BOARD OF TECHNICAL


EDUCATION, MUMBAI

AN

INDUSTRIAL TRAINING REPORT

SUBMITTED BY –

Mr. Bhimprajyot Arun Kamble

ORGANISED BY

EMBEETEK SOLUTIONS

DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION


ENGINEERING

SANJAY GHODAWAT INSTITUTE (POLYTECHNIC)

ATIGRE

ACADEMIC YEAR: 2024-25

1
SANJAY GHODAWAT INSTITUTE

CErTIfICaTE
This is to certify that the Industrial training of six weeks has been
Successfully completed by
Mr. Bhimprajyot Arun Kamble

In the partial fulfilment of the Diploma in Electronics and


Telecommunication Engineering Maharashtra State Board of Technical
Education during the academic year 2024-25 under the guidance of

Mr.D.V. Kamble Ms. R. M. Mulla


Industrial Training Mentor H.O.D

Dr. V. V. Giri
Principal

DEPARTMENT OF ELECTRONICS & TELECOMMUNICATION


ENGINEERING
SANJAY GHODAWAT INSTITUTE (POLYTECHNIC) ATIGRE
ACADEMIC YEAR 2024-25

2
SANJAY GHODAWAT INSTITUTE

SUMMER INTERNSHIP REPORT AT

EMBEETEK SOLUTIONS

Submitted in partial fulfilment of the requirement for the award


of Diploma in
Electronics And Tele-Communication
13th July 2024 - 12th AUGUST 2025

SUBMITTED BY -
Name: BHIMPRAJYOT ARUN KAMBLE
Enrolment no: 2216440137
Seat no: 274738
SUBMITTED TO
Department of
Electronics & Tele-Communication Engineering.
Sanjay Ghodawat Institute, Atigre

3
SANJAY GHODAWAT INSTITUTE

CONTENTS

➢ MSBTE Certificate
➢ Internship Certificate
➢ Acknowledgement
➢ Company profile
➢ About The Organization
➢ Week wise index
➢ Week wise summary
➢ Conclusion
➢ Reference

4
SANJAY GHODAWAT INSTITUTE

MaharaShTra STaTE BOard Of TEChNICaL


EdUCaTION,
MUMBaI

CErTIfICaTE

This is to certify that Mr. Bhimprajyot Arun Kamble with Enrolment No.
2216440246 has successfully completed Industrial Training (22049) in
EMBEETEK SOLUTIONS from 13th July 2020 to 12th August 2020 for
partial fulfilment towards completion of Diploma in electronics And Tele-
Communication from Sanjay Ghodawat Institute, Atigre

External Examiner Name of the Mentor

(Head of Department) Mr. V. V. Giri


(Principal)

5
SANJAY GHODAWAT INSTITUTE

CErTIfICaTE

6
SANJAY GHODAWAT INSTITUTE

ACKNOWLEDGEMENT

I would like to express my truthful gratitude for providing me all the


required valuable suggestions with It is my pleasure to be indebted to various
people, who directly or indirectly contributed in the development of this work
and who influenced my thinking, behaviour, and acts during the course of study.
I express my sincere gratitude to (Rohan Chandrakant Suryawanshi),
& his team for providing me an opportunity to undergo summer training
I am thankful to Dr.V.V. Giri, Principal, Sanjay Ghodawat Institute and
Ms. R. M. Mulla, HOD Electronics and tele-communication department for all
the support rendered to me during the entire internship.
I also extend my sincere appreciation to (Mr. P. B. Chavan), Faculty
mentor who consistently provide me all the required valuable suggestions with
his precious time in accomplishing my training.
Lastly, I would like to thank the almighty God and my parents for their
moral support and my friends with whom I shared my day-to-day experience and
received lots of suggestions that improved my quality of work.

7
SANJAY GHODAWAT INSTITUTE

COMPANY PROFILE

Introduction to EMBEETEK SOLUTIONS


Company Name: EMBEETEK SOLUTIONS
Founder: Rhan Chandrakant Suryawanshi
Date of Incorporation: 24th August 2023
Business Focus: Research and Development in Electronics, providing solutions
to other Electronics Companies
COMPANY PICTURES:

8
SANJAY GHODAWAT INSTITUTE

ABOUT THE ORGANIZATION

Organization Structure of EMBEETEK SOLUTIONS

1. Founder:- Rohan Chandrakant Suryawanshi


2. Departments:
➢ Research and Development (R&D):
✓ Responsible for developing innovative electronics solutions
including:
✓ Auto switches for motor protection
✓ Digital voltmeter and ammeter (1 phase and 3 phase)
✓ SMPS (Switched-Mode Power Supply)
✓ Battery chargers

➢ Sales and Marketing:


✓ Promoting developed products and R&D services to electronics
companies

➢ Operations:
✓ Ensuring smooth functioning of R&D processes and product
development

➢ Finance:
✓ Managing financial aspects including budgeting and financial
planning

➢ Human Resources (HR):


✓ Handling recruitment, training, and employee relations

9
SANJAY GHODAWAT INSTITUTE

3. Product and Service Offerings:


➢ Products:
✓ Auto switches for motor protection devices
✓ Digital voltmeter and ammeter (1 phase and 3 phase)
✓ SMPS (Switched-Mode Power Supply)
✓ Battery chargers

➢ Services:
✓ Research and Development (R&D) services for electronics products
companies
✓ Customized electronics solutions development

4. Vision and Mission:


✓ To be a leading provider of innovative electronics solutions through
continuous R&D and technological advancement.
✓ Mission to collaborate with electronics industry leaders to enhance
product efficiency and reliability.

5. Core Values:
✓ Innovation
✓ Quality
✓ Customer-Centric Approach
✓ Integrity and Transparency

6. Future Goals:
✓ Expand product offerings in the electronics sector.
✓ Strengthen partnerships with electronics products companies
globally.
✓ Foster a culture of innovation and excellence within the
organization.

10
SANJAY GHODAWAT INSTITUTE

Week 1: From 5th June 2024 to 9th June 2024

DAILY ACTIVITY
DAY DATE ACTICITIES CARRIED OUT TEST MARKS
OUT OF ( 10 )

We learn what is active passive


1 5/6/2024 components and how it works with
symbol.

Introduction about circuit using IC


LM 358 Relation about current,
2 6/6/2024
voltage, resistance and series
circuit.

Information of Socket, Switch


3 7/6/2024 connection and we learn how to use
IC Regulator in circuit.

Build and test application-based


4 8/6/2024 connection circuit on bread board
using LDR, Relay, Capacitor.

Build circuit using IC LM 358,


Relay and LDR to glow led bulb on
5 9/6/2024
PCB with proper soldering
guidance.

6 10/6/2024 Holiday -

Signature of student Signature of industrial supervisor

11
SANJAY GHODAWAT INSTITUTE

Week 2: From 12th June 2024 to 17th June 2024

DAILY ACTIVITY
DAY DATE ACTIVITIES CARRIED OUT TEST MARK OUT
OF ( 10 )

Introduction of Arduino and tools:


over view of Arduino platform,
1 12/6/2024
Introduction of microcontroller,
understanding the Arduino.

Basic of Arduino programming,


2 13/6/2024 Arduino pre-defined functions:
void setup (), void loop ( ).

Programme of LED ON and OFF,


interfacing LED’s with Arduino
3 14/6/2024
and steps how to connect Arduino
board.

We perform LED ON and OFF,


interfacing LED’s using LDR we
4 15/6/2024
study control structure, if else, for
loop, etc.

5 16/6/2024 Holiday -

6 17/6/2024 Holiday -

Signature of student Signature of industrial supervisor

12
SANJAY GHODAWAT INSTITUTE

Week 3: From 19th June 2024 to 24th June 2024

DAILY ACTIVITY
DAY DATE ACTIVITIES CARRIED OUT TEST MARK OUT
OF ( 10 )

Learned while and for loops and


1 19/6/2024 also performed programme using
all control structures.

Learned theory using DHT 11


sensor and performed related to
2 20/6/2024
it and theory about UART
communication photocall’s.

Performed program using IR


3 21/6/2024 sensor and Ultrasonic sensor
with IF and while statement.

Learned theory about servo


4 22/6/2024 motor and performed
programme related to it.

Introduce to IR sensor and


performed programme of
5 23/6/2024
distance measurement using
Arduino and ultrasonic sensor.

Holiday
6 24/6/2024 -

Signature of student Signature of industrial supervisor

13
SANJAY GHODAWAT INSTITUTE

Week 4: From 26th June 2024 to 1ST July 2024

DAILY ACTIVITY
DAY DATE ACTIVITIES CARRIED OUT TEST MARKS OUT
OF ( 10 )

Interfacing of 16*2 LED display


module with Arduino and
1 26/6/2024
performed programme to display
“welcome”.

Interfacing of LCD display and


DHT 11 sensor with Arduino and
2 27/6/2024 programme to measure and
display the temperature,
humidity.

We performed the programme


for Ultrasonics sensor to measure
3 28/6/2024
and to display the distance on the
serial monitor.

Numerical based on voltage


divider and input or output
4 29/6/2024
waveform active passive
components.

5 30/6/2024 Test

Holiday
6 1/7/2024 -

Signature of student Signature of industrial supervisor

14
SANJAY GHODAWAT INSTITUTE

Week 5: From 3rd July 2024 to 8th July 2024

DAILY ACTIVITY
DAY DATE ACTIVITIES CARRIED OUT TEST MARKS OUT
OF ( 10 )

Introduction Of IOT, Esp 8266,


1 3/7/2024 Learn about cloud network,
service, client.

Programme on LED control


2 4/7/2024
using Adafruit IO service.

Programme of home automation


3 5/7/2024 using sinric pro light control
using Alexa and Google home.

Programme of 5 LED control


using Adafruit programme of
4 6/7/2024
analogy read serial control using
potentiometer.

Programme of temperature and


humidity using DHT 11 sensor
5 7/7/2024
and output display on Google
sheet.

Holiday
6 8/7/2024

Signature of student Signature of industrial supervisor

15
SANJAY GHODAWAT INSTITUTE

Week 6: From 10th July 2024 to 15th July 2024

DAILY ACTIVITY
DAY DATE ACTIVITIES CARRIED OUT TEST MARKS OUT
OF ( 10 )

Revision on basic electronic,


active passive component, Basic
1 10/7/2024
circuit of electronic application
based project

Revision on Arduino basic,


2 11/7/2024 Arduino programming basic,
LED’s interfacing with Arduino.

Revision on Fundamentals of
3 12/7/2024 IOT, IOT protocols and 3rd party
dashboards

4 13/7/2024 TEST

5 14/7/2024 TEST

Holiday
6 15/7/2024 -

Signature of student Signature of industrial supervisor

16
SANJAY GHODAWAT INSTITUTE

SUMMERY
Week 1st:
Introduction to Passive & Active Components
1. Passive Components:
Resistors: A Resistor is A passive electrical component with two terminals that
are used to limit or regulate the flow of electric current in electrical circuits. The
main purpose of a resistor is to reduce the current flow and to lower the voltage
in any particular portion of the circuit. It is made of copper wires coiled around
a ceramic rod and the outer part of the resistor is coated with an insulating paint.

Capacitors: Capacitors store and release electrical energy. They are used for
various purposes such as filtering, timing, smoothing voltage fluctuations, and
coupling signals between different parts of a circuit.

Inductors: Inductors store energy in a magnetic field when current flows through
them. They are used in applications such as filtering, energy storage, and
inductive coupling.

17
SANJAY GHODAWAT INSTITUTE

Transformers: Transformers consist of two or more coils of wire wrapped


around a core. They are used to step up or step-down voltage levels in AC circuits,
as well as for isolation and impedance matching

2. Active Components:
Transistors: Transistors are semiconductor devices that can amplify or switch
electronic signals. They are the building blocks of modern electronic circuits
and are used in a wide range of applications including amplifiers, switches, and
digital logic circuits.

Voltage Regulators- Voltage regulators maintain a constant output voltage


despite variations in input voltage or load conditions. They are crucial in power
supply systems to ensure the stable operation of electronic devices

18
SANJAY GHODAWAT INSTITUTE

Diodes: Diodes allow current to flow in one direction while blocking it in the
opposite direction. They are commonly used for rectification (converting AC to
DC), voltage regulation, and signal modulation

Operational Amplifiers (Op-amps): Op-amps are high-gain voltage


amplifiers with differential inputs. They are widely used in Analog electronics
for tasks such as signal conditioning, filtering, and Signal Amplification
operations.

➢ Some Active & Passive Components with Symbol

19
SANJAY GHODAWAT INSTITUTE

Introduction to Current, Voltage & Resistance


1. Current (I):
Current is the flow of Electrons through a conductor per unit of time. It is
typically denoted by the symbol "I" and measured in amperes (A). Here are
some key points about the current:
✓ Definition: Current represents the rate of flow of electric charge. It is the
amount of charge passing through a given point in a circuit per unit of
time.
✓ Symbol: I
✓ Unit: Ampere (A)
✓ Current Sources: A current source provides a constant flow of current in
a circuit, regardless of the voltage across it.
✓ Visualising Electric Current:
To gain a deeper understanding of what an electric current is and how it behaves
in a conductor, we can use the water pipe analogy of electricity. Certainly, there
are some limitations but they serve as a very basic illustration of current and
current flow.

We can compare the electric current to the water flowing through the pipe. When
pressure is applied to one end of the pipe, the water is forced to flow through the
pipe in one direction. The amount of water flow is proportional to the pressure
placed on the end. This pressure can be compared to the electromotive force.

20
SANJAY GHODAWAT INSTITUTE

2. Voltage (V):
✓ Voltage known as electric potential difference is the measure of electrical
potential energy per unit charge between two points in a circuit. It is
typically denoted by the symbol "V" and measured in volts (V). Here are
some key points about voltage:
✓ Definition: Voltage represents the energy required to move an electric
charge between two points. It is analogous to pressure in a fluid system or
height in a gravitational field.
✓ Symbol: V
✓ Unit: Volt (V)
✓ Voltage Source: A voltage source, such as a battery or power supply,
provides a constant voltage difference between its terminals. This voltage
drives the flow of electric current in a circuit.
Resistance and Ohm's Law:
✓ Resistance: Resistance is a measure of the opposition that a material
offers to the flow of electric current. It is a fundamental property of
electrical components and circuits, influencing how much current will
flow for a given voltage. This phenomenon of opposing the flow of
electrons is known as Resistance(R). Its SI unit is the ohm(Ω)
Factors affecting the resistance

✓ Resistance R of a conductor is directly proportional to the length of the


conductor
✓ formula of resistance.
✓ The formula for resistance (R) is given by Ohm’s law, which states that
resistance is equal to the voltage (V) across a conductor divided by the current
(I) flowing through it
R= V/I
where:
“R” is the resistance in ohms (Ω), “V” is the voltage in volts (V),
“I” is the current in amperes (A).

21
SANJAY GHODAWAT INSTITUTE

➢ resistivity in Ohm’s law:

Ohm's Law provides a mathematical relationship between voltage (V), current


(I), and resistance (R):
In Ohm’s law, resistivity represents the intrinsic resistance of a material,
influencing the overall resistance (R) based on its dimensions and conductivity.
➢ Factors Affecting Resistance.
-Material: Different materials have different inherent resistivities. Conductors
(e.g., copper, aluminium) have low resistivities, while insulators (e.g., rubber,
glass) have high resistivities.
✓ Length: Resistance increases with the length of the conductor. The longer
the conductor, the greater the resistance.
✓ Cross-Sectional Area: Resistance decreases with an increase in the cross-
sectional area of the conductor. A thicker conductor has less resistance.
✓ Temperature: For most conductive materials, resistance increases with
temperature In some materials, such as semiconductors, resistance can
decrease with increasing temperature.
✓ Resistors in Circuits
✓ Resistors are components specifically designed to provide precise
resistance in electrical circuits.
They are used to control current flow, divide voltages, and protect sensitive
components from excessive current.

22
SANJAY GHODAWAT INSTITUTE

➢ Resistance
✓ Whenever individual resistances are connected in series, they have the
same effect as one large combined resistance. Since there is only one path
for current flow in a series circuit, and since each of the resistors is in line
to act as an opposition to this current flow, the overall resistance is the
combined opposition of all the in-line resistors.
✓ The total resistance of a series circuit is equal to the sum of all the
individual resistances in the circuit.
✓ Rt = R1 + R2 + R3…
✓ Using this formula, you find that the total resistance of the circuit is:
✓ RT = 15 Ω + 5 Ω + 20 Ω = 40 Ω

➢ Current
o Since there is only one path for electron flow in a series circuit, the
current is the same magnitude at any point in the circuit.
o The total current in a series circuit is the same as the current
through any resistance of the circuit.
o IT = I1 = I2 = I3…
o Given 120 V as the total voltage, and having determined the total
resistance of the circuit as 40 Ω, you can now apply Ohm law to
determine the total current in this circuit:
o IT = 120 V/ 40 Ω = 3 A
o This total circuit current would remain the same through all the
individual circuit resistors.

23
SANJAY GHODAWAT INSTITUTE

➢ Voltage

➢ Before any current will flow through a resistance, a potential difference,


or voltage, must be available. When resistors are connected in series, they
must “share” the total voltage of the source.
➢ The total voltage in a series circuit is equal to the sum of all the
individual voltage drops in the circuit.
➢ As current passes through each resistor in a series circuit, it establishes a
difference in potential across each individual resistance. This is
commonly called voltage drop, and its magnitude is in direct proportion
to the value of resistance. The greater the value of resistance, the higher
the voltage drop across that resistor.
ET = E1 + E2 + E3…

Using Ohm's law you can determine the voltage across each resistor.
3 A × 15 Ω = 45 V
3 A × 5 Ω = 15 V
3 A × 20 Ω = 60 V

➢ The total source voltage is equal to the sum of the individual voltage
drops: 45 V + 15 V + 60 V = 120 V

2. Parallel Circuits
A parallel circuit is constructed by connecting the terminals of all the individual
load devices so that the same value of voltage appears across each component.

1. Three Laws of a Parallel Circuit


There are three fundamental relationships concerning voltage, current, and
resistance in all parallel circuits.
➢ Voltage
− In a parallel circuit, each load resistor acts as an independent branch
circuit, and because of this, each branch “sees” the entire voltage of the
supply.
− Total voltage of a parallel circuit has the same value as the voltage across
each branch.
− This relationship can be expressed as: ET = E1 = E2 = E3…

24
SANJAY GHODAWAT INSTITUTE

In the above circuit, the voltage in each branch is 120 V.


➢ Current
- A parallel circuit has more than one path for current flow. The number of
current paths is determined by the number of load resistors connected in
parallel.
- Total current in a parallel circuit is the sum of the individual branch currents.
− This relationship in a parallel circuit is expressed as: IT = I1 + I2 + I3…
− To solve for the total current, you must first determine individual branch
currents using Ohm law:
I1 = 120 V/ 20 Ω = 6 A
I2 = 120 V/ 40 Ω = 3 A
I3 = 120 V/ 60 Ω = 2 A
IT = 6 A + 3 A + 2 A = 11 A

➢ Resistance
− Whenever more resistances are connected in parallel, they have the effect
of reducing the overall circuit resistance.
− The net resistance of a parallel circuit is always less than any of the
individual resistance values.
− The overall resistance is commonly determined using the reciprocal
equation:
− 1/RT = 1/R1 + 1/R2 + 1/R3…

➢ Voltage Divider
A voltage divider is a passive circuit that reduces the voltage of the output
compared to the input. In other words, it produces a fixed fraction of the
supplied voltage after every voltage drop. This reduction is achieved by
connecting several resistors in a series. While there are varying ways one can
set up the wires and arrange the resistors in a voltage divider circuit, the
important aspect of these circuits is that resistors are set up in series. It is this

25
SANJAY GHODAWAT INSTITUTE

serial arrangement that allows the voltage to be divided. How much the voltage
is reduced is dependent upon the ratio of the resistors.
Resistive Voltage Divider:
✓ This is a very easy and simple circuit to design as well as understand. The
basic type of a passive voltage divider circuit can be built with two
resistors which are connected in series. This circuit uses the voltage
divider rule to measure the voltage drop across every series resistor. The
resistive voltage divider circuit is shown below.
✓ In the resistive divider circuit, the two resistors R1 and R2 are connected
in series. So the flow of current in these resistors will be the same.
Therefore, it provides a voltage drop (I*R) across every resistive.

26
SANJAY GHODAWAT INSTITUTE

➢ Night Lamp Circuit Using LDR

During the daytime when there is a light, the LDR has very low
resistance and all voltage coming through R1 drops with the ground. This makes
the voltage at the base of the transistor very low and it will not switch ON the
transistor. Because the transistor is OFF, the current will not flow through the
transistor. As a result, the LED will not turn ON.
At night when there is no light, the LDR has high resistance and very
little power dropped with the ground. This makes the voltage at the base of the
transistor high to turn the transistor ON. Because the transistor is turned ON,
current flows through the transistor. It flows from the positive battery terminal,
through R2, the LED, and the transistor down to the negative battery terminal.
As a result, the LED turns ON.

27
SANJAY GHODAWAT INSTITUTE

Week 2nd:

1. Introduction to Arduino and Tools


History of Arduino: In 2005, the first Arduino prototype called the "Arduino
Serial," was created using an Atmel ATmega8 microcontroller and an RS-232
serial interface. Shortly
after, the official Arduino NG (New Generation) board was released in 2005, with
the same microcontroller but featuring USB connectivity.
The Arduino Uno, released in 2010, became one of the most popular Arduino
boards. It featured the ATmega328 microcontroller and a USB-to-serial adapter,
making programming even easier. The Uno's user-friendly design and capabilities
further solidified Arduino's position as a go-to platform for electronics enthusiasts
and beginners.
Features of Arduino: The Arduino platform is an easy-to-use and open-source
system perfect for beginners and experts alike. It offers a simple software
interface, various board options for different needs, lots of pre-written code for
hardware connections, compatibility with add-ons, helpful guides, a friendly
community, low cost, and
flexibility for all sorts of projects. These qualities make Arduino a favourite for
tinkering, learning, and creating in the world of electronics.
User-Friendly IDE: The Arduino Integrated Development Environment (IDE)
provides a simple interface for writing, compiling, and uploading code to Arduino
boards. It features a streamlined workflow, syntax highlighting, and built-in
examples to facilitate the learning process.
Plug-and-Play Compatibility: Arduino boards feature standardised pin layouts
and connectors, enabling easy integration with a wide range of shields, modules,
and sensors available in the market. This plug-and-play compatibility allows
users to quickly expand the capabilities of their projects without complex wiring
or configuration.

28
SANJAY GHODAWAT INSTITUTE

2. Introduction to microcontrollers
A. What is a microcontroller:
A microcontroller is a small, integrated circuit that contains a processor core,
memory, and programmable input/output peripherals. It is designed to execute
specific tasks within embedded systems, ranging from simple control functions
to more complex operations. Microcontrollers are commonly used in devices such
as appliances, automobiles, industrial machinery, and consumer electronics,
where they serve as the brains of the system, processing data and controlling
various functions based on programmed instructions. They are different from
microprocessors by their integrated peripherals and suitability for embedded
applications.
B. Applications of microcontrollers
Microcontrollers are compact, integrated circuits widely used in various
industries for controlling electronic devices and systems. They find applications
in
✓ Embedded Systems: Control functions in appliances, consumer
electronics, and automotive systems.
✓ IoT (Internet of Things): Enable connectivity and smart functionality in
home automation, wearable devices, and industrial sensors.
✓ Robotics: Control robots' movements, sensors, and actuators in hobbyist,
industrial, and autonomous systems.
✓ Consumer electronics, powering smartphones, TVs, home entertainment
systems, digital cameras, wearable devices, home automation, gaming
consoles, personal audio devices, smart home assistants, and home
appliances.

3. Understanding the Arduino board components


A. Introduction to Arduino Uno: Arduino Uno is a versatile microcontroller
board equipped with digital and Analog input/output pins, making it ideal for a
wide range of electronic projects. Its simplicity, affordability, and extensive
community support have made it a favourite among hobbyists, students, and
professionals alike. Whether you're prototyping a new gadget, or automating your
home Arduino Uno provides a user-friendly platform for bringing your ideas to
life.

29
SANJAY GHODAWAT INSTITUTE

B. Key components on the Arduino Uno board:


✓ Microcontroller (ATmega328P): The central processing unit of the Arduino
Uno, responsible for executing the code and controlling input/output
operations.
✓ Digital I/O Pins (14): These pins can be configured as either inputs or
outputs to interact with digital devices like sensors, LEDs, and motors.
✓ Analog Input Pins (6): Used to read Analog voltage values from sensors,
converting them into digital values for the microcontroller to process.
✓ Power Pins:
• Vin: External power input, typically 7-12V, used to power the board.
• 5V: Provides regulated 5V output for external components.
• 3.3V: Provides regulated 3.3V output.
• GND: Ground pins for completing circuits and providing reference
✓ voltage.
• Reset Button: Pressing this button restarts the microcontroller, useful
for resetting the program.
• Power LED: Indicates when the board is receiving power.
• TX and RX LEDs: Indicate data transmission/reception through the
USB connection to the computer.
• USB Connection: Used for uploading code to the board and
communicating with it.
• Crystal Oscillator: Provides the clock signal for the microcontroller,
operating at 16 MHz
• Voltage Regulator: Regulates incoming voltage to provide a stable 5V
supply for the microcontroller and other components.

30
SANJAY GHODAWAT INSTITUTE

4. Introduction to Arduino IDE


A. Features and capabilities of the Arduino Integrated Development
Environment The Arduino Integrated Development Environment (IDE) is a
user-friendly software application tailored for Arduino boards. It features a
text editor with syntax highlighting, auto-indentation for writing code, and
a built-in library manager for easy access to additional functionalities. The
IDE includes a serial monitor for communication with the Arduino
board, a board manager for configuring board settings, and a tool for
compiling and uploading code with a single click. It offers example
sketches for learning and inspiration, integrates with version control
systems like Git, and is compatible with Windows, macOS, and Linux
platforms. Overall, the Arduino IDE streamlines the process of writing,
testing, and deploying code, making it accessible to both beginners and
experienced developers.

B. Writing, compiling, and uploading code to Arduino boards


The Arduino IDE provides a user-friendly platform for programming
Arduino boards, simplifying the process of writing, compiling, and uploading
code. By
following these steps, users can efficiently develop Arduino projects.
• Writing Code: Utilize the Arduino IDE's text editor to write your code,
incorporating necessary functions and libraries.
• Compiling: Verify your code's syntax and convert it into machine-
readable instructions by clicking the "Verify" button or selecting Sketch
> Verify/Compile.
• Uploading: Connect your Arduino board to your computer via USB,
select the correct board and port in the Tools menu, and upload your
compiled code by clicking the "Upload" button or selecting Sketch >
Upload.
• Monitoring: Keep an eye on the progress bar at the bottom of the IDE
as your code is uploaded to the Arduino board.
• Debugging (Optional): If your code involves serial communication,
open the Serial Monitor from the Tools menu to help in debugging and
testing.

31
SANJAY GHODAWAT INSTITUTE

C. Utilizing libraries for extended functionality


Using libraries in Arduino IDE greatly enhances its functionality by
providing access to pre-written code modules for various components and
functions.
These libraries simplify the development process by offering ready-made
solutions for tasks like controlling sensors, displays, motors, and communication
protocols. By incorporating libraries, Arduino projects become
more efficient, saving time and effort while enabling a wider range of
possibilities for creators.
D. User interface of the IDE
The user interface of the Arduino IDE is Simple and straightforward,
designed to facilitate the development of Arduino projects. Upon launching the
IDE,
you're greeted with a clean layout consisting of several key elements:
1. Menu Bar: Located at the top, it provides access to various functions
and settings such as file management, editing tools, compiling,
uploading, and configuring the IDE.
2. Toolbar: Below the menu bar, the toolbar contains commonly used
actions like verifying, uploading, opening serial monitors, and
managing libraries.
3. Editor Pane: This is the main area where you write and edit your
Arduino sketch (code). It supports syntax highlighting to improve
code readability.
4. Message Area: Positioned below the editor pane, it displays
compilation messages, errors, and warnings generated during the
code verification process.
5. Status Bar: At the bottom of the IDE, the status bar indicates the
current board and port selected for uploading, as well as the status
of the compilation and upload processes.

32
SANJAY GHODAWAT INSTITUTE

Arduino Programming Basics

1) Arduino programming syntax


Arduino programming syntax follows a simplified version of C/C++, making it
accessible to beginners while offering powerful capabilities for advanced users.
A typical Arduino sketch consists of two main functions: `setup ()` and `loop()`.
The
`setup ()` function runs once at the beginning of the program and is used for
initializing variables, setting pin modes, and other setup tasks. The `loop ()`
function then runs repeatedly, executing the main program logic.
• Setup () Function: The function runs once when the program starts. It is
used to initialize variables, pin modes, etc.
• void setup () {
• // Setup code here
• }
• Loop () Function: The loop () function runs repeatedly as long as the
Arduino is powered on. It contains the main code of your program.
• void loop () {
• // Main code here
• Comments: Comments in Arduino code start with "//" for single-line
comments or
• enclosed within "/" and "/" for multi-line comments.
• // This is a single-line comment
• /*
• This is a multi-line comment It can span multiple lines
• */
• Variables: Variables are used to store data. They must be declared with a
data type before use.

int number; // Integer variable


float temperature; char // Floating-point variable
letter; // Character variable

33
SANJAY GHODAWAT INSTITUTE

➢ Pin Modes: Set pin modes using the function to specify if a pin should be
used as an input or output
pinMode(13, OUTPUT); // Set pin 13 as output
pinMode (A0, INPUT); // Set pin A0 as input

• Digital I/O: Control digital pins using digitalWrite() to set the pin high or
low, and digitalRead() to read the digital value of a pin
digitalWrite (13, HIGH); // Set pin 13 high
int value = digitalRead (2); // Read the value of pin 2
• Analog I/O: Read analog sensors using analogRead () and write analog
values using analogWrite () (PWM pins only).
int sensorValue = analogRead(A0); // Read analog value from pin A0
analogWrite (9, 128); // Write analog value (0-255) to PWM pin 9
• Control Structures: Arduino supports common control structures like if,
else, for and while.
if (condition) {
// Code to execute if condition is true
} else {
// Code to execute if condition is false
}
for (int i = 0; i < 10; i++) {
// Loop code here
}
while (condition) {
// Code to repeat while condition is true
}

2) Variables, data types, and operators


In Arduino programming, variables, data types, and operators are
fundamental concepts that allow you to store and manipulate data within
your sketches. Let's break down each of these concepts with examples
1) Variables: Variables are containers used to store data that can change during
the execution of the program. They have a data type and a name. Here's an
example:
int sensorValue;
Declares a variable named sensorValue of type integer2) Data Types:

34
SANJAY GHODAWAT INSTITUTE

2)Data types: define the type of data that can be stored in a variable. Arduino
supports several data types including integers, floating-point numbers,
characters, and Boolean values. Here are some examples:
• int: Used for integers (whole numbers).
int temperature = 25;
Declares an integer variable named temperature with initial value 25

float: Used for floating-point numbers (numbers with a decimal point).

float voltage = 3.5;


Declares a floating-point variable named voltage with initial value 3.5

Char: Used for individual characters.


• char grade = 'A';
• Declares a character variable named grade with initial value 'A'
• bool: Used for boolean values (true or false).
bool is on= true;
Declares a boolean variable named is on with initial value true
3) Operators: Operators are symbols that perform operations on operands.
Arduino supports various types of operators including arithmetic,
comparison, logical, and assignment operators. Here are examples of each:

4) Arithmetic Operators:
int x = 5; int y = 3;
int sum = x + y; // Addition operator
int difference = x - y; // Subtraction operator
int product = x * y; // Multiplication operator float quotient = x / y; //
Division operator
int remainder = x % y; // Modulus operator (remainder of division)

5) Logical Operators:
bool p = true; bool q = false;
bool and Result = (p && q); // Logical AND operator
bool or Result = (p || q); // Logical OR operator
bool not Result =! p; // Logical NOT operator

35
SANJAY GHODAWAT INSTITUTE

Week 3rd:

Control structures: if, else, for, while loops:

1) if Statement:
The if statement is used to execute a block of code if a specified condition is
true. Optionally, an else block can be used to execute a different block of code if
the condition is false.

2) else Statement:
The else statement is used in conjunction with the if statement to provide an
alternative block of code to execute when the condition evaluated by the if
statement is false. Syntax:
if (condition) {
// Code to execute if condition is true
} else {
// Code to execute if condition is false
}
3) for Loop:
The for loop is used to execute a block of code repeatedly for a specified
number
Of times. It consists of three parts: initialization, condition, and
increment/decrement.
Syntax:
for (initialization; condition; increment/decrement) {
// Code to repeat
}
4) while Loop:
The while loop executes a block of code repeatedly as long as a specified
condition is true. It is useful when the number of iterations is not known
beforehand.
Syntax:
while (condition) {
// Code to repeat while condition is true
}

36
SANJAY GHODAWAT INSTITUTE

LEDs Interfacing with Arduino

1) Interfacing LEDs With Arduino UNO.


• Steps:
1. Connect the Arduino Board via a USB cable.
2. Connect LED Pin.
3. Select Board and Port: in the Arduino IDE.
4. Upload Code.

• Code:
void setup() {
// initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN,
OUTPUT);
}
// the loop function runs over and over again forever void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is
the voltage level)
delay (1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by
making the voltage LOW // wait for a second
delay (1000);

➢ Connections:

37
SANJAY GHODAWAT INSTITUTE

2) Interfacing buttons.
• Steps:
1. Connect a push button to digital pin 2 with a resistor 1kΩ and
the other leg of the button connecting to GND.
2. Connect an LED with a resistor 220Ω to digital pin 13
3. Select Board and Port:
4. Upload Code:
• Code:
const int buttonPin = 2; // the number of the pushbutton pin const int
ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0;// variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output: pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on: digitalWrite(ledPin, HIGH);
} else {
// turn LED off: digitalWrite(ledPin, LOW);
}
}

• Connections:

38
SANJAY GHODAWAT INSTITUTE

3. Interfacing output devices:


• Steps:
1) Connect the Arduino Board via a USB cable.
2) Connect LEDs to the corresponding Pins.
3) Select the Board and Port: in the Arduino IDE.
• Code:
void setup()
{
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode (4, OUTPUT);
pinMode(2, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH); • Connections:
delay(100);
digitalWrite(12, HIGH);
delay(100);
digitalWrite(8, HIGH);
delay(100);
digitalWrite(7, HIGH);
delay(100);
digitalWrite(4, HIGH);
delay(100);
digitalWrite(2, HIGH);
delay(100);
digitalWrite(13, LOW);
delay(100);
digitalWrite(12, LOW);
delay(100);
digitalWrite(8, LOW);
delay(100);
digitalWrite(7, LOW);
delay(100);
digitalWrite(4, LOW);
delay(100);
digitalWrite(2, LOW);
delay(100);
}

39
SANJAY GHODAWAT INSTITUTE

What is an IR Sensor/Infrared Sensor?


An infrared sensor is an electronic device, that emits in order to sense some
aspects of the surroundings. An IR sensor can measure the heat of an object as
well as detects the motion. These types of sensors measure only infrared
radiation, rather than emitting it that is called a passive IR sensor. Usually, in the
infrared spectrum, all the objects radiate some form of thermal radiation.

Connecting the IR sensor to any microcontroller is really simple. As we know


this sensor outputs a digital signal and processing this signal is very easy. There
exist two methods to do so first, you can always check the port in an infinite
loop to see when the port changes its state from high to low, or the other way is
to do it with an interrupt if you are making a complicated project the interrupt
method is recommended. Power the IR with 5V or 3.3V and connect ground to
ground. Then connect the output to a digital pin D9. We have just used a Male
to Female Jumper wire to connect the IR sensor module with Arduino board

40
SANJAY GHODAWAT INSTITUTE

• Code

int IRSensor = 9; // connect IR sensor module to Arduino pin D9


int LED = 13; // connect LED to Arduino pin 13
void setup(){
Serial.begin(115200); // Init Serial at 115200 Baud Rate.
Serial.println("Serial Working"); // Test to check if serial is working or not
pinMode(IRSensor, INPUT); // IR Sensor pin INPUT
pinMode(LED, OUTPUT); // LED Pin Output
}
void loop(){
int sensorStatus = digitalRead(IRSensor); // Set the GPIO as Input
if (sensorStatus == 1) // Check if the pin high or not
{
// if the pin is high turn off the onboard Led
digitalWrite(LED, LOW); // LED LOW
Serial.println("Motion Detected!"); // print Motion Detected! on the serial
monitor window
}
else {
//else turn on the onboard LED
digitalWrite(LED, HIGH); // LED High
Serial.println("Motion Ended!"); // print Motion Ended! on the serial monitor
window
}
}

• Advantages

The advantages of IR sensor include the following


It uses less power
The detection of motion is possible in the presence or absence of light
approximately with equal reliability.
They do not need contact with the object for detection
There is no data leakage because of the ray direction

41
SANJAY GHODAWAT INSTITUTE

DHT11

DHT11 Module features a temperature & humidity sensor complex with a


calibrated digital signal output. The exclusive digital-signal-acquisition technique
and temperature & humidity sensing technology ensure high reliability and
excellent long-term stability. This sensor includes an NTC for temperature
measurement and a resistive-type humidity measurement component for
humidity measurement. These are connected to a high-performance 8-bit
microcontroller, offering excellent quality, fast response, anti-interference ability,
and cost-effectiveness.

How does DHT11 Work?


As already mentioned, DHT11 has an NTC thermistor and humidity sensing
components. When the temperature changes, the resistance of the NTC also
changes. This change in resistance is measured and the temperature is calculated
from it. We have already discussed
Connections are pretty simple and only require three wires. Connect the VCC
and GND of the module to the 5V and GND pins of the Arduino. Then connect
the DATA pin to the Arduino’s digital pin 2. We communicate with DHT11
through this pin.

42
SANJAY GHODAWAT INSTITUTE

• Code
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
#define DHTTYPE DHT11 // DHT 11
#define DHTPIN 2
DHT_Unified dht(DHTPIN, DHTTYPE);
uint32_t delayMS;
void setup() {
Serial.begin(9600);
dht.begin();
sensor_t sensor;
delayMS = sensor.min_delay / 1000;
}
void loop()
{
sensors_event_t event;
dht.temperature().getEvent(&event);
Serial.print(F("Temperature: "));
Serial.print(event.temperature);
Serial.println(F("°C"));
dht.humidity().getEvent(&event);
Serial.print(F("Humidity: "));
Serial.print(event.relative_humidity);
Serial.println(F("%"));
delay(delayMS);
}

43
SANJAY GHODAWAT INSTITUTE

Peripherals & Communications Protocols of Arduino

1. Interfacing sensors with Arduino.

• what is a Sensor?
Sensors are devices or modules that detect and respond to physical input from the
environment or a system, converting it into an electrical or digital signal that can
be interpreted by a microcontroller, computer, or other electronic device. They
are essential components in various fields, including electronics, robotics,
automation, and IoT.

A. DHT11 Sensor
1) Basic Functionality: The DHT11 sensor consists of a capacitive humidity
sensor and a thermistor to measure temperature. It provides digital output
for both temperature and humidity values.
2) Pin Configuration: The sensor typically has Three pins:
a. VCC: Power supply (usually 3.3V or 5V)
b. Data: Digital output for temperature and humidity readings
c. GND: Ground
d. Communication Protocol: The DHT11 sensor communicates using a
single- wire serial protocol. It sends data in the form of a series of pulses,
where the duration of each pulse represents either a '0' or a '1'.

• Steps:
1) Connect the Arduino Board via a USB cable.
2) Connect Sensor As per Diagram Pin.
3) Select Board and Port: in the Arduino IDE.
4) Upload Code.

• Code:
#include <dht11.h>
#define DHT11PIN
4 dht11 DHT11;
void setup()
{
Serial. Begin(9600);
}
void loop()
{
Serial.println();
int chk = DHT11.read(DHT11PIN);

44
SANJAY GHODAWAT INSTITUTE

Serial.print("Humidity (%): ");


Serial.println((float)DHT11.humidity, 2);
Serial.print("Temperature (C): ");
Serial.println((float)DHT11.temperature, 2);
delay(2000);
}

• Connections:

45
SANJAY GHODAWAT INSTITUTE

Week 4th:

What is I2C Communication Protocol?


The term I2C stands for “Inter Integrated Circuits”. It is normally denoted as IIC
or I squared C or even as 2-wire interface protocol (TWI) at some places but it all
means the same. I2C is a synchronous communication protocol, means both the
devices that are sharing the information must share a common clock signal. It has
only two wires, SDA and SCL to share information, out of which SCL is used for
the clock signal and SDA is used for sending and receiving data.

Connections for interfacing LCD with ESP32 is given below


connect pin 1-16 of I2C module to pin 1-16 of LCD display.
SDA pin of I2C module -> SDA pin of ESP32 i.e D21
SCL pin of I2C module -> SCL pin of ESP32 i.e D22

46
SANJAY GHODAWAT INSTITUTE

I have connected 3v of ESP32 to 5v of I2C for demonstration only but we need


5V supply for the I2C module to display data properly, because ESP32 can only
give 3.3 volts which is low for the I2C module and data won’t be visible clearly.
So, it’s better to use external 5V supply

I have connected 3v of ESP32 to 5v of I2C for demonstration only but we need


5V supply for the I2C module to display data properly, because ESP32 can only
give 3.3 volts which is low for the I2C module and data won’t be visible clearly.
So, it’s better to use external 5V supply.

• Code

#include <Wire.h>

void setup() {
Serial.begin (9600);
Serial.println ("Scanning I2C device...

Wire.begin();
for (byte i = 0; i <50; i++)
{
Wire.beginTransmission (i);
if (Wire.endTransmission () == 0)
{
Serial.print ("Address found->");
Serial.print (" (0x");
Serial.print (i, HEX);
Serial.println (")");
Count++;
}
Serial.print ("Found ");
Serial.print (count, DEC);
Serial.println (" device");
}

void loop() {}

47
SANJAY GHODAWAT INSTITUTE

C. Ultrasonic Sensor:
• Actually, it consists of an ultrasonic transmitter and an ultrasonic receiver.
First ultrasonic transmitter sends an ultrasonic wave. This signal will
collide with the object and reflect the signal. The receiver will receive the
reflected signal. The distance is calculated by the time taken to receive
the reflected. and the speed of sound in the air. The speed of sound in air
at room temperature is 340 Meters/Second or
0.034 centimetre/microsecond. The equation for calculating time is,
Time=Distance/speed of sound

• Pin Configuration: The sensor typically has Three pins:


1. VCC: Power supply (usually 3.3V or 5V)
2. TRIGGER: A trigger pin is an Input pin. This pin has to be kept
high for 10us to initialize measurement by sending a US wave.
3. Echo pin is an Output pin. This pin goes high for a period that will
be equal to the time taken for the US wave to return to the sensor.
4. GND: Ground

• Steps:
1. Connect the Arduino Board via a USB cable.
2. Connect Sensor As per Diagram .
3. Select Board and Port: in the Arduino IDE.
4. Upload Code.

48
SANJAY GHODAWAT INSTITUTE

• Code:
#define echoPin 2
#define trigPin 3
long duration;
int distance; void setup(){
Serial.begin(9600);
pinMode(trigPin,OUTPUT);
pinMode(echoPin,INPUT);
}
void loop(){
digitalWrite(trigPin,LOW);
delayMicroseconds(2);
digitalWrite(trigPin,HIGH);
delayMicroseconds(10);
digitalWrite(trigPin,LOW);
duration=pulseIn(echoPin,HIGH);
distance=(duration*0.034/2);
Serial.print("Distance : ");
Serial.print(distance);
Serial.println(" cm "); delay(1000);
}

• Connections:

49
SANJAY GHODAWAT INSTITUTE

2. Interfacing Servo with Arduino:


• A servo motor is a type of motor that can rotate with great precision.
Normally this type of motor consists of a control circuit that provides
feedback on the current position of the motor shaft, this feedback
allows the servo motors to rotate with great precision. If you want to
rotate an object at some specific angles or distance, then you use a
servo motor. It is just made up of a simple motor that runs through a
servo mechanism.
• Pin Configuration:
The Servo typically has Three pins:
1) GND: Ground (Brown)
2) VCC: Power supply 3.3V or 5V(Red)
3) PWM: PWM signal is given in through this wire to
drive the motor
• Steps:
1. Connect the Arduino Board via a USB cable.
2. Connect Servo As per Diagram.
3. Select Board and Port: in the Arduino IDE.
4. Upload Code.

• Code:
#include <Servo.h>
Servo myservo; // create servo object to control a servo
int potpin = 0; // analog pin used to connect the
potentiometer
int val; // variable to read the value from the analog pin
void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the
servo object
}
void loop() {
val = analogRead(potpin); // reads the value of the
potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 180); // scale it to use it with the servo
(value between 0 and 180)
myservo.write(val); // sets the servo
position according to the scaled value
delay(15); // waits for the servo

to get there
}

50
SANJAY GHODAWAT INSTITUTE

• Connections:

3. Communication Protocols
What is A protocol?
A protocol is a set of rules agreed by both, the sender and the receiver.
UART communication Protocol:
What is the UART communication protocol?
UART is a serial communication protocol used to transmit & receive data
serially at a specific baud rate.

• Basic Print Example


- This example will send the string Hello World! from an Arduino to a
computer, using the Serial.println() function. Data will be sent every second.

51
SANJAY GHODAWAT INSTITUTE

• Code:
void setup(){
Serial.begin(9600); //initialize serial communication at a 9600 baud rate
}
void loop(){
Serial.println("Hello world!"); delay(1000);
}

1. I2C communication
• What is an I2C?
I2C (Inter-Integrated Circuit) is a serial bus interface connection protocol. It is
also called a TWI (two-wire interface) since it uses only two wires for
communication. Those two wires are SDA (serial data) and SCL (serial clock).
• I2C Communication between Two Arduino
I was transferring data from the master to the slave device. Here, we will use
two Arduino one as master and the other as slave.

52
SANJAY GHODAWAT INSTITUTE

• Code
Master Transmitter:
#include <Wire.h>
void setup() {
Wire.begin(); // join i2c bus (address optional for master)
}
byte x = 0;
void loop() {
Wire.beginTransmission(8); // transmit to device #8
Wire.write("x is "); // sends five bytes
Wire.write(x); // sends one byte
Wire.endTransmission(); x++; // stop transmitting
delay(500);
}

• Code
Slave receiver:
#include <Wire.h>
void setup() {
Wire.begin(8); // join i2c bus with address#8
Wire.onReceive(receiveEvent); // register event
Serial.begin(9600); // start serial for output
}
void loop() {
delay(100);
}
void receiveEvent(int howMany) {
while (1 < Wire.available()) { // loop through all but the last
char c = Wire.read(); // receive byte as a character
Serial.print(c); // print the character
}
int x = Wire.read(); // receive byte as an integer
Serial.println(x); // print the integer
}

53
SANJAY GHODAWAT INSTITUTE

Week 5th :

Fundamentals of IoT

1. Introduction
IoT stands for Internet of Things. Most simply, it refers to physical objects linked
through wired and wireless networks. More specifically, it refers to the collection
of internet-connected devices that can communicate autonomously over the
internet, without needing a person to initiate the communication.

2. Why is the Internet of Things (IoT) so important?


Over the past few years, IoT has become one of the most important technologies
of the 21st century. Now that we can connect everyday objects kitchen appliances,
cars, thermostats, and baby monitors

3. What is industrial IoT?


Industrial IoT IoT refers to the application of IoT technology in industrial settings,
especially concerning instrumentation and control of sensors and devices that
engage cloud technologies. Refer to this Titan use case PDF for a good example
of IoT. Recently, industries have used machine-to-machine communication
(M2M) to achieve wireless automation and control. But with the emergence of
cloud and allied technologies (such as analytics and machine learning), industries
can achieve a new automation layer and with it create new revenue and business
models. IoT is sometimes called the fourth wave of the industrial revolution, or
Industry 4.0. The following are some common uses for IoT.
• Smart manufacturing
• Connected assets and preventive and predictive maintenance
• Smart power grids
• Smart cities
• Connected logistics
• Smart digital supply chains
Through the internet via embedded devices, seamless communication is possible
between people, processes, and things.
Using low-cost computing, the cloud, big data, analytics, and mobile
technologies, physical things can share and collect data with minimal human
intervention. In this hyperconnected world, digital systems can record, monitor,
and adjust each interaction between connected things. The physical world meets
the digital world and they cooperate.

54
SANJAY GHODAWAT INSTITUTE

Getting Started with ESP8266 Node MCU

1. What Is Node MCU?


Today, IoT applications are on the rise, and connecting objects is getting more
and more important. There are several ways to connect objects such as Wi-Fi
protocol. Node MCU is an open source platform based on ESP8266 which can
connect objects and let data transfer using the Wi-Fi protocol. In addition, by
providing some of the most important features of microcontrollers such as GPIO,
PWM, ADC, etc, it can solve many of the project’s needs alone.

2. The general features of this board are as follows:


• Low-cost Wi-Fi solution programmable with the Arduino language.
• on-board USB-serial adaptor.
• PCB antenna (no external antenna required)
• 10 GPIO pins, each GPIO can be PWM, I2C & 1-wire.
• breadboard compatible.
• powered via micro B USB.

Development Board Node MCU 12F

55
SANJAY GHODAWAT INSTITUTE

3. How to program Node MCU using Arduino IDE:

• Choose Preferences in the File menu and enter the board link in the
Additional Board Manager URLs part. Then press OK.
• Search the word ESP8266 in Boards> Boards Manager from the Tools menu.
Then install ESP8266 boards. After completing the installation, you will see
the INSTALLED label on ESP8266 boards.
• After these two steps, you can see ESP8266-based boards such as Node
MCU in your Arduino IDE boards list, and you can choose your desired
board to upload the code.

56
SANJAY GHODAWAT INSTITUTE

IoT Protocols & 3rd Party Dashboards

1) What Is an IoT dashboard?


An IoT dashboard is the user interface within an IoT platform that enables users
to monitor and interact with connected devices through graphs, charts and other
tools and UI elements. Dashboards allow you to manage every aspect of your
connected devices as well as gain perspective on your environment through
visualization of your device data.

Adafruit IO Dashboard

57
SANJAY GHODAWAT INSTITUTE

2) Some IoT Protocols

1) HTTP/HTTPS (Hyper Text Transfer Protocol)


• Purpose: Standard protocol for web communication, also used in IoT for
device communication.

• Features:
- Widely used and supported.
- Secure communication with HTTPS.
- RESTful APIs are common for web and IoT devices.

• Use Cases: Web-based IoT applications, smart home devices

2) MQTT (Message Queuing Telemetry Transport)


• Purpose: Lightweight messaging protocol ideal for small sensors and
mobile devices.
• Features:
- Uses publish/subscribe model.
- Low bandwidth usage.
- Quality of Service (QoS) levels for message delivery.
• Use Cases: Home automation, remote monitoring, and control systems.

3) DTLS (Datagram Transport Layer Security)


• Purpose: Provides security for datagram-based applications.
• Features:
- Encryption, message authentication, and integrity.
- Based on TLS but adapted for UDP.
• Use Cases: Securing CoAP communications, and low-latency
applications.
4) TLS/SSL (Transport Layer Security / Secure Sockets Layer)
• Purpose: Provides secure communication over a computer network.
• Features:
- Encryption, authentication, and data integrity.
- Widely used in HTTP and other protocols.
Use Cases: Securing HTTP-based IoT communications, and secure web
services.

58
SANJAY GHODAWAT INSTITUTE

Hands-on & Projects

1. Temperature and Humidity Monitoring ThingSpeak IoT Platform.

STEP 1: Setting Thingspeak & Getting API Key:


• Go to https://thingspeak.com/ and create an account if you do not have
one. Login to your account.
• Create a new channel by clicking on the button. Enter the basic details
of the channel. Then Scroll down and save the channel. You can follow
the video guide below.
• Then go to API keys copy and paste this key to a separate notepad file.
You will need it later while programming.

STEP 2: Programming:

• The program for Humidity & Temperature Monitoring using DHT11 &
Node MCU on ThingSpeak is given below.
• Copy this program and paste it on Arduino IDE.
• Download the DHT11/DHT22 library from GitHub and add it to your
library manager.
• Select the Node MCU ESP-12E board from the board manager.
• Paste your API Key from thing Speak which you created earlier on a
programming section line.
• Edit the program to change the Wi-Fi SSID and password with your own.
• Compile the code and upload it to the Node MCU board

59
SANJAY GHODAWAT INSTITUTE

• Code:

#include <ESP8266WiFi.h>
#include <DHT.h>
#include <ThingSpeak.h>
const char *ssid = "black hat"; //Your WIFI SSID
const char *pass = "rabin@1234"; //Your WIFI PASSWORD
DHT dht(D5, DHT11);
WiFiClient client;
long myChannelNumber = 1115593;
const char myWriteAPIKey[] = "4W0SZYJQK8UFX7QM"; //Your API KEY
void setup() {
// put your setup code here, to run once: Serial.begin(9600);
WiFi.begin(ssid, pass);
while(WiFi.status() != WL_CONNECTED)
{
delay(200);
Serial.print("..");
}
Serial.println(); Serial.println("NodeMCU is connected!");
Serial.println(WiFi.localIP()); dht.begin();
ThingSpeak.begin(client);
}
void loop() {
// put your main code here, to run repeatedly:
float h = dht.readHumidity();
float t = dht.readTemperature();
Serial.println("Temperature: " + (String) t);
Serial.println("Humidity: " + (String) h);
ThingSpeak.writeField(myChannelNumber, 1, t, myWriteAPIKey);
ThingSpeak.writeField(myChannelNumber, 2, h, myWriteAPIKey);
delay(2000);
}

60
SANJAY GHODAWAT INSTITUTE

• Connections

2. Switch ON and Off Led Remotely Using the Adafruit IO Platform


Step 1: Set Up Adafruit IO
• Create an Account:
• Sign up for an account on Adafruit IO.
• Create a Feed:
• Once logged in, navigate to the "Feeds" section.
• Click on "Actions" and select "Create a New Feed."
• Name the feed (e.g., "LED").

61
SANJAY GHODAWAT INSTITUTE

Step 2: Set Up Your Hardware


You will need:
• An ESP8266 or ESP32 board (or any other microcontroller with WiFi
capabilities)
• An LED
• A resistor (220 ohms is typical for an LED)
• Breadboard and jumper wires

62
SANJAY GHODAWAT INSTITUTE

Write the Code


• You will need to use the Adafruit IO Arduino library to connect your
microcontroller to Adafruit IO. Install the library through the Arduino
Library Manager.
• Here's a basic code example for an ESP8266:
#include <ESP8266WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#define WIFI_SSID "JioFi3_2183EB" // Your Wifi Credentials #define
#define WIFI_PASS "zc5c5kpujr"
#define AIO_SERVER "io.adafruit.com" #define AIO_SERVERPORT 1883
#define AIO_USERNAME "web01" // Your Network Credentials
#define AIO_KEY "aio_DWSl32Y8i5JJCGRPfZFJ5NoHN7n5"
WiFiClient client;
Adafruit_MQTT_Client mqtt (&client, AIO_SERVER, AIO_SERVERPORT,
AIO_USERNAME, AIO_KEY);
Adafruit_MQTT_Subscribe onoffbutton = Adafruit_MQTT_Subscribe
(&mqtt, AIO_USERNAME "/feeds/onoff");

void MQTT_connect();
void setup() {
Serial.begin(115200);
delay(10);
pinMode(D6, OUTPUT);
Serial.println(F("Adafruit MQTT demo"));
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(WIFI_SSID);
WiFi.begin(WIFI_SSID, WIFI_PASS);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println();
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
mqtt.subscribe(&onoffbutton);
}
uint32_t x = 0;
void loop() {

63
SANJAY GHODAWAT INSTITUTE

MQTT_connect();
Adafruit_MQTT_Subscribe *subscription;
while ((subscription = mqtt.readSubscription(5000))) {
if (subscription == &onoffbutton) {
Serial.print(F("Got: "));
String status = (char *)onoffbutton.lastread;
Serial.println(status);
if (status.equals("ON")) {
digitalWrite(D6, HIGH);
} else if (status.equals("OFF")) {
digitalWrite(D6, LOW);
}
}
}
}
void MQTT_connect() {
int8_t ret;
if (mqtt.connected()) {
return;
}
Serial.print("Connecting to MQTT... ");
uint8_t retries = 3;
while ((ret = mqtt. connect()) != 0) {
Serial.println(mqtt.connectErrorString(ret));
Serial.println("Retrying MQTT connection in 5 seconds...");
mqtt.disconnect();
delay(5000);
retries--;
if (retries == 0) {
while (1)
;
}
}
Serial.println("MQTT Connected!");
}

64
SANJAY GHODAWAT INSTITUTE

Week 6th:

Resistors: A Resistor is A passive electrical component with two terminals that


are used to limit or regulate the flow of electric current in electrical circuits. The
main purpose of a resistor is to reduce the current flow and to lower the voltage
in any particular portion of the circuit. It is made of copper wires coiled around
a ceramic rod and the outer part of the resistor is coated with an insulating paint.

Capacitors: Capacitors store and release electrical energy. They are used for
various purposes such as filtering, timing, smoothing voltage fluctuations, and
coupling signals between different parts of a circuit.

Inductors: Inductors store energy in a magnetic field when current flows through
them. They are used in applications such as filtering, energy storage, and
inductive coupling.

65
SANJAY GHODAWAT INSTITUTE

Transformers: Transformers consist of two or more coils of wire wrapped


around a core. They are used to step up or step down voltage levels in AC circuits,
as well as for isolation and impedance matching

3. Active Components:
Transistors: Transistors are semiconductor devices that can amplify or switch
electronic signals. They are the building blocks of modern electronic circuits
and are used in a wide range of applications including amplifiers, switches, and
digital logic circuits.

Voltage Regulators- Voltage regulators maintain a constant output voltage


despite variations in input voltage or load conditions. They are crucial in power
supply systems to ensure the stable operation of electronic devices

66
SANJAY GHODAWAT INSTITUTE

Diodes: Diodes allow current to flow in one direction while blocking it in the
opposite direction. They are commonly used for rectification (converting AC to
DC), voltage regulation, and signal modulation

Operational Amplifiers (Op-amps): Op-amps are high-gain voltage


amplifiers with differential inputs. They are widely used in Analog electronics
for tasks such as signal conditioning, filtering, and Signal Amplification
operations.

➢ Some Active & Passive Components with Symbol

67
SANJAY GHODAWAT INSTITUTE

. Key components on the Arduino Uno board:


✓ Microcontroller (ATmega328P): The central processing unit of the Arduino
Uno, responsible for executing the code and controlling input/output
operations.
✓ Digital I/O Pins (14): These pins can be configured as either inputs or
outputs to interact with digital devices like sensors, LEDs, and motors.
✓ Analog Input Pins (6): Used to read Analog voltage values from sensors,
converting them into digital values for the microcontroller to process.
✓ Power Pins:
• Vin: External power input, typically 7-12V, used to power the board.
• 5V: Provides regulated 5V output for external components.
• 3.3V: Provides regulated 3.3V output.
• GND: Ground pins for completing circuits and providing reference
✓ voltage.
• Reset Button: Pressing this button restarts the microcontroller, useful
for resetting the program.
• Power LED: Indicates when the board is receiving power.
• TX and RX LEDs: Indicate data transmission/reception through the
USB connection to the computer.
• USB Connection: Used for uploading code to the board and
communicating with it.
• Crystal Oscillator: Provides the clock signal for the microcontroller,
operating at 16 MHz
• Voltage Regulator: Regulates incoming voltage to provide a stable 5V
supply for the microcontroller and other components.

68
SANJAY GHODAWAT INSTITUTE

Arduino Programming Basics

1) Arduino programming syntax


Arduino programming syntax follows a simplified version of C/C++, making it
accessible to beginners while offering powerful capabilities for advanced users.
A typical Arduino sketch consists of two main functions: `setup()` and `loop()`.
The
`setup()` function runs once at the beginning of the program and is used for
initializing variables, setting pin modes, and other setup tasks. The `loop()`
function then runs repeatedly, executing the main program logic.
• Setup() Function: The function runs once when the program starts. It is
used to initialize variables, pin modes, etc.
• void setup() {
• // Setup code here
• }
• Loop() Function: The loop() function runs repeatedly as long as the
Arduino is powered on. It contains the main code of your program.
• void loop() {
• // Main code here
• Comments: Comments in Arduino code start with "//" for single-line
comments or
• enclosed within "/" and "/" for multi-line comments.
• // This is a single-line comment
• /*
• This is a multi-line comment It can span multiple lines
• */
• Variables: Variables are used to store data. They must be declared with a
data type before use.

int number; // Integer variable


float temperature; char // Floating-point variable
letter; // Character variable

69
SANJAY GHODAWAT INSTITUTE

➢ Pin Modes: Set pin modes using the function to specify if a pin should be
used as an input or output
pinMode(13, OUTPUT); // Set pin 13 as output
pinMode(A0, INPUT); // Set pin A0 as input

• Digital I/O: Control digital pins using digitalWrite() to set the pin high or
low, and digitalRead() to read the digital value of a pin
digitalWrite(13, HIGH); // Set pin 13 high
int value = digitalRead(2); // Read the value of pin 2
• Analog I/O: Read analog sensors using analogRead() and write analog
values using analogWrite() (PWM pins only).
int sensorValue = analogRead(A0); // Read analog value from pin A0
analogWrite(9, 128); // Write analog value (0-255) to PWM pin 9
• Control Structures: Arduino supports common control structures like if,
else, for and while.
if (condition) {
// Code to execute if condition is true
} else {
// Code to execute if condition is false
}
for (int i = 0; i < 10; i++) {
// Loop code here
}
while (condition) {
// Code to repeat while condition is true
}

2) Variables, data types, and operators


In Arduino programming, variables, data types, and operators are
fundamental concepts that allow you to store and manipulate data within
your sketches. Let's break down each of these concepts with examples
1) Variables: Variables are containers used to store data that can change during
the execution of the program. They have a data type and a name. Here's an
example:
int sensorValue;
Declares a variable named sensorValue of type integer2) Data Types:

70
SANJAY GHODAWAT INSTITUTE

2)Data types: define the type of data that can be stored in a variable. Arduino
supports several data types including integers, floating-point numbers,
characters, and Boolean values. Here are some examples:
• int: Used for integers (whole numbers).
int temperature = 25;
Declares an integer variable named temperature with initial value 25

float: Used for floating-point numbers (numbers with a decimal point).

float voltage = 3.5;


Declares a floating-point variable named voltage with initial value 3.5

Char: Used for individual characters.


• char grade = 'A';
• Declares a character variable named grade with initial value 'A'
• bool: Used for boolean values (true or false).
bool is on= true;
Declares a boolean variable named is on with initial value true
5) Operators: Operators are symbols that perform operations on operands.
Arduino supports various types of operators including arithmetic,
comparison, logical, and assignment operators. Here are examples of each:

6) Arithmetic Operators:
int x = 5; int y = 3;
int sum = x + y; // Addition operator
int difference = x - y; // Subtraction operator
int product = x * y; // Multiplication operator float quotient = x / y; //
Division operator
int remainder = x % y; // Modulus operator (remainder of division)

5) Logical Operators:
bool p = true; bool q = false;
bool and Result = (p && q); // Logical AND operator
bool or Result = (p || q); // Logical OR operator
bool not Result =! p; // Logical NOT operator

71
SANJAY GHODAWAT INSTITUTE

Fundamentals of IoT

2. Introduction
IoT stands for Internet of Things. Most simply, it refers to physical objects linked
through wired and wireless networks. More specifically, it refers to the collection
of internet-connected devices that can communicate autonomously over the
internet, without needing a person to initiate the communication.

3. Why is the Internet of Things (IoT) so important?


Over the past few years, IoT has become one of the most important technologies
of the 21st century. Now that we can connect everyday objects kitchen appliances,
cars, thermostats, and baby monitors

4. What is industrial IoT?


Industrial IoT, IoT refers to the application of IoT technology in industrial
settings, especially concerning instrumentation and control of sensors and devices
that engage cloud technologies. Refer to this Titan use case PDF for a good
example of IoT. Recently, industries have used machine-to-machine
communication (M2M) to achieve wireless automation and control. But with the
emergence of cloud and allied technologies (such as analytics and machine
learning), industries can achieve a new automation layer and with it create new
revenue and business models. IoT is sometimes called the fourth wave of the
industrial revolution, or Industry 4.0. The following are some common uses for
IoT.
• Smart manufacturing
• Connected assets and preventive and predictive maintenance
• Smart power grids
• Smart cities
• Connected logistics
• Smart digital supply chains
Through the internet via embedded devices, seamless communication is possible
between people, processes, and things.
Using low-cost computing, the cloud, big data, analytics, and mobile
technologies, physical things can share and collect data with minimal human
intervention. In this hyperconnected world, digital systems can record, monitor,
and adjust each interaction between connected things. The physical world meets
the digital world and they cooperate.

72
SANJAY GHODAWAT INSTITUTE

IoT Protocols & 3rd Party Dashboards

1) What Is an IoT dashboard?


An IoT dashboard is the user interface within an IoT platform that enables users
to monitor and interact with connected devices through graphs, charts and other
tools and UI elements. Dashboards allow you to manage every aspect of your
connected devices as well as gain perspective on your environment through
visualization of your device data.

Adafruit IO Dashboard

73
SANJAY GHODAWAT INSTITUTE

3) Some IoT Protocols

1) HTTP/HTTPS (Hyper Text Transfer Protocol)


• Purpose: Standard protocol for web communication, also used in IoT for
device communication.

• Features:
- Widely used and supported.
- Secure communication with HTTPS.
- RESTful APIs are common for web and IoT devices.

• Use Cases: Web-based IoT applications, smart home devices

3) MQTT (Message Queuing Telemetry Transport)


• Purpose: Lightweight messaging protocol ideal for small sensors and
mobile devices.
• Features:
- Uses publish/subscribe model.
- Low bandwidth usage.
- Quality of Service (QoS) levels for message delivery.
• Use Cases: Home automation, remote monitoring, and control systems.

4) DTLS (Datagram Transport Layer Security)


• Purpose: Provides security for datagram-based applications.
• Features:
- Encryption, message authentication, and integrity.
- Based on TLS but adapted for UDP.
• Use Cases: Securing CoAP communications, and low-latency
applications.
5) TLS/SSL (Transport Layer Security / Secure Sockets Layer)
• Purpose: Provides secure communication over a computer network.
• Features:
- Encryption, authentication, and data integrity.
- Widely used in HTTP and other protocols.
Use Cases: Securing HTTP-based IoT communications, and secure web
services.

74
SANJAY GHODAWAT INSTITUTE

Conclusion:
I have learnt basic of active and passive component, current, voltage resistance
on basic circuits of electronics deeply and also learnt Arduino basics in which
Arduino and tools and programming basic, peripherals and communication
protocols of Arduino, and also the fundamental of IOT, ESP8266 node MCU
and IOT protocols and 3rd party dashboards, hands on project etc.

75
SANJAY GHODAWAT INSTITUTE

Reference:

https://www.instagram.com/embeetek.in?igsh=MzRlODBiNWFlZA==

https://www.arduino.cc/reference/en/language/functions/analog-
io/analogreference/

https://www.instructables.com/LED-as-lightsensor-on-the-arduino/

https://maps.app.goo.gl/ciuMpryZ1eJEMHdA7

76

You might also like