Introduction: Particle Photon Lie Detector

Have you ever suspected someone of deceiving you? Did they stutter? Were they avoiding meeting your gaze? Did they, possibly, start sweating? Looks like it's time to pull out the lie detector! Oh? You don't have one? Don't worry! This will teach you how to make something that'll work similarly! Based on the Arduino Lie Detector tutorial on by BuildItDR.

Step 1: Material List

  • Particle Photon
  • Yellow LED
  • Red LED
  • Green LED
  • Velcro Strips
  • Breadboard
  • Male/Male Wires
  • 100k Resistor (a 10k Resistor works as well)

Step 2: Placement of the Particle Photon

Position the Photon in the center and towards the end of the breadboard, with the microUSB port facing away from the breadboard.The pins on either side of the Photon should be 2 spaces away from either edge of the breadboard. It makes no difference if the Photon is placed on one end of the breadboard or the other, as long as the port is facing away, and the pins are evenly spaced.

Step 3: Wiring

  1. Connect the ground and GND pin.
  2. Connect pins D2, D3, and D4 to their respective LED pins.
  3. Place negative prong of the LEDs into the ground. (The photon uses a voltage of 3.3V, which is will not require the use of resistors for the LEDs.)
  4. Connect a wire from the 3.3V pin of the Photon and place it on any area on the breadboard.
  5. Connect the first wire to a second wire with a 100k resistor. (10k will also work, as stated by the original article, but using a 100k resistor will give a wider array of results.)
  6. Connect a wire to the A0 pin on the Photon.
  7. Leave the unconnected wires alone.

Step 4: The Code

void setup()

{ Serial.begin(100000);

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() {

String lie = String(analogRead(A0));

Particle.publish("lie", lie, PRIVATE);


if (analogRead(A0) >= 1760)

{ digitalWrite(4, HIGH);

digitalWrite(2, LOW);

digitalWrite(3,LOW); }

else { digitalWrite(3,LOW);


digitalWrite(4, LOW); }

if (analogRead(A0) >= 1510 & analogRead(A0) <= 1750)

{ digitalWrite(3, HIGH);

digitalWrite(2, LOW); }

else { digitalWrite(3, LOW); }

if (analogRead(A0) >= 1 & analogRead(A0) <=1500)

{ digitalWrite(2, HIGH); }

else {

digitalWrite(2,LOW); }

Serial.println(analogRead(A0)); delay(20);


Step 5: Finger Clamps

Once the actual lie detector is functioning, we can make the finger clamps. these will help the lie detector get more reliable results, as they will completely wrap around your fingers and get a full reading. They are simple to make; you take the 2 velcro strips that you acquired, and you measure out a corresponding amount of tinfoil that fill be glued to the side of the velcro that doesn't have the bristles. Once you have done this for both sets of velcro strips, you will then, attach both parts of the velcro strip together so that they wrap around your finger and have a firm grip. Now, place the end of one of the two unconnected wires onto the tinfoil of the strip, and then secure it with another piece of tinfoil on top of the wire and securing in with electric tape. Do this for both finger clamps.

Step 6: Done!

You now have a fully functioning lie detector. To view the results as they are being detected, you can open the Arduino IDE and use the serial monitor. It will actively show the values as a graph, which you can use to determine any sudden change in the data. If you don't have the Arduino IDE, I recommend that you download it, as its free and incredibly useful.

Now, just because this states that the project is a lie detector, it does not mean that it is 100% accurate. This is simply a reproduction of a simple lie detector. There are other factors that can cause the values to rise and/or spike, such as being very nervous, fidgeting, wearing the clamps for long periods of time, or even having sweaty hands. As such, I wouldn't recommend using it in a life or death scenario.

An enclosure to place the detector in is optional. However, it can add to the aesthetic and keep your device safe.