Lie detector with arduino

Διασκεδάστε με τους φίλους σας με αυτή την έξυπνη εφαρμογή.

In this fun tutorial we are going to present at you a project that can detect whether someone is stressed or lying!

If you are going to test that on someome just to let you know, whatever the results… don’t trust them! lie detection is more complex and requires more input data. So keep it cool 🙂

We are going to use an arduino uno. Of course we can use any edition we like. There are so few pins that we are going to use it can work with nano as well.

We are not going to stop by just showing you a small circuit! In this video we are going to build a super cool project that will work like a polygraph. We are going to document the stress condition of the subject to paper!

The project

Arduino lie detector is a project that will help us understand commands analogRead(), digitalWrite() and we will see how a serial design works in arduino.

Every time we have a variation in the analog input the red led is lit and with the help of the servo motor a graph will be drawn on paper.

How does the lie detector works anyway?

Lie detectors get the instant changes that occur to a subject that is been put to the test. That means is someone for any reason remains calm during the test, there is a posibility to trick the lie detector.

Therefore we are in the basis that when someone lies he/she is streesed. Otherwise it’ s difficult to detect those changes.

Many professional lie detectors utilize more than one point. Heart pulses, galbanic skin resistance, eye iris, themal image, etc. All these if combined they make safer results but they all are base to one single fact. That the subject will be stressed when lies.

Effectivess is not the same to all people. People who tend to lie are less sensitive and the machines cannot detect their freaking lies so easily.

The build

Some of the parts where drawed at corelDraw in mm scale and i gave the file to a laser cut in plexi glass plexi glass 3mm thickness. From a hardware store i supplied nuts and bolts in order to put them all together. Some bearings and aluminium parts that i bought from a workshop.

Parts of the plexi glass where meant to be without bolts. The problem was that the laser cut was not so accurate, therefor i used some bolts to tight them all together.

I did not used 3D printer because it was not cost efficient comparing to plexi glass laser cut.

As far as the motor is concerned, it is a gear box from Ebay.

The final speed is 20rpm which is pretty cool. I made some tests with 2rpm gear motor but is was verrrryyyyy slooooow.

Before the gear box i tried to give movement from pulleys but with no luck.

The readings are beeing made with 2 cables that measure the galbanic skin resistance. When we lie (stressed) the value of GSR is changed.

This variation in the gsr is easy to detect.

The circuit

The circuit is pretty simple. We did not used many components. The only thing is that the gear motor is connected to a different power supply

To download the fritzing circuit click here

Circuit for Arduino lie detector

Arduino lie detector: Operation

We will have to attach to each finger a cable. Choose the index and middle finger for that.

During the test, hand and fngers must remain still!

When the detector starts, DV motor starts to rotate and folds the paper. The system begins to read data from our fingers which with the help of code we proccess.

We are starting the questions. In the beginning we start with questions like “Is your name Bill?”, “Do you live in Amsterdam?” and simple questions that can be answered with a yes or no. After a while we start making question we want to check if the subject is lying.

We can see the servo motor rotating and creating a wave line.

When a lie is detected red LED lights and GREEN is turned off.

Code

Here is the code that we have to upload to our arduino. Upload the code and you are ready to go!

#include <Servo.h>
int redLed = 7;
int greenLed = 8;
int servoPin = 9;
int converttograph;
Servo myservo;
void setup() {
  Serial.begin(9600);
  pinMode(greenLed, OUTPUT);
  pinMode(redLed, OUTPUT);
  myservo.attach(servoPin);
}
void loop() {
  int sensorValue = analogRead(A0);
  converttograph = map(sensorValue,0,60,50,90);
  if (sensorValue >= 45) {
    digitalWrite(redLed, HIGH);
    digitalWrite(greenLed, LOW);
    myservo.write(converttograph);
  }
  else {
    digitalWrite(redLed, LOW);
    myservo.write(converttograph);
  }
  if (sensorValue <10) {
    digitalWrite(redLed, LOW);
    digitalWrite(greenLed, HIGH);
    myservo.write(90);
  }
  Serial.println(sensorValue);
  delay(15);
}  

You may need to adjust the values in IF’s in order to make it work for you. If you have different GSR that mine in calm state you might need to adjust it a bit.

Video

0 responses on "Lie detector with arduino"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Σχεδιασμός © GetCert. Με επιφύλαξη παντός δικαιώματος.