Vous êtes sur la page 1sur 6

5/12/2016

GROUP MEMBERS ID NUMBER


MOHD KHAIRI BIN AHMAD TB14056
MUHAMMAD HAFIZI TB14055
MOHD HAZIM BIN ZAIDEEN TB 14030
MUHAMMAD SHAFIQ BIN ABDUL KARIM TB14057
LECTURER : MOHD FAIZAL BIN ISMAIL

Automatic gate are used to control acess into a secured


area

Introduction
Component Circuit Block
Flow Char
Program Automatic gate consists of two basic components
used Diagram Diagram Result
Gate : the physical object that is moved to block the gate
opening
Gate operator : the machinery that moves the gates in and out
of the gate opening
5/12/2016

Decided to design and code a functuning


To implement what we have learned in lab season
Automated Gate System
To design a circuit using Proteus
Using the combination of program and
circuit diagram To write the program using Atmel Studio
Code a program in C language using To know the workflow of Automated Gate System
Amtel and simulate on Proteus

Microprocessor LED Red &


Push Button Buzzer LCD display
Atmega 16A Yellow

Motor Relay Resistor Power source


5/12/2016

Start

Initialize
Atm eg a16A

Buzzer ON ,
Turn
Press push Yellow LED on,
on
button DING Motor start
device Initialize Motor
initialized

Red LED ON,


buzzer and Yellow Initialize LCD
Press button LED OFF & Press button
GOFF Motor start GON
spinning
anticlockwise

LCD output
WELCOME TO ~ MY
HOUSE DEAR~

System go to
initial state
1

1 3

LCD output LCD Display


PRESS TH E PLEASE WAIT
GATE WILL
BUTT ON
OPEN

Press
button
Press pus h button GON
DI NG

No

No Is the b utton
pressed ?

Yes
Is the DI NG ON ?

Red LE D ON, buzzer


and Yello w LED OFF &
Moto r start spinning
anticlockwise
Yes

Yellow LED turn


ON, Buzzer On &
Moto r start LCD disp lay
initialize Loading.
GATE OPEN

3 4
5/12/2016

Moto r sto p
5
spinning
af ter 500 ms

Press
button
GOF F Motor stop
spinning after
No 500 ms

Is the b utton
pressed ?

Yes

Moto r turn Ret urn ?


clockwise &
red L ED
turn o n

No
LCD disp la y
LOADING..
CLOSED
THE G ATE
End

/* { lcd_gotoxy(0,0); while(1)
* GATE_PROJECT.c DDRC = 0xFF; //Port C as lcd_puts(" WELCOME TO"); {
output lcd_gotoxy(0,1); if(PINA == 0xFE) //for ding INPUT
DDRA = 0x00; //Port A as lcd_puts("~MY HOUSE {
#include <avr/io.h> input DEAR~"); PORTC = 0x01; // FOR DING1
#define F_CPU PORTA = 0xFF; // Pull up _delay_ms(200); OUTPUT
lcd_clrscr(); lcd_clrscr();
8000000UL Port A lcd_gotoxy(0,0); lcd_gotoxy(0,0);
#include <util/delay.h> lcd_init(LCD_DISP_ON_CU lcd_puts("PRESS THE lcd_puts(" PLEASE WAIT ");
#include "lcd.h" RSOR); // initialize lcd BUTTON"); lcd_gotoxy(0,1);
lcd_clrscr(); lcd_gotoxy(0,1); lcd_puts("GATE WILL OPEN
lcd_gotoxy(0,0); lcd_puts("****************"); }
int main(void) _delay_ms(50); _delay_ms(10);
5/12/2016

lcd_puts(" WELCOME TO ");


if(PINA == 0xFD) if(PINA == 0xFB)
lcd_gotoxy(0,1); Return (0);
{ {
PORTC = 0x0A; PORTC = 0x04; lcd_puts("~MY HOUSE {
lcd_clrscr(); lcd_clrscr(); DEAR~");
lcd_gotoxy(0,0); lcd_gotoxy(0,0); _delay_ms(200); }
lcd_puts("LOADING....."); lcd_puts("LOADING....."); lcd_clrscr();
lcd_gotoxy(0,1); lcd_gotoxy(0,1); lcd_gotoxy(0,0);
lcd_puts("GATE OPEN"); lcd_puts("GATE CLOSE"); }
lcd_puts("PRESS THE
_delay_ms(500); _delay_ms(500);
BUTTON"); }
PORTC = 0x0A; PORTC = 0x14;
_delay_ms(500); _delay_ms(500); lcd_gotoxy(0,1);
//motor stops running //motor stops running lcd_puts("****************");
PORTC = 0x00; PORTC = 0x00; _delay_ms(10);
} lcd_gotoxy(0,0); }

Initial Push
Button 1
Condition (DING)
5/12/2016

Push Push
Button 2 Button 3
(GON) (GOFF)

The program and the connection of the circuit is correct

Have the same results and prove the result when created an Automated
Gate System using C language and simulate the program using circuit

Already know the working flow of Automated Gate System

Vous aimerez peut-être aussi