Introduction: Arduino Polygraph Machine (Lie Detector)
In this project, We’ll try to get some information from the human body by using simple sensors and Arduino. You can use this information to create a lie detector machine. At the end of this article, you :
- 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.
Step 1: an Introduction to Polygraph
You may hear about lie detector machines used by FBI or CIA or any another investigation by police. Today we are going to make one of those machines. First of all, let’s figure out one important fact about the polygraph and the lie detector machine. It’s better to say an important fact about lie detection tests. This test cannot tell us the person is lying or telling the truth, by itself. This is very important. But, how do they rely on polygraph test results?
The main idea of the lie detection test is changing the reaction of the human body between when a person is telling the truth or answering to a normal and routine question like what’s your name?, And his body reaction when he or she is lying. For example when a criminal is going to have a lie detection test the investigator attach sensors on his finger, head or maybe on his chest. These sensors measure the breathing rate, pulse, blood pressure, perspiration and etc.
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.
Step 2: Required Materials
Hardware Components
Software Apps
Step 3: 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.
Attachments
Step 4: 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!
Step 5: 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.
Step 6: Plotter of Arduino
Now, open up the Tools >> Serial Plotter. You can see PULSE and BREATH graphs in the plotter of Arduino.
Step 7: 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.
You can also read this project on ElectroPeak's official website:
8 Comments
4 years ago on Step 1
lie detectors are quite famously bunk science. this is why they're inadmissible in court. they exist purely to scare suspects into a confession. you might as well make an arduino powered dowsing rod, it'd be just as useful.
also I like how you used the word criminal, rather than suspect. just throw the presumption of innocence right out the window. that kind of attitude is why people get wrongly convicted.
Reply 1 year ago
bruh this is an ecg pad hooked up to an arduino, i hardly think we'll be convicting any murderers any time soon
4 years ago
This is an area of technology amateurs should not enter. You are encouraging experimenters to attach themselves and others to electrical equipment without any of the very rigorous safety measures that are legally and medically required, and exposing them to electrocution from potentially faulty equipment or mains services. I don't know if you are aware of all the precautions taken with medical monitoring equipment to ensure adequate electrical isolation, but if you are, or not, this is a very irresponsible article.
4 years ago
This is a great project. My mind was elsewhere with the tech/software...
Sleep Apnea
You could put the ECG on your chest as expected to monitor your breathing rate and do the pulse oxy still. With this and decent software you have yourself a machine which can detect sleep apnea and or other sleeping disorders.
Anxiety...
Another thing this could be used for... helping those with anxiety disorders break habits that start them down the rabbit hole. Apply the ECG to chest to monitor ones breathing rate. People who stress/anxiety a lot tend to shallow breath and or hold their breath (or breath fast). It causes light headiness which then causes more anxiety (vicious cycle). You could pattern ones breathing rates at "rest" and then alert them via vibration or something to let them know when they are starting to get stressed by detecting changes in their breathing patterns (i.e. holding their breath or rapid breathing). With this feedback it could be used as another form of cognitive behavior therapy. Granted this isn't an overnight fix, it'd be a good tool to let people know when they are heading down the path as most don't realize it until it's too late (dizzy).
Anyway, thank you for sharing this. Pretty cool.
4 years ago
I personally feel that there is a "valid" lie detector method with lie detector system that can be validated holistically when considering the internal, boundary and external variables of the system including utilizing basic holistic system life cycle validation methodologies so that the hardware, software, documents (protocols, procedures, methods) and training is all validated/qualified with change controls documented from system design per user requirements on to decommissioning. I won't go into more details... however I do want to comment regarding using the IR method of detection. That is neat to see and thanks for sharing... very neat.
When I worked on the FT-NIR system and other alternative technology materials test systems I stumbled upon NIR helmets being used with methods in equivalent or less than equivalent to traditional MRI ways. There's not much info out in the World noting... though enough to "wow" many into creative insight into potential applications. That leads me into NIR methods like the Open Water Company envisions, though I don't recall work on polygraphs being pursued, for treating and diagnosing health conditions.
These systems are like say a fingerprint analysis test tool. Yeah... a fingerprint analysis test tool doesn't tell us much until you have the fingerprint data from the tool, the fingerprint data from the tool from a large sample set, and ideally the population, in a relational database that can be used to develop and validate methods and the validated methods to qualify the test results.
I also feel there are counter polygraph methods and methods to make variables attributes to effect polygraph examinations failure... even when there is no polygraph exam taking place.
Neat project for sure!
4 years ago
The polygraph so-called "Lie Detector" is pseudoscience.
https://en.wikipedia.org/wiki/Polygraph
4 years ago
While this is an awesome project, I feel it's important to state that polygraphs do NOT detect whether someone is lying "with a high degree of accuracy." In fact, they are mostly used as psychological tools these days, mostly for intimidation. They are not considered admissible evidence in court, and can be easily beaten, or register multiple false "positives." I feel this is important, because someone is bound to try and use this thing to "test" their teenage kids, "prove" their spouse is cheating, or "determine" that their employee is stealing. Any of these scenarios would result in pointless pain and suffering for many people. So I will say this again. GREAT PROJECT. and LIE DETECTORS DO NOT DETECT LIES with any trustworthy degree of accuracy. It is interesting as a curiosity only.
4 years ago on Introduction
Nice! I'll have to show this to my dad, he owns a polygraph examination company and my brother is a polygraph examiner, here in Denver.