You are on page 1of 26

Chapter III

3. DESIGN OF SMART HOME

3.DESIGN APPROACH
A smart home is equipped with special structured wiring that permits
occupants to program associate degree array of machine-controlled home
electronic devices by
entering one command. Implementation of the smart house is supported the lab
VIEW software package.The objective of this project is to map the processes
that optimize the use of smart home technology to ensure that as many users as
possible have access to the technology as possible.

The software Lab VIEW controls the Indoor lighting, outside illumination,
temperature, fire In-house security, burglary security. Every component
typically performs one function, and there is no function synchronization with
other pieces that are safety systems including failure warning system That
signals a burglary, the lighting system which includes internal house lighting,

Lab View comes with different inputs


the sensors are linked and processed according to the specified program, and
then logical output to the whole power system in the house. Its add-on
characteristics is that it has power security mechanism even, if there is a fault
within the building defense device traps the key force instantly Source.

3.1.1 Codes and Standards


IEEE Standard Description
IEEE 1451 1451 defines Transducer Interface
standards that permit systems to
automatically identify sensors and
obtain their calibration and operating
parameters.
IEEE NESC NESC stands for National Electrical
Safety Code

3.1.2 Realistic Constraints

1. In practical conditions voltage is too high so parameters changes for


every sensors and loads.
2. In practical conditons range of detection will be more .so suitable
wirelesss transmission technology is required.
3. Cost of the process in reality increases but it can be reduced by
decreasing number of controllers used.

3.2 DESIGN SPECIFICATIONS

The design specifications of the circuit are very simple & the following
parameters can be calculated using the given formula:
Sensor value of temperature (t):
Sensor Value t = analog Read(A0)/2
Lcd write((sensorValuet%10) +0x30)
Sensor value of gas sensor(p):
Sensor Value p = analog Read(A1)/2
Lcd. write(((sensorValuep%100)/10) +0x30)
Sensor value(z):
Sensor value z =analog Read(A2)/2
Lcd. Write((((sensorValuez%100)/10+0x30)

3.3 TECHNICAL SPECIFICATION FOR HARDWARE ANALYSIS


Analog input, analog output, serial output:
Reads an analog input pin, maps the result to a variety from zero to 255.and
uses the result to line the pulsewidth modulation (PWM) of an output pin.Also
prints the results to the serial monitor.
The circuit:
potentiometer connected to analog pin 0. The potentiometer 's center-pin goes
to the analog board.Potentiometer side pins get to 5V and ground. LED
connected to ground through digital pin 9.

Components used Operational specifications Units

Motion sensor Motion detected = 2.8v Volts


Motion not detected = 0.1mv
LDR sensor In light voltage=2.9mv Volts,ohm
Resistance =5kohm
In dark =0.658mv
Resistance=1mohm
Temperature sensor Output voltage =305mv Volts,Celsius
Room temperature=30.5C
MQ2 sensor Input voltage=5v Volts
Analog output voltage=0-5v
Zigbee transmitter and
receiver modules
Relay unit 5v (2) Volts
Arduino Uno Input voltage 0-5v Volts
board(modified)

LabVIEW software Input voltage 220v Volts

Step down transformer Input voltage 220v


Output voltage 24v

3.4 PROJECT COMPONENTS USED:


3.4.1 Motion sensor (PIR):

Pyro electric Infrared (PIR) Sensor may be a compact and complete sensor
which is employed for physical body detection. For high sensitivity and low
noise a Fresnel lens and motion detection circuit are incorporated in the sensor.
Output of a sensor is a standard 5V active low output signal. The sensor can
detect motion up to six meters and may be utilized in burglar alarms. It can also
access control system. It’s not expensive and ideal for security systems, holiday
props, motion activated lighting and robotics applications.

The sensor is extremely simple to use. The module provides associate


degree optimized circuit. The output of circuit area unit typically connected on
to a microcontroller pin for watching signal. The output also can be connected
to a junction transistor for driving DC masses like a siren, bell, relay,
optocoupler (e.g. PC817, MOC3021), bell etc. This facilitates the board to be
mounted within a case. The police investigation lens protrudes outside the case.

Specifications:

Size: Rectangular.

Sensitivity range: up to twenty feet (6 meters) 110° x 70° detection range

Power supply: 5V-12V input voltage for most modules (they have a 3.3V
regulator), but 5V is ideal in case the regulator has different specs
3.4.2 LDR sensor

The value of a light-weight sensor is defined by the brightness of sunshine


which falls thereon . Cadmium Sulphide may be a semiconductor which is
employed to form light dependent resistors also knows as light sensors. The
amount of sunshine falling on material changes its resistance. Photoelectric
effect is that the main working rule of sunshine dependent resistor. In
lightlessness , a light-weight sensor features a resistance of about 1mega ohm.
In illuminated brightness it has a resistance of only about 5k ohms. Light sensor
responds to a large part of light spectrum.

Two cadmium sulphide(cds) photoconductive cells with spectral responses


similar to that of the human eye.

Applications:

Analog applications:

Camera Exposure Control


Auto Slide Focus - dual cell
Photocopy Machines - density of toner
Colorimetric Test Equipment
DensitometeriElectronic Scales - dual cell
AutomaticiGain Control – modulated light source
Automated Rear View Mirror

Digital applications:

· Night Light Control

· Oil Burner Flame Out

· Street Light Control


Electrical characterstics:
Parameter Conditions Units
Cell resistance 1000LUX Ohm
10LUX K ohm
Voltage 320 volts
Current 75 mA
Power 100 mW
Operating temperature -60 - +75 Deg.C

Sensitivity:
The sensitivity of a photodetector is that the relationship between the sunshine
falling on the device and therefore the resulting output . In the case of a
photocell, one is handling the connection between the incident light and
therefore the corresponding resistance of the cell.

Spectral response:
Like the human eye, the relative sensitivity of a detector depends on the
wavelength (color) of the incident lightweight. every photoconductor
material kind has its own distinctive spectral response curve or plot of the
relative response of the photocell versus wavelength of sunshine .
3.4.3 Temperature sensor (LM35):

The LM35 thus has a plus over linear temperature sensors calibrated in ˚ Kelvin,
because the user isn't required to subtract an outsized constant voltage from its
output to obtain convenient Centigrade scaling. The LM35 doesn't require any
external calibration or trimming to supply typical accuracies of ±1⁄4˚C at
temperature and ±3⁄4˚Cover a full −55 to +150˚C temperature range.
It are often used with single power supplies, or with plus and minus supplies. As
it draws only 60 µA from its supply, it's very low self-heating, but 0.1˚C in still
air. The LM35 is rated to figure over a −55˚ to +150˚C temperature vary, while
the LM35C is rated for a −40˚ to +110˚C vary (−10˚ with improved accuracy).

Supply Voltage: +35V to −0.2V


Output Voltage: +6V to −1.0V
Output Current: 10 mA
MQ2 SENSOR:

When the target combustible gas exist, The sensor’s conductivity is higher
along side the gas concentration rising. Please use simple electrocircuit, convert
change of conductivity to correspond output of gas concentration. MQ-2 gas
sensor has high sensitity to LPG, Propane and Hydrogen, also might be wont to
Methane and other combustible steam, it's with low cost and suitable for
different application.

Character:
 High sensitivity to LPG, Propane and Hydrogen
 Long life and low cost
 Simple drive circuit
Application:
 Domestic gas leakage detector
 Industrial Combustible gas detector
 Portable gas detector

Parameter Condition
Concentration 300-10000ppm
Voltage 24V dc
Sensing resistance 2Kohm-20Kohm
Detection Combustible gas and smoke
3.4.5 Zigbee transmitter and receiver modules:

Zigbee technology:
Introduction:
ZigBee is the industry wireless mesh networking standard for connecting
sensors, instrumentation and control systems. ZigBee, a specification for
communication during a wireless personal area network (WPAN), has been
called the "Internet of things." Theoretically, your ZigBee-enabled kitchen
appliance can communicate together with your ZigBee-enabled toaster.

ZigBee is an open, global, packet-based protocol designed to provide associate


degree easy-to-use design for secure, reliable, low power wireless networks.
ZigBee and IEEE 802.15.4 ar low rate wireless networking standards which
can eliminate the expensive and injury prone wiring in
industrial management applications.
Flow or process management instrumentation ar typically place anyplace and
still communicate with the remainder of the system. It can also be affected,
since the network does not care regarding the physical location of a device,
pump or valve.
Zigbee applications:
 Home and office automation
 Industrial automation
 Medical monitoring
 Low-power sensors
 HVAC control
Wireless communication:
It consists of three parts:
 Transmitter
 Receiver
 Antennas

Path between the transmitter and therefore the receiver briefly , the transmitter
feeds a sign of encoded data modulated into RF waves into the antenna. The
antenna radiates the signal through the air where it's picked up by the antenna of
the receiver. The receiver demodulates the RF waves back to the encoded data
stream sent by the transmitter.

Transmitter and receiver:


The power output of the transmitter and thus the sensitivity of the receiver
are decisive factors of the signal strength an its vary. alternative factors embody
any obstacles inside the communication path that cause interference with the
signal. On the other facet, the receiver's sensitivity determines the minimum
power needed for the radio to dependably receive the signal. These
values ar delineated using dBm, a relative measuring that compares 2 signals
with one power unit used as a result of the reference signal.
Zigbee transmitter:

Specification:
Zigbee digital transmitter in 2.4GHZ band is meant using Verilog for
acknowledgement frame (or) architecture. There are two types of layers.
 Physical layer and
 Medium Access Control (MAC) layer.
In these Zigbee transmitter we are using 2.4 GHZ band because it's a world
wide band. In these schemes, we focus on 2.4 GHZ band application which has
16 channels with spacing of 5 MHZ and data rate is 250 Kbps.

Parameter Specification
Data rate 250kbps
No of channels 16
Operating frequency 5.4GHz
Channel spacing 5MHz
Chip rate 2 mega chips for second

MAC layer defines two sorts of nodes they're Reduced Function Devices
(RFDs) and Full Function Devices (FFDs).
Arduino Uno:

Overview:
It has fourteen digital input/output pins (of that six ar typically used as PWM
outputs), 6 analog inputs, a sixteen Mc ceramic resonator, a
USB association, associate degree influence jack, associate degree ICSP header,
and a push. It contains everything required to support the
microcontroller; merely connect it to a pc with a USB cable or power it
with associate degree AC-to-DC adapter or battery to urge started.

"Uno" suggests that one in Italian and is thought on mark


the approaching unharness of
Arduino 1.0. The Uno and version one.0 ar attending to be the reference
versions of
Arduino, moving forward. The Uno is that the most recent throughout a series
of USB
Arduino boards, and thus the reference model for the Arduino platform; for
a comparison with previous versions, here is the following index of Arduino
boards.

Parameter Condition
Microcontroller ATmega328
Operating voltage(limits) 5V
Input voltage (recommended) 7-12V
Input voltage(limits) 6-20V
Flash memory 32KB
Digital I/O pins 14
Analog input pins 6
3.4.6 Step down transformer:

General description:
It is a general-purpose chassis mounting mains transformer. Transformer has
240V primary windings and Centre tapped secondary coil . In AC circuits, AC
voltage, current and waveform are often transformed with the assistance of
Transformers.

Product description:
A transformer is an device that transfers electricity between two or more circuits
through electromagnetic induction. Electromagnetic induction produces an
voltage within a conductor which is exposed to time varying magnetic fields.
Transformers are wont to increase or decrease the alternating voltages in
electrical power applications.It is a step-down transformer in which the
secondary winding is more than primary winding. Due to this winding it can
able to step down the voltage.

Fig.Step down transformer


Features:
 Output current:1A
 Supply voltage: 220-230VAC
 Output voltage: 12VAC
 Soft Iron Core
 1Amp Current Drain

Applications:
 DIY projects Requiring In-Application High current drain.
 On chassis AC/AC converter.
 Designing a battery Charger.
 Electronic applications.
 Step down applications (Power transmission).
3.4.7 Relay unit

2 CHANNEL 5V 10A RELAY MODULE:

Description:
The relay module is an electrically operated switch that permits you to show on
or off a circuit using voltage and/or current much above a microcontroller could
handle. There is no connection between the low voltage circuit operated by the
microcontroller and therefore the high-power circuit.

The each channel within the module has three connections named NC, COM,
and NO. Depending on the input trigger mode, the jumper cap are often placed
at high level effective mode which ‘closes’ the normally open (NO) switch at
high level input and at low level effective mode which operates an equivalent
but at low level input.

Specifications:
 Relay long life can absorb 100000 times during a row
 Module are often directly and MCU I/O link, with the output indicator
 PCB Size: 45.8mm x 32.4mm
Pin configuration:

1. VCC: 5V DC
2. COM: 5V DC
3. IN1: high/low output
4. IN2: high/low output
5. GND: ground
4. PROJECT DEMONSTRATION

4.1 INTRODUCTION:
The project is started by completing hardware part and then it is tested for the
correct functionality of the components. Graphical code is developed in the
LabVIEW software and both software and hardware are both interfaced through
Zigbee technology which is wireless transmission. there are some accuracy
problems regarding the functionality of sensors when interfaced with the
software which can be resolved by taking better quality sensors.

4.2 SIMULATION:

Simulation software: LabVIEW


LabVIEW is systems engineering software for applications that need test,
measurement, and control with rapid access to hardware and data insights. The
LabVIEW programming environment simplifies hardware integration for
engineering applications in order that you've got a uniform thanks to acquire
data from NI and third-party hardware. LabVIEW reduces the complexity of
programming, so you'll specialise in your unique engineering problem.
LabVIEW enables you to right away visualize results with built-in, drag-and-
drop engineering interface creation and integrated data viewers.

To turn your acquired data into real business results, you'll develop algorithms
for data analysis and advanced control with included math and signal processing
IP or reuse your own libraries from a variety of tools.
Simulation results:
LabVIEW block diagram

The above block diagram indicates the back panel of the LabVIEW where we
write the graphical code which is suitable and interfaceable with the Zigbee
software. when we write the graphical code in the black panel then
automatically subsequent control functions which can be monitored are created
in control panel or front panel.

When we want to switch ON/OFF the loads by using the LabVIEW, alternate
code which we created for our own purpose will be given to LabVIEW control
panel which controls the loads of the smart home. we can monitor the data of
the sensors generated on the front panel of the LabVIEW continously.so real
time data monitoring can be done using the LabVIEW.
LabVIEW front panel result:

The max –min limits of every sensor are mentioned clearly .so using those
limits we can monitor the functionality of the sensor that is we can check
whether the sensor is working properly or not from the front panel indication
.separate block is created for each and every sensor and load so that it makes us
easy to do the monitoring. Simulation is successfully tested against the
hardware setup.
Hardware results:
Home automation Arduino code:

Code:

#include <LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

// These constants won't change. They're used to give names


// to the pins used:
const int analogInPinx = A0; // Analog input pin that the potentiometer is
attached to
const int analogInPiny = A1; // Analog input pin that the potentiometer is
attached to
const int analogInPinz = A2; // Analog input pin that the potentiometer is
attached to

int sensorValuet = 0; // value read from the pot


int sensorValuep = 0; // value read from the pot
int sensorValuez = 0; // value read from the pot
int sensorValueh = 0; // value read from the pot
int sensorValuei = 0; // value read from the pot
int sensorValuej = 0; // value read from the pot

void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
pinMode(2, OUTPUT); //buzzer
pinMode(3, OUTPUT); //led labview
pinMode(4, OUTPUT); //relay
pinMode(5, OUTPUT); //relay
pinMode(6, OUTPUT); //led 1
pinMode(7, OUTPUT); //led 2

digitalWrite(7,0);
digitalWrite(6,0);
digitalWrite(5,0);
digitalWrite(4,0);

digitalWrite(3,1);
lcd.begin(16,2);
}

char oc;

void loop() {
// read the analog in value:

lcd.setCursor(0, 0);
lcd.print("T");
sensorValuet = analogRead(A0);
sensorValuet = analogRead(A0)/2;
lcd.write((sensorValuet/100)+0x30);
lcd.write(((sensorValuet%100)/10)+0x30);
lcd.write((sensorValuet%10)+0x30);
lcd.setCursor(8, 0);
lcd.print("G");
sensorValuep = analogRead(A1)/2;
lcd.write((sensorValuep/100)+0x30);
lcd.write(((sensorValuep%100)/10)+0x30);
lcd.write((sensorValuep%10)+0x30);
lcd.setCursor(0, 1);
lcd.print("L");
sensorValuez = analogRead(A2)/2;
lcd.write((sensorValuez/100)+0x30);
lcd.write(((sensorValuez%100)/10)+0x30);
lcd.write((sensorValuez%10)+0x30);

lcd.setCursor(8, 1);
lcd.print("S");
pinMode(A5,INPUT_PULLUP); //switch 1
pinMode(A4,INPUT_PULLUP); //swith 2a
sensorValuei=digitalRead(A5);
sensorValuej=digitalRead(A4);
lcd.print(sensorValuei);
lcd.print(sensorValuej);

if(sensorValuep>200)
{
digitalWrite(5,HIGH);

}
else
{
digitalWrite(5,LOW);
}

if(sensorValuet>40)
{
digitalWrite(2,HIGH);
}
else if(sensorValuep>200)
{
digitalWrite(2,HIGH);

}
else
{
digitalWrite(2,LOW);

if(sensorValuez<200)
{
digitalWrite(4,HIGH);

}
else
{
digitalWrite(4,LOW);

while (Serial.available()) {
// get the new byte:
char inChar = (char)Serial.read();

lcd.setCursor(15,1);
lcd.print(inChar);
// add it to the inputString:
// if the incoming character is a newline, set a flag
// so the main loop can do something about it:
if (inChar == 'A') {
pinMode(3,OUTPUT);
digitalWrite(3,0);
}
if (inChar == 'B') {
pinMode(3,OUTPUT);
digitalWrite(3,1);
}
}

You might also like