A polygraph is an instrument that records physiological indicators like pulse rate, blood pressure, and electrodermal activity of a human subject under questioning by an operator. It’s commonly referred to as a lie-detector test because it’s designed to assess whether a person is telling the truth.
Industry-standard polygraph equipment is said to be 80 to 90% accurate if used correctly with proper quality controls. They’re not foolproof, but these devices have been used in investigations.
An important physiological measure is a person’s electrodermal activity, which is skin changes such as perspiration (which might be one indication of lying for some people). It’s simple to design polygraph equipment based on electrodermal activity, and this type of “lie detector” can be built using Arduino or any microcontroller for fun.
Microcontroller boards have one or more analog inputs, and one can be used to measure skin conductance. The electrical conductance can then be plotted as a graph through Arduino Serial Plotter.
For the most part, the graph of the electrical conductance of a typical person is consistent. When someone lies, the person gets nervous, which may result in a change in the skin’s electrical conductance. This is a potential indication that a subject is lying to the question.
In this project, we’ll build a type of lie detector based on electrodermal activity using Arduino UNO.
Components
1. Arduino UNO x1
2. Red LED x1
3. Yellow LED x1
4. Green LED x1
5. 330Ω resistors x3
6. 2K resistor x1
7. Jumper wires
8. Electrical wires
9. Arduino USB cable
Circuit connections
- Connect the red LED’s anode with Arduino’s GPIO10 via the 330Ω resistor
- Connect the yellow and green LED’s anodes to Arduino’s GPIO9 and GPIO8, respectively, via the 330Ω resistors
- Connect the cathodes of all of the resistors to Arduino’s ground
- Connect a jumper wire to Arduino’s analog input A0, and pull it down to Arduino’s ground via the 2K resistor
- Extend the connection from pin A0 to an electrical wire
- Extend an electrical wire from 5V of Arduino
The electrical wires extended from pin A0 and 5V out will act as probes of our lie detector. The probe ends can be attached to pieces of tin foil, secured by hook & loop tapes, to ensure uninterrupted contact with the subject’s fingers.
While prototyping, the open ends of the electrical wires can also be attached to the subject’s fingers using electrical tape.
Arduino sketch
//Arduino Lie Detector
void setup() {
Serial.begin(9600);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
digitalWrite(10, HIGH);
delay(500);
digitalWrite(9, HIGH);
delay(500);
digitalWrite(8, HIGH);
delay(500);
}
void loop() {
if (analogRead(A0) > 900)
{
digitalWrite(8, HIGH);
}
else
{
digitalWrite(8, LOW);
}
if (analogRead(A0) > 300)
{
digitalWrite(9, HIGH);
}
else
{
digitalWrite(9, LOW);
}
if (analogRead(A0) > 600)
{
digitalWrite(10, HIGH);
}
else
{
digitalWrite(10 , LOW);
}
Serial.println(analogRead(A0));
delay(20);
}
How it works
Once the circuit connections are complete, upload the sketch to Arduino UNO and connect the open ends of the probes to the subject’s fingertips. Open the Arduino Serial Plotter and begin observing the graph of electrical conductance.
Initially, the graph is consistent, with periodic variations in the read analog input. Next, start questioning the subject. First, ask things that are simple and that you know to be true, such as ‘What is your name?’; ‘What city do you live in?’; ‘How old are you?’
Typically, the graph on the Arduino serial plotter remains consistent without any deviations. Slowly, ask new questions, including ones the subject might lie about (you can ask them to do so for fun!).
Depending on the subject, you might notice a change in the graph. This could be an indication that the subject is lying.
Over the course of a long investigation, the threshold values for the analog input can be determined, which may indicate when the subject is lying or telling the truth. The values can then be added to the sketch to turn on the red LED on when it detects a “lie” and the green LED when it detects the “truth.”
The code
The Arduino sketch monitors the analog input from the skin of the subject’s fingertips. The analog readings are plotted as a graph over Serial Plotter. The plotted graph is observed for a long time to determine the physiological behavior of the subject. The threshold values are set in the sketch for lie detection, accordingly. These values are also used to turn on LEDs as indicators of truth or lie.
The results
An Arduino lie detector based on electrodermal activity built on a prototyping board…
The subject’s fingertips are connected to the probes using electrical tape while prototyping as shown here…
A normal graph for a subject during an initial investigation, as observed on the Serial Plotter…
During a period of questioning, the subject lied several times as observed by the abrupt changes in the graph below…
You may also like:
Filed Under: Arduino Projects, Electronic Projects, Tech Articles
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.