Sei sulla pagina 1di 12

EEEB371

MICROPROCESSOR LAB
Name

: Vinish a/l Govindarajoo

EE091198

Navinthararao a/l Vickmaswaran

EE087721

Title of project

: Digital Pressure Alert

Semester

: Year 3, Sem2

Section

: 03

Table of Content

No.

Title

Page no.

1.

Project specifications

2.

Design Development & Programming Phase

4-7

Testing

4.

Result and discussion

5.

Conclusion

3.

10-12
6.

Appendix

Project Specifications
2

Block Diagram

LM35
a/d
converter

PIC18F455
0

Led
Buzzer

Description of operation

LM35 (potentiometer) act as a pressure sensor. The range is set accordingly. When the
pressure is in normal condition the first led (green led) will light up. When the pressure is
above normal level the second led (yellow led) will light up. And when the pressure is high
the third led (red colour) will light up and the buzzer will sound indicating the pressure is
high.

Design Development & Programming Phase


3

Hardware design

LM35
(POTENTIOMET
ER)

LED1(GREE
N)

PORTA,0
PORTD,0

LED2(YELL
OW)

PORTD,1
LED3(RED)

PORTD,2
PIC18F455O

Flowchart

Buzzer

START

Initialize PICF184550
Set port A as input
Set port D as output
Set port C as output

Check if potentiometer
reading <50
Led 1(green) turn on
indicating normal
pressure

Check if potentiometer
reading in between 50-100

Led 2(green) turn on


indicating above
normal pressure

Check if potentiometer
reading in between 50-100
Led 2(green) turn on
indicating above
normal pressure

START

Description of flowchart

As we can see from the flowchart, the first step is to initialize PIC18F4550.
Port A is set as output, whereas port D and port C as output. Then condition is checked, if
potentiometer reading is less than 50 led1 (green) lights up indicating normal pressure. If not
second condition is checked whether the range of potentiometer is in between 50 to 100. If
yes led 2( yellow) lights up indicating above normal pressure level. If not third condition is
checked whether the potentiometer is above 100. If yes led 3 (red) lights up and buzzer
sounds indicating high pressure.

Testing
PROTEUS
1. The coding was typed into the mplab and then it was build. Once its successful, the HEX
File is saved.
2. To simulate the program, PROTEUS was used. The circuit diagram schematic was built
using LM35 temperature sensor, PIC18F4550 microprocessor, three LEDs, and a buzzer.
3. Once the circuit diagram is built, the HEX file is then exported into the PIC18F4550
microprocessor. It is then simulated and the results are observed.

PTK40A TRAINING KIT


1. The coding was typed into the mplab compiler and then it was build. Once its successful,
the HEX File is saved.
2. PICkit 2 is opened and from here, communication between mplab compiler and PTK40A
Training Kit was established.
3. After, the Hex file is imported and it is then read by the PICkit and the program is then
written to function on the PTK40A training kit.
4. Results are observed.

Result and discussion

As it is observed the final output is achieved in protues. LM35 (potentiometer) act as


a pressure sensor. The range is set accordingly. When the pressure is in normal condition
which is less than 50 in potentiometer, the first led (green led) will light up indicating normal
pressure level. When the pressure is above normal level the second led (yellow led) will light
up. And when the pressure is high the third led (red colour) will light up and the buzzer will
sound indicating the pressure is high.
As for discussion, A pressure sensor measures pressure, typically of gases or liquids.
Pressure is an expression of the force required to stop a fluid from expanding, and is usually
stated in terms of force per unit area. A pressure sensor usually acts as a transducer; it
generates a signal as afunction of the pressure imposed. For the purposes of this article, such
a signal is electrical.
Pressure sensors are used for control and monitoring in thousands of everyday
applications. Pressure sensors can also be used to indirectly measure other variables such as
fluid/gas flow, speed, water level, and altitude. Pressure sensors can alternatively be
called pressure transducers, pressure transmitters, pressure senders, pressure
indicators, piezometers and manometers, among other names.
Pressure sensors can vary drastically in technology, design, performance, application
suitability and cost. A conservative estimate would be that there may be over 50 technologies
and at least 300 companies making pressure sensors worldwide.
There is also a category of pressure sensors that are designed to measure in a dynamic
mode for capturing very high speed changes in pressure. Example applications for this type
of sensor would be in the measuring of combustion pressure in an engine cylinder or in a gas
turbine. These sensors are commonly manufactured out of piezoelectric materials such as
quartz.
Some pressure sensors, such as those found in some traffic enforcement cameras,
function in a binary (off/on) manner, i.e., when pressure is applied to a pressure sensor, the
sensor acts to complete or break an electrical circuit. These types of sensors are also known
as a pressure switch.
This project is mainly focusing on pressure sensor in medical area.

Conclusion

This pressure sensor mainly is designed to sense pressure and indicate the
pressure level of a patient. This is a simple device to ensure pressure to be maintained in daily
life. This project also could be developed to show further accurate reading as this project is
only indicating the pressure level. Thus, people should be more aware of the danger of having
high blood pressure.

Appendix

Schematic diagrams

HEX file
:020000040000FA
:040000000DEF00F010
:020008001000E6
:080018001000946A9268956AD9
:10002000836A826A800EC06E0E0EC16E030EC26EAF
:10003000070EB46EC2B21AEF00F0E86AD00EC360C9
:1000400025EF00F0836A8380ECD7E00EC3602CEFCD
:1000500000F0836A8382E5D7F00EC36011EF00F0F1
:08006000836A83848284DDD7EA
:00000001FF

Source file
10


#include<p18f4550.inc>
org 0x00
goto start
org 0x08
retfie
org 0x18
retfie
start
CLRF TRISC,A
SETF TRISA,A
CLRF TRISD,A
CLRF PORTD,A
AGAIN
CLRF PORTC,A
MOVLW 0X80
MOVWF ADCON2,A
MOVLW 0X0E
MOVWF ADCON1,A
MOVLW 0X03
MOVWF ADCON0,A
MOVLW 0X07
MOVWF CMCON
waitsec
btfsc ADCON0,NOT_DONE
GOTO waitsec
CLRF WREG,A
MOVLW 0XD0
CPFSLT ADRESL,A
GOTO LEVEL2
CLRF PORTD,A
BSF PORTD,0,A
BRA AGAIN
LEVEL2
MOVLW 0XE0
CPFSLT ADRESL,A
GOTO LEVEL3
CLRF PORTD
BSF PORTD,1,A
BRA AGAIN
LEVEL3
MOVLW 0XF0
CPFSLT ADRESL,A
GOTO AGAIN
CLRF PORTD
BSF PORTD,2,A
BSF PORTC,2,A
BRA AGAIN

11

END

12

Potrebbero piacerti anche