"Lie detector" with the NanoV3

Hello together,

in today's post, I'd like to introduce you to an interesting idea.  When browsing through various forums, we have discovered an interesting application that we do not want to refrain from: a lie detector on an Arduino basis. Or: Measuring the skin resistance

In Germany, a serious use of lies detectors is neither legally, nor morally justifiable.  

Polygraphs are colloquially referred to as "lie detectors". Polygraphs have a large number of physical values, such as Atem and heart rate, skin resistance, blood pressure and movements. In combination with the right questions, it is possible to close the activation level so that the proband becomes nervous in the case of certain data. Since it cannot be directly identified as "a lie", this practice is not widespread in Europe. The moral aspect can also not be neglected here, however, who is experimenting with the sensors is certainly surprised by what is possible with it.

Many of these values can be measured with our hardware. So, for example, with the Heartbeat sensor.

In order to get into the subject, a nano and a few LEDs are enough, so we need:

We start with the "sensors":

The wiring is simple:

 NanoV3 Sensor 1 Sensor2 LEDG LEDB LEDR
5V X
GND - - -
D2 +
D3 +
D4 +
A0 X

For the connection of the LEDs, resistance is recommended.

In addition, we connect A0 over a 2.2K resistance with GND of the Nano:

The code is simple:


void setup()
{   Serial.begin(9600);   pinMode(2, OUTPUT);   pinMode(3, OUTPUT);   pinMode(4, OUTPUT);   digitalWrite(2, HIGH);   delay(500);   digitalWrite(3, HIGH);   delay(500);   digitalWrite(4, HIGH);   delay(500);

void loop()
{   if (Analog Read(A0) > 60)   {     digitalWrite(4, HIGH);   }   else   {     digitalWrite(4, LOW);   }   if (Analog Read(A0) > 20)   {     digitalWrite(2, HIGH);   }   else   {     digitalWrite(2, LOW);   }   if (Analog Read(A0) > 45)   {     digitalWrite(3, HIGH);   }   else   {     digitalWrite(3, LOW);   }   Serial.println(Analog Read(A0));   delay(20);


And the result is astonishing:

An unpleasant question was asked at the first call. The last red dot shows my (gelogenes) "no". When adjusting the sketches, please note that the values depend, among other things, on the physical structure (wiring & electrodes) as well as on the individual constitution "of the test piece". Furthermore, there are also other reasons as lies for changing the skin resistance can lead. 

However, I hope to be able to inspire some readers with my contribution. Expand the project by some LEDs or integrate our Heart Beat sensor .... These, and much more hardware, can be found in our shop.

Until the next post:)




Für arduinoProjekte für anfänger




Aus Sicherheitsgründen sollte die Stromversorgung mit Batterie oder Akku erfolgen und es sollte keinerlei Verbindung mit Stromnetz-betriebenen Geräten bestehen. Nicht ohne Grund gelten in der Medizintechnik strenge Vorschriften.

Dieter Ziesel

Dieter Ziesel

man kann aus den Parametern Hautwiderstand und Herzfrequenz sehr zuverlässig auf den Entspannungsgrad schließen. Wenn man z.B. sehr aufgeregt und nervös ist ist der Hautwiderstand niedrig bzw. die Leitfähigkeit hoch, ebenso die Herzfrequenz. Wenn man nun z.B. ruhige Musik hört (oder andere Entspannungsmethidenoden testet) kann man sehr gut feststellen, wie die Entspannung zunimmt, Hautleitfähigkeit und Herzfrequenz nehmen ab. Man hier für sich ermitteln was einem guttut und wie lange es dauert bus man eine Entspannungsphase erreicht. Also sehr nützlich in unseren stressigen Zeiten.
Herzlich Grüße

Leave a comment

All comments are moderated before being published