14
م ي ح ر ل ا ن م ح ر ل ه ا ل ل م ا س بAn_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

Embed Size (px)

Citation preview

Page 1: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

الرحيم الرحمن الله بسم

An_najah National University

Faculty of Engineering

Computer Engineering Department

Graduation Project In

Control of Lighting Systems

Page 2: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

Lighting System

Supervised By:

Eng.Ashraf Armoush

Prepared By: Samer Mustafa Alsaid Mohanned Tahseen Salameh

Page 3: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

Introduction

• Lighting System Control consists of a control system through a computer, and also by using PIC controller, and lights to control with it.

• In our project we take a building of eight floors as an example.

• We represent each floor as a LED, And we control the light of each floor separately from others

Page 4: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems
Page 5: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

Objectives

• Showing an automatic programmable way for lighting the floors in a building .

• An expected floors in the building will switch off and switch on in a given time.

• Energy saving…to save electrical power from being wasted.

Page 6: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

Hardware Specification

• PIC16F877• LCD • LEDs, for specifying the floors • SP232ACP• Oscillator• Buttons• Capacitors, Resistors• Regulator

Page 7: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

Software used• PIC C Compiler( To write the program to

receive data and time from the PC Program and control through it in the hardware and LEDs).

• Visual C++ programming (MFC)(To write the program required to send data and time to the PIC)

Page 8: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

0

0

0

0

V D D

0

V D D

V D D

1 0

1 4

1 1

6

1 2

87

1 3

9

5

U 1

P I C 1 6 F 8 7 7

891 0

1 4

1 51 61 71 8

1 92 02 12 2

2 32 42 52 6

2 72 82 93 0

1

1 3

234567

3 33 43 53 63 73 83 94 0

1 13 2

R E 0 / R D / A N 5R E 1 / W R / A N 6R E 2 / C S / A N 7

O S C 2 / C L K O U T

R C 0 / T1 O S O / T1 C K IR C 1 / T1 O S I / C C P 2

R C 2 / C C P 1R C 3 / S C K / S C L

R D 0 / P S P 0R D 1 / P S P 1R D 2 / P S P 2R D 3 / P S P 3

R C 4 / S D I / S D AR C 5 / S D O

R C 6 / TX/ C KR C 7 / R X/ D T

R D 4 / P S P 4R D 5 / P S P 5R D 6 / P S P 6R D 7 / P S P 7

M C L R / V P P

O S C 1 / C L K I N

R A 0 / A N 0R A 1 / A N 1R A 2 / A N 2R A 3 / A N 3 / V R E FR A 4 / TO C K IR A 5 / A N 4 / S S

R B O / I N TR B 1R B 2R B 3R B 4R B 5R B 6R B 7

V D DV D D

C 1 2

1 u

C 5

1 u

V B 1 S U B -D 9

594837261

S 9

M C L RC 91 u

C 1 0

1 u

X1

9 . 8 3 0 4 M H z

U 3

I C L 2 3 2

1 2

1 471 0

1 1

1 38 9

13

45

26

R 1 O U T

T1 O U TT2 O U TT2 I N

T1 I N

R 1 I NR 2 I N R 2 O U T

C 1 +C 1 -

C 2 +C 2 -

V +V -

C 1

1 0 p

C 2

1 0 p

C 1 11 u

R 1

4 0 k

C 21 0 u

VCC

To LCD

Dataandcontrol

LED

LED

push button

LED

Page 9: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

Schematic Diagram

• This diagram in the previous page specify the connections with the PIC in every pin which make the hardware understood.

• The PIC connects with eight LEDs and the LCD to make a relation between lighting the floors and showing the results in the LCD ( number of floors that switched on or off and the current time every minute.

Page 10: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

• The LEDs are connected with the PIC that are work in a programmable way in lighting the floors as a systematic method

• The LCD will show the current time, and the number of the floors which lighted or switched off to give complete information about the building lighting in every minute

Page 11: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

The Mechanism of the work

• We insert the start time, stop time for each LED in the PC program

• We Open the serial port

• We transmit these data through the serial port

• We close the port

Page 12: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

Cont.

• The PIC receives these data

• Storing these data in the EEPROM of the PIC

• We apply the functions in the PIC program on these data

• The output will show in the LEDs that are on after a given time, or off in a given time

Page 13: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

PIC Working

• The work of the PIC is receiving data from the PC , and stores it in EEPROM with applying some functions on these data to switch on and switch off some LEDs, and displaying the time ,when floors lighted, and when floors switched off that will be shown in the LCD.

Page 14: بسم الله الرحمن الرحيم An_najah National University Faculty of Engineering Computer Engineering Department Graduation Project In Control of Lighting Systems

Finally…………

• Thanks for all:

Project SupervisorEng. Asharaf Armoush

And so Dr. Loai Malhees

Dr. Raed Alqadi