Bluetooth - Based Lamp Controller

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

BLUETOOTH COMMUNICATION CONTROLLED LAMP

LOAD BRIGHTNESS AND DIMNESS FOR NEXT


GENERATION
LIST OF FIGURES

FIG.NO FIGURES PAGE NO


1.1 Block diagram transmitter 2

1.2 Block diagram receiver 3

2.1 Circuit diagram 6

2.2 TRIAC equivalent circuit 7

2.3 Light dimmer circuit 8

3.1 Pin diagram of PIC 16F877A 14

3.2 Architecture Diagram of PIC 16F877A 15

3.3 Using UA 741 op-amp IC 20

3.4 Using 741 IC waveforms 21

3.5 Using timing marker generator 22

3.6 Timing marker generator waveform 23

3.7 Using IC 311 and transmitter 24

3.8 Block diagram (Power supply) 25

3.9 Circuit diagram (Power supply) 28

3.10 Circuit diagram (TRIAC) 29

3.11 TRIAC 30

4.1 Controller design 35

4.2 Power supply design 36

4.3 Bluetooth design 37


LIST OF TABLES

T.NO TABLES PAGE NO


1.1 Block Diagram 4

3.1 Specifications of PIC 16F877A 14

3.2(a) Pin out description 16

3.2(b) Pin out description 17

5.1 Components list 38

8.1 Cost estimation 46


LIST OF ABBREVIATIONS

ZCD : ZERO CROSSING DETECTOR

TRIAC : TRIODE FOR ALTERNATING CURRENT

EMC : ELECTROMAGNETIC COMPATIBILITY

VR : VARIABLE RESISTOR

PIC : PERIPHERAL INTERFACE CONTROLLER

RISC : REDUCED INSTRUCTION SET COMPUTER

CMOS : COMPLEMENTARY METAL OXIDE SEMICONDUCTOR

EEPROM : ELECTRICALLY ERASABLE PROGRAMMABLE READ ONLY

MEMORY

EPROM : ERASABLE PROGRAMMABLE READ ONLY MEMORY

CPU : CENTRAL PROCESSING UNIT

RAM : RANDOM ACCESS MEMORY

POR : POWER ON RESET

PWRT : POWER UP TIMER

OST : OSCILLATOR START UP TIMER

WDT : WATCHDOG TIMER

ICSP : INCIRCUIT SERIAL PROGRAMMING


PDA : PERSONAL DIGITAL ASSISTANTS

SAW : SURFACE ACOUSTIC WAVE

DSC : DIGITAL SIGNAL CONTROLLER

CISC : COMPLEX INSTRUCTION SET COMPUTER

PC : PROGRAM COUNTER

ALU : ARITHMETIC LOGIC UNIT

PWM : PULSE WIDTH MODULATION

D : DIODE

L : INDUCTANCE

R : RESISTANCE

C : CAPACITANCE

V : VOLTAGE

I : CURRENT

L : LOAD

AC : ALTERNATE CURRENT

DC : DIRECT CURRENT

RMS : ROOT MEAN SQUARE

IC : INTEGRATED CIRCUITS

PWM : PULSE WIDTH MODULATION


ADC : ANALOG TO DIGITAL CONVERTOR

OP AMP : OPERATIONAL AMPLIFIER

RL : LOAD RESISTANCE
INTRODUCTION

The project aims in designing a system which helps in increasing or

decreasing lamp intensity as required with simple touch. As the world gets more

and more technologically advanced, we find new technology coming in deeper

and deeper into our personal lives even at home. Home automation is becoming

more and more popular around the world and is becoming a common practice.

I
ABSTRACT
The aim of this project is to build a Touch Screen based application

interface for high voltage electrical lamp dimming operation over wireless. The

program running inside microcontroller can develop a virtual on screen keypad

and a control panel. The status of lamp intensity can be viewed on mobile

screen. No need to have mechanical rotational based control system or push

buttons for this operation. Users can control the lamp intensity with gentle

finger touch.

II
CHAPTER 1

BLOCK DIAGRAM

1
1.1. BLOCK DIAGRAM

TRANSMITTER

POWER SUPPLY

PIC 16F877A

TOUCHPAD BLUETOOTH

Fig 1.1 Block Diagram Transmitter

2
RECEIVER

POWER
SUPPLY

BLUETOOTH

PIC 16F877A
ZCD
TRIAC
DRIVER

SOURCE
LAMP

Fig 1.2 Block Diagram receiver

3
1.2 BLOCK DIAGRAM DESCRIPTION
A system is designed to increasing or decreasing lamp intensity as
required with the help of simple touch pad unit is main concept of our project.
Home automation is becoming more and more popular around the world and is
becoming a common practice.
The process of home automation works by making everything in the
house automatically controlled using technology to control and do the jobs that
we would normally do manually.
In our project we are using Mobile App and Bluetooth technology for
light dim and bright control. The program running inside pic-controller can
develop a virtual on screen keypad and a control panel. The status of lamp
intensity can be viewed on touch pad.
No need to have mechanical rotational based control system or push
buttons for this operation. Users can control the lamp intensity with gentle
finger touch. The light intensity ratio with switch position is given below in
table. In future we add more number switches depending on this we may
increase or decrease the lamp brightness.

% OF DATA
SL.NO SWITCH NO BRIGHTNESS OF KEY
1 1 90 *150#
2 2 70 *120#
3 3 50 *090#
4 4 30 *070#
5 5 10 *010#
6 ON 100 *000#
7 OFF 0 *200#

Tab 1.1 Block Diagram

4
CHAPTER 2

CIRCUIT DIAGRAM

5
2.1. CIRCUIT DIAGRAM

Fig 2.1 Circuit Diagram

2.2. CIRCUIT DIAGRAM DESCRIPTION


6
Bluetooth Module HC-05 is connected with the PIC microcontroller. The
data send by the mobile phone is received by the Bluetooth module is send to
the PIC via transmitter and receiver pin. According to the value received by the
Bluetooth module the PIC controller sends the firing angle to the TRIAC
circuit. The firing angle also visible in android application, and also adjustable
to the user. Zero crossing detector sends a signal every time of the power supply
crossing a zero line.

The TRIAC is a three terminal component that is used to control the


current. It works based on the thyristor. It gives AC switching for various
electrical system applications such as the TRIACS and the thyristor. These
components can be found only in a particular light dimmer circuit where they
allow both halves of the AC cycle to be used. This makes them more effective
in terms of the power available. Whereas it is possible to use two thyristors back
to back, this is not always cost effective for low power and low cost
applications. When the two thyristors are connected back to back then it is
possible to view the operation of the TRIAC.

Fig 2.2 TRIAC equivalent circuit

The main drawback of the TRIAC is, it does not switch proportionally
and frequently it will have an offset, switching at various gate voltages for each
half of the cycle. This makes extra harmonics which is not worthy for the
performance of EMC and also offers a difference in the system.

7
Light Dimmer Circuit Using Triac

This light dimmer circuit is built with various electrical and electronic
components like resistors R1=68 kilo ohms, R2=280 kilo ohms and R3=10 kilo
ohms, variable resistors VR1=100 kilo ohms and VR2=200 kilo ohms,
capacitors C1, C2 and C3=0.33 uF/400V, TRIAC is BT136 and DIAC is
ER900.

Fig 2.3 Light Dimmer Circuit

The basic circuit of light dimmer using TRIAC is shown below and this
circuit depends on phase control. The variable resistor VR1 plays as a main
controller in the light dimmer circuit. The capacitor ‘C2’ in the circuit below
gets charge from the main supply. In the circuit, variable resistor VR1 and
D1 DIAC are used to control the brightness of the lower level. To overcome the
interface problem, R2 & C3 are used.

Here in this light dimmer circuit, without any change DIAC can be
replaced by the BC148 transistor. When the transistor is used instead of DIAC,
then the base terminal of the transistor not connected and remaining terminals
like emitter and collector are connected without the help of polarity. In this
circuit, diode is used as a DIAC.

CHAPTER 3

8
HARDWARE DESCRIPTIONS

HARDWARE DESCRIPTIONS

9
 PIC MICROCONTROLLER

 TOUCH SCREEN(MOBILE APPLICATION)

 ZERO CROSSING DETECTOR

 POWER SUPPLY

 TRAIC CONTROL CIRCUIT

 SOFTWARE

3.1. PIC MICROCONTROLLER

10
3.1.1 Introduction

The microcontroller that has been used for this project is from PIC series.
PIC microcontroller is the first RISC based microcontroller fabricated in CMOS
(complementary metal oxide semiconductor) that uses separate bus for
instruction and data allowing simultaneous access of program and data memory.

The main advantage of CMOS and RISC combination is low power


consumption resulting in a very small chip size with a small pin count. The
main advantage of CMOS is that it has immunity to noise than other fabrication
techniques. Various microcontrollers offer different kinds of memories.
EEPROM, EPROM, FLASH etc. are some of the memories of which FLASH is
the most recently developed. Technology that is used in PIC 16F877A is flash
technology, so that data is retained even when the power is switched off. Easy
Programming and Erasing are other features of PIC 16F877A.

3.2 CORE FEATURES

• High-performance RISC CPU

• Only 35 single word instructions to learn

• All single cycle instructions except for program branches which are two
cycle

• Operating speed: DC - 20 MHz clock input

DC - 200 ns instruction cycle

• Up to 8K x 14 words of Flash Program Memory,

Up to 368 x 8 bytes of Data Memory (RAM)

Up to 256 x 8 bytes of EEPROM data memory

11
• Pin out compatible to the PIC16C73/74/76/77

• Interrupt capability (up to 14 internal/external

• Eight level deep hardware stack

• Direct, indirect, and relative addressing modes

• Power-on Reset (POR)

• Power-up Timer (PWRT) and Oscillator Start-up Timer (OST)

• Watchdog Timer (WDT) with its own on-chip RC Oscillator for reliable
operation.

• Programmable code-protection

• Power saving SLEEP mode

• Selectable oscillator options

• Low-power, high-speed CMOS EPROM/EEPROM technology

• Fully static design

• In-Circuit Serial Programming (ICSP) via two pins

• Only single 5V source needed for programming capability

• In-Circuit Debugging via two pins

• Processor read/write access to program memory

• Wide operating voltage range: 2.5V to 5.5V

• High Sink/Source Current: 25 mA

• Commercial and Industrial temperature ranges

• Low-power consumption:

12
< 2mA typical @ 5V, 4 MHz

< 20mA typical @ 3V, 32 kHz

< 1mA typical standby current.

3.3 ARCHITECTURE OF PIC 16F877A


13
The complete architecture of PIC 16F877A is shown in the fig 3.2. Table
3.1 gives details about the specifications of PIC 16F877A. Fig 3.1 shows the
complete pin diagram of the IC PIC 16F877A.

DATA DATA
DEVICE PROGRAM FLASH
MEMORY EEPROM

PIC
8K 368 Bytes 256 Bytes
16F877A

Tab: 3.1 Specifications of PIC 16F877A

Fig: 3.1 Pin Diagram of PIC 16F877A

14
Fig: 3.2 Architecture Diagram of PIC 16F877A

15
Tab: 3.2(a) Pin Out Description

16
Tab: 3.2(b) Pin Out Description

Legend: I = input O = output I/O = input/output P = power

= Not used TTL = TTL input ST = Schmitt Trigger input

3.4. TOUCH SCREEN

A touch screen is an electronic visual display that the user can control
through simple or multi-touch gestures by touching the screen with one or more
fingers. Some touch screens can also detect objects such as a stylus or ordinary
or specially coated gloves. The user can use the touch screen to react to what is
displayed and to control how it is displayed (for example by zooming the text
size).

The touch screen enables the user to interact directly with what is
displayed, rather than using a mouse, touchpad, or any other intermediate device
(other than a stylus, which is optional for most modern touch screens). Touch
screens are common in devices such as game consoles, all-in-one computers,
tablet computers, and smart phones. They can also be attached to computers or,
as terminals, to networks. They also play a prominent role in the design of
digital appliances such as personal digital assistants (PDAs), satellite navigation
devices, mobile phones, and video games.

The popularity of smart phones, tablets, and many types of information


appliances is driving the demand and acceptance of common touch screens for
portable and functional electronics. Touch screens are popular in the medical
field and in heavy industry, as well as in kiosks such as museum displays or
room automation, where keyboard and mouse systems do not allow a suitably
intuitive, rapid, or accurate interaction by the user with the display's content.

17
Historically, the touch screen sensor and its accompanying controller-based
firmware have been made available by a wide array of after-market system
integrators, and not by display, chip, or motherboard manufacturers. Display
manufacturers and chip manufacturers worldwide have acknowledged the trend
toward acceptance of touch screens as a highly desirable user interface
component and have begun to integrate touch screens into the fundamental
design of their products.

3.4.1 Resistive touch screen

A resistive touch screen panel comprises several layers, the most


important of which are two thin, transparent electrically-resistive layers
separated by a thin space. These layers face each other with a thin gap between.
The top screen (the screen that is touched) has a coating on the underside
surface of the screen. Just beneath it is a similar resistive layer on top of its
substrate. One layer has conductive connections along its sides, the other along
top and bottom. A voltage is applied to one layer, and sensed by the other.
When an object, such as a fingertip or stylus tip, presses down on the outer
surface, the two layers touch to become connected at that point: The panel then
behaves as a pair of voltage dividers, one axis at a time. By rapidly switching
between each layer, the position of a pressure on the screen can be read.

Resistive touch is used in restaurants, factories and hospitals due to its


high resistance to liquids and contaminants. A major benefit of resistive touch
technology is its low cost. Additionally, as only sufficient pressure is necessary
for the touch to be sensed, they may be used with gloves on, or by using
anything rigid as a finger/stylus substitute. Disadvantages include the need to
press down, and a risk of damage by sharp objects. Resistive touch screens also
suffer from poorer contrast, due to having additional reflections from the extra
layer of material placed over the screen.

18
3.4.2 Surface acoustic wave

Surface acoustic wave (SAW) technology uses ultrasonic waves that pass
over the touch screen panel. When the panel is touched, a portion of the wave is
absorbed. This change in the ultrasonic waves registers the position of the touch
event and sends this information to the controller for processing. Surface wave
touch screen panels can be damaged by outside elements. Contaminants on the
surface can also interfere with the functionality of the touch screen.

3.5. ZERO CROSSING DETECTOR

The zero crossing detector circuit is an important application of the op-


amp comparator circuit. It can also be called as the sine to square wave
converter. Anyone of the inverting or non-inverting comparators can be used as
a zero-crossing detector. The only change to be brought in is the reference
voltage with which the input voltage is to be compared, must be made zero
(Vref = 0V). An input sine wave is given as Vin. These are shown in the circuit
diagram and input and output waveforms of an inverting comparator with a 0V
reference voltage.

19
Fig 3.3 Using UA 741 op-amp IC

As shown in the waveform, for a reference voltage 0V, when the input
sine wave passes through zero and goes in positive direction, the output voltage
Vout is driven into negative saturation. Similarly, when the input voltage passes
through zero and goes in the negative direction, the output voltage is driven to
positive saturation. The diodes D1 and D2 are also called clamp diodes. They
are used to protect the op-amp from damage due to increase in input voltage.
They clamp the differential input voltages to either +0.7V or -0.7V.

20
In certain applications, the input voltage may be a low frequency
waveform. This means that the waveform only changes slowly. This causes a
delay in time for the input voltage to cross the zero-level. This causes further
delay for the output voltage to switch between the upper and lower saturation
levels. At the same time, the input noises in the op-amp may cause the output
voltage to switch between the saturation levels. Thus zero crossing are detected
for noise voltages in addition to the input voltage. These difficulties can be
removed by using a regenerative feedback circuit with a positive feedback that
causes the output voltage to change faster thereby eliminating the possibility of
any false zero crossing due to noise voltages at the op-amp input.

Fig 3.4 Using 741 IC Waveforms

3.5.1 Zero-crossing Detector as Time Marker Generator

For an input sine wave, the output of the zero-crossing detector being a
square wave, is further passed through an RC series circuit. This is shown in the
figure below.

21
Fig 3.5 Using Timing Marker Generator

If the time constant RC is very small compared to the period T of the input sine
wave, then the voltage across R of the RC circuit network called Vr will be a
series of positive and negative pulses. If the voltage Vr is applied to a clipper
circuit using a diode D, the load voltage Vload will have only positive pulses
and will clip away the negative pulses. Thus, a zero-crossing detector whose
input is a sign wave has been converted into a train of positive pulses at interval
T by adding a RC network and a clipping circuit.

22
Fig 3.6 Timing Marker Generator Waveform

3.5.2 Zero-crossing Detector as Phase meter

A zero-crossing detector can be used for the measurement of phase angle


between two voltages. The working will be the same as explained in the above
circuit. A train of pulses in the positive and negative cycles are obtained and the
time interval between the pulse of sine wave voltage and that of second sine
wave voltage is measured. This interval of time is proportional to the phase
difference between the two input sine wave voltages. The range of use of phase
meter for measurement is 0° to 360°.

23
3.5.3 Zero-crossing Detector Using IC 311 and Transistor

A zero-crossing detector using an 8 pin DIP unit 311 IC is shown in the


figure below. The output of the 311 op-amp IC is connected to an open collector
NPN transistor. A 20 kilo ohm load resistor is connected to the output of the
transistor.

Fig 3.7 Using IC 311 and transistor

For a positive input signal, that is, for an input sine wave above 0 volt,
the output of the op-amp sets the transistor OFF, and the output of the transistor
goes HIGH. The low condition resembles a -10 volt in the circuit and a HIGH
condition resembles -10 volt in the circuit.

The output of the transistor indicates whether the input is more than or
less than 0 volt. In short, if the input signal is a positive voltage, the output of
the transistor will be LOW. If the input signal is a negative voltage, the output
of the transistor will be HIGH.

24
3.6. POWER SUPPLY DESCRIPTION

3.6.1. Introduction

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 REGULATOR LOAD

Fig: 3.8 Block diagram (Power supply)

3.6.2. WORKING PRINCIPLE

Transformer

The 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.

25
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 path for current flow is from point B through D1, up through RL,
through D3, through the secondary of the transformer back to point B. this path
is indicated by the solid arrows. Waveforms (1) and (2) can be observed across
D1 and D3.

One-half cycle later the polarity across the secondary of the transformer
reverse, forward biasing D2 and D4 and reverse biasing D1 and D3. Current
flow will now be from point A through D4, up through RL, through D2, through
the secondary of T1, and back to point A. This path is indicated by the broken
arrows. Waveforms (3) and (4) can be observed across D2 and D4. The current
flow through RL is always in the same direction. In flowing through RL this
current develops a voltage corresponding to that shown waveform (5). Since
current flows through the load (RL) during both half cycles of the applied
voltage, this bridge rectifier is a full-wave rectifier.

One advantage of a bridge rectifier over a conventional full-wave rectifier


is that with a given transformer the bridge rectifier produces a voltage output
that is nearly twice that of the conventional full-wave circuit.

26
This may be shown by assigning values to some of the components
shown in views A and B. assume that the same transformer is used in both
circuits. The peak voltage developed between points X and y is 1000 volts in
both circuits. In the conventional full-wave circuit shown—in view A, the peak
voltage from the center tap to either X or Y is 500 volts. Since only one diode
can conduct at any instant, the maximum voltage that can be rectified at any
instant is 500 volts.

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 adjustable set
voltage. The regulators can be selected for operation with load currents from
hundreds of mill amperes to tens of amperes, corresponding to power ratings
from mill watts to tens of watts.

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.

27
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.

Fig: 3.9 Circuit diagram (Power supply)

For ICs, microcontroller, LCD --------- 5 volts

For alarm circuit, op-amp, relay circuits ---------- 12 volt

For driver circuit ---------- 15 volts


28
3.7 TRIAC CONTROL CIRCUIT

Fig: 3.10 Circuit diagram (Triac)

TRIAC

A TRIAC, or TRIODE for alternating current is an electronic component


approximately equivalent to two silicon-controlled rectifiers (SCRs/Thyristors)
joined in inverse parallel (paralleled but with the polarity reversed) and with
their gates connected together. This result in a bidirectional electronic switch
which can conduct current in either direction when it is triggered (turned on). It
can be triggered by either a positive or a negative voltage being applied to its
gate electrode.

Once triggered, the device continues to conduct until the current through
it drops below a certain threshold value, such as at the end of a half-cycle of
alternating current (AC) mains power. This makes the TRIAC a very convenient
switch for AC circuits, allowing the control of very large power flows with mill
ampere-scale control currents. In addition, applying a trigger pulse at a
controllable point in an AC cycle allows one to

29
Fig: 3.11 Triac

control the percentage of current that flows through the TRIAC to the load (so-
called phase control).

3.8 SOFTWARE TOOLS


MPLAB

MPLAB IDE is an integrated development environment that provides


development engineers with the flexibility to develop and debug firmware for
various Microchip devices.

MPLAB IDE is a Windows-based Integrated Development Environment


for the Microchip Technology Incorporated PIC microcontroller (MCU) and
DSPIC digital signal controller (DSC) families. In the MPLAB IDLE, you can.

Create source code using the built-in editor.

 Assemble, compile and link source code using various language tools. An
assembler, linker and librarian come with MPLAB IDE. C compilers are
available from Microchip and other third party vendors.
 Debug the executable logic by watching program flow with a simulator,
such as MPLAB SIM, or in real time with an emulator, such as MPLAB
ICE. Third party emulators that work with MPLAB IDE are also
available.

30
 Make timing measurements.
 View variables in Watch windows.
 Program firmware into devices with programmers such as PICSTART
Plus or PRO MATE II.
 Find quick answers to questions from the MPLAB IDE on-line Help

MPLAB SIMULATOR

 MPLAB SIM is a discrete-event simulator for the PIC microcontroller


(MCU) families. It is integrated into MPLAB IDE integrated
development environment. The MPLAB SIM debugging tool is designed
to model operation of Microchip Technology's PIC microcontrollers to
assist users in debugging software for these devices

IC PROGRAMMER

The PRO MATE II is a Microchip microcontroller device programmer.


Through interchangeable programming socket modules, PRO MATE II enables
you to quickly and easily program the entire line of Microchip PIC
microcontroller devices and many of the Microchip memory parts.

PRO MATE II may be used with MPLAB IDE running under supported
Windows OS's (see Read me for PRO MATE II.txt for support list), with the
command-line controller PROCMD or as a stand-alone programmer

COMPILER-HIGH TECH C

A program written in the high level language called C; which will be


converted into PIC micro MCU machine code by a compiler. Machine code is

31
suitable for use by a PIC micro MCU or Microchip development system product
like MPLAB IDE.

PIC START PLUS PROGRAMMER

The PIC start plus development system from microchip technology


provides the product development engineer with a highly flexible low cost
microcontroller design tool set for all microchip PIC micro devices. The pic
start plus development system includes PIC start plus development programmer
and MPLAB IDE.

The PIC start plus programmer gives the product developer ability to
program user software in to any of the supported microcontrollers. The PIC start
plus software running under MPLAB provides for full interactive control over
the programmer.

CHAPTER 4

32
PCB DESIGN

PCB DESIGN

33
CONTROLLER DESIGN

34
Fig 4.1 Controller design

POWER SUPPLY DESIGN

35
Fig 4.2 Power supply design

BLUETOOTH DESIGN

Fig 4.3 Bluetooth design

36
CHAPTER 5

37
COMPONENTS LIST
COMPONENTS LIST

Sl.No Components Name Range Quantity


1 Step down transformer (230/15v,500mA) 2

2 Regulator 7805/812 1/2


3 Bluetooth HC-05 1
4 Capacitor 1000mf/25v 6
5 Diode 1A 2
6 PIC 16F877A 1
7 PIC board - 1
8 LCD 16*2 1
9 ZCD IC 741 1
10 TRIAC BOARD BT136 1

Table 5.1 Components List

38
CHAPTER 6

39
ADVANTAGES AND APPLICATIONS
ADVANTAGES AND APPLICATIONS

ADVANTAGES

 Aims at energy conservation.

 Provides user friendly graphical interface.

 Provides fast access to using touch screen.

 Device enable with zero crossing detector.

APPLICATIONS

 All medical center and hospital.


 Home usages

40
CHAPTER 7

41
PROGRAM CODING
PROGRAM CODING

#include<pic.h>
int j=0,sel=0,val,ang=45,adh=0,adl=0;
void main()
{
ADCON1=0X82;
TRISA=0XFF;
TRISC=0X80;
TRISB=0X0F;
TRISD=0X01;
RB4=0;
val=34.5*ang;
adh=0XFF-(val/0X100);
adl=0XFF-(val%0X100);
GIE=1;
PEIE=1;
INTE=1;
INTEDG=0;
INTF=0;
TMR1IE=1;

42
TMR1IF=0;
T1CON=0x30;
TMR1L=0XDB;
TMR1H=0XF3;
TMR1ON=0;

while(1)
{
}
}
void interrupt isr(void)
{
if(TMR1IF==1)
{
TMR1ON=0;
RB4=1;
for(j=0;j<200;j++);
RB4=0;
TMR1L=adl;
TMR1H=adh;
TMR1IF=0;
}
if(INTF==1)
{
if(sel==0)
{
sel=1;
43
INTEDG=1;
}
else if(sel==1)
{
sel=0;
INTEDG=0;
}
RB4=0;
TMR1ON=1;
INTF=0;
}
}

44
CHAPTER 8

45
COST ESTIMATION

COST ESTIMATION

Sl.No Component Name Qty Cost


1 Step down 2 400
transformer(230/15v,500mA)
2 Regulator 7805/812 1/2 30
3 Bluetooth 1 1000
4 Capacitor 1000mf/25v 6 60
5 Diode 1A 2 20
6 Pic 16f877a 1 150
7 Pic board 1 1500
8 LCD 1 150
9 ZCD 1 500
10 TRIAC BOARD 1 300
11 ASSEMBLYING COST & REQ 3000
ACCESSORIES
TOTAL COST 7110

Table 8.1 Cost estimation

46
CHAPTER 9

47
CONCLUSION

CONCLUSION

The objective of the project is to realize the smart living, more

specifically the home lighting control system using Bluetooth Technology. As

phones and mobile devices are each time more powerful, using them as robot

for building robot with advanced feature such as voice recognition. Android

blue tooth-enable phones and Bluetooth module communication among blue

tooth devices. It is concluded that smart living will gradually turn into reality

that consumer can control their home remotely and wirelessly.

FUTURE WORK:

The knowledge is ever expanding and so are the problems which the

mankind strive to solve. In this spirit, it is hoped that the current activity will

lead to further enhancements. For example; work on future for Industrial

machines control by the Bluetooth.

48
CHAPTER 10

49
BIBLIOGRAPHY

BIBLIOGRAPHY

 Remote Healthcare Monitoring System for Drivers Community Based On


IOT, Shilpa D.Choudhari. International Journal of Emerging
Technologies in Engineering Research (IJETER) , Volume 4, Issue 7,
July (2016).

 S.M.RIAZUL ISLAM1, DAEHAN KWAK “The Internet of Things for


Health Care: A Comprehensive Survey” 2015 IEEE ACCESS.

 CHEN Xican, Woogeun RHEE, WANG Zhihua “Low Power Sensor


Design for IoT and Mobile Healthcare Applications”.

REFERRED WEBSITES

 https://en.wikipedia.org

 http://electronicsforu.com/newelectronics

 http://pic-microcontroller.com

50
CHAPTER 11

51
PHOTO COPY

PHOTO COPY

52

You might also like