Skip to main content

Lie Detector

Lie Detector

How can an Evil Genius be sure that their prisoners are telling the truth? By using a lie detector, of course. This lie detector (see Figure) uses an effect known as galvanic skin response. As a person becomes nervous—for example, when telling a lie—their skin resistance decreases. We can measure this resistance using an analog input and use an LED and buzzer to indicate an untruth. We use a multicolor LED that will display red to indicate a lie, green to indicate a truth, and blue to show that the lie detector should be adjusted by twiddling the variable resistor.


There are two types of piezo buzzers. Some are just a piezoelectric transducer, while some also include the electronic oscillator to drive them. In this project we want the former type without the electronics, as we are going to generate the necessary frequency from the Arduino board itself. Hardware The subject’s skin resistance is measured by using the subject as one resistor in a potential divider and a fixed resistor as the other. The lower their resistance, the more analog input 0 will be pulled towards 5V. The higher the resistance, the closer to GND it will become.
The piezo buzzer, despite the level of noise these things generate, is actually quite low in current consumption and can be driven directly from an Arduino digital pin. This project uses the same multicolor LED as Project 14. In this case, however, we are not going to blend different colors but just turn one of the LEDs on at a time to display red, green, or blue. Figure shows the schematic diagram for the project and  the breadboard layout. The variable resistor is used to adjust the set point of resistance, and the touch pads are just two metal thumbtacks pushed into the breadboard.
Schematic  
Bread Board Connection

Software

The script for this project x` just has to compare the voltage at A0 and A1. If they
are about the same, the LED will be set to green. If the voltage from the finger sensor (A0) is
significantly higher than A1, the variable resistor will indicate a fall in skin resistance, the LED will
change to red, and the buzzer will sound. On the other hand, if A0 is significantly lower than A1,
the LED will turn blue, indicating a rise in skin resistance. The buzzer requires a frequency of about 5KHz or 5000 cycles per second to drive it. We accomplish this with a simple for loop with
commands to turn the appropriate pin on and off with delays in between.

int redPin = 9;
int greenPin = 10;
int bluePin = 11;
int buzzerPin = 7;
int potPin = 1;
int sensorPin = 0;
long red = 0xFF0000;
long green = 0x00FF00;
long blue = 0x000080;
int band = 10;
// adjust for sensitivity
void setup()
{
pinMode(potPin, INPUT);
pinMode(sensorPin, INPUT);
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
pinMode(buzzerPin, OUTPUT);
}
void loop()
{
int gsr = analogRead(sensorPin);
int pot = analogRead(potPin);
if (gsr > pot + band)
{
setColor(red);
beep();
}
else if (gsr < pot - band)
{
setColor(blue);
}
else
{
setColor(green);
}
}
void setColor(long rgb)
{
int red = rgb >> 16;
int green = (rgb >> 8) & 0xFF;
int blue = rgb & 0xFF;
analogWrite(redPin, 255 - red);
analogWrite(greenPin, 255 - green);
analogWrite(bluePin, 255 - blue);
}
void beep()
{
// 5 Khz for 1/5th second
for (int i = 0; i < 1000; i++)
{
digitalWrite(buzzerPin, HIGH);
delayMicroseconds(100);
digitalWrite(buzzerPin, LOW);
delayMicroseconds(100);
}
}


Putting It All Together Load the completed sketch from your Arduino Sketchbook and download it to the board To test the lie detector, you really need a test subject, as you will need one hand free to adjust the knob. First, get your subject to place two adjoining fingers on the two metal thumbtacks. Then turn the knob on the variable resistor until the LED turns green. You may now interrogate your victim. If the LED changes to either red or blue, you should adjust the knob until it changes to green again and then continue the interrogation.

Happy "DIY"ing💀

Comments

  1. Sands Casino - Las Vegas, NV, USA | Review & Map
    Sands Casino is an 바카라 all new Vegas Strip 샌즈카지노 casino that features an exclusive $100 Million Design and a 1xbet $100 Million Welcome Package.

    ReplyDelete

Post a Comment

Popular posts from this blog

Arduino Based Digital IC Tester Using MATLAB

Arduino Based Digital IC Tester Using MATLAB                             Testing of digital electronic systems generally involves applying a set of test stimuli to inputs of the device-under-test (DUT) and analysing responses of the system using a response analyser. If the DUT generates correct output responses (also called the golden response) for all the input stimuli, the DUT is regarded as fault-free. Those DUTs that fail to meet the golden response are regarded as faulty or defective. Block diagram for testing a device is shown in Fig. 1. Fig. 1: Block diagram for testing a device This project describes testing of 74xx series digital ICs using a MATLAB graphical user interface (GUI) drop-down menu based approach. MATLAB acts as the test stimuli generator to the IC, which is the DUT. The GUI initiates communication with the Arduino and provides a user-friendly and interactive approach to conduct the test. The MATLAB source program (ic_tester.m) acts as the respo