Lie Detector

by thomas_uyttenhove in Circuits > Raspberry Pi

623 Views, 1 Favorites, 0 Comments

Lie Detector

IMG_20220620_145424.jpg

As a multimedia and communication technology student at Howest Kortrijk, I need to create my own IoT project. This will combine all first year modules into one large project. I've noticed all over the world that my problem is that people lie too much, so I decided to build a lie detector.

A lie detector is a device that uses your heart rate, sweat level, and temperature to measure whether a user is lying. When assuming a lie, the lie detector will play a sound via a buzzer. A graph is visible on the web app with the measured values of the sensors and a history of measured recordings!


Supplies

IMG_20220607_035442.jpg

In my Bill of materials you can find everything I used and the price it costs!

The Housing

unknown.png

I decided to 3D print my Housing, Because its seems easier and more intresting to build. I first started sketching how I wanted the case to look, then I designed it in tinkercad, finally i 3D printed it.

Fritzing

Breadbord_schema_V2.png

Before we can start on anything else, we need to get a "prototype plan" ready. In this case, we make a fritzing schema. Just so we know exactly how everything will be connected and we can use this as a guideline later on.


Normalized Database

unknown2.png

To log and store sensor data I have designed my own database which contains 5 tables.

The EER diagram is shown in the image above.

1.Table Gebruikers

In this table gebruikers I store the users who log into my website.

2.Table Sessies

In these table sessies I store every recording a user makes per user.

3.Table Historiek

In this table history I store each sensor values associated with their session, device and action.

4.Table Devices

In this table devices I store all information about each device.

5.Table Acties

In this Actions table I store which actions there are.


Writing the Code

IMG_20220620_154137.jpg

Writing the backend

I used Visual Studio Code for my whole backend, you just need to make sure your Visual Studio project is connected to your Raspberry Pi, this means your LAN cable has to be connected to your RPi and to make an SSH connection.


Writing the frontend

Now that the backend is done, we can start writing the full front-end.

I firstly made the desktop version and then worked on the tablet and mobile version. After finishing my design I worked on getting everything functional with javascript.

You can find all my code in my github: github