Coder Social home page Coder Social logo

daialaa / embedded-project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dinaalaaahmed/embedded-project

0.0 0.0 0.0 945 KB

An Arduino code for the access control system of an entrance gate to allow only authorized people to enter.

C++ 100.00%

embedded-project's Introduction

Access control system

It’s an access control system which checks if there is a car at the gate using an IR sensor. If yes, the system checks the driver card ID by using an RFID scanner. If it is authorized, the gate will open using a servo motor and the car will pass. Also an LCD will print “pass” and a green LED will be on. If it isn’t authorized, the gate will not open and the LCD will print “failed” and a red LED will be on.

List of used components:

  • IR sensor
  • RFID scanner
  • Servo motor
  • LCD
  • Arduino Uno
  • Green LED
  • Red LED

Design models:

1. Wiring diagram

alt

2. Finite State Machine

alt

3. Petri-nets Diagram

alt

  • The system starts with one token in IDLE state, and we have 6 input states, that they can have tokens or not depending on user actions or sensor reads.
  • The 6 input states are ( IR1, IR2, Card True, Card False, Not IR1, Not IR2)

Test Cases Description

1. The system is in an idle state (Gate is off, Leds are off, LCD “Welcome”).

  • When a car arrives in front of the gate the LCD displays “Scan Your Card”.

2. The System is in a car state (Gate is off, Leds are off, LCD “Scan Your Card”).

  • If the car returns and leaves the gate the system returns to idle state again and the LCD displays “Welcome”.
  • If the user scans an unauthenticated card the LCD displays “Fail” and a red led becomes on for three seconds then returns to the car state to try scanning the card again.
  • If the user scans an authenticated card the LCD displays “Pass” and a Green led becomes on and the motor opens the gate.

3. The system is in a pass state (Gate is On, red led is off,green led is on, LCD “pass”).

  • If the outer IR catches the car leaving the gate the system closes the gate and goes to Busy state.

4. The system is in a busy state (Gate is off, Leds are off)

  • If the car stays in front of the outer IR the LCD displays “Busy”.
  • If there is a car in front of the gate the system returns to the car state.
  • If there is not a car in front of the gate the system returns to the idle state

References:

embedded-project's People

Contributors

abdallahhussien4 avatar daialaa avatar dinaalaaahmed avatar nerdeen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.