You are on page 1of 28

PROJECT ON

IOT
(“INTERNET OF THINGS”)

Online Training Report In Partial Requirement


Of

Bachelors Of Technology
Mechatronics Engineering
Submitted By:-
Ashutosh Mahapatro
GU-2019-3328-L
FACULTY OF ENGINEERING DESIGN & AUTOMATION

GNA UNIVERSITY, PHAGWARA


CANDIDATE DECLARATION

I hereby confirm that the work is being presented in this project


entitled “IOT(Internet Of Things)” by “Ashutosh Mahapatro”
in the partial fulfillment requirement of the award of my degree
in Bachelors technology in MECHATRONICS
ENGINEERING which is to be submitted to the Faculty of
Engineering Design & Automation at GNA UNIVERSITY,
Phagwara is an authentic record of my own work carried out
during the session of 27th August 2020- 27th October 2020.

This is to certify that the above mentioned statement by the


candidate is correct to the best of my knowledge.

---------------------- --------------------
Ashutosh Mahapatro Signature of HOD
Gu-2019-3328-L Mr. Mandeep Heer
B.Tech Mechatronics HOD Mechatronics
CONTENTS

➢Introduction to Internet Of Things


o Introduction

➢Electronics
o Basics of Electronic Components
o Microcontrollers in IOT
o ESP Processors
o Sensors & Actuators

➢Programming
o Text vs block Programming
o About Facilino Software
o USB Serial

➢Programming Sensors & Actuators


o RGB led
o Infrared Receiver

CONCLUSION
INTRODUCTION
The Internet of Things (IOT) refers to a system of interrelated,
internet-connected objects that are able to collect and transfer
data over a wireless network without human intervention.

The personal or business possibilities are endless. A ‘thing’ can


refer to a connected medical device, a biochip transponder (think
livestock), a solar panel, a connected automobile with sensors
that alert the driver to a myriad of possible issues (fuel, tire
pressure, needed maintenance, and more) or any object, outfitted
with sensors, that has the ability to gather and transfer data over
a network.
Our planet has more connected devices than people. The IOT
will transform the way businesses, governments, and humans
interact with the rest of the connected world.

But as with any new technology, IOT issues do exist. Concerns


include acceptance, cost, connectivity, security, and more. As
many new players enter the field, standards still are being set.
But even with these challenges, the end goals of IOT have so
much promise.
Basic Of Electronics Components
Definitions:
Voltage is the electrical force that would drive an electric
current between two points.
Current is the rate of flow of electric charge.
Resistance is a material's tendency to resist the flow of charge
(current).

Resistive components: Resistors, potentiometers, LDR, etc…

Capacitive components: Capacitors, touch, etc…


Inductive components: Coils, relays, motors, etc…

Semiconductors: Diodes, LEDs, Transistors, Triacs, IC, etc…

A microcontroller (uC):Is a programmable device.

The brain of our “smart device”.

Breadboard: A board with all necessary elements for making


an experimental model of an electrical circuit.
Shields: A board, ready to use, that contains all necessary
elements to use a specific electronic component.

AC/DC Power Supply

Alternating current (AC):


Magnitude and direction varies periodically (sinusoidal wave).
Easy to transport energy without significant loses.

Direct current (DC):


Magnitude and direction is constant.

Easier to ‘work with’.


Power generating sources:
Photovoltaic (solar panels), chemical (batteries), electrical
(home power), fuel, geothermal, nuclear, wind, etc…

Resistors:
Used in almost every circuit to limit the current flow or
to adapt a voltage.
Ohm’s law R=V/I. Measured in Ohms.
Capacitors:
Used to store electrical charge so that they provide
required current peaks. Also used as filters.
In DC a capacitor behaves as an open-circuit.
Coils:
Used to generate an electromotive force due to a
change of the flow of current. Also used as filters.
In DC a coil behaves as a wire.
Diodes:
Made from the union of N-type and P-type semiconductors.
Current flows on one direction, but not in the opposite
direction (from anode to cathode).

Zener’s are special types of diodes used to stabilize a voltage.

Transistor
Useful for amplification and switching applications.
Amplifier: A tiny current on one lead produces a bigger
current at the other leads.
Switch: A small current through on one lead makes the current
flow on the two other leads.
Types:
BJT have three layers of doped semiconductor material: NPN
or PNP. They have pins: Base (B), Collector (C) and Emitter
(E).
MOSFET: A voltage applied to the gate can generate a
current flow between the other leads, the source and the drain
Thyristors & Triacs
They can be used to control loads such as lamps, motors,
heaters.
A thyristor is like a controlled diode. The current only flows
in one direction but only if a voltage is applied to the gate. To
switch off, the current between the anode and the cathode
must be eliminated.
Triacs is like a thyristor but can conduct current in both
directions, they are used in AC power control.
Microcontrollers In IOT
Digital vs. Analog: A digital signal varies between two possible
states HIGH or LOW, while an signal that can take any value

within a range of voltages.


Digital Input: An external device controls the voltage and the
microcontroller ‘monitor’ its changes, so we can read it as

HIGH or LOW.
Digital Output: The microcontroller can set a HIGH or LOW
voltage.
Analog Input: An internal ADC converts the analog value into
a decimal number (typically discrete values with 10-bit to 16 bit

resolution).
PWM (Pulse modulated width): A periodic signal with
variable HIGH/LOW times. Typically used to control
transistors, generate frequencies, etc... They can be seen as
‘analog’ signals for components with slow dynamics, such as
motors or analog filters.

Interrupts: Special signals that will interrupt the current


program flow so that a higher priority task can be executed.
External: External signals can generate an interrupt on specific
pins.
Timers: Most microcontrollers include timers to measure time
or to execute tasks periodically.
Bus signals: Used to transmit digital data between the
microcontroller and another external device.
UART: Serial communication with two lines (RX and TX)
between two devices.
I2C: Serial communication with two lines (SDA and SCK).
Master-slave architecture.
SPI: Serial full-duplex communication with four lines (CLK,
MOSI, MISO,SS). Master-slave architecture.
Program memory (Flash memory):
Where we store our code, non-volatile.
Large, compared to data memory, because is cheap.
Data memory:
RAM (SRAM): Where we store variables that we use in our
code. It is deleted on start-up (volatile).
Special Function Registers (SFR) are connected to specific
peripherals such as de ADC or Timers.
ROM (EEPROM): Where we store long-term variables.
Usually is even shorter than SRAM, because is expensive.
ESP Processors
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 Uno.


In 2015, Espressif released the API to be able to program their
ESP8266 microcontroller.
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 esp. too
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.
Available API to program ESP32 with Arduino IDE in GitHub.
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 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.
Sensors & Actuators
Light Dependent Resistor (LDR): Its resistance varies depending
on the amount of visible light received.
Typical circuit application:

LDR Calibration: The curve voltage-luminance is nonlinear.


Digital Temperature Sensor:
DHT11 provides:
Relative humidity provided in %.
Temperature provided in Celsius with degree precision.
Uses one digital signal for transmitting and receiving data.
Analog temperature sensor LM35.
Linear response. Resolution: 10mV/C
Precision: 0.5 C at 25 C temperature.
Range: −55°C to 150°C.

Passive Buzzer
A buzzer has a piezoelectric layer that makes a membrane
vibrate when a current is applied to it.

If a PWM signal is applied, the frequency of such signal is


converted into a sound with a vibration of that frequency.
We can generate notes at the indicated frequency and duration.
Sound Player:
A small, cheap and tiny circuit for reproducing MP3, WAV,
WMA sounds.
SD card up to 32GB.
Multiple sampling rates and adjustable volume.
Classic functionalities: play, pause, stop, etc…

Liquid Cristal Display


A cost effective way to print text out of your microcontroller.
2 lines with 16 characters.
I2C/Parallel Interface
Organic Light Emitting Diode.
They do not need backlight better contrast.Lower power

consumption.
I2C or SPI interfaces

Light ON/OFF Control with a LED lamp and LED driver.


Temperature control with a FAN.
Water pump ON/OFF control with a DIY water pump
Position controlled DC motors with a small driver quite
standardized.
A Servo includes DC Motor, gears, IC driver and interface and
potentiometer.
The accuracy is not very good, very more than enough for many
applications.
Easy to control: PPM signal
Programming
Programming for IOT is usually a polyglot (multiple languages)
effort since the Internet-of-Things ( IOT ) is a system of inter-
related computing devices that are provided with unique
identifiers and the ability to transfer data over a network.

The most popular languages in IOT are Java, C, C++, Python,


JavaScript, Node.js, Assembler, PHP, C#, Lua, R, Go, Ruby,
Swift and Rust in descending order of popularity. This is from a
2017 online survey co-sponsored by Eclipse IOT Working
Group, IEEE IOT, AGILE IOT and IOT Council in which 713
individuals participated.
Edge Devices - These are constrained-resource embedded
systems. For very small devices (higher constraints), Assembly
and C are the languages of choice. A better processor and more
computing power on the device enables one to use C, Python,
Node.js, Java. The focus is to minimize instruction count, and
maximize execution speed and resource management.
Gateways - Gateways manage communication and do analysis
of data from many devices through several different buses. More
languages can be run on these devices because of their increased
computing power, including C, C++, Java, Python, and Node.js.
Text Vs Block Programming

Learn to code Code to learn

Text Programming
In particular in Arduino IDE (based on C++)
C++ is based on OOP (object oriented paradigm). Well-
structured code.
Libraries: maintained by communities and particular users.
Arduino IDE is simple and easy compared to other development
environments. You need to remember the API or continuously
access to the documentation.
It can be complex to understand for non-experienced users,
particularly when handling pointers, managing memory, etc…
Prone to compilation errors.

Block Programming
Block programming expose users to the fun aspects of
programming (creativity and design).
With a simple block, you can generate many lines of code.
Blocks can be reconfigurable, very intuitive to use and they
require less memory effort to remember how to use it.
Good for simple programs, it’s a kick start for many situations.
Students learn programming without noticing. Block
programming tools are not necessarily childish.
Difficult to maintain for larger programs. They are not
standardized.
They are not as accessible to students with visual disabilities.
About Facilino Software

Kick start usage of some electronics. Facilino simplifies


required steps to successfully start using electronics.
If you have little experience in microcontrollers, electronics,
IOT, robotics, control, etc… To my knowledge, there are no
other block programming tools targeting this fields.
Young learners should code to learn and in the meantime are
learning to code. This tool is a good companion for schools
(ages 10+).
When you look for a tool that includes many complex tasks and
you don’t know how to start with...
When you are primarily interested in learning to code.
Facilino will help you in that process, but only at the beginning.
Sooner or later you will need a text-programming tool.
When the number of blocks is too large. Visual programming
can be annoying if there are too much blocks. When you need
advance programming features not considered yet in Facilino.
Not only for child. You can use Facilino as code generator.
IOT technology is relatively new and evolving, Block
Programming tool like Facilino to hide all unnecessary
complexities and most of the technical details.

License
License can be acquired at Robotics Facile store, a very small
company, devoted to create and provide educational resources in
UPV MOOCs:
Facilino license allows code generation for advanced
instructions.
13-digit key that can be used on any platform and several
computers (after 5 min). No shipping costs.
Uncountable hours devoted to improve this software. Collected
money from the license is used for buying new materials to
create new resources.
Programming USB Serial

WeMo’s D1 R32 With Arduino multi-sensor shield


Main Instructions Additional Information
HELLO WORLD!
Print on console ‘Hello world!’ at start up

Serial Loop back:-Print on console any character received on the


serial receiver buffer.

Parsing integer Number:- Parse an integer number & print the


value incremented in one unit.

Parsing Decimal Number:- Parse a decimal number and print the


negate value.
CONCLUSION
In conclusion, Internet of Things is the concept in which the
virtual world of information technology connected to the real
world of things. The technologies of Internet of things such as
RFID and Sensor make our life become better and more
comfortable
The opportunities that come with IoT are enormous, and can be
game-changing for virtually any business or organization,
especially those that are embarking on a digital transformation.

You might also like