0% found this document useful (0 votes)
8 views

Embedded Systems-IoT

Uploaded by

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

Embedded Systems-IoT

Uploaded by

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

EMEBEDDED SYSTEMS-IOT

INTRODUCTION

An embedded system is a dedicated computer system designed for one or two specific
functions, often within a larger system. Unlike general-purpose computers, embedded
systems are specialized and optimized for particular tasks, which allows them to operate
more efficiently and reliably. These systems are ubiquitous, found in various
applications such as automotive electronics, home appliances, medical devices,
industrial machines, and consumer electronics.

Key Characteristics of Embedded Systems:

 Dedicated Functionality: Designed to perform specific tasks.


 Real-time Operation: Often required to process data and respond to inputs within
a strict time constraint.
 Resource Constraints: Limited processing power, memory, and storage to keep
costs and power consumption low.
 Reliability and Stability: Must operate continuously and reliably over long
periods.
 Embedded Software: Runs software that is tailored to the hardware and specific
application.

Components of an Embedded System:

 Microcontroller/Microprocessor: Acts as the brain of the system, executing the


program stored in its memory.
 Memory: Includes ROM (for storing firmware) and RAM (for temporary data
storage).
 Peripherals: Input/output interfaces, timers, communication modules (UART, SPI,
I2C), etc.
 Sensors and Actuators: Interfaces with the physical world to gather data and
control external devices.

Internet of Things (IoT)

The Internet of Things (IoT) refers to the network of physical objects or "things"
embedded with sensors, software, and other technologies to connect and exchange
data with other devices and systems over the internet. IoT extends the capabilities of
embedded systems by providing connectivity, enabling remote monitoring, and control,
and facilitating data-driven insights.

Key Characteristics of IoT:

 Connectivity: Devices are connected to the internet, allowing for remote access
and control.
 Data Collection: Sensors collect data from the environment, which is then
processed and analyzed.
 Automation: Enables automatic control of devices based on predefined
conditions or algorithms.
 Scalability: Can handle a vast number of connected devices and data points.
 Interoperability: Devices and systems from different manufacturers can work
together.

Components of IoT Systems:

 IoT Devices: Embedded systems with sensors and actuators that interact with the
environment.
 Connectivity: Communication protocols and networks (Wi-Fi, Bluetooth, Zigbee,
LoRa, NB-IoT) that connect devices to the internet.
 IoT Platforms: Cloud-based platforms that manage device connectivity, data
storage, and processing (e.g., AWS IoT, Azure IoT Hub, ThingSpeak).
 Data Processing and Analytics: Tools and algorithms to analyze the collected data
and derive actionable insights.
 User Interface: Applications and dashboards for users to interact with the system
and visualize data.

Applications of Embedded Systems and IoT

 Smart Homes: Automation of home appliances, lighting, security systems, and


energy management.
 Healthcare: Remote patient monitoring, fitness trackers, and medical devices.
 Industrial IoT (IIoT): Predictive maintenance, asset tracking, and smart
manufacturing.
 Agriculture: Precision farming, livestock monitoring, and automated irrigation
systems.
 Transportation: Fleet management, vehicle telematics, and smart traffic systems.
 Environmental Monitoring: Air quality monitoring, weather stations, and disaster
management.

Conclusion

Embedded systems and IoT are transforming various industries by enabling smarter,
more efficient, and connected solutions. The integration of embedded systems with IoT
capabilities allows for advanced automation, real-time monitoring, and data-driven
decision-making, paving the way for innovative applications and improved quality of life.
DIGITAL AND ANALOG SENSORS

IR SESNOR

IR TRANSMITTER

IR transmitter is a light emitting diode (LED) which emits infrared radiations. Hence,
they are called IR LED’s. Even though an IR LED looks like a normal LED, the radiation
emitted by it is invisible to the human eye.

There are different type of infrared transmitters depending on their wavelengths,


output power and response time. A simple infrared transmitter can be constructed using
an infrared LED’s current limiting register and a power supply. When operated at a
supply of 5V, the IR transmitter consumes about 3 to 5 mA of current. Infrared
transmitter can be modulated to produce, a particular frequency of infrared light. The
most commonly used modulation is OOK (ON-OFF-KEYING) modulation. IR transmitter
can be found in several application. Some application require infrared heat and the best
infrared source is infrared transmitter

Fig IR Transmitter
IR RECEIVER

IR receivers are also called infrared sensors as they detect the radiation from an
IR transmitter. IR receiver come in the form of photodiodes and photo transmitters.
Infrared photodiodes are different from the normal photodiodes as they detect only the
infrared radiation.

Different type of IR receivers based on the wavelength, voltage, package, etc.


When used in an infrared transmitter – receiver combination, the wavelength of the
receiver should match with that of the transmitter. The typical infrared receiver circuit
using a phototransistor consists of an IR phototransistor, a diode, a MOSFE, a
potentiometer and an LED. When the phototransistor receives any infrared radiation,
current flow through it and MOSFET turn ON. This is turn lights up the LED which act as
a load. The potentiometer is used to control the sensitivity of the phototransistor.

Fig IR Receiver

IR SENSOR OPERATION

The IR sensor consists of an IR LED, a photodiode, a potentiometer, an IC operational


amplifier and an LED.
IR LED emits infrared light. The photodiode detects the light. An IC op-amp is used
as a voltage comparator. The potentiometer is used to calibrate the output of the
sensor according to the requirement. When the light emitted by the IR LED is incident
on the photodiode after hitting an object, the resistance of the photodiode falls down
from the huge value. One of the input of the op-amp is at threshold value set by the
potentiometer. The other input of the op-amp is from the photodiode’s series resister.
When the incident radiation is more on the photodiode, the voltage drop across the
series resistor will be high. In the IC, both the threshold voltage and voltage across the
series resistor are compared. If the voltage across the series resister to photodiode is
greater than that of the threshold voltage, the output of the op-amp is high.

FEATURES

 5V powered, low current consumption.


 3 pin interface which are signal, GND, 5V.
 Small size makes it easy to assembly.
 Single bit output.
 Compatible with all type of microcontrollers and Arduino.
Light Dependent Resistor (LDR):

A Light Dependent Resistor (LDR) or a photo resistor is a device whose resistivity is a


function of the incident electromagnetic radiation. Hence, they are light sensitive
devices. They are also called as photo conductors, photo conductive cells or simply
photocells. They are made up of semiconductor materials having high resistance. There
are many different symbols used to indicate a LDR, one of the most commonly used
symbol is shown in the figure below. The arrow indicates light falling on it.

Working Principle of LDR

A light dependent resistor works on the principle of photo conductivity. Photo


conductivity is an optical phenomenon in which the materials conductivity is increased
when light is absorbed by the material.

When light falls i.e. when the photons fall on the device, the electrons in the valence
band of the semiconductor material are excited to the conduction band. These photons
in the incident light should have energy greater than the band gap of the semiconductor
material to make the electrons jump from the valence band to the conduction band.
Hence when light having enough energy strikes on the device, more and more electrons
are excited to the conduction band which results in large number of charge carriers. The
result of this process is more and more current starts flowing through the device when
the circuit is closed and hence it is said that the resistance of the device has been
decreased. This is the most common working principle of LDR.

GAS SESNOR

Nowadays, sensors play a major role in safety systems. In order to detect smoke and
fire, smoke sensors are used. They provide appropriate action on time for safety
purposes. There are numerous types of sensors available to measure environmental
characteristics like light, noise, smoke, etc.

One such sensor used in safety systems to detect harmful gases is the MQ2 Gas sensor.
If you want to make an indoor air quality monitoring system, breath checker, or early
fire detection system, the MQ2 sensor is a suitable choice.

In this tutorial, we are going to discuss how to interface the MQ2 smoke detector sensor
with Arduino and its code. The MQ2 sensor is a powerful sensor in order to measure
different types of gases like Butane, Methane, LPG, Smoke, Alcohol, Propane, Hydrogen
concentrations in the air.

 VCC provides power to the sensor comparator board and needs to be connected to
the 5V of the Arduino
 GND is the ground pin and needs to be connected to the GND pin of the Arduino.
 D0 is the digital output pin, which shows the digital representation of the detected
gas.
 A0 is the analog output pin from which we can detect the gas type by analyzing
analog values.

LCD INTERFACE

The display used is 16x2 LCD (Liquid Crystal Display); which means 16 characters per line
by 2 lines. The standard is referred as HD44780U, which refers to the controller chip
which receives data from an external source (Here Atmega16) and communicates
directly with the LCD. Here 8-bit mode of LCD is used, i.e., using 8-bit data bus.

The three control lines are EN, RS, and RW.

The EN line is called "Enable." This [5] control line is used for telling the LCD that we are
sending data. For sending data to the LCD, the program should make sure that the line is
low (0) and then set the other two control lines or put data on the data bus. When the
other lines are ready completely, bring EN high (1) and should wait for the minimum
time required by the LCD datasheet and end by bringing it low (0) again.
The RS line is "Register Select" line. When RS is low (0), the data is treated as a
command or special instruction (such as clear screen, position cursor, etc.). When the RS
is high (1), the data sent is text data which is displayed on the screen. For example, to
display the letter "B" on the screen you would set RS high.

The RW line is “Read/Write" control line. When RW is low (0), the information on the
data bus is written to the LCD. When RW is high (1), the program is effectively
questioning (or reading) the LCD. Only one instruction ("Get LCD status") is read
command. All the others are write commands--so RW will always be low.

In case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4, DB5,
DB6, and DB7.
Fig: Pin Diagram of LCD
BLUETOOTH HC-05

A Bluetooth technology is a high speed low powered wireless technology link that is
designed to connect phones or other portable equipment together. It is a specification
(IEEE 802.15.1) for the use of low power radio communications to link phones,
computers and other network devices over short distance without wires. Wireless
signals transmitted with Bluetooth cover short distances, typically up to 30 feet (10
meters).

It is achieved by embedded low cost transceivers into the devices. It supports on the
frequency band of 2.45GHz and can support upto 721KBps along with three voice
channels. This frequency band has been set aside by international agreement for the
use of industrial, scientific and medical devices (ISM).rd-compatible with 1.0 devices.

Bluetooth can connect up to “eight devices” simultaneously and each device offers a
unique 48 bit address from the IEEE 802 standard with the connections being made
point to point or multipoint.

HC‐05 module is an easy to use Bluetooth SPP (Serial Port Protocol) module, designed
for transparent wireless serial connection setup. The HC-05 Bluetooth Module can be
used in a Master or Slave configuration, making it a great solution for wireless
communication. This serial port Bluetooth module is fully qualified Bluetooth V2.0+EDR
(Enhanced Data Rate) 3Mbps Modulation with complete 2.4GHz radio transceiver and
baseband. It uses CSR Bluecore 04‐External single chip Bluetooth system with CMOS
technology and with AFH (Adaptive Frequency Hopping Feature).

Bluetooth Module HC-05

The Bluetooth module HC-05 is a MASTER/SLAVE module. By default the factory setting
is SLAVE. The Role of the module (Master or Slave) can be configured only by AT
COMMANDS. The slave modules cannot initiate a connection to another Bluetooth
device, but can accept connections. Master module can initiate a connection to other
devices. The user can use it simply for a serial port replacement to establish connection
between MCU and GPS, PC to your embedded project, etc.

Hardware Features

 Typical ‐80dBm sensitivity.


 Up to +4dBm RF transmit power.
 3.3 to 5 V I/O.
 PIO(Programmable Input/Output) control.
 UART interface with programmable baud rate.
 With integrated antenna.
 With edge connector.

Pin Description

The HC-05 Bluetooth Module has 6pins. They are as follows:

ENABLE: When enable is pulled LOW, the module is disabled which means the module
will not turn on and it fails to communicate. When enable is left open or connected to
3.3V, the module is enabled i.e the module remains on and communication also takes
place.
Vcc: Supply Voltage 3.3V to 5V
GND: Ground pin
TXD & RXD: These two pins acts as an UART interface for communication
STATE: It acts as a status indicator. When the module is not connected to / paired with
any other Bluetooth device, signal goes Low. At this low state, the led flashes
continuously which denotes that the module is not paired with other device. When this
module is connected to/paired with any other Bluetooth device, the signal goes High. At
this high state, the led blinks with a constant delay say for example 2s delay which
indicates that the module is paired.
NODE MCU-ESP8266

Node MCU is an open source IoT stage. It incorporates firmware which keeps running on
the ESP8266 Wi-Fi SoC from Expressive Systems, and equipment which depends on the
ESP-12 module. The term NodeMCU typically refers to the firmware, whereas the board
is termed Devkit. NodeMCU Devkit 1.0 consists of associate ESP-12E on a board that
facilitates its use. It additionally contains a transformer, a USB interface. The expression
"NodeMCU" of course alludes to the firmware as opposed to the improvement units.
The firmware utilizes the Lua scripting dialect

The NodeMCU (Node Micro Controller Unit) is an open source software and hardware
development environment that is built around a very inexpensive System-on-a-Chip
(SoC) called the ESP8266. The ESP8266 is designed and manufactured by Express,
contains all crucial elements of the modern computer: CPU, RAM, networking (wi-fi),
and even a modern operating system and SDK. When purchased at bulk, the ESP8266
chip costs only $2 USD a piece. That makes it an excellent choice for this system design.
The NodeMCU aims to simplify ESP8266 development. It has two key components.

i. An open source ESP8266 firmware that is built on top of the chip manufacturer's
proprietary SDK. The firmware provides a simple programming environment
based on eLua (embedded Lua), which is a very simple and fast scripting
language with an established developer community. For new comers, the Lua
scripting language is easy to learn. And to add on NodeMCU can be programmed
with the Android IDE too.
ii. ii. A development kit board that incorporates the ESP8266 chip on a standard
circuit board. The board has a built-in USB port that is already wired up with the
chip, a hardware reset button, Wi-Fi antenna, LED lights, and standard-sized
GPIO (General Purpose Input Output) pins that can plug into a bread board.
Figure 2 below shows the NodeMCU development board.

Fig -: NodeMCU (ESP8266) Development Board

There are various platforms for IoT system one of them is NodeMCU. It provides lower
level control on devices which is known as firmware. These control runs on ESP8266 Wi-
Fi SoC, which hardware is based on ESP-12 module.Esp8266 is a Wi-Fi based
communication system’s microchip. It uses TCP/IP protocol for communicating with
internet through router. It uses 802.11b/g/n slandered technology for Wi-Fi
communication. It is a Tensilica L106 32-bit RISC instruction unite microprocessor with
32 KB instruction RAM, 32KB instruction Cache RAM, 80KB Data memory.ESP8266 (Pin)
and Arduino Mega’s (Pin) common pins are GND TX (0)-3.3V, RX (0), 3.3V. For running
the ESP8266 on Arduino platform we need to install ESP8266 package in Arduino IDE. As
a board is using, we need to give the additional board manager.
Fig: Esp8266 NodeMCU chip

As shown in Fig it has 12 GPIO pins. One ADC pin. For this project 7 GPIO pins have been
used. They are D0 to D6 which delivers digital outputs.
Interface One Channel Relay Module with Arduino

This is where relay modules come into play. These well-contained modules are
inexpensive, simple to connect, and ideal for home-brew projects that require
switching modest amounts of AC or DC power. The only downside is that, because
these are electro-mechanical devices, they are more prone to wear and tear over
time.
At the core of a relay is an electromagnet (a wire coil that becomes a temporary
magnet when electricity is passed through it). A relay can be thought of as an electric
lever; you turn it on with a relatively small current, and it turns on another device with
a much larger current.

You might also like