Overview
In this project, We’ll try to get some information from human body by using simple sensors and Arduino. You can use these information to create a lie detector machine
What You Will Learn
- Know Polygraph and basics of measuring and recording physiological indicators.
- Will be familiar with Lie Detector systems.
- Can get data from sensors and analyze them by Arduino.
- Can measure respiration rate by using ECG electrodes and impedance pneumography.
An Introduction to Polygraph
Sometimes the machine will also record things like arm, leg, face, and pupil movement. When the test begins the investigator asks some questions like “Is your name, Bob?” or “Do you live in the United States?” When the criminal answers, investigator establish the norm graphs of his reaction. After that, the main questions will be asked. During the test or after that, the investigator checks the result. If he finds a significant change indicates that the criminal is lying. These changes could be faster heart rate, higher blood pressure, increased perspiration, moving and looking around and etc. When an experienced examiner uses a lie detector machine He can detect the lie with high accuracy. If you use the polygraph for the first time it could be a little bit hard for you to recognize the lying.
In this project, We use SHT20 to measure temperature and perspiration, ECG electrodes to measure respiration rate, A pulse sensor to measure heart rate and an Arduino board to get data and analyze them.
Required Materials
Hardware Components
Software Apps
Circuit
In this circuit, We used ECG pads to have a better connection between the skin of the body and Arduino. You can use alligator clips and jumper wire to make this connection. This circuit can measure the breath rate of the body. But some parts of the circuit is removed from the picture because it depends on the level of parameters resolution and sensitivity in your project. For better understanding, read the impedance pneumography way to measure breath rate and complete your circuit according to your interest.
Impedance pneumography
Code
In this code, We get temperature and perspiration from SHT20 sensor by I2C port, Heart rate from pulse sensor by analog input pin and breath rate from impedance pneumography circuit by analog input pin.
You must add the library and then upload the code. If it is the first time you run an Arduino board, don’t worry. Just follow these steps:
- Go to www.arduino.cc/en/Main/Software and download the software of your OS. Install the IDE software as instructed.
- Run the Arduino IDE and clear the text editor and copy the following code in the text editor.
- Choose the board in tools and boards, select your Arduino Board.
- Connect the Arduino to your PC and set the COM port in tools and port.
- Press the Upload (Arrow sign) button.
- You are all set!
Necessary Files and Downloads:
Impedance pneumography
#include "Wire.h"
#include "DFRobot_SHT20.h"
DFRobot_SHT20 sht20;
void setup()
{
Serial.begin(9600);
sht20.initSHT20(); // Init SHT20 Sensor
delay(100);
sht20.checkSHT20(); // Check SHT20 Sensor
}
void loop()
{
float humd = sht20.readHumidity(); // Read Humidity
float temp = sht20.readTemperature(); // Read Temperature
Serial.print(temp, 2);
Serial.print(",");
Serial.print(analogRead(A3)); // Read Pulse sensor value
Serial.print(",");
Serial.print(humd, 1);
Serial.print(",");
Serial.println(analogRead(A2)); // Read Breath rate
}
Assembling
All you need to do is just cut the sponge and place the sensors. Then put it on your hand and adjust the stretch rubber and stick it using the hot glue gun.
Now, open up the Tools >> Serial Plotter.
What’s Next?
You can improve this project as you wish. Here are a few suggestions:
- Use ECG modules and connect them to Arduino
- Try analyzing data from your body.
- Make a simple Lie Detector by more sensors and more coding.
Comments (13)
Can we use another temperature and humidity sensors instead of SHT20
Hi,
Sure, you can use other temperature and humidity sensors. But of course you will need to change the code and circuit according to your new sensor.
THANKS FOR THE REPLY!!
SHT20 IS ALMOST UNAVAILABLE,SO WILL BE USING DHT11 SENSOR.
CAN YOU SUGGEST THE CHANGES IN ABOVE CODE FOR THE DHT11 SENSOR.
THANKS IN ADVANCE
You’re welcome!
DHT11 is a pretty good choice actually. As I said earlier, you just need to make some changes to the code and circuit. Here is a good tutorial on how you can interface DHT11 sensor with Arduino. You can use it to properly modify the code and wiring.
https://electropeak.com/learn/interfacing-dht11-temperature-humidity-sensor-arduino/
Thanks for that!!
i have setup this project,and included dht11 sensor instead of sht20.The code is fine.
may i know the expected waveforms,during the experiment,when someone is lying or not.
How can we differentiate that from the graph.
Thanks in advance
Hi,
The expected waveforms are the same as the last images shown in this article. The first waveform plotted in blue and the second one plotted in red are the expected waveforms for when someone is telling a truth or a lie, respectively. -Blue for truth and red for lie –
Can u give full details of code how to compile in Arduino
Que archivo o código debería modificar para poder utilizar el modelo DHT11?:(
Hi dear.
You can use several Microcontroller IDE like Arduino or PlatformIO and etc.
here is a good toturail for setup the DHT11 Module
https://electropeak.com/learn/interfacing-dht11-temperature-humidity-sensor-arduino/
good luck
Hii, my question is it necessary SHT20 Temperature and Humidity Sensor Module, can lie detector could work without that sensor?
Hi Nikola,
The SHT20 sensor is primarily used to obtain temperature and humidity readings. While it’s possible to exclude this sensor, many lie detectors also incorporate temperature and humidity measurements alongside other data points.
i need complete info on lie dector
Hi Andrew,
This is a DIY project with limited information available. Additionally, the results may not be very precise.