Introduction: LockCypher

About: Student MCT at Howest (Kortrijk Belgium)

Hello, my name is Jaron Strypsteen and I study New Media and Communication Technology at Howest in Kortrijk, Belgium. For an assignment for school, we needed to make an project. I choice a smart lock that can be opened with RFID and/or barcode. Below you can read all the steps that were necessary to make this tool. If you want to know more about me and other projects I made, check my portfolio.

Step 1: Supplies/Materials/Tools/

Before I started designing the website and making my tool, I needed to make sure that I had all the required parts for my device. I started looking in my toolbox and wrote down what I needed to order. Here you can find the entire bill of material. These are the main parts:

1. RFID-scanner
2. LCD display
3. LED
4. Resistors
5. Solenoid lock
6. Barcode scanner
7. Magnetic sensor
8. Transistor
9. Diode
10. Potentiometer
11. Raspberry pi
12. Wires

Step 2: Wiring

After ordering the components they arrived a few weeks later. So I could start making a schematic and testing all the components to make sure they work.

I connected my LCD as an 8bit device, I can also work as a 4bit device but since I had a few GPIO pins that were unused I decided to go with 8bit. I also used a potentiometer with it so I could adjust the contrast of the LCD.

The RFID-scanner is connected over the SPI bus and needed 5 wires to the Pi

I wanted to use serial communication with a level-shifter for my barcode scanner but the module I ordered was dead on arrival so I got my hand on a USB barcode scanner.

My solenoid lock needed to be connected with a transistor because the lock won't work with 5v it needed 6-12v and I had a 9v power adapter that I could use.

Then I had my LED and magnetic sensor, they both have a resistor in series

Step 3: Database

For keeping logs of my sensors I needed a good database.

I started making a diagram but I decided it was to complex, so I made a simpler but better diagram which was approved of one my teachers.

For creating the diagram and the database I used MySQL Workbench because it makes it easy to convert a diagram to a database

I included a dump of the database so you can take a look.

Step 4: Designing the Website

Before starting the design I took a look online at some websites, after taking a look online I had an idea at how my site should look.

I made my design in Adobe XD which is a easy to use program to make wireframes.

For the colors I used a color generator online and changed the values a bit, they all went through a contrast test and all succeeded.

For the font I used Gidole, I think it has a modern look but not too distracting.

After the design I started to code it in HTML, CSS and JS.

I included my xd file so you can take a look and see the details of it.

Step 5: Code

My project couldn't work without the backend. To make my sensors work I used Python.

I used few libraries that I found online and made myself in school. To serve it to the web I used Flask with SocketIO so the connection with the frontend would be seamless.

There were some problems but all of it was fixable.

You can find my code on this github link. It's currently private but you can see it once my teachers make it public.

Step 6: Housing

For the housing of my project I decided to use wood. I still had some wood at home from an old desk that still needed to be trashed so I used that. I forgot to take pictures of me building it but I used a 40x30cm piece where I cut a door in, then I drilled some holes next to each other so I could route the cables for the sensors through.

Then I put a frame around the door to make it look a bit more clean. But if I had to do it over I would just go to a shop and got some wood.

After making the wooden construction I spray painted it black so it all has the same color and looks better that black and brown.

Once it dried I started putting the components in, I think I did a good job with cable management and placement.