13
WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE Manfred Kibona, graduate engineer at University of Dar es salaam, BSc. Telecommunication engineering. Phone. 0768-799-454, mail: [email protected] Supervisor Dr. Omar F. Hamad ABSTRACT This paper presents a project-based final year project course on completion of Bachelor degree in Telecommunication engineering. The goal of this project was to provide engineering students a hands-on experience involving actual engineering design on communication circuits, printed circuit board (PCB) design, layout, fabrication, assembly, and testing. Through project-based learning, students not only learn technical skills in designing and Manufacturing an electronic device, but also develop their project management and Communication skills early in their course of study at the university. The project outline are presented in this paper as well as project evaluations and students’ feedback. INTRODUCTION The scope of the project was been projected in develop a RF remote control system that will be capable for controlling various electrical appliances in the vicinity of 100 meters. The control signals has to traverse wirelessly by means of modulation with radio frequency carrier signal ranging from frequency band of 385MHz to 480MHz. The control system has to comprise of small portable hand remote control and fixed switchboard controller where appliances to controlled are connected to. There are dangerous facilities or machines i.e. high voltage operating machines, in which for safety reasons has to be operated at a distance, so as to isolate hazards from works. But also there are some people due incapability or disability reasons it is difficult for them to have direct access easily, not only but also in processing industries control system there is needed means that I has to be monitored continuously, by increasing the range of operation means improvement of produced goods. OBJECTIVES Main Objective of this project is to develop a control system to control electrical appliances remotely. To enhance facilities in embedded systems like range, actively operate the power line devices through the radio waves and indicate the current status of the operation.

WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

Embed Size (px)

Citation preview

Page 1: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER

BASED ON RF-MODULE

Manfred Kibona, graduate engineer at University of Dar es salaam, BSc. Telecommunication

engineering. Phone. 0768-799-454, mail: [email protected]

Supervisor Dr. Omar F. Hamad

ABSTRACT

This paper presents a project-based final year project course on completion of Bachelor degree in

Telecommunication engineering. The goal of this project was to provide engineering students a

hands-on experience involving actual engineering design on communication circuits, printed

circuit board (PCB) design, layout, fabrication, assembly, and testing.

Through project-based learning, students not only learn technical skills in designing and

Manufacturing an electronic device, but also develop their project management and

Communication skills early in their course of study at the university. The project outline are

presented in this paper as well as project evaluations and students’ feedback.

INTRODUCTION

The scope of the project was been projected in develop a RF remote control system that will be

capable for controlling various electrical appliances in the vicinity of 100 meters. The control

signals has to traverse wirelessly by means of modulation with radio frequency carrier signal

ranging from frequency band of 385MHz to 480MHz.

The control system has to comprise of small portable hand remote control and fixed switchboard

controller where appliances to controlled are connected to.

There are dangerous facilities or machines i.e. high voltage operating machines, in which for safety

reasons has to be operated at a distance, so as to isolate hazards from works. But also there are

some people due incapability or disability reasons it is difficult for them to have direct access

easily, not only but also in processing industries control system there is needed means that I has to

be monitored continuously, by increasing the range of operation means improvement of produced

goods.

OBJECTIVES

Main Objective of this project is to develop a control system to control electrical appliances

remotely. To enhance facilities in embedded systems like range, actively operate the power line

devices through the radio waves and indicate the current status of the operation.

Page 2: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

Small and light handled smartly remote controller to be operated by any group of people. Along

with the complexity and carry over around the home, industrial or plant area.

Design and implement of RF remote controller (transmitter)

Design and implementation of RF remote controlled switch board.

Design and print PCB (Printed Circuit Board) for both receiver (switch board) and transmitter

(remote controller)

Test and analyze performance of the device

ARCHITECTURE OF THE PROPOSED SYSTEM

Below is the block diagram showing the signal flow, signal processors arrangement parts

(subsystem) and the way interconnection is. These blocks and parts are: Transmitter (remote

controller), Receiver, Decoder and packet algorithm, microcomputer, switching unit and power

unit.

Figure 1 Block diagram showing the hardware arrangement and interaction

Page 3: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

THEORY

Teleportation of control signals in air is via transmission by means of asynchronous binary

amplitude shifting keying modulation. One advantage of ASK communication is that on incoming

random data signal does not require bit-to-symbol conversion. Therefore on the transmitter side a

random data stream and a carrier signal are directly multiplied and up-converted to RF band.

The incoming base band signal is a random sequence so m(t) is expressed as

Where An is a random variable value of 1 or 0 with equal probabilities in stochastic process and

rect(t) is a box of car function (single pulse) bit period Tb

Modulated signal XASK(t) .It arrives at receiver with attenuation factor AC and phase shift. PSD of

arrived signal is

Arrival signal is multiplied by itself (mutual mixing) resulted in baseband data signal and

modulated signal with carrier frequency that is twice that of the signal carrier signal.

And power spectrum is as follows

Page 4: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

Figure 2 Matlab program output to show the Amplitude shifting Keying Modulation

SYSTEM DESIGN SPECIFICATION

• Receive and transmission band 280 to 434MHz transmit frequency 433.92MHz

The industrial, scientific and medical (ISM) radio bands

• Demodulation scheme used is Amplitude Shifting Keying (ASK)

• The system is capable of controlling 16 different appliances.

• Data rate transmission is 4800bps

• Unique pairing ID between the receiver and transmitter specified.

• Output power is 13.5dBm at supply voltage of 9V D.C

• Duplex type is transmit only and receive only

• Length of antenna to be employed is 17cm (Quarter wave antenna for attain the

maximum distance at low power).

Page 5: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

SYSTEM REQUIREMENTS (FOR THE TRANSMITTER)

• Peripheral Interface Controller (PIC18F4520)

• SEVEN push buttons (SPDT)

• 212 series encoder from HOLTEK (HT12E)

• RF Transmission module (TLP 433.92)

• 9V battery power supply (9V‐PP3‐block)

• Voltage regulator (LM7805)

• 4 resistors three of 10k and one of 65Ohm

• Crystal oscillator 8MHz

• Four, two ceramic capacitors (22 pF) and polarized 330F and 100nF

• Antenna of length 17cm

• One red LED

• LCD display (LCD041L 16X4 characters)

(AT RECEIVER SIDE)

• Peripheral Interface Controller (PIC18F4520)

• Five electro-magnetic relays (5V - 12V)

• 212 series decoder from HOLTEK (HT12D)

• RF Receiver module with Colppit’s oscillator

• Step down transformer 220V ac to 12V dc

• Electrolytic capacitor 100nF and 330nF

• Four pair diodes 2N4148

• Voltage regulator (LM7805)

• Quartz crystal oscillator 10MHz

• Four, two ceramic capacitors 22Pf, 330F,100nF

• Resistors 51K, 470 Ohm,10K,470 Ohm

• One NPN transistor BC 547/548

• Two LED green and red

• Antenna of length 17cm

Page 6: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

PIC18F4520 MICRO-CONTROLLER Why PIC 18f4520 preferred choice?

What is PIC?

The PIC microcontroller is a low cost ‘computers on a chip’ manufactured by Microchip. They

allow electronic designers impart intelligence and logic to a single chip for special purpose

applications. This powerful yet easy to program into a 40-pin package.

Figure 1 PIC 18F4520 microcontroller and its pin description layout

RF MODULES

Figure 4 Receiver side

L1 and C8 form the pass band filter front end. Purpose is to attenuate the external and undesired

outside band noise which reduces receiver performance.

𝑓 =1

2 ∗ 𝑝𝑖 ∗ 𝑠𝑞𝑟𝑡(𝐿1 ∗ 𝐶8)

𝐵𝑊 = 𝐵𝑊@433.92𝑀ℎ𝑧 ∗ 𝑜𝑝𝑒𝑟𝑎𝑡𝑖𝑛𝑔 𝑓𝑟𝑒𝑞(𝑀𝐻𝑧

433.2)

Page 7: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

C3 and L2 are matching network capacitor provide additional ESD protection at ANT pin.

Demodulation bandwith section is as follows

SEL0 SEL1 [email protected]

0 0 1.625kHz

1 0 3.25kHz

0 1 6.5kHz

1 1 13kHz

𝑟𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑂𝑆𝐶 =𝐹(𝑅𝐹)

32 +1.112

To operate the MICRF211 with min offset, crystal frequency should be specified with 10pF

(specified by manufacture) loading capacitance.

component value

L1 24nH

L2 39nH

C1 1.5pF

C2 5.6pF

C3 0.1micro farad

C4 0.1micro farad

C5 4.7micro farad

Crystal Oscillator 13.52MHz

Figure 5 Transmitter side

Page 8: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

Component value

R1 100

R2 200

R3 6k8

R4 4k7

C1 470pF

C2 3Pf

C3 7pF

C4 470pF

C5 470pF

L1 27nH

L2 68nH

TRANSISTOR 2N3375

Page 9: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

Remote control software program flowchart Receiver side software program flowchart

Figure 2 Flow charts for software programs for transmitter and receiver microcontrollers

Page 10: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

Figure 7 Schematic circuit for receiver switchboard

Figure 8 schematic circuit for the remote control

Page 11: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

Figure 9 PCB schematic for receiver switchboard (10x16)cm dimension

Figure 10 PCB layout for remote control (13x8.7)cm dimension

Page 12: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

Figure 11 The remote/ transmitter

Figure 12 The receiver (remote switch board)

Page 13: WIRELESS HOME AUTOMATION USING PIC MICROCONTROLLER BASED ON RF-MODULE

CONCLUSION

I have succeeded to transmit information up to 70 meters on open space with accurate and secure

algorithms but also transmission of information signals on area covered by tall buildings up 50

meters. I have faced a power fan out problem during interconnection of various microchips to

make the device work in the real environment power specification has to be considered as prime

factor hence low power microchips and integrated circuits must be used.

I have found this project extremely useful and have learnt alot from it. I have not only obtained

amount of technical knowledge but have also picked up valuable life skills.

REFERENCES

[1] IEEE Journal on Emerging and selected topics in circuit and systems, Vol.2, No.2,

June 2012.

[2] Bernard Skalar, pabitra Kumar Ray, Digital Communication, Second Edition, Pearson

Education

[3] Digital and analog communication by B.P. Lathi. Zhi Ding (international 4th Edition),

OXIFORD University press.

[4] Fisher and Pleshko, Monopulse Key Sampling, Vol. 13, No.1, Jun. 1970, pp.72, 73.

[5] Gabriel Cuendet, Remote Controls for CPG based Robots,Ecole Polytechnique Federale

De Lausanne Presentation paper,June 2010.

[6] HTTPS://www.google.co.tz/?gws_rd=cr,ssl&ei=nguwVMXrN4msUdHWgYAL#

[7] J.Dunlop and D.G.Smith, Telecommunication engineering, Third edition, 1994.

[8] Kip Irvine, Assembly language for Intel-based computers, 3rd edition, 1999

[9] PIC16F87X, Data Sheet-28/40-Pin 8-Bit CMOS FLASH Microcontrollers, 2001 Micro-

Technology.

[10] Piyare, R. K., & Singh, R. (2011, March). Wireless control of an automated guided

vehicle. In Proceedings of the International MultiConference of Engineers and

Computer Scientists. Doi: ISSN: 207 8-0966

[11] Sheth, V. J., & Suryawanshi, P. V. On the Design and Development of a Motion Control

System using Accelerometer and RF communication.

[12] SYN 500R Datasheet (350MHz-450MHz) version