Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 35

THE DEVELOPMENT OF REMOTELY CONTROLLED HOME AUTOMATION

SYSTEM OF ENERGY SAVING

ABSTRACT

The purpose of this study is to showcase the design and development of a web-enabled
home automation system prototype. The unit was developed using low-cost components such as
the ubiquitous Arduino microcontroller. One of the features of the developed unit is the ability to
monitor the power consumed by electrical loads. The unit also has the ability to control the status
of individual loads through the internet using a web-enabled mobile application. This feature
enables load management that could contribute to energy saving.

BLOCK DIAGRAM
ADVANTAGE

 Managing all of your home devices from one place.


 Flexibility for new devices and appliances
 Maximizing home security.
 Remote control of home functions.
 Home management insights

DISADVANTAGE

 You don’t get quality devices for setting up your smart home via Bluetooth, at the least
what you can do is you will have to setup the whole thing all on yourself. 
 If you want another user to join this system a whole lot of code and configuration is
needed.
 Once Bluetooth is disconnected app also disconnects and reconnecting Bluetooth is a
task.
 Bluetooth communication only has range of 10-20 meters.

POWER SUPPLY

Block Diagram

The ac voltage, typically 220V rms, is connected to a transformer, which steps that ac voltage
down to the level of the desired dc output. A diode rectifier then provides a full-wave rectified
voltage that is initially filtered by a simple capacitor filter to produce a dc voltage. This resulting
dc voltage usually has some ripple or ac voltage variation.
A regulator circuit removes the ripples and also remains the same dc value even if the input
dc voltage varies, or the load connected to the output dc voltage changes. This voltage regulation
is usually obtained using one of the popular voltage regulator IC units.

TRANSFORMER RECTIFIER FILTER IC LOAD


REGULATOR

Fig 2.1 Block Diagram of Power supply

Working principle

Transformer

The potential transformer will step down the power supply voltage (0-230V) to (0-6V) level.
Then the secondary of the potential transformer will be connected to the precision rectifier,
which is constructed with the help of op–amp. The advantages of using precision rectifier are it
will give peak voltage output as DC, rest of the circuits will give only RMS output.

Bridge rectifier

When four diodes are connected as shown in figure, the circuit is called as bridge rectifier.
The input to the circuit is applied to the diagonally opposite corners of the network, and the
output is taken from the remaining two corners.
Let us assume that the transformer is working properly and there is a positive potential, at point
A and a negative potential at point B. the positive potential at point A will forward bias D3 and
reverse bias D4.
The negative potential at point B will forward bias D1 and reverse D2. At this time D3 and D1
are forward biased and will allow current flow to pass through them; D4 and D2 are reverse
biased and will block current flow.

The maximum voltage that appears across the load resistor is nearly-but never exceeds-500 v0lts,
as result of the small voltage drop across the diode. In the bridge rectifier shown in view B, the
maximum voltage that can be rectified is the full secondary voltage, which is 1000 volts.
Therefore, the peak output voltage across the load resistor is nearly 1000 volts. With both
circuits using the same transformer, the bridge rectifier circuit produces a higher output voltage
than the conventional full-wave rectifier circuit.

IC voltage regulators

Voltage regulators comprise a class of widely used ICs. Regulator IC units contain the
circuitry for reference source, comparator amplifier, control device, and overload protection all
in a single IC. IC units provide regulation of either a fixed positive voltage, a fixed negative
voltage, or an adjustably set voltage. The regulators can be selected for operation with load
currents from hundreds of milli amperes to tens of amperes, corresponding to power ratings from
milli watts to tens of watts.
Fig 2.2 Circuit Diagram of Power Supply

A fixed three-terminal voltage regulator has an unregulated dc input voltage, Vi, applied to one
input terminal, a regulated dc output voltage, Vo, from a second terminal, with the third terminal
connected to ground.

The series 78 regulators provide fixed positive regulated voltages from 5 to 24 volts. Similarly,
the series 79 regulators provide fixed negative regulated voltages from 5 to 24 volts.
 For ICs, microcontroller, LCD --------- 5 volts
 For alarm circuit, op-amp, relay circuits ---------- 12 volts

EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE


Understand User
Requirements

Choose Optimum
Electronic Chip

S/W Side
H/W Side

HLL/ALL
PCB Layout Design

Algorithm

Coding/Editing Assembling
Compiling/Assembling Components

Debugging

Testing Testing

Simulator

S/W H/W

Download

ICE (In-Circuit
Emulator)

Embedded Product

Figure – 13 Embedded Product Development Life Cycle

INTEL’S 8051 ARCHITECTURE


The generic 8031 architecture sports a Harvard architecture, which contains two separate
buses for both program and data. So, it has two distinctive memory spaces of 64K X 8 size for
both program and data. It is based on an 8 bit central processing unit with an 8 bit Accumulator
and another 8 bit B register as main processing blocks. Other portions of the architecture include
few 8 bit and 16 bit registers and 8 bit memory locations.

Each 8031 device has some amount of data RAM built in the device for internal
processing. This area is used for stack operations and temporary storage of data.

This base architecture is supported with onchip peripheral functions like I/O ports,
timers/counters, versatile serial communication port. So it is clear that this 8031 architecture was
designed to cater many real time embedded needs.

The following list gives the features of the 8051 architecture:

 Optimized 8 bit CPU for control applications.


 Extensive Boolean processing capabilities.
 64K Program Memory address space.
 64K Data Memory address space.
 128 bytes of onchip Data Memory.
 32 Bi-directional and individually addressable I/O lines.
 Two 16 bit timer/counters.
 Full Duplex UART, On-chip clock oscillator.
 6-source / 5-vector interrupt structure with priority levels.
Now you may be wondering about the non mentioning of memory space meant for the
program storage, the most important part of any embedded controller. Originally this 8031
architecture was introduced with onchip, ‘one time programmable’ version of Program Memory
of size 4K X 8. Intel delivered all these microcontrollers (8051) with user’s program fused inside
the device. The memory portion was mapped at the lower end of the Program Memory area. But,
after getting devices, customers couldn’t change any thing in their program code, which was
already made available inside during device fabrication.
Figure 1 - Block Diagram of the 8031 Core

So, very soon Intel introduced the 8031 devices (8751) with re-programmable type of Program
Memory using built-in EPROM of size 4K X 8. Like a regular EPROM, this memory can be re-
programmed many times. Later on Intel started manufacturing these 8031 devices without any
onchip Program Memory.

Now I go ahead giving more information on the important functional blocks of the 8031.

DIFFERENCES BETWEEN MICROCONTROLLER AND MICROPROCESSOR:

 Microprocessors have many instructions for moving data from external memory to internal
memory. But microcontrollers have a few such instructions.
 Microprocessors have less bit handling instructions, but microcontrollers have many such
instructions.
 Microprocessors are concerned with rapid movement of code and data from external
memory. But Microcontroller is concerned with that of bits within the chip.
PIC Microcontroller
PIC Microcontroller:

PIC microcontroller was developed in the year 1993 by microchip technology. The term PIC
stands for Peripheral Interface Controller. Initially this was developed for supporting PDP
computers to control its peripheral devices, and therefore, named as a peripheral interface device.
These microcontrollers are very fast and easy to execute a program compared with other
microcontrollers.

What is a PIC Microcontroller?

PIC (Programmable Interface Controllers) microcontrollers are the worlds smallest


microcontrollers that can be programmed to carry out a huge range of tasks. These
microcontrollers are found in many electronic devices such as phones, computer control systems,
alarm systems, embedded systems, etc. Various types of microcontrollers exist, even though the
best are found in the GENIE range of programmable microcontrollers. These microcontrollers
are programmed and simulated by a circuit-wizard software.

Every PIC microcontroller architecture consists of some registers and stack where registers
function as Random Access Memory( RAM) and stack saves the return addresses. The main
features of PIC microcontrollers are RAM, flash memory, Timers/Counters, EEPROM, I/O
Ports, USART, CCP (Capture/Compare/PWM module), SSP, Comparator, ADC (analog to
digital converter), PSP(parallel slave port), LCD and ICSP (in circuit serial programming) The 8-
bit PIC microcontroller is classified into four types on the basis of internal architecture such as
Base Line PIC, Mid Range PIC, Enhanced Mid Range PIC and PIC18.

Other PIC MCU’s

PIC12F508, PIC12F629, PIC12F683, PIC16F505, PIC16F628A, PIC16F676, PIC16F72,


PIC16F873A, PIC16F876A, PIC16F886, PIC18F252, PIC18F25520, PIC18F452, PIC18F4520

PIC16F877A
This powerful (200 nanosecond instruction execution) yet easy-to-program (only 35 single word
instructions) CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC®
architecture into an 40 package and is upwards compatible with the PIC16C5X, PIC12CXXX
and PIC16C7X devices. The PIC16F877A features 256 bytes of EEPROM data memory, self
programming, an ICD, 2 Comparators, 8 channels of 10-bit Analog-to-Digital (A/D) converter, 2
capture/compare/PWM functions, the synchronous serial port can be configured as either 3-wire
Serial Peripheral Interface (SPI™) or the 2-wire Inter-Integrated Circuit (I²C™) bus and a
Universal Asynchronous Receiver Transmitter (USART).

We know that the microcontroller is an integrated chip which consists of CPU, RAM,
ROM, timers, and counters, etc. In the same way, PIC microcontroller architecture consists of
RAM, ROM, CPU, timers, counters and supports the protocols such as SPI, CAN, and UART for
interfacing with other peripherals. At present PIC microcontrollers are extensively used for
industrial purpose due to low power consumption, high performance ability and easy of
availability of its supporting hardware and software tools like compilers, debuggers and
simulators.

PIN DIAGRAM

PIC16F877A Pin Configuration


Pin Pin Name Description
Number

1 MCLR/Vpp MCLR is used during programming, mostly connected


to programmer like PicKit

2 RA0/AN0 Analog pin 0 or 0th pin of PORTA

3 RA1/AN1 Analog pin 1 or 1st pin of PORTA

4 RA2/AN2/Vref- Analog pin 2 or 2nd pin of PORTA

5 RA3/AN3/Vref+ Analog pin 3 or 3rd pin of PORTA

6 RA4/T0CKI/C1out 4th pin of PORTA

7 RA5/AN4/SS/C2out Analog pin 4 or 5th pin of PORTA

8 RE0/RD/AN5 Analog pin 5 or 0th pin of PORTE

9 RE1/WR/AN6 Analog pin 6 or 1st pin of PORTE

10 RE2/CS/AN7 7th pin of PORTE

11 Vdd Ground pin of MCU

12 Vss Positive pin of MCU (+5V)


13 OSC1/CLKI External Oscillator/clock input pin

14 OSC2/CLKO External Oscillator/clock output pin

15 RC0/T1OSO/T1CKI 0th pin of PORT C

16 RC1/T1OSI/CCP2 1st pin of POCTC or Timer/PWM pin

17 RC2/CCP1 2nd pin of POCTC or Timer/PWM pin

18 RC3/SCK/SCL 3rd pin of POCTC

19 RD0/PSP0 0th pin of POCTD

20 RD1/PSPI 1st pin of POCTD

21 RD2/PSP2 2nd pin of POCTD

22 RD3/PSP3 3rd pin of POCTD

23 RC4/SDI/SDA 4th pin of POCTC or Serial Data in pin

24 RC5/SDO 5th pin of POCTC or Serial Data Out pin

25 RC6/Tx/CK 6th pin of POCTC or Transmitter pin of


Microcontroller

26 RC7/Rx/DT 7th pin of POCTC or Receiver pin of Microcontroller

27 RD4/PSP4 4th pin of POCTD


28 RD5/PSP5 5th pin of POCTD

29 RD6/PSP6 6th pin of POCTD

30 RD7/PSP7 7th pin of POCTD

31 Vss Positive pin of MCU (+5V)

32 Vdd Ground pin of MCU

33 RB0/INT 0th pin of POCTB or External Interrupt pin

34 RB1 1st pin of POCTB

35 RB2 2nd pin of POCTB

36 RB3/PGM 3rd pin of POCTB or connected to programmer

37 RB4 4th pin of POCTB

38 RB5 5th pin of POCTB

39 RB6/PGC 6th pin of POCTB or connected to programmer

40 RB7/PGD 7th pin of POCTB or connected to programmer


Architecture of PIC Microcontroller

The PIC microcontroller architecture comprises of CPU, I/O ports, memory organization,
A/D converter, timers/counters, interrupts, serial communication, oscillator and CCP module
which are discussed in detailed below.

Architecture of PIC Microcontroller

CPU (Central Processing Unit)

It is not different from other microcontrollers CPU and the PIC microcontroller CPU consists
of the ALU, CU, MU and accumulator, etc. Arithmetic logic unit is mainly used for arithmetic
operations and to take logical decisions. Memory is used for storing the instructions after
processing. To control the internal and external peripherals, control unit is used which are
connected to the CPU and the accumulator is used for storing the results and further process.

Memory Organization
The memory module in the PIC microcontroller architecture consists of RAM (Random
Access Memory), ROM (Read Only Memory) and STACK.

Random Access Memory (RAM)

RAM is an unstable memory which is used to store the data temporarily in its registers. The
RAM memory is classified into two banks, and each bank consists of so many registers. The
RAM registers are classified into two types: Special Function Registers (SFR) and General
Purpose Registers (GPR).

General Purpose Registers (GPR)

These registers are used for general purpose only as the name implies. For example, if we
want to multiply two numbers by using the PIC microcontroller. Generally, we use registers for
multiplying and storing the numbers in other registers. So these registers don’t have any special
function,- CPU can easily access the data in the registers.

Special Function Registers

These registers are used for special purposes only as the name SFR implies. These registers
will perform according to the functions assigned to them , and they cannot be used as normal
registers. For example, if you cannot use the STATUS register for storing the data, these
registers are used for showing the operation or status of the program. So, user cannot change the
function of the SFR; the function is given by the retailer at the time of manufacturing.

Special Function Registers


Memory Organization

Read Only Memory (ROM)

Read only memory is a stable memory which is used to store the data permanently. In PIC
microcontroller architecture, the architecture ROM stores the instructions or program, according
to the program the microcontroller acts. The ROM is also called as program memory, wherein
the user will write the program for microcontroller and saves it permanently, and finally the
program is executed by the CPU. The microcontrollers performance depends on the instruction,
which is executed by the CPU.

Electrically Erasable Programmable Read Only Memory (EEPROM)

In the normal ROM, we can write the program for only once we cannot use again the
microcontroller for multiple times. But, in the EEPROM, we can program the ROM multiple
times.

Flash Memory

Flash memory is also programmable read only memory (PROM) in which we can read, write
and erase the program thousands of times. Generally, the PIC microcontroller uses this type of
ROM.

Stack

When an interrupt occurs, first the PIC microcontroller has to execute the interrupt and the
existing process address. Then that is being executed is stored in the stack. After completing the
execution of the interrupt, the microcontroller calls the process with the help of address, which is
stored in the stack and get executes the process.

I/O Ports

The series of PIC16 consists of five ports such as Port A, Port B, Port C, Port D & Port E.
Port A is an 16-bit port that can be used as input or output port based on the status of the TRISA
(Tradoc Intelligence Support Activity) register. Port B is an 8- bit port that can be used as both
input and output port. Port C is an 8-bit and the input of output operation is decided by the status
of the TRISC register. Port D is an 8-bit port acts as a slave port for connection to the
microprocessor BUS. Port E is a 3-bit port which serves the additional function of the control
signals to the analog to digital converter.

BUS

BUS is used to transfer and receive the data from one peripheral to another. It is classified
into two types such as data bus and address.

Data Bus: It is used for only transfer or receive the data.

Address Bus: Address bus is used to transmit the memory address from the peripherals to the
CPU. I/O pins are used to interface the external peripherals; UART and USART both are serial
communication protocols which are used for interfacing serial devices like GSM, GPS,
Bluetooth, IR , etc.

BUS
A/D converters

The main intention of this analog to digital converter is to convert analog voltage values to
digital voltage values. A/D module of PIC microcontroller consists of 5 inputs for 28 pin devices
and 8 inputs for 40 pin devices. The operation of the analog to digital converter is controlled by
ADCON0 and ADCON1 special registers. The upper bits of the converter are stored in register
ADRESH and lower bits of the converter are stored in register ADRESL. For this operation, it
requires 5V of an analog reference voltage.

A/D CONVERTER

Timers/ Counters

PIC microcontroller has four timer/counters wherein the one 8-bit timer and the remaining
timers have the choice to select 8 or 16-bit mode. Timers are used for generating accuracy
actions, for example, creating specific time delays between two operations.

Interrupts

PIC microcontroller consists of 20 internal interrupts and three external interrupt sources
which are associated with different peripherals like ADC, USART, Timers, and so on.
Serial Communication

Serial communication is the method of transferring data one bit at a time sequentially over a
communication channel.

USART: The name USART stands for Universal synchronous and Asynchronous Receiver and
Transmitter which is a serial communication for two protocols. It is used for transmitting and
receiving the data bit by bit over a single wire with respect to clock pulses. The PIC
microcontroller has two pins TXD and RXD. These pins are used for transmitting and receiving
the data serially.

SPI Protocol: The term SPI stands for Serial Peripheral Interface. This protocol is used to send
data between PIC microcontroller and other peripherals such as SD cards, sensors and shift
registers. PIC microcontroller support three wire SPI communications between two devices on a
common clock source. The data rate of SPI protocol is more than that of the USART.

I2C Protocol: The term I2C stands for Inter Integrated Circuit , and it is a serial protocol which
is used to connect low speed devices such as EEPROMS, microcontrollers, A/D converters, etc.
PIC microcontroller support two wire Interface or I2C communication between two devices
which can work as both Master and Slave device.

Serial Communication
Serial Communication

Oscillators

Oscillators are used for timing generation. PIC microcontroller consist of external oscillators like
RC oscillators or crystal oscillators. Where the crystal oscillator is connected between the two
oscillator pins. The value of the capacitor is connected to every pin that decides the mode of the
operation of the oscillator. The modes are crystal mode, high-speed mode and the low-power
mode. In case of RC oscillators, the value of the resistor & capacitor determine the clock
frequency and the range of clock frequency is 30KHz to 4MHz.

CCP module

The name CCP module stands for capture/compare/PWM where it works in three modes
such as capture mode, compare mode and PWM mode.

Capture Mode: Capture mode captures the time of arrival of a signal, or in other words, when
the CCP pin goes high, it captures the value of the Timer1.

Compare Mode: Compare mode acts as an analog comparator. When the timer1 value reaches a
certain reference value, then it generates an output.

PWM Mode: PWM mode provides pulse width modulated output with a 10-bit resolution and
programmable duty cycle.

PIC Microcontroller Applications

The PIC microcontroller projects can be used in different applications, such as peripherals,
audio accessories, video games, etc. For better understanding of this PIC microcontroller, the
following project demonstrates PIC microcontroller’s operations.

 Multiple DIY Projects


 Very good choice if you are learning PIC
 Projects requiring Multiple I/O interfaces and communications
 Replacement for Arduino Module
 Ideal for more advanced level A/D applications in automotive, industrial, appliances and
consumer applications.

Advantages of PIC Microcontroller:

 They are reliable and malfunctioning of PIC percentage is very less. And performance of
the PIC
 is very fast because of using RISC architecture.
 Power conception is also very less when compared to other micro controllers. When we
see in
 the programmer point of view interfacing is very easy, also we can connect analog
devices
 directly with out any extra circuitry and use them. Programming is also very easy when
compared to other microcontrollers.
Disadvantages of PIC Microcontroller:

 The length of the program will be big because of using RISC (35 instructions).
 Program memory is not accessible and only one single accumulator is present.
LCD Display

Liquid Crystal Display. A type of display used especially in small portable electronic
devices. A type of display, usually numerical, used in electronic equipment. Dark characters are
formed on a lighter background. Requires external back lighting to be visible under low-light
conditions.

Figure 7 – LCD Diagram

One of the most popular output devices for embedded electronics is LCD. The LCD interface has
become very simple. This is due to the availability modules for LCDs. The LCD along with
necessary controller (LCD Controller) and mounting facility is made available in the module
itself. The LCD controller takes care of everything necessary for the LCD. We communicate
with the LCD controller with the help of a command set provided by the manufacturer.

Pin Diagram
Figure 1.1 Pin Diagram

LCD Display Pin Description:

Vcc, Vss, and VEE:

While Vcc and Vss provide +5V and ground, respectively, VEE is used for controlling
LCD contrast.

RS – register select:

There are two very important registers inside the LCD. The RS pin is used for their selection as
follows. If RS = 0, the instruction command code register is selected, allowing the user to send a
command such as clear display, cursor at home, etc. If RS = 1 the data register is selected,
allowing the user to send data to be displayed on the LCD.

R/W – read/write:

R/W input allows the user to write information to the LCD or read information from it. R/W = 1
when reading; R/W =0 when writing.
E – Enable:

The enable pin is used by the LCD to latch information presented to its data pins. When data is
supplied to data pins, a high to low pulse must be applied to this pin in order for the LCD to latch
in the data present at the data pins. This pulse must be a minimum of 450 ns wide.

D0 – D7:

The 8 bit data pins, D0 – D7, are used to send information to the LCD or read the contents of the
LCD’s internal registers.

To display letters and numbers, we send ASCII codes for the letters A – Z, a – z, and numbers 0
– 9 to these pins while making RS = 1.

There are also instructions command codes that can be sent to the LCD to clear the display or
force the cursor to the home position or blink the cursor. Table below lists the instruction
command codes.

LCD Commands table:


We also use RS = 0 to check the busy flag bit to see if the LCD is ready to receive
information. The busy flag is D7 and can be read when R/W =1 and RS = 0, as follows: if
R/W =1, RS =0. When D7 = 1(busy flag = 1), the LCD busy taking care of internal
operations and will not accept any new information. When D7 = 0, the LCD is ready to
receive new information. Note: It is recommended to check the busy flag before writing
any data to the LCD.

Interfacing 8051 with LCD:

From the above figure microcontroller is used for 8 bit data display on the LCD. Data
lines of the LCD Pin no.7 to pin no 14 are connected to the port 1 of the microcontroller.
The control pin no.4 register select is connected to P3.5, pin no.5 of LCD for Read/write is
connected to P3.6 and the enable pin (6) is connected to microcontroller.

Bluetooth Module

Bluetooth Module

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 Rluetooth system with CMOS
technology and with AFH (Adaptive Frequency Hopping Feature).

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.

Software Features

 Slave default Baud rate: 9600, Data bits:8, Stop bit:1,Parity:No parity.
 Auto‐connect to the last device on power as default.
 Permit pairing device to connect as default.
 Auto‐pairing PINCODE:”1234” as default.

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.
BUTTON SWITCH: 
This is used to switch the module into AT command mode.To enable AT command
mode,press the button switch for a second.With the help of AT commands,the user can
change the parameters of this module but only when the module is not paired with any
other BT device.If the module is connected to any other bluetooth device, it starts to
communicate with that device and fails to work in AT command mode.

Relay

A relay is an electrical switch that opens and closes under control of another electrical
circuit. In the original form, the switch is operated by an electromagnet to open or close one or
many sets of contacts. These contacts can be either Normally Open (NO), Normally Closed
(NC), or change-over contacts.

 Normally-open contacts connect the circuit when the relay is activated; the circuit is
disconnected when the relay is inactive. It is also called Form A contact or "make"
contact. Form A contact is ideal for applications that require to switch a high-current
power source from a remote device.
 Normally-closed contacts disconnect the circuit when the relay is activated; the circuit is
connected when the relay is inactive. It is also called Form B contact or "break" contact.
Form B contact is ideal for applications that require the circuit to remain closed until the
relay is activated.
 Change-over contacts control two circuits: one normally-open contact and one normally-
closed contact. It is also called Form C contact.

Functional description

When a current flows through the coil, the resulting magnetic field attracts an
armature that is mechanically linked to a moving contact. The movement either makes or
breaks a connection with a fixed contact. When the current is switched off, the armature
is usually returned by a spring to its resting position.

Fig 6.1 An Electromagnetic Relay

Figure 3.0.2- Relay Switch Connection

Operation of Relay:
The relay driver is used to isolate both the controlling and the controlled device. The
relay is an electromagnetic device, which consists of solenoid, moving contacts (switch) and
restoring spring and consumes comparatively large amount of power. Hence it is possible for the
interface IC to drive the relay satisfactorily. To enable this, a driver circuitry, which will act as a
buffer circuit, is to be incorporated between them. The driver circuitry senses the presence of a
“high” level at the input and drives the relay from another voltage source. Hence the relay is used
to switch the electrical supply to the appliances..From the figure when we connect the rated
voltage across the coil the back emf opposes the current flow but after the short time the supplied
voltage will overcome the back emf and the current flow through the coil increase. When the
current is equal to the activating current of relay the core is magnetized and it attracts the moving
contacts. Now the moving contact leaves from its initial position denoted “(N/C)” normally
closed terminal which is a fixed terminal.

The common contact or moving contact establishes the connection with a new terminal
which is indicated as a normally open terminal “(N/O)”.Whenever, the supply coil is withdrawn
the magnetizing force is vanished. Now, the spring pulls the moving contact back to initial
position, where it makes a connection makes with N/C terminal. However, it is also to be noted
that at this time also a back emf is produced. The withdrawal time may be in microsecond, the
back emf may be in the range of few kilovolts and in opposite polarity with the supplied
terminals the voltage is known as surge voltage. It must be neutralized or else it may damage the
system.

Selection of an appropriate relay

 For a particular application requires evaluation of many different factors:


 Number and type of contacts – normally open, normally closed change over (double-
throw)
 Voltage and Current Rating of contacts
 Coil voltage – machine-tool relays usually 24 VAC or 120 VAC, relay for switch gear
may have 125V or 250 VDC coils, “sensitive” relays operate on a few mill amperes.
 Package/enclosure – open, touch-sage, double-voltage for isolation between circuits.
 Mounting – sockets ,rail mount, panel mount, through-panel mount, enclosure for
mounting on walls or equipment
 Switching time – where high speed is required
 “Dry” contacts – when switching very low level signals, special contact materials may be
needed such as gold-plated contacts
 Contact protection – suppress arcing in very inductive circuits
 Coil protection – suppress the surge voltage produced when switching the coil current.
 Isolation between coil circuit and contacts
 Aerospace or radiation – resistant testing, special quality assurance
 Accessories such as timers, auxiliary contacts, pilot lamps, test buttons
 Regulatory approvals
 Stray magnetic linkage between coils of adjacent relays on a printed circuit board.

Types of Relay

A latching relay is mechanically arranged so that the armature can rest in either of
two positions. There are two coils that pull the armature in opposite directions, so the relay can
be switched to one position or the other and then left in that state indefinitely. This type of relay
has the advantage that it consumes power only for an instant, while it is being switched, and it
retains its last setting across a power outage. Some common relays may be wired to electrically
latch, which offers no power saving but does ensure that the relay returns to a known state during
and after a power outage.
A reed relay has two, usually normally open, contacts inside a vacuum or inert gas
filled glass tube. This protects the contacts against atmospheric corrosion. The two contacts are
closed by magnetism from a coil around the glass tube, or a permanent magnet moved towards it.
See also: reed switch.
A mercury wetted relay is a form of reed relay in which the contacts are wetted
with mercury. Such relays are used to switch low-voltage signals (one volt or less), or for high-
speed counting and timing applications where the mercury eliminated contact bounce. Mercury
wetted relays are position-sensitive and must be mounted vertically to work properly. Because of
the toxicity and expense of liquid mercury, these relays are rarely specified for new equipment
A machine tool relay is a type standardized for industrial control of machine tools,
transfer machines, and other sequential control. They are characterized by a large number of
contacts (sometimes extendable in the field) which are easily converted from normally-open to
normally-closed status, easily replaceable coils, and a form factor that allows compactly
installing many relays in a control panel. Although such relays once were the backbone of
automation in such industries as automobile assembly, the programmable logic controller mostly
displaced the machine tool relay from sequential control applications.
A contactor is a very heavy-duty relay used for switching electric motors and
lighting loads. Such devices are often used for motor starters, and may be built up with overload
protection devices attached. The overload sensing devices are a form of heat operated relay
where a coil heats a bi-metal strip to open contacts, or where a solder pot melts, releasing a
spring to operate contacts.
A Buchholz relay is a safety device sensing the accumulation of gas in large oil-
filled transformers, which will alarm on slow accumulation of gas or shut down the transformer
if gas is produced rapidly in the transformer oil.
A Solid State Relay (SSR) is a solid state electronic component that provides a
similar function to an electromechanical relay but does not have any moving components,
increasing long-term reliability.
Applications
Relays are used for
 To control a high-voltage circuit with a low-voltage signal, as in some types of modems,
 To control a high-current circuit with a low-current signal, as in the starter solenoid of an
automobile
 To detect and isolate faults on transmission and distribution lines by opening and closing
circuit breakers (protection relays)
CONCLUSION:

In this THE DEVELOPMENT OF REMOTELY CONTROLLED HOME


AUTOMATION SYSTEM OF ENERGY SAVING system has been designed to improve the
domestic and industrial safety. The system was a positive learning experience for the student,
which allows maximizing his creative potential as well as utilizing many technologies in
Electrical Engineering Technology discipline.

REFERENCES

 A. Bruce Carlson, Communication Systems , Tata McGraw Hill, 1986


 Edward.C.Jordan and Keith.G.Balmain, "Electromagnetic waves and radiating systems",
Prentice Hall, 2nd Edition, 1995.

 FLOYD: Digital Fundamentals, Universal Book Stall, New Delhi.1993


 George Kennedy: Electronic communication systems, Tata McGraw Hill publications, 1992
 Gaonkar R.S., Microprocessor architecture Programming and application, Wiley Eastern
Ltd., New Delhi, 1995.
 Irving I.Kosow, “Electric Machinery and Transformers”, PHI, Second Edition, 2001.
 I.J. Nagrath & D.P. Kothari, “Electrical Machines”, Tata McGraw Hill Publications, Second
Edition 1997.
 John B.Peatman, Design with Microcontrollers, McGraw Hill International, USA, 1988.
 John D.Kraus, “Antennas “Tata McGraw Hill 2nd Edition, 2000.
 K. Feher, Wireless Digital Communication, Prentice Hall of India, New Delhi, 1995.
 Kennedy, Electronic Communication systems Mc Graw Hill.1987
 Kenneth Hint, and Daniel Tabak, Microcontrollers, Architecture, Implementation and
Programming, McGraw Hill International, USA, 1992.
 Moris Mano, ‘ Digital Electronics and Design’, Prentice Hall of India, 2000
 Mathur A.P., Introduction of Microprocessors, Tata McGraw-Hill Publishing Co.Ltd, New
Delhi, 1989.
 Prasad .K.D., "Antennas and wave propagation", Satya prakasan, 3rd Edition, 1996
 Roddy and Coolen, Electronic Communication, PHI 1999
 Simon Haykins, ‘principles of Communications, Prentice Hall of India. 2001
 Simon Haykins, Communication Systems Wiley 1995
 S.K Bhattacharya, “Electrical Machines”, Tata McGraw Hill Publications. 1997.
 T.S. Rappaport, Wireless Communication, Principle and Practice, Prentice Hall, NJ, 1996
 W.C.Y. Lee, Mobile Communication Engineering; Theory and Application, Second Edition,
McGraw Hill International, 1998.

You might also like