You are on page 1of 28

“Lie Detector”

A Project Report

Submitted in partial fulfillment of the

Requirements for the award of degree of

Bachelor of Science (Computer Science)

By

“Shaikh Inamul Hasan”

Roll no: 14

Under the esteemed guidance of

Asst. Prof. Neha Kulkarni

DEPARTMENT OF COMPUTER SCIENCE

SHREE L. R. TIWARI DEGREE COLLEGE OF ARTS, COMMERCE &


SCIENCE, Mira Road

(Affiliated to University of Mumbai)


THANE, 401107

MAHARASHTRA

2022-23
Certificate

Department of Bachelor of Science (Computer Science)

This is to certify this project report entitled “Lie Detector” submitted to

University of Mumbai, Maharashtra is bonafide record of work done by

“Shaikh Inamul Hasan” for Academic Year 2022-23 under the guidance of

“Asst. Prof. Neha Kulkarni ” from 30 June 2022 to 30 September 2022.

Date of Evaluation: ___________

_______________ ________________
Internal Examiner College Stamp
(Guide)

______________ ______________
External Examiner Head of the Department
Acknowledgement

I would like to convey my deep appreciation to my Guide Asst. Prof. Neha


Kulkarni of BACHELOR OF SCIENCE in COMPTER SCIENCE for her
valuable guidance and encouragement in completion of my project work.

I would also like to express my gratitude to our principal Dr. Sanjay Mishra for
providing all the required facilities to accomplish my work.

Finally, I would like to thank my parents and friends, without them this task
would not have been completed.

Shaikh Inamul Hasan


Signature
DECLARATION

I hereby declare that project entitled “Lie Detector” done at Shree L.R. Tiwari Degree college,

not been in any case duplicated to submit to any other university for the award of any degree.

To the best of my knowledge other than me, no one has submitted to any other university. The

project is done in partial fulfilment of requirement for the award of degree of Bachelor of

Science (Computer Science) to be submitted as Vth sem project as a part of our curriculum.

Shaikh Inamul Hasan


INDEX

1. Title………………………………………………………………………. 1

2. Introduction……………………………………………………………… 2

3. Requirement Specification……………………………………………… 4

4. System Design Details…………………………………………………… 5

5. System Implementation code…………………………………………… 18

6. Result…………………………………………………………………….. 20

7. Conclusion & Future Scope……………………………………………. 21

8. References………………………………………………………………. 22
TITLE

Lie Detector

This project is an instrument for determining whether a person is telling the truth or not.
This project checks the heartbeat/ pulse and moisture of that person while asking some
questions. When he/she lies to a question the polygraph raises to a point which is stored and
to that and output is shown to us. The output is indicated by green and red light respectively.
The green light is emitted when someone tells the truth and red light is emitted when
someone lies. The project is an IOT (Information of Things) project which is made with the
help of Arduino Uno microcontroller and Arduino IDLE. With the help of both hardware
and software the project is made. So, now I will explain how to use the lie detector.
Step 1: You have to place your finger on the pulse sensor.
Step 2: The questions will be asked simultaneously.
Step 3: Then the polygraph will show whether the person is telling the truth, or the person is
lying.
Step 4: If the person tells the truth the green light will glow, and if the person lies the red
light will glow respectively.
Step 5: And on the polygraph display, When the polygraph raises it means the person is
lying and when the graph remains stable it means he is telling the truth.
Step 6: And finally, we will get the output means we will get the right answers for which the
questions were asked.
By performing these all steps in the right manner, we will get a desired output. So, as we
made it for small scale purposes, large data cannot be stored for now. We will try to
improvise this project and make it or bring it on a large scale by adding many components to
it. So lastly the output will be displayed through polygraph or by the led lights present in the
module.
This was the small overview of my project, which means the hardware components and
software components used in this project are explained in introduction and in system
requirements.

1
INTRODUCTION

This instrument was created to analyze or detect whether the person is lying or not. If the
person lies it will be detected with the help of a polygraph. Means the detection process is
done by two things:
1. Through polygraph.
2. Through led lights.
So, for polygraph the graph or you can say the line will raise when the person is lying or try
to hide something while some questions are asked.
Example (1): If a person's name is Ravi.
And now comes the question.
Q) What is your name?
Ans. He says Raj.
Then the algorithm will sense his heartbeat, as he answered wrong, or he lied to that
question the polygraph will raise. So, polygraph is the first output and the second is while he
is lying it will be indicated through led light which means that green light indicates that the
person is telling the truth and red led light indicates that he is lying, or he is hiding
something or when he is nervous. So, we are done with false answer and for the right
answer we will try one more example:
Example (2): If the person's name is Raj.
And now comes the question.

Q) What is your name?


Ans. He says Raj.
As we know that he is not lying but for confirmation we will use the lie detector. So, the
polygraph will be stable which means he is not lying. So, as per the polygraph the green
light will emit light. Which indicates that he is not lying.
For software we are using Arduino IDLE in which we detected the moisture and heartbeat
through code. And for the hardware we will use Arduino UNO R3 chip, or you can say
microcontroller in which we have to code and for checking the heart rate we will use Heart

2
Rate Pulse Sensor Module for checking moisture of your finger we will use Temperature
and Humidity Sensor Module and lastly for connecting all these we will use Jump Wires.

1) What is Arduino?
It is a hardware component, or you can say microcontroller which according to my research
it is a good and needed replacement of Raspberry Pi. Raspberry Pi is an OS but it comes at a
high cost, but it can be replaced by an Arduino microcontroller. But it is for a small scale
only.

2) What is a Heart Rate Pulse Sensor?


It is used to detect the heartbeat pulse while asking questions the pulse sensor will sense the
nerves and display it on the screen.

3) What is a Humidity Sensor?


It will sense the moisture in your fingers when each question is asked and according to that
it will give us an answer.

4) What is Jump wire?


There are 3 types of Jump wire:
i. Male to Male
ii. Male to Female
iii. Female to Female
These all wires are used for connecting purposes.

A) Objectives:
● To find the truth from your provided information.
● To identify the lie said by the person.

3
REQUIREMENT SPECIFICATION

1) Hardware:
A) Arduino Uno.
B) Circuits.
C) Led Lights.
D) Jump Wires.
E) Humidity Sensor.
F) Heart Rate Pulse Sensor.

2) Software:
A) Python.
B) Arduino.

4
SYSTEM DESIGN DETAILS

UML DIAGRAM:

A. Flowchart:

Fig. 4.1 Flowchart

5
Flowchart is a type of diagram which represents the workflow and implementation of the
program. So, for more understanding we can say that it’s a diagrammatic representation of
your algorithm.
i. Start: It would start/execute the program if error occurred while running the
program may affect your output.
ii. Question: It is a questionnaire made by the programmer which is asked to the
person who is using that project/algorithm.
iii. Set point: This is a fixed point from which the algorithm needs to be very much
accurate to record the readings or the polygraph.
iv. Read A0 and A1: Here the work of the algorithm is to accept the input which is
provided by the user.
v. If and Else: This is the main whole and soul of the program where the program
needs to identify whether the person is innocent or guilty means the program
must decide the person answering the question is lying or telling the truth.
vi. Lies and not lies: Means if the person is lying then the program will show that he
is lying and end the program, means the polygraph will raise and it indicates that
the person is lying and if it remains stable it means he is telling the truth.
vii. End: Where the program needs to end and display us the required output.

6
HARDWARE:

Arduino UNO

Fig. 4.2 Arduino UNO

The Arduino UNO is a basic board of Arduino. UNO describes 'one' . It was labeled as
UNO to address the first release of Arduino Software. It was the first USB board launched
by Arduino. It is said to be the powerful board used in various projects. Arduino.cc has
introduced the Arduino UNO board.
Arduino UNO is fully based on ATmega328P. It is simple to use as compared to other
boards, such as the Arduino Mega board, etc. The board consists of Input/Output pins (I/O),
shields, and other circuits.
The Arduino UNO consists of 6 analog pin inputs, 14 digital pins, a USB connector, a
power jack, and an ICSP (In-Circuit Serial Programming) header. It is a program based on
IDE, which stands for Integrated Development Environment. It can be performed on both
online and offline platforms.

7
The components of Arduino UNO board:

Fig. 4.3 Components of Arduino UNO board

● ATmega328 It is a mono chip Microcontroller of the ATmel sub-type. The


process code is of 8-bit. It adjoins the Memory (SRAM, EEPROM, and Flash),
Analog to Digital Converter, serial ports, I/O lines, registers, external and
internal interrupts, and oscillator.
● ICSP pin - The In-Circuit Serial Program allows the coder to program using the
firmware of the Arduino.
● LED Indicator- The ON light in LED shows the power is activated. When the
power is OFF, the LED is shut down.
● Digital pins- The digital pins have the value HIGH or LOW. The pins numbered
from D0 to D14 are digital pins.

8
● TX and RX LEDs- The success flow of data is shown by the light of these
LED's.
● AREF- The Analog Reference (AREF) pin is used as a reference voltage to the
Arduino UNO from the external power supply.
● Reset button- It is used to Reset the connection.
● USB- It allows the board to join with the computer. It is essential for the
programmer to program on the Arduino UNO board.
● Crystal Oscillator- The CO has a frequency of 16MHz, which makes that
Arduino UNO a powerful board.
● Voltage Regulator- The VR indicates that the input voltage is 5V.
● GND- Ground pins. The ground pin is used as a pin with zero voltage.
● Vin- It is used for voltage.
● Analog Pins- The pin numbers are from A0 to A6 are analog . The function of
Analog pins is to read the analog sensor used in the connection. It can also act as
GPIO pins.

Memory:

Fig. 4.4 Memory

9
Heart Rate Pulse Sensor:

Fig. 4.5 Heart Rate Pulse Sensor

Heart rate pulse sensor is a such type of sensor which is used for sensing heart rate.
Normally it is a very difficult task to measure the exact heartbeat rate, but this has become
so much easier with the help of this pulse sensor amped. If we talk about heartbeat, then
heartbeat is a periodic signal that is produced by any software or hardware system for giving
intimation to normal working of any system. For measuring this periodic intimation signal,
so many sensors have been used currently in the market but here we shall only talk about
pulse sensor amped. This is basically plug and play heartbeat sensor and has been used by
makers, athletes, game developers and students in their hardware projects.

10
Pin Configuration of Heart Rate Pulse Sensor:

Fig. 4.6 Pin Configuration of Heart Rate Pulse Sensor

Every heart rate sensor consists of three pins. The first one is the ground pin which is used
for supplying ground to this sensor and it is connected to the source ground pin. Second one
is the VCC pin which is used for power on this heart rate sensor, and it is connected to the
source VCC pin. This sensor is powered on at almost 3V to 5V dc volt. Similarly, the last
one is the A0 pin which is an analogue pin, and it is used for receiving analogue signals.
This sensor also has a central LED. This LED helps the sensor to detect heart rate. Beside
this, there is another circuitry below the LED and this circuitry is called noise elimination
circuit. This circuitry is used for eliminating the noise which affects the reading of the heart
rate pulse sensor.

11
Temperature and Humidity Sensor Module:

Fig. 4.7 Temperature and Humidity Sensor Module

The SHT20 temperature and humidity module is high-precious, fully calibrated, with very
low power consumption and high response speed. This sensor is a combination of a
capacitive humidity sensor and a silicon band gap temperature sensor. The key features are:

● Temperature measurement range: -40 to +125 °C


● Temperature measurement accuracy: 0.3 °C
● Humidity measurement range: 0 to 100%
● Humidity measurement accuracy: 3% RH
● Communication Protocol: I2C

12
SHT20 Temperature and Humidity Sensor Pinout:

Fig. 4.8 SHT20 Temperature and Humidity Sensor Pinout

This module has 4 pins:

● VCC: Module power supply – 2.1-3.6 V


● GND: Ground
● SDA: Serial Data Input/Output for I2C protocol
● SCL: Serial Clock Input for I2C protocol

13
Male To Female Jumper Wires:

Fig. 4.9 Male to Female Jumper Wires

➢ The Male to Female Jump Wire is of 20cm. Flexible and easier detachable cable to
the wires according to requirement. It has a pin of male to a female pin header. Also,
it is compatible with 2.60 mm spacing pin headers.
➢ This cable is an electric wire in a cable with a connector at the end, which is normal
for the connections of the component of a breadboard or test circuit, other
equipment or components. Individual Dupont Cables are fit by inserting their end
connects into the slot provided in a board, the head connects the circuit board, or a
piece of test equipment.
➢ Mostly it is used with Banana Pi, Raspberry Pi, Arduino, and development boards. It
is useful in the PCB project, as well as Breadboard connections. Additionally, it
allows you for prototyping and can be used again.
➢ Jumpers are small metal connector used to open or close a circuit part. They have
two or more connection points, which regulate an electric circuit board. Their
function is to config the settings for computer, like the board. If your motherboard
supports polygraph detection.
➢ A jump can be enabled or disabled. Jumper wires are electric wire with connector
pins at the end. These are used to connect two points in a circuit without soldering.

14
You can use jump wire to update a circuit or to find a problem in a circuit. They are
best used in a circuit that does not contain a resistor and is suspected to be worst.
This includes a stretchable. All the fuse are good and the component is not receiving
power; find the main switch.

Features:
➢ Comparable with 2.6 mm spaced pin headers
➢ 40pcs chromatic color jumper wires
➢ High and in good quality working condition
➢ Durability and reusability
➢ Simple to install and use
➢ Popular choice for constructing or repairing
➢ It can be used for the electronic project
➢ Jumper Cable Wire allows you to plug in and plug out easily

Types of Jumper Wires:

Jump wires are of three types:


★ Male to male
★ Male to female
★ Female to female

And two types of head shapes: Round head and Square head. Male ends have a pin that can
plug into things, while female ends do not but are also used for plugging. Moreover, a male
connector is referred to as a plug and has a solid pin for center conduction. Meanwhile, a
female connector is referred to as a jack and has a center conductor with a hole in it to
accept the male pin. Male to male jump wires are the most usual wires.

15
Led Lights:

Fig. 4.10 Led Lights

➢ Full form of LED is Light-Emitting Diode. LED is an electric device that emits light.
Early LEDs produce only red light, but modern LEDs can produce several different
colors, including red, green, and blue light.
➢ Recent advances in LED technology have made it possible for LEDs to produce

white light as well.


➢ LEDs are commonly used for indicator lights such as power lights on electric
devices. They have many other applications, including electric signs, clock displays,
and flashlights.
➢ They have started to replace traditional light bulbs in some of the areas. Some
examples include streetlights, the red lights on cars, and various types of decorative
lighting.

16
Bread Board:

Fig. 4.11 Bread Board

➢ The breadboard is also known as a solderless board. It is a white rectangular board


with small holes to insert electronic components. It is used in electronics projects.
➢ We can say that a solderless board is a prototype that acts as a construct base of
electronics. A breadboard consists of two words: bread and board. The word
breadboard was used to slice the bread pieces.
➢ But it was named as a breadboard for its use in electronics around the 1970s.
Therefore, the term breadboard refers to these boards only and provide us a quick
electrical connection.
➢ It conveys that the component does not require any soldering to fit into the board.
Thus, we can say that breadboards can be reused.
➢ We can use the last end of the wire to the front end of the next wire to make them a
long and adjoint wire.

17
SYSTEM IMPLEMENTATION CODE

CODE:

volatile int BPM;


volatile int Signal;
volatile int Pulse;
volatile int IBI;

void setup(){
Serial.begin(115200);
interruptSetup();
pinMode(2, INPUT);
pinMode(4, OUTPUT);
}

void loop(){
int a=digitalRead(2);
//Serial.println(x);

int before = BPM;

if(a==1)
{
delay(3000);
int after = BPM;

//Serial.print(before);
//Serial.print(" ");
//Serial.println(after);

18
if(before == after)
{
digitalWrite(4, HIGH);
delay(100);
digitalWrite(4, LOW);
delay(100);
}
else
{
digitalWrite(8, HIGH);
delay(100);
}
}
delay(1000);

19
RESULT

Fig. 6.1 Output

For implementing the code, we must upload the code in Arduino UNO microcontroller. We
must write the code in Arduino IDLE. After that you must place your finger on the heart rate
sensor then some question will be asked, and we will get the answer on polygraph and
through LED.

Polygraph:

Fig. 6.2 Polygraph

Polygraph is used to show the output means the truth and lie, as shown in Fig. 6.2 It
indicates that the person who is using this lie detector is telling lies. If he tells the truth the
polygraph will show a straight line.

20
CONCLUSION & FUTURE SCOPE

In my overall project, it means the lie detector. This project is made to identify the truth and
state the lies which are told or manipulated by that person. It checks the heartbeat of that
person while answering the question. While that person is answering, the polygraph of that
person is displayed on the screen. If the polygraph raises it means the person is lying, If the
polygraph remains constant it means the person is telling the truth. The lie detector tells the
truth 80-90% of time.
The lie detector can be used in legal trails, crime departments and courts etc.
These devices are used to establish, based on scientific criteria, whether a person is telling
the truth or lying. Contrary to the common belief, what it does is analyze a series of signals
and changes of the human body, in rapport to normal conditions. These are the proofs
assessed by a specialized examiner, who is entitled to have the final call. During the
interrogation, individuals are likely to go through various emotions, which indicate their
level of anxiety and help specialists realize if they are sincere or not. Respiratory or heart
rate, as well as blood pressure are great indicators very useful for examiners. The huge
acceptance level for these tests is due to their versatility, since the device can be used in
many domains, for several purposes. Read on to discover some of the most common uses of
the polygraph instrument.

Future Scope:

● It can be used in airport security.


● It can be used in companies to check employee's authentication
● It can be used in homeland and defense security.
● It can be used to detect lies through facial expression.
● It can be used to detect lies through body language.

21
REFERENCES

● https://www.javatpoint.com/arduino-uno
● https://microcontrollerslab.com/heart-rate-pulse-sensor/
● https://electropeak.com/learn/interfacing-sht20-temperature-and-humidity-sensor
-with-arduino/
● https://www.electronicscomp.com/male-to-female-jumper-wires-20cm-40-pieces
-pack
● https://www.wiltronics.com.au/wiltronics-knowledge-base/what-are-jumper-wire
s/#:~:text=Jumper%20wires%20come%20in%20three%20versions%3A%201,M
ale-to-male%20jumper%202%20Male-to-female%20jumper%203%20Female-to
-female%20jumper
● https://techterms.com/definition/led
● https://www.javatpoint.com/breadboard
● https://www.liedetectors-uk.com/can-lie-detectors-used/#:~:text=What%20Can%
20Lie%20Detectors%20Be%20Used%20For%3F%201,relevant%20in%20the%
20hands%20of%20competent%20authorities.%20

22

You might also like