Wednesday, 18 October 2017

HOME FAN DETECTOR


HOME FAN DETECTOR

Group's member

Mohammad Akmal Hakim B Noor Said (01DNS14F2021)
Nurul Syahidah Bt Robia (01DIP15F1013)
Nurul Syazwani Bt Mohd Yazid (01DIP15F1034)

Synopsis

To detect the movement of people in the house.

Hardware


  1. Dc motor
  2. Motor driver
  3. Pic micro controller PIC16F877A 
  4. PIR motion sensor
Software

  1. Protues 8 Professional
  2. MPLAB IDE v8.83
Circuit diagram



Coding

#include<htc.h>

void delay (unsigned long); __CONFIG(0x3F3A);
#define Motion_sensor RA0
#define Motor RC2
void main (void)

{

TRISA = 1;

TRISC = 0;

PORTCbits.RC2 = 0;






if (Motion_sensor == 1)

{

PORTCbits.RC2 = 1; delay(2);

}



else PORTCbits.RC2 = 0; delay(2);

}



void delay(unsigned long)

{

unsigned char i;

for (i=0xDE; i!=0; i--)

{

unsigned char j;

for (j=0x50; j!=0; j--)

{

unsigned char k; for (k=0xC; k!=0; k--)
{

}

}

}

}

Video


No comments:

Post a Comment