Sei sulla pagina 1di 51

Chapter 1: Introduction to SMART HOME

1.1) Identify the requirements for the real-world problems

INTRODUCTION TO IOT

The Internet of Things (IoT) is the network of physical devices, vehicles, home
appliances, and other items embedded with electronics, software, sensors, actuators, and
connectivity which enables these things to connect and exchange data, creating opportunities
for more direct integration of the physical world into computer-based systems, resulting in
efficiency improvements, economic benefits, and reduced human exertions.

Internet of Things (IoT) is an ecosystem of connected physical objects that are


accessible through the internet. The ‘thing’ in IoT could be a person with a heart monitor or an
automobile with built-in-sensors, i.e. objects that have been assigned an IP address and have
the ability to collect and transfer data over a network without manual assistance or intervention.
The embedded technology in the objects helps them to interact with internal states or the
external environment, which in turn affects the decisions taken.

NEED OF IOT

Today, we are seeing the electrification of the world around us. Almost any
manufactured good now includes an embedded processor (typically a microcontroller, or
MCU), along with user interfaces, that can add programmability and deterministic command
and control functionality. The electrification of the world and the pervasiveness of embedded
processing are the keys to making objects smart. After a device becomes smart through the
integration of embedded processing, the next logical step is remote communication with the
smart device to help make life easier.

Communication capability and remote manual control lead to the next step of
automating things. And, for those applications to connect with and leverage the Internet to
achieve this goal, they must first become / incorporate an MCU/embedded processor with an
associated unique ID, then connected and, finally, controlled. Those capabilities can then
enable a new class of services that makes life easier for their users.

1
For the network, sophisticated cloud-based processing requires a new generation of
communications processors that can keep track of all of those connected devices, communicate
with them and translate their functionality into useful services, all with non- linear
improvement to their performance and efficiency. The challenge will be to build secure
networks that keep up with demand, while simultaneously reducing energy consumption and
cost of equipment.

IoT encompasses the idea of millions of heterogeneous, aware and interconnected


devices with unique IDs interacting with other machines/objects, infrastructure, and the
physical environment. IoT largely plays a remote track, command, control and route (TCC&R)
role. As with all aspects of the IoT, safety and security are paramount. These applications are
not about data mining of people’s behaviours but rather they extend the automation and
machine-to-machine (M2M), machine-to-infrastructure (M2I) and machine-to-nature (M2N)
communications that can help simplify people’s lives.

1.2 Applications of IOT

1. SMART HOME

Smart Home has become the revolutionary ladder of success in the residential spaces
and it is predicted Smart homes will become as common as smartphones. The cost of owning
a house is the biggest expense in a homeowner’s life. Smart Home products are promised to
save time, energy and money. With Smart home companies like Nest, Ecobee, Ring and
August, to name a few, will become household brands and are planning to deliver a never seen
before experience.

A home automation system will control lighting, climate, entertainment systems, and
appliances. It may also include home security such as access control and alarm systems. When
connected with the Internet, home devices are an important constituent of the Internet of
Things.

2. WEARABLES

Wearables have experienced a explosive demand in markets all over the world.
Companies like Google, Samsung have invested heavily in building such devices. Wearable

2
devices are installed with sensors and software’s which collect data and information about the
users. This data is later pre-processed to extract essential insights about user. These devices
broadly cover fitness, health and entertainment requirements.

3. CONNECTED CARS

The automotive digital technology has focused on optimizing vehicles internal


functions. But now, this attention is growing towards enhancing the in-car experience. A
connected car is a vehicle which is able to optimize it’s own operation, maintenance as well as
comfort of passengers using onboard sensors and internet connectivity.

4. INDUSTRIAL INTERNET

IoT holds great potential for quality control and sustainability. Applications for tracking
goods, real time information exchange about inventory among suppliers and retailers and
automated delivery will increase the supply chain efficiency. According to GE the
improvement industry productivity will generate $10 trillion to $15 trillion in GDP worldwide
over next 15 years.

5. SMART CITIES

Smart city is another powerful application of IoT generating curiosity among world’s
population. Smart surveillance, automated transportation, smarter energy management
systems, water distribution, urban security and environmental monitoring all are examples of
internet of things applications for smart cities.

IoT will solve major problems faced by the people living in cities like pollution, traffic
congestion and shortage of energy supplies etc.

6. IOT IN AGRICULTURE

With the continuous increase in world’s population, demand for food supply is
extremely raised. Governments are helping farmers to use advanced techniques and research
to increase food production. Smart farming is one of the fastest growing field in IoT. Sensing
for soil moisture and nutrients, controlling water usage for plant growth and determining
custom fertilizer are some simple uses of IoT.

3
7. SMART RETAIL

The potential of IoT in the retail sector is enormous. IoT provides an opportunity to
retailers to connect with the customers to enhance the in-store experience. Smartphones will
be the way for retailers to remain connected with their consumers even out of store. Interacting
through Smartphones and using Beacon technology can help retailers serve their consumers
better. They can also track consumer’s path through a store and improve store layout and place
premium products in high traffic areas.

8. ENERGY ENGAGEMENT

Power grids of the future will not only be smart enough but also highly reliable. Smart
grid concept is becoming very popular all over world. The basic idea behind the smart grids is
to collect data in an automated fashion and analyze the behavior or electricity consumers and
suppliers for improving efficiency as well as economics of electricity use.

9. IOT IN HEALTHCARE

The concept of connected healthcare system and smart medical devices bears enormous
potential not just for companies, but also for the well-being of people in general. IoT in
healthcare is aimed at empowering people to live healthier life by wearing connected devices.
The collected data will help in personalized analysis of an individual’s health and provide tailor
made strategies to combat illness. The video below explains how IoT can revolutionize
treatment and medical help.

10. IOT IN POULTRY AND FARMING

Livestock monitoring is about animal husbandry and cost saving. Using IoT
applications to gather data about the health and well being of the cattle, ranchers knowing early
about the sick animal can pull out and help prevent large number of sick cattle.

4
Chapter 2: Introduction to Mini-Project: - Home Automation

2.1 Problem Definition:

Home Automation refers to control of home appliances/ home devices through


programming them as per our need. This leads to an easy lifestyle for people living in that
home as controlling devices/appliances over voice/gestures can lower the difficulty of
performing tasks and thus saving time and energy. The home automation can be achieved using
various degrees of intelligence and automation through network. In this process we make use
of micro-controller to connect it with the network thus enabling us to program all the home
appliances/devices as per our need. Home automation provides security, energy efficiency and
ease of use hence, it is adopted more. It also provides remote interface to home appliances to
provide control and monitoring on a web browser.

2.2 Aims and Objectives

SMART HOME: A Smart Home is one that provides its home owners comfort, security,
energy efficiency (low operating costs) and convenience at all times, regardless of whether
anyone significant is home

Objectives:

 Improve Inhabitant experience


 Optimize inhabitant productivity
 Minimize operating costs
 Improve comfort
 Simplify use of technologies
 Ensure security
 Enhance accessibility

2.3 Scope of the Project

5
The user will be able to control home devices/appliances using actions and certain
events and he/she will be notified about the events. The Wifi Module can be connected to a
cloud server and can store the information regarding all the events and readings on to the cloud.
The user can then access his/her cloud account to get all the details captured by the sensors.
Also prior automation can be done using the micro-controller to sense the number of people in
a room and turn on/off devices as per. This will further ease the task of user to switch on/off
the appliances every time he/she enters the room or exits the room.

2.4 Features of the Project

Features:

 Keeping track of no. of people in a room and performing tasks as per pre-loaded
commands
 Checking for any fire situation
 Checking for room temperature
 Keeping track of all the data and uploading it to the cloud for the user to go through it
anytime he/she wants.

Chapter 3: Review of Literature

6
IOT Home Automation using Arduino

In a YouTube video by svsembedded channel, basics of home automation is show.


Simple website interaction example is shown in this video where user can interact with their
home appliances like fan, bulb, etc with the help of website.

First, the Arduino UNO board is connected to the appliances (3 bulbs of different
colours and 1 dc fan) by using relays. A program is written in order to take user’s input from
the website and perform particular tasks according to it. GPRS is used to connect the Arduino
board with the website and the input given to the website is thus passed on to the Arduino
board. Thus, we can give command to change our appliance’s status from anywhere using our
website. On that website, an interface is made for user to change the status of his/her appliances.
Whenever user makes any changes in the website, the changes are followed in the Arduino
board and then to the appliances themselves. This is done by writing a program to carry forward
the changes made by the user to the Arduino board and then make changes to the appliances.
Thus, we can achieve remote access to our home appliances. [1]

Interfacing a sensor with an Arduino

Step 01: Get your hardware

The first step is to select your hardware. There are several different versions available
from several different manufacturers. These manufacturers deliver to different areas of the
globe, with a full list given on the main Arduino site. The example code in this tutorial assumes
that you are using one of the models that includes a built-in temperature sensor (like the
Arduino Leonardo, for example).

Step 02: Plugging in

Most Arduino boards interface over USB with the development computer. For those
which don’t, there are extra modules, called shields, available to provide USB communication.
When you plug it into your Linux box, it should show up as a serial device under /dev/ttyUSBX
or /dev/ttyACMX. You can check which by executing dmesg and looking for the messages
generated when you plug it in.

Step 03: Software

Installing the required software has gotten much easier recently. You should be able to
find packages in most distributions that will handle everything for you. For example, Debian-
based distros use ‘sudo apt-get install arduino’ to install the IDE, compiler and other required
packages for Arduino development.

7
Step 04: Start a new program

Now that you have your Arduino plugged in, you can start up your IDE and begin
programming your first project. Programs in Arduino speak are called sketches, and they are
stored in a sketchbook.

Step 05: Verify your board

Since there are so many variations of the Arduino available, you need to tell the IDE
which one you will be generating code for. Clicking on Tools>Board will pull up a list of all
of the boards that it understands. We selected Leonardo for this example.

Step 06: Verify serial port

The Arduino IDE scans all of the available serial port devices on your Linux box and
presents them as options. Clicking on Tools>Serial Port will pull up this list so that you can
select the correct one. Remember to check dmesg to see which one is associated to your
Arduino.

Step 07: Using a programmer

Normally, you upload your code using the built-in bootloader. You can use an external
programmer instead. If you decide to do this, then you can select the programmer you are using
by clicking Tools>Programmer.

Step 08: Set preferences

Clicking on File>Preferences will pop up another dialog window where you can set
preferences for the IDE. The ones you will likely want to set are the verbose outputs for
verifying and uploading. This will be helpful when you are first starting out.

Step 09: Start with an example

The Arduino IDE includes a very complete set of examples to get you started. They are
broken down into groupings based on what they do. So there are examples for string processing,
controlling servos etc. Selecting one of these examples will open the referenced sketch in a
new window.

Step 10: Bare-bones program

There are two necessary parts of every program: a setup function and a loop function.
When power is applied to the Arduino, your program starts up immediately. The setup function
runs once and is used for initialisation steps. Then the loop function starts up and continues for
ever.

8
Step 11: Setup

We are going to want to see what this temperature sensor is doing, so we will need to
set up a serial connection. ‘Serial.begin(9600)’ opens the serial connection and sets the speed
to 9600. Then you can print text out on this new serial connection.

Step 12: The main loop

The main loop is the part of your program that does all of the work. In this case we will
be calling a function to get the temperature and print it out. Then we sleep for 1000ms with the
function ‘delay’. At the end of this delay we circle back up to the top of the loop function.

Step 13: Functions

You can define your own functions in your code. In this example, we create the function
GetTemp which takes no arguments and returns a double. This code is very C-like, so if you
have any experience with C you should be able to read and write code for the Arduino.

Step 14: Putting it all together

Once you have your program finished, you need to compile it. In the Arduino IDE, this
step is called verification. When you verify your program, it gets run through the compiler,
allowing you to check for any errors. The compiler output goes to the console and to the lower
pane in the main window. If you set verbose output for verification in the preferences, then
more complete output gets displayed in the lower pane. It is like setting verbose flags on GCC
when you compile directly on the command line. You can then go and fix any errors and check
on any warnings until your code compiles cleanly.

Step 15: Uploading to your Arduino

Once you have a program that compiles and you are confident is correct, you can then
upload it to your Arduino. Clicking on File> Upload will recompile your program and then
attempt to send it over the serial port you selected earlier.[2]

Chapter 4: System Description

4.1 Design (GUI Design, Block diagram, Flowchart of proposed system)

9
Block Diagram -

figure 4.1 block diagram of our project – smart home

10
Flow Chart -

figure 4.2 flow chart of our project – smart home

11
4.2 Hardware, Software and Cloud Platforms used

HARDWARE -

1. Arduino Mega 2560

The Arduino Mega 2560 is a microcontroller board based on the ATmega2560.


It has 54 digital input/output pins (of which 15 can be used as PWM outputs), 16 analog
inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB
connection, a power jack, an ICSP header, and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started. The Mega 2560
board is compatible with most shields designed for the Uno and the former boards
Duemilanove or Diecimila.

 Microcontroller - ATmega2560

 Operating Voltage – 5V

 Input Voltage (recommended) – 7-12VI

 nput Voltage (limit) – 6-20V

 Digital I/O Pins - 54 (of which 15 provide PWM output)

 Analog Input Pins – 16

 DC Current per I/O Pin - 20 mA

 DC Current for 3.3V Pin - 50 mA

 Flash Memory - 256 KB of which 8 KB used by bootloader

 SRAM - 8 KB

12
 EEPROM - 4 KB

 Clock Speed - 16 MHz

 LED_BUILTIN – 13[3]

figure 4.3 pin diagram of Arduino board

2. IR Sensor(LM393)

 Working voltage: 3 - 5V DC

 Output type: Digital switching output (0 and 1)

 3mm screw holes for easy mounting

 Board size: 3.2 x 1.4cm[4]

figure 4.4 IR sensor (LM393)

3. Temperature Sensor(LM35)

13
 Calibrated Directly in Celsius (Centigrade)

 Linear + 10-mV/°C Scale Factor

 0.5°C Ensured Accuracy (at 25°C)

 Rated for Full −55°C to 150°C Range

 Suitable for Remote Applications

 Low-Cost Due to Wafer-Level Trimming[5]

figure 4.5 temperature sensor(LM35)

4. WiFiModule(ESP8266)

 802.11 b/g/n

 Wi-Fi Direct (P2P), soft-AP

 Integrated TCP/IP protocol stack

 Integrated TR switch, balun, LNA, power amplifier and matching network

 Integrated PLLs, regulators, DCXO and power management units

 +19.5dBm output power in 802.11b mode

 Power down leakage current of <10uA

 1MB Flash Memory

 Integrated low power 32-bit CPU could be used as application processor

 SDIO 1.1 / 2.0, SPI, UART

14
 STBC, 1×1 MIMO, 2×1 MIMO

 A-MPDU & A-MSDU aggregation & 0.4ms guard interval

 Wake up and transmit packets in < 2ms

 Standby power consumption of < 1.0mW (DTIM3)[6]

figure 4.6 Wifi module ESP8266

5. Smoke Sensor(LM393MQ2)

 Working voltage: DC 5V

 Detection of gas: combustible gases, fumes

 Detectable concentration: 300-10000ppm (flammable gas)

 Input voltage: DC5V

 Power consumption (current): 150mA

 DO output: TTL digital 0 and 1 (0.1 and 5V)

 AO output: 0.1 - 0.3V (relative to pollution), the maximum concentration of a


voltage of about 4V[7]

15
figure 4.7 smoke sensor(LM393MQ2)

6. LEDs and resistors

 Voltage – 2-3.5 V

 Current – 20mA

 Resistance – 5k ohm

7. Connecting Wires(M2M, M2F)

SOFTWARE -

1. Arduino IDE

The Arduino Integrated Development Environment - or Arduino Software


(IDE) - contains a text editor for writing code, a message area, a text console, a toolbar
with buttons for common functions and a series of menus. It connects to the Arduino
and Genuino hardware to upload programs and communicate with them.

Programs written using Arduino Software (IDE) are called sketches. These
sketches are written in the text editor and are saved with the file extension .ino. The
editor has features for cutting/pasting and for searching/replacing text. The message
area gives feedback while saving and exporting and also displays errors. The console

16
displays text output by the Arduino Software (IDE), including complete error messages
and other information. The bottom righthand corner of the window displays the
configured board and serial port. The toolbar buttons allow you to verify and upload
programs, create, open, and save sketches, and open the serial monitor.[8]

2. Windows OS

 Win 8.1 or 10 (required by Arduino IDE)

OTHER -

1. Internet Connection

4.3 Implementation Methodology:


We first observer our problem and planned to implement our project according to it.
We noticed various things that we can implement in our project which can help the user to ease
his/her task. Since we are implementing home automation, we kept user’s comfort as our top
priority. In order to achieve our goal, we followed the following steps:

1. We planned what all facilities are we going to provide the end user and gathered all the
required hardware and software according to it.

2. Implementing one sensor at a time, we tested our code and see if we got the desired
output. Initially we started with easy to implement sensors like buzzer, temperature
sensor, smoke sensor, etc.

3. Temperature Sensor -

I. Temperature sensor has 3 pins (vcc, input, ground), we connected the sensor pins with
the Arduino board and then burned the code onto the board. The figure 4.3 shows how
usually a temperature sensor is connected to an Arduino board.

II. The sensor takes input of the surrounding temperature and passes the readings to the
board in form of voltage.

17
III. Then we need to convert this readings into degree Celsius. For that, appropriate
calculations are required and then the output is displayed on Serial Monitor.

figure 4.8 general pin connection for a temperature sensor

4. Smoke Sensor -

I. The smoke sensor has 4 pins(A0, D0, vcc, ground). We can get analog or digital
readings as per our requirement. So we connect A0, vcc and ground to our board. The
figure 4.4 shows how generally a smoke sensor is connected to an Arduino board.

II. Then in our code we set a particular threshold for smoke detection. If the readings cross
this threshold, then a certain event will trigger.

18
III. We set that threshold to 200 and the smoke sensor keep on getting readings.

figure 4.9 general pin connection for a smoke sensor

5. Buzzer -

I. The buzzer performs basic task of emitting sound frequency when certain event occurs.

II. The buzzer had 2 pins (vcc, ground). We connect these pins with the Arduino board.
The figure 4.5 shows how generally a smoke sensor is connected to an Arduino board.

III. According to our code, we then decide when the buzzer should go on and when the
buzzer should be off.

figure 4.10 general pin connection for a buzze

6. IR -

I. We had to implement 2 IR Sensors in a certain way to count the number of people in a


room.

19
II. IR Sensors have 3 pins (). We connect both the IR Sensors with the Arduino board and
place them adjacent to each other at a particular distance. The figure 4.6 shows how
generally an IR sensor is connected to an Arduino board.

III. Then we burn our code to the Arduino board which executes our logic of calculating
number of people and tell us the count of them according to people coming in or going
out of the room.

IV. Using that count, we then decide how to control the home appliances(bulb and fan).

V. According to our logic implemented,

0 people in room → All appliances OFF

1 person in room → All appliances ON

More than 1 person in room → Leave the appliances in the same state they are
in.

figure 4.11 general pin connection for an IR sensor

7. WiFi Module -

I. Next was to connect out Arduino board with an andriod device. We used ESP8266
module to do so.

20
II. ESP8266 has 8 pins put of which only 5 pin connections are required(). We connect
those pins accordingly to Arduino board. The figure 4.7 shows how generally a
ESP8266 Module is connected to an Arduino board.

III. Initially we connected our board with ESP module through connecting wires and then
we configured the ESP module to search for Wifi by providing SSID and Password of
the mobile hotspot.

IV. After establishing the connection we can send message to the cellphone connected
whenever required.

figure 4.12 general pin connection for a ESP8266 Module

21
4.4 Hardware Circuit Diagram

figure 4.13 circuit diagram of our project – smart home

4.5 Code

IR LOGIC
int IR1_out = HIGH;
int IR2_out = HIGH;
int count = 0;

void setup() {
// put your setup code here, to run once:
pinMode(8, INPUT); // ir sensor input value for incoming Count
pinMode(13, INPUT); // ir sensor input value for Outgoing Count
pinMode(10,OUTPUT);
Serial.begin(9600);

22
}

void loop() {
// put your main code here, to run repeatedly:
int IR1_out = digitalRead(8);
int IR2_out = digitalRead(13);
int LED = digitalRead(10);

if(IR1_out == LOW) {
IN();
}

if(IR2_out == LOW) {
OUT();
}
delay(200);
}

void IN()
{
do{
IR2_out = digitalRead(13);
delay(200);
}while(IR2_out);
count ++;
Serial.print("INSIDE-COUNT:");
Serial.println(count);
delay(200);
if (count > 0){
digitalWrite(10, HIGH);
}
else {

23
digitalWrite(10, LOW);
}
}

void OUT()
{
do{
IR1_out = digitalRead(8);
delay(200);
}while(IR1_out);
count--;
Serial.print("OUTSIDE-COUNT:");
Serial.println(count);
delay(200);
if (count > 0){
digitalWrite(10, HIGH);
}
else {
digitalWrite(10, LOW);
}
}

Esp8266 temperature and smoke

int ledPin = 10; // LED+


//float j=0;
int temp_sensor = A0; // LM35 Output
int smokeA0 = A1;
int IR1_out = HIGH;
int IR2_out = HIGH;
int count = 0;
String apiKey = "3I0KQQ80YV4HTJSE"; //Change this key to your "Write API key"

24
void setup() {
// put your setup code here, to run once:
pinMode(ledPin, OUTPUT); // Set ledPin as Output
pinMode(smokeA0, INPUT);
Serial.begin(9600); // PC Arduino Serial Monitor
Serial1.begin(115200); // Arduino to ESP01 Communication
connectWiFi(); // To connect to Wifi
}

void loop() {
// put your main code here, to run repeatedly:
float analog_val = analogRead(temp_sensor); // Read Analog Temperature
float digital_vout = (analog_val*5000.0)/1023; // Convert Analog Tempt. to Digital Value (10 bit
ADC) // mV
float tempc = digital_vout/10; // Storing value in Degree Celsius
float smokec = analogRead(smokeA0);
//j=tempc;

//digitalWrite(ledPin, HIGH); // LED ON


//delay(500); // wait for 500 mSec
//digitalWrite(ledPin, LOW); // LED OFF

Serial1.println("AT+CIPMUX=0\r\n"); // To Set MUX = 0


delay(2000); // Wait for 2 sec

// TCP connection
String cmd = "AT+CIPSTART=\"TCP\",\""; // TCP connection with https://thingspeak.com server
cmd += "184.106.153.149"; // IP addr of api.thingspeak.com
cmd += "\",80\r\n\r\n"; // Port No. = 80

Serial1.println(cmd); // Display above Command on PC

25
Serial.println(cmd); // Send above command to Rx1, Tx1

delay(20000); // Wait for 20 Sec

if(Serial1.find("ERROR")) // If returns error in TCP connection


{
Serial.println("AT+CIPSTART error"); // Display error msg to PC
//return;
}

// prepare GET string


String getStr = "GET /update?api_key=";
getStr += apiKey;
getStr +="&field1=";
getStr += tempc;
//getStr += "\r\n\r\n";
getStr +="&field2=";
getStr += smokec;
getStr += "\r\n\r\n";

Serial.println(getStr); // Display GET String on PC

cmd = "AT+CIPSEND="; // send data length


cmd += String(getStr.length());
cmd+="\r\n";

Serial.println(cmd); // Display Data length on PC


Serial1.println(cmd); // Send Data length command to Tx1, Rx1

delay(20000); // wait for 20sec

if(Serial1.find(">")) // If prompt opens //verify connection with cloud

26
{
Serial.println("connected to Cloud"); // Display confirmation msg to PC
Serial1.print(getStr); // Send GET String to Rx1, Tx1
}
else
{
Serial1.println("AT+CIPCLOSE\r\n"); // Send Close Connection command to Rx1, Tx1
Serial.println("AT+CIPCLOSE"); // Display Connection closed command on PC
}

// thingspeak free version needs 16 sec delay between updates


delay(16000); // wait for 16sec

boolean connectWiFi() { // Connect to Wifi Function


Serial1.println("AT+CWMODE=1\r\n"); // Setting Mode = 1
delay(100); // wait for 100 mSec

String cmd = "AT+CWJAP=\""; // Connect to WiFi


cmd += "KT18"; // ssid_name
cmd += "\",\"";
cmd += "1029384756"; // password
cmd += "\"\r\n";

Serial.println(cmd); // Display Connect Wifi Command on PC


Serial1.println(cmd); // send Connect WiFi command to Rx1, Tx1

delay(10000); // wait for 10 sec

Serial1.println("AT+CWJAP?"); // Verify Connected WiFi

27
if(Serial1.find("+CWJAP"))
{
Serial.println("OK, Connected to WiFi."); // Display Confirmation msg on PC
return true;
}
else
{
Serial.println("Can not connect to the WiFi."); // Display Error msg on PC
return false;
}
}

4.6 Final Prototype:

figure 4.14: Final IR setup

28
figure 4.15: final temperature and smoke sensor setup

4.7 Conclusion & Future Scope of the Project


Conclusion -

The proposed project provides a Home Automation System that uses WiFi Module and
Smartphone assistant to connect all home appliances with the user. The project provides a user-
friendly automation system with low cost and good performance. The user gives command
through the android application which is connected to Arduino Mega with the help of ESP8266
then the electrical appliances of a home can be regulated.

29
Future Scope -

Our project is just a prototype of a home automation system. There are various things
which can be implemented along with our project in order to make it a full-fledged home
automation system.

By taking the reading from the smoke sensor, we can perform various tasks. For
example, if the smoke sensors senses smoke from a fire then we can use water sprinkler to put
off the fire and save a calamity.

For improving security of the home, we could add a fingerprint scanner or a web camera
to identify the person trying to enter the house. We can create a database of existing people
living in the house and also the people who are allowed to enter the house. Every time someone
tries to enter the house, a notification will be sent to the user mentioning the image of the person
trying to enter the house.

We can make an android app or we cn connect our Arduino board with voice assistance
in order to enable the feature of voice control over cell phone or even going as far as to install
mics in the room to capture voice commands from user and perform tasks as per.

4.8 Constraints for real time development:

1. The main constraint will be the Arduino Mega board. Although we were able to
implement this project on a small scale, in order to implement it on a large scale – an
entire building or an office, Arduino Mega will fall short since it has less number of
pins and processing capabilities.

2. IR Sensors used here have very small range of detecting input from the surrounding
movements. So in real life, we have to use much better performing IR Sensors to get
the correct input or else it will create a major flaw in our system.

3. The temperature sensor also works on a small scale. For the temperature sensor to
measure temperature of the entire room, we require good sensors than the current one.
Or else we can user multiple temperature sensors and scatter it in the room and take the
average reading from them in order to decide the room temperature.

30
4. Connecting actual appliances like bulbs or a fan to our Arduino board might damage
our board, since the voltage required for such appliances is very large than the voltage
we provide to our board.

References -
1. https://www.youtube.com/watch?v=xTyPSPzD8-M (Accessed on: 18/08/2018 05:46
pm)

2. https://www.gadgetdaily.xyz/customising-the-bootstrap-framework/ (Accessed on:


11/10/2018 07:00 pm)

3. https://store.arduino.cc/usa/arduino-mega-2560-rev3 (Accessed on: 26/09/2018 10:23


pm)

4. http://qqtrading.com.my/ir-infrared-obstacle-detaction-sensor-module-fc-5 (Accessed
on: 26/09/2018 10:35 pm)

5. http://www.ti.com/product/LM35 (Accessed on: 26/09/2018 10:42 pm)

6. https://www.sparkfun.com/products/13678 (Accessed on: 28/09/2018 09:51 pm)

7. https://www.alibaba.com/product-detail/LM393-ZYMQ-2-MQ2-Gas-
Sensor_60702921381.html?s=p (Accessed on: 29/09/2018 08:16 pm)

8. https://www.arduino.cc/en/Guide/Environment (Accessed on: 01/10/2018 07:50 pm)

31
APPENDIX

ASSIGNMENT NO 1

Q1) Explain automated meter reading system in detail

DEFINITION:

Automatic meter reading (AMR) is the collection of, at a remote central location, data from
consumption meters located at customers’ premises via telecommunication links.

The meters could measure gas, water or electricity flow. These links could be Telephone lines,
powerline carrier communication (PLCC), Radio frequency CATV etc.

Automatic Meter Reading (AMR) is a telephone-based, calling outbound system, for utility
control and reliable, low-cost meter reading.

With the use of AMR, the need of a person to visit the consumer’s site and record the readings
of the meters is eliminated. This also prevents human errors in recording the reading.

WHAT'S AMR?

AMR improves operational management by providing just-in-time meter replacement, tamper


detection, remote access, and automatic scheduling of meter reading. In short, AMR will
optimize cost savings and maximize efficiency for Anglian Water while providing improved
customer service.

AMR brings significant benefits to the customer by providing increased meter-reading


accuracy, fewer estimated bills, rapid response to read requests, automatic leak detection and
billing options and provides detailed usage information about individual sites, which allows
the utility to offer variable rates and encourage price-responsive behavior among customers.

32
HOW DOES THE SYSTEM WORK?

The key to the system is a device called an ERT (Encoder-Receiver-Transmitter).

This device is connected directly to a special electronic register on the water meter.

Normally, the ERT does nothing - it "sleeps," waiting for the meter reader to approach.

The meter truck-mounted reading the device sends out a continuous "wake up" signal.

When an ERT receives the signal, it checks the reading on the meter register, encodes it into a
digital signal, and begins transmitting its identification number and the current reading

After a few minutes, the ERT stops transmitting and goes back "to sleep," waiting for the next
time meter reading.

The truck-mounted computer system matches the ERT identification number with the property
and records the reading. At the end of the day, the meter reader unloads the information to our
billing system.

AMR also need Meter Interface Unit (MIU).It responds to calls initiated through the software
installed on a PC. A simple three-wire hook-up from the encoded register provides input from
the meters to the MIU.

OPERATING PRINCIPLE:

 To operate the AMR, Power Line Modem (PLM) is used, Technical Seminar
Presentation AMRITA PATTNAIK EE200199180 which transmits and receives data
over the power line.
 The PLMs operate in a Half Duplex, two-way, Time Division Multiplex
communication mode.
 Both the MIU and the DCU contain the PLM device.

33
 The binary data stream is keyed onto a carrier signal by means of the Frequency Shift
Keying (FSK) technique.
 The central frequency is shifted +0.3KHz to represent 1 or 0 of the binary data stream.
s then coupled onto the power line by the PLM.
 At the receiving end, an identical PLM will detect the signal and convert it back to a
binary data stream.

ARM SYSTEM OVERVIEW:

The remote Automatic Meter Reading (AMR) System is a host driven, multi-level network
system consisting of a Host Central Station (HCS), Data Concentrator Units (DCU) and Meter
Interfacing Units (MIU), with built-in flexibility and expandability. Technical Seminar
Presentation AMRITA PATTNAIK EE200199180

Handheld Programming Unit (HPU)

Single Phase Meter Interface Unit (MIU).

Multi-Channel Meter Interface Unit (MIU).

Data Concentrator Unit (DCU).

Host Central Station Hardware and Software Requirements (HCS).

BLOCK DIAGRAM OF ARM:

34
figure a1.1:block dig of arm

AUTOMATED METER READING (ARM) OVER STAND-ALONE METER


READING

1. Highly Person dependent.


2. Human errors cannot be avoided.
3. Accessibility of meters in rural/ Agricultural zones.
4. Energy Audits performed based on bill collection which is highly inaccurate.
5. Billing done mainly on estimated/ monthly average basis
6. Inability to monitor and control discrete loads
7. Billing cycle requires excessive time.
8. Meter data used only for billing, cannot help in analysis like demand analysis, energy
audit, pinpointing losses, etc.

Q2) EXPLAIN WITH BLOCK DIGRAM BATTERY OPERATED SMART CARD


READER DESIGN

What is a Smart Card?

A smart card is a special type of card like device which contains an integrated circuit chip
embedded on it. The IC chip can be a microprocessor with memory or just simple memory
circuit. In simple layman’s words, a smart card is the card with which we can exchange the
data, store it and manipulate data.

How does the Smart Card Works?

A smart card is connected to the host computer or controller via a card reader which gets
information from the smart card and accordingly passes the information to the host computer
or controller.

What is a Smart Card Reader?

35
A smart card reader is a device to which the smart card is connected either directly or indirectly
using RF communication. It interfaces with the PC or a microcontroller using USB port or
RS232 serial ports. It can be a contact or contactless reader.
Readers come in many form factors and in a wide variety of capabilities. Contact smart
cards have a contact area, comprising several gold-plated contact pads, that is about 1 cm
square. When inserted into a reader, the chip makes contact with electrical connectors that can
read information from the chip and write information back. The cards do not contain batteries;
energy is supplied by the card reader.

figure a1.2: smart card reader

Lab Equipment with Smartcard reader and serial communication with PICKit2 UART Tool.

The serial communication lines are connected to a diode gate to form a communication mixer.

With a push button you change between upload the code to PIC16F690 (lock) or to PIC16F84A
(keys).

Since Smartcard does not have its own clock pulse oscillator, clock pulses must be provided
from outside. This is best done with a external 4 MHz crystal oscillator chip.

A Smart Card has eight contact surfaces, but in practice the user only have access to one single
pin C7 (RB7). The other interfaces are used as supply voltage, ground, reset, and clock pulses.

36
Q3) Write a note on digital clock as an embedded system.

EMBEDDED SYSTEM:

An embedded system is a programmed controlling and operating system with a dedicated


function within a larger mechanical or electrical system, often with real-time
computing constraints. It is embedded as part of a complete device often including hardware
and mechanical parts. Embedded systems control many devices in common use today.

DIGITAL CLOCK:

Digital clock displays the time using numbers. This circuit is used in many applications like
cars, railway stations, houses, offices, etc. in order to provide accurate time and date. In this
type of applications, normally we use RTC (Real Time Clock) ICs to display the time and date
accurately. This circuit displays the time on LCD. For this clock, we can set the time at any
instant. Here the clock works in 24 hour mode and the RTC chip is configured by programming
8051 controller

figure a1.3: digital clock

37
A digital clock keeps track of the time and uses RTC(real Time Clock).The time is displayed
on the LCD, which is connected to Port 2.The RTC used is DS12887 and the controller used is
89v51RD2.Three switches acts as a input for seconds, minutes and hours.
The above circuit is built on proteus and crystal frequency has been internally set. The
connection of the RTC DS12C887 with the microcontroller is shown in the circuit diagram.It
uses update interrupt to keep the track of the time. Every time the update interrupt comes, the
clock is incremented by one second. The output is displayed on the LCD. The clock uses
external interrupt 2 of the microcontroller AT89C51 for setting the time. A user can set time
by pressing the switch connected to pin 13 of the microcontroller, which is interrupt 2. The
hour and minutes can be set using pin 5 and pin 6 of the controller AT89C51 respectively.
Once the time is set, the user needs to press the start pin (pin 8 of controller) to start the clock

The component used are 8051

The main features of 8051 microcontroller are:


i. RAM – 128 Bytes (Data memory)
ii. ROM – 4Kbytes (ROM signify the on – chip program space)
iii. Serial Port – Using UART makes it simpler to interface for serial communication.
iv. Two 16 bit Timer/ Counter
v. Input/output Pins – 4 Ports of 8 bits each on a single chip.
vi. 6 Interrupt Sources
vii. 8 – Bit ALU (Arithmetic Logic Unit) viii. Harvard Memory Architecture – It has 16 bit
Address bus (each of RAM and ROM) and 8 bit Data Bus.
ix. 8051 can execute 1 million one-cycle instructions per second with a clock frequency of
12MHz.

DS12887 RTC

The real-time clock (RTC) is a widely used device that provides accurate time and date for
many applications. It provides time components of hour, minute, and second, in addition to
the date/calendar components of year, month, and day. The RTC chip uses an internal battery,
which keeps the time and date even when the power is off. One of the most widely used RTC
chips is the DS 12887 from Dallas Semiconductor/Maxim Corp. The DS 12887 supports both
12-hour and 24-hour clock modes with AM and PM in the 12-hour mode. It also supports the
Daylight Savings Time option. The DS 12887 uses CMOS technology to keep the power
consumption low and it has the designation DS12C887, where C is for CMOS. The DS12887
38
has a total of 128 bytes of nonvolatile RAM. It uses 14 bytes of RAM for clock/calendar and
control registers, and the other 114 bytes of RAM are for general-purpose data storage.
Pins of DS12887

VCC
Pin 24 provides external supply voltage to the chip. The external voltage source is +5V.
When VC9 falls below the 3V level, the external source is switched off and the internal
lithium battery provides power to the RTC.

GND
Pin 12 is the ground.

ADO-AD7
The multiplexed address/data pins provide both addresses and data to the chip. Addresses are
latched into the DS 12887 on the falling edge of the AS (ALE) signal. ADO – AD7 of the DS
12887 are connected directly to the 8051 and there is no need for any 74xx373 latches, since
the DS 12887 provides the latch internally.

AS (ALE)
AS (address strobe) is an input pin. On the falling edge it will cause the addresses to be
latched into the DS 12887. The AS pin is used for demultiplexing the address and data and is
connected to the ALE pin of the 8051 chip.

MOT
This is an input pin that allows the choice between the Motorola and Intel microcontroller bus
timings. The MOT pin is connected to GND for the Intel timing. That means when we
connect DS 12887 the 8051, MOT = GND.

DS
Data strobe or read is an input. When MOT = GND for Intel timing, the DS pin is called the
RD (read) signal and is connected to the RD pin of the 8051.

R/W

39
Read/Write is an input pin. When MOT = GND for the Intel timing, the R/W pin is called the
WR (write) signal and is connected to the WR pin of the 8051.

CS
Chip select is an input pin and an active low signal. During the read (RD) and write (WR)
cycle time of Intel timing, the CS must be low in order to access the chip. It must be noted
that the CS works only when the external VCC is connected. In other words “when VCC falls
below 4.25V, the chip-select input is internally forced to an inactive level regardless of the
value of CS at the input pin.” This is called the write-protected state. When the DS 12887 is
in write-protected state, all inputs are ignored.

IRQ
Interrupt request is an output pin and active low signal. To use IRQ, the interrupt-enable bits
in register B must be set high.

SQW
Square wave is an output pin. We can program the DS 12887 to provide up to 15 different
square waves. The frequency of the square wave is set by programming register A RESET
Pin 18 is the reset pin. It is an input and is active low (normally high). In most applications
the reset pin is connected to the Vcc pin. In applications where this pin is used, it has no
effect on the clock, calendar, or RAM if it is forced low. The low on this pin will cause the
reset of the IRQ and clearing of the SQW pin.

Address map of the DS12887

The DS12887 has a total of 128 bytes of RAM space with addresses 00 -7FH. The first ten
locations, 00 – 09, are set aside for RTC values of time, calendar, and alarm data. The next
four bytes are used for the control and status registers. They are registers A, B, C, and D and
are located at addresses 10-13 (OA – OD in hex). Notice that their hex addresses match their
names.
The next 114 bytes from addresses OEH to 7FH are available for data storage. The entire 128
bytes of RAM are accessible directly for read or write except the following:
1) Registers C and D are read-only.

40
2) D7 bit of register A is read-only.
3) The high-order bit of the second byte is read-only.

ASSIGNMENT NO: 2

There is a variety of embedded tools available out there for development of hardware and
software for embedded systems. These embedded tools include editors, compilers, assemblers,
debuggers, and simulators etc. for software part and soldering iron, desoldering gun, Digital
Multimeter, oscilloscope, cutter, laptop etc. as hardware tools. All of the embedded tools are
necessary and work together. After a short review of software tools, I am going to write about
hardware tools which are the main focus of my article.

1) ARDUINO:

 Introduction
 Arduino is an open-source platform used for building electronics projects. Arduino
consists of both a physical programmable circuit board (often referred to as
a microcontroller) and a piece of software, or IDE (Integrated Development
Environment) that runs on your computer, used to write and upload computer code to
the physical board.
 The Arduino platform has become quite popular with people just starting out with
electronics, and for good reason. Unlike most previous programmable circuit boards,
the Arduino does not need a separate piece of hardware (called a programmer) in order
to load new code onto the board – you can simply use a USB cable. Additionally, the
Arduino IDE uses a simplified version of C++, making it easier to learn to program.

41
Finally, Arduino provides a standard form factor that breaks out the functions of the
micro-controller into a more accessible package.

 What does it do?


 The Arduino hardware and software was designed for artists, designers, hobbyists,
hackers, newbies, and anyone interested in creating interactive objects or environments.
Arduino can interact with buttons, LEDs, motors, speakers, GPS units, cameras, the
internet, and even your smart-phone or your TV! This flexibility combined with the fact
that the Arduino software is free, the hardware boards are pretty cheap, and both the
software and hardware are easy to learn has led to a large community of users who have
contributed code and released instructions for a huge variety of Arduino-based
projects.
 For everything from robots and a heating pad hand warming blanket to honest fortune-
telling machines, and even a Dungeons and Dragons dice-throwing gauntlet, the
Arduino can be used as the brains behind almost any electronics project.

 TYPES OF ARDUINO:

table 1: types of arduino


Arduino Board Processor Memory Digital I/O Analogue I/O

Arduino Uno 16Mhz 2KB SRAM, 14 6 input,


ATmega328 32KB flash 0 output

Arduion Due 84Mhz 96KB SRAM, 54 5412 input,


AT91SAM3X8E 512KB flash 2 output
Arduino Mega 16MHz 8KB SRAM, 54 5416 input,
ATmega2560 256KB flash 0 output
Arduino 2.5KB 20 12 input,
Leonardo 16MHz SRAM, 32KB 0 output
ATmega32u4 flash

1) RASPBERRY PI:

42
Generally, the raspberry pi is designed for the educational purpose and it is in small size like
a credit card. It will improve the programming skills & hardware programming at the higher
education in the schools or colleges. The raspberry pi is slower than the laptop or desktop and
it is totally in the Linux operating system. The availability of price in the market is low.

 Different Types of Raspberry Pi Models

The different types of raspberry pi models are following

 Raspberry Pi 1 model B
It is a higher-spec variant of raspberry pi. After this design of this raspberry pi, it has
extended to the next model i.e raspberry pi 2. The specifications of the raspberry pi
model B are following, the raspberry pi model B has two USB ports, having a RAM
of 512MB and its Ethernet port is 100mb.
 Raspberry Pi 1 model A
 Raspberry Pi 1 model B+

This model B+ is replaced in the place of raspberry pi model B in the year 2014. Model B+
Rpi is compared with the model B it has more GPIO, more USB, more SD, lower power
consumption

 Raspberry Pi 1model A+
 Raspberry Pi Zero

It is a half size of the model A+ with twice a utility and for any project, it has the same
specification like 1GHz, Single-core CPU, 512MB RAM, Mini-HDMI port, Micro-
USB OTG port, Micro-USB power, HAT-compatible 40-pin header, Composite video
and reset headers, CSI camera connector (v1.3 only).

 Raspberry Pi 2

The basic image of the raspberry pi 2 is following and the features of the raspberry pi
2 are it has quad-core ARM cortex-A7 processor with a 900MHz, the SDRAM is about
the 1GB. It is completely compatible with the raspberry pi 1.

 Raspberry Pi 3 model B

43
 Raspberry Pi Zero W

 Applications of Raspberry Pi

The different applications of the raspberry pi model are

 Media steamer
 Tablet computer
 Home automation
 Internet radio
 Controlling robots
 Cosmic Computer
 Arcade machines
 Raspberry pi based projects

2) ARM CORTEX

The ARM stands for Advanced RISC machine and it is a 32-bit reduced instructions set
computer (RISC) microcontroller. It was first introduced by the Acron computers’
organization in 1987. The ARM is a family of the microcontroller developed by the different
manufacturers such as ST microelectronics, Motorola and so on. The ARM microcontroller
architecture come with a few different versions such as ARMv1, ARMv2 etc. and each one has
its own advantage and disadvantages.

figure a2.1: arm architecture

44
The ARM cortex microcontroller is an advanced microcontroller in the ARM family, which is
developed by the ARMv7 architecture. The ARM cortex family divided into three sub-families
such as;

 ARM-Cortex Ax-series

The ARM Cortex-A is a group of 32-bit and 64-bit RISC ARM processor cores
licensed by Arm Holdings. The cores are intended for application use. The group
consists of 32-bit cores: ARM Cortex-A5, ARM Cortex-A7, ARM Cortex-A8, ARM
Cortex-A9, ARM Cortex-A12, ARM Cortex-A15, ARM Cortex-A17
MPCore, and ARM Cortex-A32, and 64-bit cores: ARM Cortex-A35, ARM Cortex-
A53, ARM Cortex-A55, ARM Cortex-A57, ARM Cortex-A72, ARM Cortex-
A73, ARM Cortex-A75, and ARM Cortex-A76.

 ARM-Cortex Rx-series

The ARM Cortex-R is a family of 32-bit RISC ARM processor cores licensed by Arm
Holdings. The cores are optimized for hard real-time and safety-critical applications.
Cores in this family implement the ARM Real-time (R) profile, which is one of three
architecture profiles, the other two being the Application (A) profile implemented by
the Cortex-A family and the Microcontroller (M) profile implemented by the Cortex-
M family. The ARM Cortex-R family of microprocessors currently consists of ARM
Cortex-R4 (F), ARM Cortex-R5(F), ARM Cortex-R7(F), ARM Cortex-R8(F), and
ARM Cortex-R52(F).

 ARM-Cortex Mx-series

The ARM Cortex-M is a group of 32-bit RISC ARM processor cores licensed by Arm
Holdings. They are intended for microcontroller use, and have been shipped in tens of
billions of devices. The cores consist of the Cortex-M0, Cortex-M0+, Cortex-M1,
Cortex-M3, Cortex-M4, Cortex-M7, Cortex-M23, Cortex-M33, Cortex-M35P. The
Cortex-M4 / M7 / M33 / M35P cores have an FPU silicon option, and when included
in the silicon these cores are known as "Cortex-Mx with FPU" or "Cortex-MxF", where
'x' is the core number.

45
4) INTEL GALILEO

figure a2.2: intel galileo

 Galileo is a microcontroller board based on the Intel® Quark SoC X1000


Application Processor, a 32-bit Intel Pentium-class system on a chip (datasheet).
It’s the first board based on Intel® architecture designed to be hardware and
software pin-compatible with Arduino shields designed for the Uno R3. Digital
pins 0 to 13 (and the adjacent AREF and GND pins), Analog inputs 0 to 5, the
power header, ICSP header, and the UART port pins (0 and 1), are all in the
same locations as on the Arduino Uno R3. This is also known as the Arduino
1.0 pinout.

46
 Galileo is designed to support shields that operate at either 3.3V or 5V. The core
operating voltage of Galileo is 3.3V. However, a jumper on the board enables
voltage translation to 5V at the I/O pins. This provides support for 5V Uno
shields and is the default behavior. By switching the jumper position, the
voltage translation can be disabled to provide 3.3V operation at the I/O pins.

 Of course, the Galileo board is also software compatible with the Arduino
Software Development Environment (IDE), which makes usability and
introduction a snap. In addition to Arduino hardware and software
compatibility, the Galileo board has several PC industry standard I/O ports and
features to expand native usage and capabilities beyond the Arduino shield
ecosystem. A full sized mini-PCI Express slot, 100Mb Ethernet port, Micro-SD
slot, RS-232 serial port, USB Host port, USB Client port, and 8MByte NOR
flash come standard on the board.

 DIFFERENT TYPES OF SENSORS

SENSOR: Sensor as an input device which provides an output (signal) with


respect to a specific physical quantity (input).

We live in a World of Sensors. You can find different types of Sensors in our
homes, offices, cars etc. working to make our lives easier by turning on the
lights by detecting our presence, adjusting the room temperature, detect smoke
or fire, make us delicious coffee, open garage doors as soon as our car is near
the door and many other tasks

The following is a list of different types of sensors that are commonly used in various
applications. All these sensors are used for measuring one of the physical properties like
Temperature, Resistance, Capacitance, Conduction, Heat Transfer etc.

 Temperature Sensor

47
One of the most common and most popular sensor is the Temperature Sensor. A
Temperature Sensor, as the name suggests, senses the temperature i.e. it measures the
changes in the temperature.

figure a2.3: temprature sensor

In a Temperature Sensor, the changes in the Temperature correspond to change in its


physical property like resistance or voltage. There are different types of Temperature
Sensors like Temperature Sensor ICs (like LM35), Thermistors, Thermocouples, RTD
(Resistive Temperature Devices), etc.

 Proximity Sensor
A Proximity Sensor is a non-contact type sensor that detects the presence of an object.
Proximity Sensors can be implemented using different techniques like Optical (like
Infrared or Laser), Ultrasonic, Hall Effect, Capacitive, etc.

 IR Sensor (Infrared Sensor)

figure a2.4: ir sensor

48
IR Sensors or Infrared Sensor are light based sensor that are used in various applications
like Proximity and Object Detection. IR Sensors are used as proximity sensors in almost
all mobile phones.

 Pressure Sensor

figure A2.5 pressure sensor

a pressure sensor is an instrument consisting of a pressure sensitive element to


determine the actual pressure applied to the sensor (using different working principles)
and some components to convert this information into an output signal.

 Light Sensor

Light Sensors are photoelectric devices that convert light energy (photons) whether
visible or infra-red light into an electrical (electrons) signal

A Light Sensor generates an output signal indicating the intensity of light by measuring
the radiant energy that exists in a very narrow range of frequencies basically called
“light”, and which ranges in frequency from “Infra-red” to “Visible” up to “Ultraviolet”
light spectrum.

 Ultrasonic Sensor

49
figure A2.6: ultrasonic sensor

An Ultrasonic Sensor is a non-contact type device that can be used to measure distance
as well as velocity of an object. An Ultrasonic Sensor works based on the properties of
the sound waves with frequency greater than that of the human audible range.

 Color Sensor

figure A2.7 color sensor

Color sensors detect the color of a surface. The sensors cast light (red, green, and blue LEDs)
on the objects to be tested, calculate the chromaticity coordinates from the reflected radiation
and compare them with previously stored reference colors. If the color values are within the
set tolerance range, a switching output is activated.

 Humidity Sensor

50
figure A2.8 humidity sensor

A humidity sensor (or hygrometer) senses, measures and reports both moisture and air
temperature. The ratio of moisture in the air to the highest amount of moisture at a
particular air temperature is called relative humidity. Relative humidity becomes an
important factor, when looking for comfort.

51

Potrebbero piacerti anche