Вы находитесь на странице: 1из 61

NOISE DETECTOR

MALAYSIAN INSTITUTE OF INFORMATION TECHNOLOGY


UNIVERSITI KUALA LUMPUR
2010

NOISE DETECTOR

NURAZRINA AZRIN BINTI BADRUL AZAM


AMIRA ZATTY BINTI ABDUL HAMID
NUR FARHAH BINTI ABDUL HALIM

Dissertation Submitted in Fulfillment of the Requirements


For the Diploma of Engineering Technology Engineering & Computing
in the Malaysian Institute of Information Technology,
Universiti Kuala Lumpur

2010

DECLARATION PAGE

I declare that this dissertation is of my original work and all references have been cited
adequately as required by the institute.

Date: 25/10/10

Signature:
Full Name: Nurazrina Azrin binti Badrul Azam
ID No: 52118208228

Date: 25/10/10

Signature:
Full Name: Nur Farhah binti Abdul Halim
ID No: 52118208358

Date: 25/10/10

Signature:
Full Name: Amira Zatty binti Abdul Hamid
ID No: 52118208190

ii

APPROVAL PAGE

We have examined this dissertation and verify that it meets the program and institutes
requirements for the Diploma of Engineering Technology Engineering & Computing

Signature:
Date: 00/00/00

Supervisors Name & Official Stamp

Signature:
Date: 00/00/00

Supervisors Name & Official Stamp

iii

COPYRIGHT PAGE

Declaration of Copyright and Affirmation of Fair Use of Unpublished Research Work as


stated below:

Copyright @ 25/10/10 by Nurazrina Azrin binti Badrul Azam (52118208228), Amira


Zatty binti Abdul Hamid (52118208190), Nur Farhah binti Abdul Halim (52118208358)
All rights reserved for Noise Detector

No part of this unpublished research may be reproduced, stored in a retrieval system, or


transmitted, in any form by any means, electronic, mechanical, prototyping, recording or
otherwise without the prior written permission of the copyright holder except as provided
below:
i.

Any material contained in or derived from his unpublished research may only
use by others in their writing with due acknowledgment.

ii.

MIIT UniKL or its library will have the right to make and transmit copies
(print or electronic) for instituational and academic purposes.

iii.

The MIIT UnikKLs library will have the right to make, store in a retrieval
system and supply copies of this unpublished research if requested by other
universities and research libraries.

iv

DEDICATION

We would like to dedicate this project firstly to ourselves because from the project we
were able to determine and know what we need to do to finish the project. We hardly find
the source for the project by ourselves and make it clear that we are determined. Other
than that, this project is also dedicated to the students of UniKL who are currently
persuading the Diploma Engineering Technology Engineering & Computing and to
everyone that had been so kind for helping us making and finishing this project and
report. This project can be one of the references for their future studies or maybe they can
upgrade the project to become more systematic and efficient.

ACKNOWLEDGEMENT

We would like to thank firstly to Allah S.W.T. because of the willing and the blessing, we
are able to complete this project. We would also like to thank our supervisor, Miss
Hannah Sofian (supervisor) and Madam Adidah bt Lajis (advisor) for his guidance,
advices and his tolerances. Thank you to all people that involved in our project including
our classmates from DEC group and our family for supporting us to finish this project
especially.

vi

TABLE OF CONTENTS
page no
Title page

Declaration Page

ii

Approval Page

iii

Copyright Page

iv

Dedication

Acknowledgement

vi

Table of Contents

vii

List of Tables
List of Figures
List of Abbreviation
CHAPTER I : INTRODUCTION
1.1 Problem Statement
1.2 Aims & Objectives
1.3 Project Scope
1.4 Project Limitation

CHAPTER II : LITERATURE REVIEW


2.1 Definition

CHAPTER III : METHODOLOGY


3.1 Methodology
3.2 List of Components
3.3 Budget and Costing

CHAPTER IV: PROTOTYPE/PROJECT DEVELOPMENT


4.1 Overview of The Project Block Diagram
4.1.1 Transmitter Module
4.1.2 Receiver Module
4.2 Project Schematic Diagram
4.2.1 Transmitter
4.2.2 Receiver
4.3 Project Diagram
4.3.1 Transmitter
4.3.2 Receiver
4.4 Project Development Tools Required
4.4.1 Computer
4.4.2 Laser Printer
4.4.3 PCB Development Tools
4.4.4 PCB Assembly Tools
4.4.5 Programming Development Tools
4.5 Project Development Flow Chart
4.6 Steps to Download PIC program into PIC microcontroller
4.6.1 Steps to Use PCWH C-Compiler
4.7 Project Wiring
4.7.1 Transmitter Module
4.7.2 Receiver Module
4.8 PCB Fabrication
4.9 The Product Work Flow
4.9.1 Transmitter
4.9.2 Receiver
CHAPTER V : TESTING & RESULTS
5.1 Testing phase

CHAPTER VI : CONCLUSION AND SUGGESTION

References
Appendix A :
Appendix B :
Appendix C :

LIST OF TABLES
Page no
Table 1 :
Table 2 :

LIST OF FIGURES
Page no
Figure 1 :
Figure 2 :

LIST OF ABBREVIATION
Abbreviation
Malaysian Institute of Information Technology

MIIT

Universiti Kuala Lumpur

UniKL

ABSTRACT

This study was design

ABSTRAK

Kajian ini direkabentuk untuk

CHAPTER I : INTRODUCTION
A noise detector is a device to use in detecting noise in a certain area or room.
Detection device can be set or program accordingly to a desired level of noise or decibels
(db) to activate the alarm for the detector.
The noise detector here means a device to detect sounds whenever a baby is
crying. The parents are mostly cannot hear their babys cry after they have fall asleep.
Nowadays we can see that rooms for parents and the baby are separated. To make sure
that their baby is well-cared especially in the sleep time, we decided to build this
detector. As we already known, most of the family nowadays lives in a double-storey
house.
For example, we can see that the newly-wed couple will choose this kind of
house to live and start their family. This is for their goodness in the future. However, they
still need to have other facilities to help them in facing their day routine smoothly. The
noise detector that we built will surely help the families with babies in their members
whenever they have to do other things and leave their babies for a while.
The device will be placed in the babys room and the alarm will be placed outside
of the babys room as it will gives signal to the parents when the baby is crying. When the
device detects the babys cry, the buzzer will beeping and it will let the parents knows
and rush to the babys room. This device will really useful especially in the midnight,
where their rooms are separated. Although it is separated, they can still know what
happens to the baby when he or she cries.

1.1 Problem Statement


Normally rooms for parents and the baby are separated. The probability of parents
cannot hear their baby cries at midnight is high. The parents will not know what
happened to their baby. This situation also happens for a family who lives in a
double-storey house, they left their baby upstairs. Anything dangerous might happen
to the baby.
Besides that, we have found that whenever parents have other works to do such as
in the kitchen, they are hard to leave the baby alone. This situation might lead the
parents to not doing the work properly.
1.1.1

Rationale Problem Solving

By looking to the problems stated above, we decided to build a device that can help the
parents in handling their baby. We will build a device which is easy to use and will not
harm the user.

In this project, we include the buzzer to give signals when the baby is crying. The
parents will hear the buzzer beeping and they will rush to the baby. So in this case parents
can go anywhere without holding the baby together, as long as they are still in the house.

1.2 Aims and objectives

The aim of this project is to build a noise detector that is reliable and efficient that can be
use or can function within the specified limit which is in area with radius of 25 meters.
The user just need to place the detector inside the babys room and it will detects the
babys cry easily.
The objective of this project is first, to help detects the baby cries whenever the
parents are not by their side. Based on the problem statement, we found that rooms
between the parents and baby are separated. This situation will cause the parents to not
hear the baby cries especially in the midnight. So, this device can help the parents to
easily detect when their baby is crying even though the rooms are separated.
Next is to build a light noise detector which can be placed whether on the ceiling
or on the wall. We decided to build a light noise detector so that it is applicable to place
anywhere. Based on the project, the device can easily be placed on the ceiling as it is
light and hard to fall down compared to the heavy one.
Besides that, making the parents routine goes smoothly is also one of the
objectives in doing this project. Other things can be well-managed. It means that they can
do other things too while taking care of the baby. When the baby needs anything, they
can simply know it by the beeping of the buzzer.

1.3 Project Scope

This project is invented from the existing product which is sound detector. Sound detector
is used to detect sounds in a certain places. There is also several kind of noise detector
which is already existed in the market now such as room noise detector. We refer on this
type of detector while doing the project.
Scope of the project is this project is a kind of applying it in the babys room and
is able to detect the babys cry. We scope the project to just apply it in the babys room
based on the problem statement made before we conduct the product. We want to settle
the problem that has been bothering most of the families with babies.
Next scope is we invented more than the existing product by adding several
function such as way of giving signals. For example when the baby is crying, the detector
will detect the sound. The red LED will flashing and the buzzer will beeping to give
attentions to the parents. We also put the LCD screen so that whenever the device detect
sounds, it will display the message saying that noise occurs from the babys room.
Other scope of this project is this product can be function whenever the owner
wants to turn it on. This product will not automatically turns on, but the user has to
manually turn it on. By making it this way, power can be saved and it will less the cost of
paying the electric bills.

1.4 Project Limitation

Figure 1
Figure 1 shows the detecting area of the device. It is included in the project limitation
so that it can explain how far the device can detect sounds produced by the baby.
First limitation of the product is, it will only be applied in the babys room for
family whom their main room is separated from the babys room. The main objective of
the product is to detect the babys cry, so it cannot be used for any other reason as this
device has been set to detect the noise of the babys cry only.
The device will only starts to function when the user turns it on manually. It
cannot function automatically. We provide the button to turn the device on and the user
can simply switch it off back when they do not want to use the device.
The device that we have invented cannot function efficiently when there is
presence of obstacles. For example, the device will less-function when there is wall that
blocked the device to send information so that the buzzer can give signals telling the baby
is crying. This device will work efficiently only in the radius of 25 meters in open space,
without any obstacle around. The device also cannot be put in a metal box as metal box
can easily absorb heat and this will harm the electronic component in the circuit.

CHAPTER II : LITERATURE REVIEW

This chapter will explain about the related literature reviews of the project, which have
been referred according to the projects needs. Definition and concepts of methodology,
reviews on existing systems and other related literature reviews are discussed. In order to
develop this project, all the information in this chapter will be useful.
As we all known, noise detector is a device to use in detecting noises in a certain
area or room. Detection device can be set or programmed accordingly to a desired level
of noise or decibles (db) to activate the LED and buzzer for the detector. Different from
the existing product, we add a little bit of the function. For a normal sound detector in
market, they usually put alarm together in the circuit so that it will be automatically
ringing when the sounds exceed the level of noise. In our product, we do not practically
use the same way. We use the buzzer and put the red LED together with the green LED to
give a signal when there is loud sounds occur. We also add the LCD screen to display the
message that has been programmed by us when the device detects the babys cry.
Before deciding which project we want to build, we first conduct a survey to find
the problem that has been bothering certain communities. We found that family who has
babies in their family members is dealing with the problem of leaving their baby alone to
do other things in the house. They are worried if they cannot hear the babys cry if they
are not by the babys side. This kind of problem is mostly happen for a family who lives
in a double-storey house. They cannot hear the babys cry when they are downstairs and
the baby is upstairs, alone. Besides that, this situation also happens among family whom
their room are separated from the babys room. They might not know what happen to the
baby when the room are separated and sleep in a different rooms.
So by surveying the problem, we decided to build a product and make it as our
final year project. This kind of product will help the family with babies to solve the
problem and lives peacefully without having to worry about leaving their baby alone.

The purpose of this project is to build a product that is reliable, easy and efficient.
The product can be said as reliable because it helps the parents to detect whenever their
baby is crying. When the detector is placed in the babys room, it can detect the sounds

produced by the baby and from that the parents will know that they need to rush to the
baby. Next, the objective of this product is also to detect the babys cry in the area with
radius of 25 meters. The noises detector can only detect noises within this area only, as it
will less functioning if the area exceed from the detected part and when there is presence
of obstacles. Besides that, this noises detector is easy to use harm free. The product or
device to detect the sounds is not heavy and it can be placed at the ceiling of the babys
room.
After setting up the level, the detector is then being placed at the ceiling or wall of
the babys room. As compared to other existing product of sound detector, most of them
use a flashing LED to give signals. But for our product, we add buzzer as one of the
signal whenever the product detect the noises. We also use red, green and yellow LED as
the signals besides using buzzer. Red LED will flashes when the detector catch the babys
cry, while green LED will stay flashes when no noise is detected. Yellow LED works as
the signal for power source. LCD is for displaying characters to show the situation
whether noise is detected or not.
By doing this project, we can conclude that the noises detector is able to detect the
babys cry eventhough in a separated room. The detector can be use as one of the medium
to help parents detecting their baby s crying during midnight. Other than that, we also
manage to produce a product that can be very useful to be applied in a daily life and can
gives lots of benefits to the family. We can build a product that can detect noises within
the specified area, and add a bit of the function from the existing product, which is in
type of signal given.

CHAPTER III : METHODOLOGY


3.1 Methodology

Information is gathered using resources such as the internet, the books and
journals available in the library. The searches on the net and library is intended to find the
most suitable topic for the Final Year Project that is to be undertaken. Many journals have
been read so as to better familiar rise oneself to the topics usually taken by student and
isolate those that are not yet undertaken by any students.
Supporting components in this case means components such as resistors,
capacitors, inductors and amplifiers. Information on these components can be obtained
easily from normal component stores and can be recommended by the Supervisor for the
most perfect type to be used. One thing to be remembered is the fact that each component
picked must match in the system as so to balance it and not disrupt the inner workings of
the project.
Besides that, we also did some research to know the problems that have been
bothering the residences and try to find out the solution. We went to housing area and did
some survey. After gathering all the information, we search on the internet about the
existing product which is closely related to the problems.
3.2 List of Components
Stated below are the information obtained from the research of appropriate
components to be used while making the project.
PIC microcontroller
PIC16F876A-I/P microcontroller is used to control the whole system. It is
designed using flash technology. So the PIC can read/write program for more than
100,000 times. The PIC 16F876A has 8 K words or program memory. Since each word in
the midrange family is 14 bits long the program memory can also be expressed as 14
Kbytes. The unit has 368 bytes of data ram and 256 bytes of EEPROM. It has 8 channels
of A/D with 10 bit resolution. The unit has 2 8 bit Timer/Counters and a single 16 bit
Timer/Counter. In addition to this it has several different types of serial communication
functions such as SPI, I2C, and normal pc type serial communications functions.

OSC1 and OSC2 pins are connected to 20MHz crystal to execute every single
program line in the system.

20MHz crystal is used because this is the maximum

frequency that the PIC can support. If over frequency the PIC will burn. Else if crystal
speed less than 20MHz then PIC response speed will slower. The MCLR pin of the PIC is
pull up to 5V through a 10KR resistor.
The PIC can operate using 4.5V to 6.0V DC voltage. In the project is operating at
5.0V (by using 7805). It is DIP layout (dual in line package) and suitable for student
project. It has 28 pins but only 22 I/O pins can be set as digital input or digital output.
The digital output of the PIC is 5V (for signal 1) and 0V (for signal 0) these signals will
be directly connected to actuators for control purpose. When the PIC pin is set as digital
input. It will detect input voltage 5V as signal 1 and 0V as signal 0. Any voltage less than
0V or more than 5V will damage PIC.

Voltage regulator module

The voltage regulator module is used to protect PIC and other


connected sensors / actuators from over voltage. This is because
PIC and all other connected sensors, actuators all support 5V DC
only. Over voltage will cause any of the module burn.
LM7805 is used to regulate voltage in the system and output 5V
DC (max output current: 1000mA). It supports input voltage from
7V DC to 18V DC. If the input voltage is over, the LM7805 will burn or auto shutdown
due to overheat.
The generated 5V from LM7805 will be noise filtered by 0.1uF ceramic capacitor and a
1000uF electrolytic capacitor. This is to avoid high frequency oscillation on the outputs
which may cause system hang or unstable.
A diode is connected at the input of the LM7805. This is to avoid voltage connected
reversely. An on/off switch is used to turn on/off the system and a LED (5V, 5mA) is used
to indicate the system is power on/off. The LED is connected through 1KR resistor to
limit current pass through LED is 5mA.

Advantages
The 7805 series has several key advantages over many other voltage regulator circuits
which have resulted in its popularity:

7805 series ICs do not require any additional components to provide a constant,
regulated source of power, making them easy to use, as well as economical, and
also efficient uses of circuit board real estate. By contrast, most other voltage
regulators require several additional components to set the output voltage level, or
to assist in the regulation process. Some other designs (such as a switching power
supply) can require not only a large number of components but also substantial
engineering expertise to implement correctly as well.

78xx series ICs have built-in protection against a circuit drawing too much power.
They also have protection against overheating and short-circuits, making them
quite robust in most applications. In some cases, the current-limiting features of
the 78xx devices can provide protection not only for the 78xx itself, but also for
other parts of the circuit it is used in, preventing other components from being
damaged as well.

Disadvantages

The input voltage must always be higher than the output voltage by some
minimum amount (typically 2 volts). This can make these devices unsuitable for
powering some devices from certain types of power sources (for example,
powering a circuit which requires 5 volts using 6-volt batteries will not work
using a 7805).

As they are based on a linear regulator design, the input current required is always
the same as the output current. As the input voltage must always be higher than
the output voltage, this means that the total power (voltage multiplied by current)
going into the 78xx will be more than the output power provided. The extra input
power is dissipated as heat. This means both that for some applications an
adequate heat sink must be provided, and also that a (often substantial) portion of
the input power is wasted during the process, rendering them less efficient than
some other types of power supplies. When the input voltage is significantly higher
than the regulated output voltage (for example, powering a 7805 using a 24 volt
power source), this inefficiency can be a significant issue.

Even in larger packages, 78xx integrated circuits cannot supply as much power as
many designs which use discrete components, and therefore are generally not
appropriate for applications which require more than a few amps of current.

HD44780 Character LCD


An HD44780 Character LCD is a de facto industry standard liquid crystal display (LCD)
display device designed for interfacing with embedded systems. These screens come in a
variety of configurations including 8x1, which is one row of eight characters, 16x2, and
20x4. The most commonly manufactured configuration is 40x4 characters, which
requires two individually addressable HD44780 controllers with expansion chips.
These LCD screens are limited to text only and are often used in copiers, fax machines,
laser printers, industrial test equipment, networking equipment such as routers and
storage devices.
Character LCDs can come with or without backlights, which may be LED, fluorescent, or
electroluminescent.
Character LCDs use a standard 14-pin interface and those with backlights have 16 pins.
The pin outs are as follows:
1. Ground
2. VCC (+5V)
3. Contrast adjustment
4. Register Select (R/S)
5. Read/Write (R/W)
6. Clock (Enable)
7. Bit 0
8. Bit 1
9. Bit 2

10. Bit 3
11. Bit 4
12. Bit 5
13. Bit 6
14. Bit 7
15. Optional backlight power rail
16. Optional backlight power rail
The backlight power rail differs often, the polarity can be different and some screens need
an external resistor. Usually the supply voltage is 5V DC.
Character LCDs can operate in 4-bit or 8-bit mode. In 4 bit mode, pins 7 through 10 are
unused and the entire byte is sent to the screen using pins 11 through 14 by sending 4-bits
(nibble) at a time.

Font
The character generator ROM contains 208 characters in a 5x8 dot matrix, and 32
characters in a 5x10 dot matrix.
There is a Japanese version of the ROM which includes kana characters, and a European
version which includes Cyrillic and Western European characters.

The 7-bit ASCII subset for the Japanese version is non-standard: it supplies a Yen symbol
where the backslash character is normally found, and left and right arrow symbols in
place of tilde and the rub-out character.
Interconnection between the FOX Board and a LCD with Hitachi HD44780 interface

Output LED indicator: A normal LED use 5V and 5mA to operate. And through LED the
current status of the system can be known. A 1KR resistor is connected series with the
LED to limit the current pass through LED is 5mA. This is calculated using V=IR. Where
V=5VDC, R=1KR.
Buzzer: The buzzer used in the project is 5V buzzer. It is direct connected to PIC.
Whenever invalid entry detected the buzzer will turn on. Else it remains off.

RF module: These RF modules are adopting RF integrated circuit with super-heterodyne


working mode and SAW resonance. Its features are stability and strong ability of antijamming. It is widely used at some spot of industrial control that has high requirement.

RF Receiver Module
RF Transmitter Module
Technical specifications of the RF module:

resonance (SAW)

Modulation mode: AM/OOK/ASK

Working frequency: 315MHz

Transmitting velocity: <9600bps

Antenna length: 24cm

Control range: 20-50 meters

Communication: Serial 8-bit data

Resonance mode: sound wave

3.3 Budget and Costing


The whole system consists of the following parts and components:
Transmitter Module
Description

Value

Quantity

Unit Price
(RM)

Microcontroller

PIC16F876A

26.00

IC Socket

28 pin

0.80

Crystal

20MHz

1.20

Capacitor

18pF

0.30

Voltage Regulator

LM7805

1.20

Capacitor

0.1uF, 50V

0.30

Capacitor

1000uF, 16V

1.00

LED

5mm

0.20

Resistor

1KR

0.05

Diode

1N4007

0.20

Switch

On/Off

2.00

Photo PCB

300mm*150mm

28.00

Etching Powder

1Kg

20.00

PCB Developer

50g

8.00

Battery

9VDC

3.00

Connector

Battery snap

1.00

Buzzer

5V

3.00

Resistor

1KR

0.05

LED

5mm

0.20

Resistor

10KR, 1/4W, 5%

0.05

RF Transmitter

5V, 4800bps

23.00

Quantity

Unit Price
(RM)

Receiver Module
Description

Value

Microcontroller

PIC16F876A

26.00

IC Socket

28 pin

0.80

Crystal

20MHz

1.20

Capacitor

18pF

0.30

Voltage Regulator

LM7805

1.20

Capacitor

0.1uF, 50V

0.30

Capacitor

1000uF, 16V

1.00

LED

5mm

0.20

Resistor

1KR

0.05

Diode

1N4007

0.20

Switch

On/Off

2.00

Photo PCB

300mm*150mm

28.00

Etching Powder

1Kg

20.00

PCB Developer

50g

8.00

Battery

9VDC

3.00

Connector

Battery snap

1.00

LCD

2x16, Green

30.00

Buzzer

5V

3.00

Resistor

1KR

0.05

LED

5mm

0.20

Resistor

10KR, 1/4W, 5%

0.05

RF Receiver

5V, 4800bps

23.00

CHAPTER IV : PROTOTYPE/PROJECT DEVELOPMENT

4.1 Overview of The Project Block Diagram


4.1.1 Transmitter module

LED, 2 units

RF Transmitter

PIC microcontroller

Buzzer

4.1.2 Receiver module

Voltage regulator

Amplifier

9VDC Battery

Microphone

LED, 2 units

RF receiver

PIC microcontroller

Buzzer

4.2 Project Schematic Diagram


4.2.1 Transmitter

4.2.2 Receiver

Voltage regulator

LCD

9VDC Battery

4.3 Project Diagram


4.3.1 Transmitter

4.3.2 Receiver

1. Noise detector is operating using 9V battery. This system is including transmitter


and receiver module. When system is operating, transmitter module will detect
noise level.
2. If noise level more than set point, system delay 3 seconds. Then buzzer and red
LED turn on, green LED turn off. Else, green LED turn on, red LED and buzzer
turn off.
3. Data will send to receiver module. If data A received, buzzer and red LED turn
on. Else, green LED turn on, buzzer and red LED turn off.
4. System status will display on LCD.

4.4 Project development tools required


4.4.1. Computer:
The computer is used to draw schematic and PCB for the system. Computer can be
used to compile and download program into PIC through C-compiler and downloader
software.
4.4.2. Laser printer:
The laser printer is used to print the PCB drawing for PCB fabrication.
4.4.3. PCB development tools:
a. Blade: to cut suitable size for PCB.
b. Fluorescence light: to do photo etching for PCB.
c. PCB developer, etching powder and thinner: to develop track from PCB.
4.4.4. PCB assembly tools:
a. Cutter: used to cut wire and components legs.

b. Pliers: used to bend component legs and place components on PCB.


c. Soldering iron: used to solder components on PCB.
d. Mini drill: used to drill holes on PCB to place components.
4.4.5. Programming development tools:
a. PCW C-Compiler: Edit and compile C-language program. It will generate .hex file
for downloading application. The trial version of C-compiler can download from
www.ccsinfo.com.
b. Winpic800 USB Downloader Software: This software is used to download program
to PIC.
c. Universal PIC Programmer: It is an electronics device used to download PIC
program into PIC. Through Winpic800 USB downloader software, this programmer
can download PIC program (machine code, .hex file) into PIC.

4.5 Project development Flow chart

4.6 Steps to download PIC program into PIC Microcontroller


1.

Connect PIC programmer to computer via serial port / USB port.

2.

Insert PIC into the programmer socket.

3.

Copy Winpic800 folder to Desktop.

4.

Look for Winpic800.exe in the folder.

5.

Double click Winpic800.exe to start the program.

6.

Select proper PIC name in the top right combo box.

7.

Open the .hex file which you want to download into PIC e.g. if your .c filename is
abc.c, suppose you need to download abc.hex into PIC.

8.

Go to Device -> Program All to start download program into your PIC.

4.6.1 Steps to use PCWH C-Compiler


1.

Open PCW C-Compiler Start->All Programs->PIC-C->PIC C Compiler.

2.

File -> New to start a new file.

3.

Save the file as .c file, it is advisable to put the main file name within 8 chars
length, extended file name must be .c, e.g. myprog1.c.

4.

Type / Edit your program.

5.

Save program before compile.

6.

Compile your program using F9.

7.

If any error occurs, please check your program and compile again. Otherwise you
wont get your .hex file.

4.6.2

Coding of the program

Transmitter

#include <16f876A.h> //use pic16f876A


#use delay(clock = 20000000) //clock=20mhz
#fuses hs, noprotect, nowdt //default setting
#use rs232(baud=4800,xmit=PIN_C6,rcv=PIN_C7,PARITY=N)
#byte PORTA=5 //define PORT A address
#byte PORTB=6 //define PORT B address
#byte PORTC=7 //define PORT C address
void main()
{
int voice_level=110; //setpoint for voice level
int voice_read; //signal from microphone
int count, count2, txdata;
//set i/o for each pin
set_tris_a(0b00000001);
set_tris_b(0b00000000);
set_tris_c(0b10000000);
//set port a as analogue input
setup_port_a(RA0_ANALOG);
setup_adc(ADC_CLOCK_INTERNAL);
set_adc_channel(0);
output_high(pin_b7); //on buzzer
output_high(pin_c5); //on red led
output_high(pin_c4); //on green led
delay_ms(1000);
output_low(pin_b7); //off buzzer
output_low(pin_c5); //off red led

output_low(pin_c4); //off green led


do
{
voice_read=read_adc(); //read voice level
if(voice_read>=voice_level) //if voice more than setpoint
{
txdata='A';
output_high(pin_b7); //on buzzer
output_high(pin_c5); //on red led
output_low(pin_c4); //off green led

for(count2=0;count2<6;count2++)
{
for(count=0;count<10;count++)
{
putc('(');
putc(txdata);
putc(')');
delay_ms(10);
}
delay_ms(500);
}
}
else
{
txdata='B';
output_low(pin_b7); //off buzzer
output_low(pin_c5); //off red led

output_high(pin_c4); //on green led


for(count=0;count<10;count++)
{
putc('(');
putc(txdata);
putc(')');
delay_ms(10);
}
}
delay_ms(250);
}while(1);
}
Receiver
#include <16f876a.h> //use pic16f876a
#use delay(clock = 20000000) //clock=20mhz
#fuses hs, noprotect, nowdt //default setting
#use rs232(baud=4800,xmit=PIN_C6,rcv=PIN_C7,PARITY=N)
#define use_portb_lcd TRUE //use portb for lcd
#include <lcd.c> //call lcd.c library
#byte PORTA=5 //port a address
#byte PORTB=6 //port b address
#byte PORTC=7 //port c address
int receive=0;
int rx_detect=0;
int a=0;

int b=0;
//receive rf data
#int_rda
void serial_isr()
{
a=getch();
if(a=='(')
{
receive=getch();
b=getch();
}
if(b==')')
{
rx_detect=1;
}
a=0;
b=0;
}
void main()
{
set_tris_a(0b00000000);
set_tris_b(0b00000000);
set_tris_c(0b10000000);
enable_interrupts(int_rda);
enable_interrupts(GLOBAL);
output_high(pin_c1); //on buzzer
output_high(pin_a0); //on red led

output_high(pin_a1); //on green led


delay_ms(1000);
output_low(pin_c1); //off buzzer
output_low(pin_a0); //off red led
output_low(pin_a1); //off green led
lcd_init();
do
{
if(rx_detect==1) //if any data received
{
rx_detect=0;
if(receive=='A') //if loud sound case
{
output_high(pin_c1); //on buzzer
output_high(pin_a0); //on red led
output_low(pin_a1); //off green led
lcd_putc("\fNoise Detected!");
}
else
{
output_low(pin_c1); //off buzzer
output_low(pin_a0); //off red led
output_high(pin_a1); //on green led
lcd_putc("\fNo Noise!");
}
delay_ms(1000);
}

}while(1);
}

4.7 Project Wiring

4.7.1 Transmitter Module


PIC I/O Pin

Connected To
Sensor / Actuator

Function

RA0

Amplifier to microphone

To detect sound level

RB7

Buzzer

Turn on buzzer

RC4

Green LED

Turn on green LED

RC5

Red LED

Turn on red LED

RC6

RF Transmitter

Send data to receiver

4.7.2 Receiver Module


PIC I/O Pin

Connected To
Sensor / Actuator

Function

RA0

Red LED

Turn on red LED

RA1

Green LED

Turn on green LED

RB0

Pin E LCD

Display message on LCD

RB1

Pin RS LCD

Display message on LCD

RB2

Pin R/W LCD

Display message on LCD

RB4

Pin DB4 LCD

Display message on LCD

RB5

Pin DB5 LCD

Display message on LCD

RB6

Pin DB6 LCD

Display message on LCD

RB7

Pin DB7 LCD

Display message on LCD

RC1

Buzzer

Turn on buzzer

RC7

RF Receiver

Receive data from transmitter

4.8 PCB Fabrication

1.

PCB Drawing: PCB drawing is designed using Protel DXP 2005, this software
can automatically convert schematic file to PCB automatically.

2.

Film Printing: After PCB file is generated, use laser printer to print it on
transparency.

3.

PCB Cutting: Cut photo PCB size according to the film size.

4.

PCB Photo Etching: Expose the photo PCB in photo etching kit for 8-10minutes.

5.

PCB Developing: Wash the PCB using PCB developer (white powder) for 2 min.

6.

Acid Etching: After PCB is developed, put it in Ferric Chloride liquid. Add in hot
water (80C) and shake the water until you see unused part is washed and left only
the tracks. The etching process takes around 30 min.

7.

Alcohol Washing: Wash the PCB with alcohol to get rid off the green coating.

8.

Drilling: Drill PCB after alcohol washing, use drill bit 0.8mm, 1.0mm and 1.2mm.

9.

Soldering: Place all components on the PCB, use tape to stick all components
tightly on the PCB and then solder the components using soldering iron and lead.

4.9 The Product Workflow


4.9.1 Transmitter

Start
Detect noise level

Red LED and buzzer turn of, green No


LED turn on
Noise level > set point?
Yes
Delay 3 seconds

Red LED and buzzer turn on, green LED turn of

Send data to RF receiver

4.9.2 Receiver

Start
Detect data from transmitter

Received A?
No
Red LED and buzzer turn of, green LED turn on

Yes
Red LED and buzzer turn on, green LED turn of

Display system status on LCD

Figure shows the display of Noise Detected! when the


device detect sounds

Figure shows the display of No Noise! when no noise


is detected.

CHAPTER V : TESTING AND RESULTS


5.1 Testing Phase

TYPE OF TESTING

STRENGTH

Open space within radius 25 meters

Can easily detect and function efficiently.

Obstacle (wall and doors) the transmitter


and the receiver is in a different room

For the first time of testing, the buzzer


beeping and it works.
For the second time of testing, the buzzer
did not beeping.
From this we can conclude that the device
is less functioning when there are presence
of obstacles.
The receiver cannot detect the sounds
coming from the baby.

Between floor 1 and floor 2

CHAPTER VI : CONCLUSION AND SUGGESTION

The noise detector is able to detect babys cry when the baby is in a different place from
the parents. Although they are not by their babys side, but still they can know when their
baby is crying.
By placing the detector in each house, parents will be no longer worried if they
are not by their childrens side. For example, in the midnight. The separated room will
not be a problem anymore to them. The device will function efficiently to make sure the
parents know what happens to their baby whom in a different room from them.
It is easy to use and harm-free. The user can manually turn on the device and can
switch it off back whenever they want.

SUGGESTION
There are some recommendations for future enhancement suggestion of noise detector for
babys room.

Enhance the antenna of detection so that the device can detect the
babys cry and give signals to a place which is even more far.

Improve the case of the device so that it will look more interesting.

Can make the device automatically switch on compared to what we


have did, it is still have to be manually turn on.

REFERENCES

Вам также может понравиться