19ECE181-Electronics System Lab

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

ES PROJECT REPORT

JUNE|2023 

19ECE181- Electronics System Lab


Submitted by

BL.EN.U4ECE22044                       ABHINAV VIKRAM


BL.EN.U4ECE22070 DS.RAGA VINAY
BL.EN.U4ECE22064                      ESHWAR REDDY

in partial fulfillment for the award of the degree


of
BACHELOR OF TECHNOLOGY
IN
“ELETRONICS AND COMMUNICATION” ENGINEERING

AMRITA VISHWA VIDYAPEETHAM


BENGALURU-560035

JUNE-2023
AMRITA VISHWA VIDYAPEETHAM
AMRITA SCHOOL OF ENGINEERING, BENGALURU, 560035

Department of ECE, ASE, Bengaluru

1
ES PROJECT REPORT

Index
SI.NO TOPIC Page no
1 Aim 3
2 Components required 3
3 Detailing of components 3
4 Arduino Code 6
5 GUI Code 10
6 Circuit diagram 12
7 Result & inference 13

2
ES PROJECT REPORT

Aim:
To make security wakeup call for lock system. Using RFID, Keypad (4x4)
and Sim module 800L.

Components required:
 Keypad (3x4)
 Sim module 800L
 RFID kit
 Arduino UNO board
 Jumper wires
 Antenna
 buzzer

Keypad(3x4)
The Arduino UNO can be used to interface with a 3x4 matrix keypad, which allows you to
input values or commands into your Arduino project. The keypad consists of 12 buttons
arranged in a 3x4 grid.

Sim Module 800l

3
ES PROJECT REPORT

The "SIM800L" is a popular GSM/GPRS module commonly used with Arduino and other
microcontrollers for wireless communication.

It allows you to add cellular connectivity to your projects, enabling them to send and receive
SMS messages, make phone calls, and access the internet.

Communication Standards: It supports GSM (2G) and GPRS (2.5G) networks, operating in the
frequency ranges of 850/900/1800/1900 MHz.

Power Supply: The module requires a regulated 3.7-4.2V DC power supply.

SIM Card Slot: It has a SIM card slot where you insert a valid GSM SIM card to establish a
cellular connection.

I/O Pins: SIM800L has several General Purpose Input/Output (GPIO) pins that can be used to
interface with external devices or sensors.

When using the SIM800L module with Arduino, you typically connect the module's TX and
RX pins to the corresponding digital pins on the Arduino board.

Antenna:

The module requires an external antenna for reliable signal reception and transmission. An
appropriate GSM antenna should be connected to the module.

RFID KIT:
RFID module, and various components to facilitate RFID-based projects. The RFID module is
used to communicate with RFID tags and read their unique identification numbers.

RFID Module: The RFID module is the core component of the kit. It consists of an RFID reader
that communicates with RFID tags using radio frequency signals. The module may have built-in
antennas or require an external antenna.

4
ES PROJECT REPORT

RFID Tags: The kit typically contains a few RFID tags. These tags are small electronic devices
that store unique identification numbers. They can be attached to objects or embedded within
them for identification purposes.

JUMPER WIRES:
Jumper wires are commonly used in electronics projects, including those involving Arduino
microcontrollers. They are used to establish connections between different components on a
breadboard or to connect components directly to an Arduino board.

Arduino UNO:
The Arduino Uno is a popular microcontroller board based on the ATmega328P
microcontroller. It is widely used in various electronics projects and prototyping due to its
simplicity and versatility.

Microcontroller: The Arduino Uno is equipped with the ATmega328P microcontroller.


Digital and Analog I/O: The board has 14 digital input/output pins, out of which 6 can be used
5
ES PROJECT REPORT

as PWM (Pulse Width Modulation) outputs. It also has 6 analog input pins for reading analog
sensor values.

Programming: The Arduino Uno can be programmed using the Arduino programming
language, which is a simplified version of C/C++. You can write your code using the Arduino
IDE (Integrated Development Environment) and upload it to the board via a USB connection.

Buzzer:

An Arduino Buzzer is basically a beeper. The Arduino buzzer is a device that produces sound
when an electric current is passed through it. The Arduino buzzer can be directly connected to
the Arduino and produce different tones by giving different frequency electric pulses to the
buzzer.

Arduino Code:
// Include required libraries

#include <MFRC522.h>

#include <Keypad.h>

#include <SoftwareSerial.h>

#include <SPI.h>
6
ES PROJECT REPORT

SoftwareSerial SIM800L(3, 4); // SoftwareSerial SIM900(Rx, Tx)

MFRC522 mfrc522(10, 9); // MFRC522 mfrc522(SS_PIN, RST_PIN)

char initial_password[4] = {'1', '2', '4', '4'}; // Variable to store initial password

String tagUID = "43 FF 5C A6"; // String to store UID of tag. Change it with your tag's UID

char password[4]; // Variable to store users password

boolean RFIDMode = true; // boolean to change modes

boolean NormalMode = true; // boolean to change modes

char key_pressed = 0; // Variable to store incoming keys

uint8_t i = 0; // Variable used for counter

uint8_t count=0;

uint8_t count_1=0;

// defining how many rows and columns our keypad have

const byte rows = 4;

const byte columns = 3;

// Keypad pin map

char hexaKeys[rows][columns] = {

{'1', '2', '3', }, {'4', '5', '6', }, {'7', '8', '9', }, {'*', '0', '#', }

};

// Initializing pins for keypad

byte row_pins[rows] = {A0, A1, A2};

byte column_pins[columns] = { A3,A4,A5};

// Create instance for keypad

Keypad keypad_key = Keypad( makeKeymap(hexaKeys), row_pins, column_pins, rows, columns);

void setup()

{Serial.begin(9600);

SPI.begin(); // Init SPI bus

mfrc522.PCD_Init(); // Init MFRC522

delay(100);
7
ES PROJECT REPORT

SIM800L.begin(19200);

SIM800L.println ("Initialization complete.");

void loop() {

while(SIM800L.available())

{ Serial.println(SIM800L.readString());

} if (NormalMode == false) {

}else if (NormalMode == true) {

// System will first look for mode

if (RFIDMode == true) {

// Function to receive message

Serial.println(" Welcome to Amrita!!!");

delay(1500);

Serial.println(" Door Lock ");

delay(1500);

Serial.println(" Scan Your Tag ");

// Look for new cards

if ( ! mfrc522.PICC_IsNewCardPresent()) {

return;

} // Select one of the cards

if ( ! mfrc522.PICC_ReadCardSerial()) {

return;

} //Reading from the card

String tag = "";

for (byte j = 0; j < mfrc522.uid.size; j++)

{ tag.concat(String(mfrc522.uid.uidByte[j] < 0x10 ? " 0" : " "));

tag.concat(String(mfrc522.uid.uidByte[j], HEX)); }

tag.toUpperCase();
8
ES PROJECT REPORT

if (tag.substring(1) == tagUID) //Checking the card

{ // If UID of lcd.clear();

Serial.println("Tag Matched");

delay(3000);

Serial.println("Enter Password:");

count=0;

RFIDMode = false; // Make RFID mode false

} else

{ Serial.println("Wrong Tag Shown");

Serial.println("Access Denied");

Serial.println("Someone Tried with the wrong tag ");

delay(3000);

count=count+1;

} } // If RFID mode is false, it will look for keys from keypad

if (RFIDMode == false) {

key_pressed = keypad_key.getKey(); // Storing keys

if (key_pressed)

{ password[i++] = key_pressed; // Storing in password variable

Serial.print("*");

}if (i == 4) // If 4 keys are completed

{ delay(200);

if (!(strncmp(password, initial_password, 4))) // If password is matched

{ Serial.println("Pass Accepted");

Serial.println("Door Opened ");

delay(3000);

count_1=0;

i = 0;

RFIDMode = true; // Make RFID mode true


9
ES PROJECT REPORT

}else // If password is not matched

{ count_1=count_1+1;

Serial.println("Wrong Password");

Serial.println ("Some one tried with the wrong Password ");

delay(3000);

i = 0;

RFIDMode = true; // Make RFID mode true

}}} }

if(count>1){

Serial.println("Limit is completed.");

Serial.println ("ATD+918886877566;\r\n");

SIM800L.println ("ATD+918886877566;\r\n");

delay(20000);

count=0;

}if(count_1>1){

Serial.println("Limit is completed.");

Serial.println ("ATD+918886877566;\r\n");

SIM800L.println ("ATD+918886877566;\r\n");

delay(20000);

count_1=0;

}}

GUI Code:
import processing.serial.*;

PFont f;

Serial myPort;

String val;

void setup(){

10
ES PROJECT REPORT

println(Serial.list());

String portName = Serial.list()[2];

myPort = new Serial(this, portName, 9600);

size(500,500);

f= createFont("Arial Black",24,true);

void draw(){

if ( myPort.available() > 0){

val=myPort.readStringUntil('\n');

background(50,50,0);

textFont(f,24);

text(val,70,140);

println(val);

11
ES PROJECT REPORT

Circuit Diagram:

12
ES PROJECT REPORT

RESULT AND INFERENCE:

13
ES PROJECT REPORT

If in case of two or more continuous and discontinuous wrong passwords have been entered by
the user by using keypad ,then the Arduino UNO interfaces with the sim module 800L and later
the user gets a call regarding the wrong attempts.

Similarly, if a person tries to enter or unlock the door using RFID tag, in case of two or
unsuccessful attempts, the RFID module interfaces with the Arduino UNO and makes the call
to the user regarding the unsuccessful attempts.

The main motto of this experiment is to enhance safety and security and keep updating the user
in case of any burglar activity took place.

For sim module 800L , which we are using is having less accuracy.

14

You might also like