Introduction: Lie Detector and Biofeedback Arduino Based

This tutorial will explain how to build a machine for biofeedback. But first a bit of theory.

What is biofeedback?

[Font: Wikipedia |]

Biofeedback is the process of gaining greater awareness of many physiological functions primarily using instruments that provide information on the activity of those same systems, with a goal of being able to manipulate them at will. Some of the processes that can be controlled include brainwaves, muscle tone, skin conductance, heart rate and painperception.
Biofeedback may be used to improve health, performance, and the physiological changes that often occur in conjunction with changes to thoughts, emotions, and behavior.

Step 1: List of Materials

Step 2: Mount the LCD Screen

First we begin to build the electronic circuit on breaboard. We put all the components starting from the LCD.

We pay attention to where we insert the display on the breadboard.

This kind of LCD work on 5V with 16 columns and 2 rows. You can also use this module with keypad.

Follow the image to link the 10 pin to VCC, GROUND, POTENTIOMETER and 6 Arduino pin.

When you have connected the LCD to the Arduino board try to this LCD Example sketch and see the result. Go to and download the sketch.

Step 3: Mount Sensors

Ok now you can mount the sensors. The TMP36 have 3 pin. Two for alimentation VCC and GND, and une for measurement. You can put the VCC pin and GND pin on the breadboard's VCC-GND pin. After put the measurement pin on the Arduino's A1 pin.

Step 4: GSR Sensor

After this mounting you can create a GSR sensor. You can use two copper pieces. If you live in Europe, you can use the 1 or 2 euro money like in figure.

Put the pin of the copper pieces like in figure. Use a 220k Ohm resistor between GND and A0 Arduino pin.

Step 5: Upload the Sketch

Double check that everything is ok in the electronic circuit. Check especially the pins VCC and GND. Check that they are not reversed. Take your time for this control. The risk is to burn Arduino and electronic components used. When you finish this stage you just have to upload the sketch on the Arduino board. Click the link: Go Upload!

Step 6: Operating Instructions

When away from the Arduino biofeedback appear on the screen you'll see the welcome screen. Keep your fingers between the temperature sensor TMP36 and supports the index finger and ring finger on the copper pieces. And then you can see how the device will begin to measure your vital signs like temperature and heart skin conductance.

On the screen you can read the current GSR temperature value, the maximum value GSR skin conductance and the time elapsed since the machine.

You can open the serial port of your computer and read the value on the screen. After 1 second the value are updated. You can create the report of entire measurement session. Like in photo.

Also on Arduino Biofeedback Github repository you can find a Processing sketch for use a Processing graphical interface. View the GSR view value on the X Y diagram.


Rebecca Dsouza made it! (author)2017-07-09

I made it for my college project. I used LM35.

masteruan made it! (author)masteruan2017-07-10


SamarH1 made it! (author)2017-04-05

there is an error in processing sketch in the line

myPort = new Serial(this, Serial.list()[3], 9600);

the error says:


please help...

i m waiting...

masteruan made it! (author)masteruan2017-04-09

This is the number of your serial port. Try 0 or 1 or 2

SamarH1 made it! (author)SamarH12017-04-14

i already tried that but in vain..:(

NihalJ5 made it! (author)2017-03-27

I'm using atnega 16 A for this project.. can you guide meabout the corresponding code for that..

masteruan made it! (author)masteruan2017-03-28

I tink it's the same code...

stevew17 made it! (author)2017-03-23

I did not check the baud rate but I am starting over from scratch this time double checking the baud...I believe the project was working fine except for the graph plotting...I was getting output values on the 16 x 2 lcd with all three sensors responding appropriately to both temperature and skin conductivity .

masteruan made it! (author)masteruan2017-03-24

This Arduino sketch print the data on serial. But you can't use this with serial plotter, but you can use serial monitor.

JamalS23 made it! (author)2017-03-22


thank you alot for everything

I wonder what the usefulness of a MAX GSR value ?

JamalS23 made it! (author)JamalS232017-03-24

and i wanna ask if there is an any limti of gsr value that we can understand that the subject is lying ?
and what is the unit of gsr value is ohm or what ?

thank you

masteruan made it! (author)masteruan2017-03-24

Dear, I don't know the gsr limits. But I think that the focus of the question is the rapid change of value after a lie.

NihalJ5 made it! (author)2017-03-20

I'm using a DHT 11 SENSOR, how's the code going to change for that.

masteruan made it! (author)masteruan2017-03-21

You can use the Adafruit sensor Library and DHT-11 library. Try Test Example.

NihalJ5 made it! (author)NihalJ52017-03-21

Can you tell me step by to do it

stevew17 made it! (author)2017-03-19

I cannot get my output to the serial monitor. I copied and pasted sketch as suggested but I only see output on 16 x 2 lcd display, Can anyone help ?

masteruan made it! (author)masteruan2017-03-21

Have you settingup the serial to 9600 baud?

NihalJ5 made it! (author)2017-03-05

In that's the coding going to differ..and is there anything we can add to it..i mean..another feature...actually i wana make it my btech project

masteruan made it! (author)masteruan2017-03-09

If you want use DHT-11 you can use the Adafruit DHT Arduino Library

mdestructable made it! (author)2016-01-16

Thanks for the fun instructable! I did this with my boys and they thought it was pretty cool. I was short on breadboards so we quickly soldered everything up (soldering lesson too) - it's kind of a mess, but it works fine! I also ended up using a DHT11 in the end and made a few other minor updates. I had some flexible copper labels that I used to make tighter fitting finger sensors. I can upload the sketch somewhere if anybody is interested.

NihalJ5 made it! (author)NihalJ52017-03-07

Hey @mdestructible, I'm pretty much interested to know how you did it.. moreover I too suffer the same problem ,the non availability of tmp36.. so kindly guide me ..

masteruan made it! (author)masteruan2016-01-17

Woow great work!

NihalJ5 made it! (author)2017-03-03

I mean what apart from tmp 35/36 ..

masteruan made it! (author)masteruan2017-03-04

You can use the DHT-11

NihalJ5 made it! (author)2017-03-02

What alternatively can be used in place of tmp35/ this project?

masteruan made it! (author)masteruan2017-03-03


SamarH1 made it! (author)2016-12-24

how to get the biofeedback graph on laptop... complete steps please..

masteruan made it! (author)masteruan2016-12-27

Great idea! You can use Processing for example...

AdamK15 made it! (author)2016-11-05

hi, kindly help me that which one is final complete code??? and after uploading code what this project do.. means i cant understand about GSR, how can i understand that the man is telling lie? please help me

masteruan made it! (author)masteruan2016-11-06

It's the final code.
The GSR is a value of skin conductance. When a person tells lies, in many cases, he have an increase of arousal. One of the reactions of arousal is the sweat, and an increase of sweat is equal an increase of GSR.

at_amelia made it! (author)2016-09-11

where would I find a breadboard and a temperature sensor TMP36

masteruan made it! (author)masteruan2016-09-11

Hi dear,
You can buy the tmp sensor here:
And the breadboard here:

ekdikitis112 made it! (author)2016-06-29

what kind of jumper wires can i use do i need only male to male or do i need male to female jumper wires

masteruan made it! (author)masteruan2016-06-29

For what?

Arturo osuna made it! (author)2016-04-11

hey, i need some help, the skecth for processing doesnt work for me, the error is here ,it says

myPort = new Serial(this, Serial.list()[3], 9600);


masteruan made it! (author)masteruan2016-04-15

Hi Arturo,
you can define the number of serial by the serial output.
After change the number of Serial.list()[number])

MonimaC made it! (author)2016-03-14

Hey !! Thank you so much for this project !! Its good indeed ! Would try it definitely !

masteruan made it! (author)masteruan2016-03-17

Thank's !

JafarS5 made it! (author)2016-02-24

plz can u help me with the gsr part??i dont want to include temperature.

my project is based on could u kindly help me out.can u provide circuit details and connections

my mail

masteruan made it! (author)masteruan2016-03-04

Hi, in the project there are all informations :-)

JafarS5 made it! (author)2016-02-24

plz can u help me with the gsr part??i dont want to include temperature.

my project is based on could u kindly help me out.can u provide circuit details and connections

nsoclo made it! (author)2016-01-18

can you show me, how i can judge someone lie? from this tool? in your code is nothing. ty sir

masteruan made it! (author)masteruan2016-01-20

Yes, if you read a big difference in the bio signal of the subject, probably the subject is a liar.

youssefelmarasy made it! (author)2015-12-29

Hi do you have a file for the sketch to work with the arduino app ??

youssefelmarasy made it! (author)2015-11-24


youssefelmarasy made it! (author)2015-11-23

What should the lcd do when I test it? Should it show blocks?

masteruan made it! (author)masteruan2015-11-23

follow this:

Arduino connect
LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2

Arduino code:


// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12,11,5,4,3,2); // see the connections

// set up the LCD's number of columns and rows:
// Print a message to the LCD.
lcd.print("hello, world!");

// Turn off the display:
// Turn on the display:


Statonwest made it! (author)2015-11-10

This may be oblivious, but where do you place the TMP36. On the wrist, palm, arm?

masteruan made it! (author)masteruan2015-11-11

You can put the TMP36 on the palm. A solution is adapt the temperature. In the future I want use a better sensor like DHT_11.

About This Instructable




More by masteruan:Arduino Edit, Compile, Upload, Read Serial by LInux Pocket ChipMeteo Node IoT Smart Meteo StationO-Zone: DIY Bluetooth Battery Lamp
Add instructable to: