Blueprint

Desk Lock

A cheap desk lock that unlocks with an NFC card.

Created by NightshadeXD NightshadeXD

Tier 4

8 views

0 followers

CAN CAN ⚡🚀 approved Desk Lock ago

Tier approved: 4

Grant approved: $53.00

awesome

NightshadeXD NightshadeXD submitted Desk Lock for ship review ago

NightshadeXD NightshadeXD added to the journal ago

update readme + added electronics cad

added a new image of cad to readme, and a short section emphasizing that i did indeed have case cads for every part of my project so that doesn't happen again (also some electronic cads too)

image

Tanuki Tanuki ⚡🚀 requested changes for Desk Lock ago

good work! can you please include electronics in the cad in the readme and files? I also still dont see the case for many of the components that may need one: this includes the servo (if its just being hotglued to the desk, a 3d print can probably make these more adhesive due to more surface contract and not harm the servo) and the NFC card reader. I really like the idea!

NightshadeXD NightshadeXD submitted Desk Lock for ship review ago

NightshadeXD NightshadeXD added to the journal ago

small updates to nfc card

in the best interest to reduce pcba costs as much as possible, i swapped out 2 components to corresponding components that were basic on jlcpcb to reduce 6 whole dollars :) (2 per extended component)

also some small updates to readme to make stuff more clear

image
(still looks visually the same tho)

CAN CAN ⚡🚀 requested changes for Desk Lock ago

Please include all of the parts you are buying in the screenshots

NightshadeXD NightshadeXD added to the journal ago

cad servo stuff + case

image

did what the title said: got servo case cad so its easier to glue onto the desk + found the servo fits nicely

also put all the cads i did onto the github

NightshadeXD NightshadeXD added to the journal ago

Put some components into the cad

I found a few components online and I put them in their respective positions in the CAD, and I had to adjust some dimensions but it wasn't too bad.
One issue tho was that I mislabed the LDR and 10k resistor text but i fixed it

image

NightshadeXD NightshadeXD added to the journal ago

+ readme stuff

also from tanuki:
i described the project in more detail in the readme.

i added:

  • jobs of each and every components
  • how everthing works together
  • + the cad i just did

old cad image bc nothing really new i js had this extra readme
image

NightshadeXD NightshadeXD added to the journal ago

tanuki begged me to add a cad

so i cadded a case for the main parts that might need one since these would be housed in the desk itself.

  • esp32 case: partially inspired by someone else, but a lot of changes made by me.
    • features: nice looking, support on the back by 2 screws, pins open to air + exposed. usb port
  • i also cadded the photoresistor + resistor case since the photoresistor will always have to stand straight up to detect light
    • lots of measurements were from random sources so unsure about quality

heres an image of it:
image

NightshadeXD NightshadeXD submitted Desk Lock for ship review ago

Tanuki Tanuki ⚡🚀 requested changes for Desk Lock ago

Hey! Can you please include what exactly is being bought in the cart screenshots? Feel free to DM me! I dont understand why this is 23 dollars. Your journal is descriptive, and that's nice!

NightshadeXD NightshadeXD submitted Desk Lock for ship review ago

NightshadeXD NightshadeXD added to the journal ago

added designs for a long time

i did a lot of design thingies

  1. i changed nfc card to my name
  2. then i changed my name to a cool looking font
  3. I added a github qr code to my account
  4. and a chevron arrow thingy that points to the github
  5. Added my name + profile to the back side
  6. Added the large github qr to the back too
  7. Added nice round rectangular border around the antenna + on the back side
  8. also i wrote "zsharpminor is my opp" in the bottom left corner - this counts as art i made

image

zsharpminor zsharpminor requested changes for Desk Lock ago

Hi, please add JUST A TAD MORE art on your PCB!!! We're looking for something you created yourself - so ideally a vector image you made, not something you found online. Thanks!

NightshadeXD NightshadeXD submitted Desk Lock for ship review ago

NightshadeXD NightshadeXD added to the journal ago

did what they said

  1. sure, if i can figure out how. I searched online and couldn't find any good methods to turn easyeda files into kicad files. but after a while i realized i could just open it in kicad anyway idk why this
  2. there is already a bom in csv format in the repo with links and price and qty: https://github.com/22yeets22/Desk-Lock/blob/main/BOM.csv
  3. alright sure - i added 2 more things: the hack club logo and the nfc scan tag thing, as well as a little light bulb icon - i can't think of anything else. Also I moved the ic and capacitor to the side since I was worried that they may hit when the user taps their card.

image

alright i put everything on github

Iamalive Iamalive 🚀 requested changes for Desk Lock ago

Hey, awesome project, but I'm going to have to ask you to fix 3 things to get this approved. 1: Upload each kicad file instead of uploading it as a .epro, 2: change your bom to a .csv format and have everything you're purchasing along with a link to the item and its price, and 3: have some more custom art on your nfc card, 3-5 unique things is needed! If you can do all that, this project would be perfect to submit :)

NightshadeXD NightshadeXD submitted Desk Lock for ship review ago

PenguinMo PenguinMo requested changes for Desk Lock ago

Please update the grant cost to match the total , besides that you should not need to fix anything

NightshadeXD NightshadeXD submitted Desk Lock for ship review ago

Sidd Sidd 🚀 requested changes for Desk Lock ago

Looking good! However, you need to change the amount of PCBs that are getting assembled from 5 to 2 to save costs.

NightshadeXD NightshadeXD submitted Desk Lock for ship review ago

NightshadeXD NightshadeXD added to the journal ago

more pain

while trying to get this into revewing, i was trying to get an order in on jlcpcb but alas, the components were too fucked up

LIKE WHAT DO YOU WANT ME TO DO EASYEDA
oh, you don't want me to connect it
image
oh, you want me to connect it
image
why are there random x's everywhere

but im pretty sure i'll just ignore it

then when i went to submit it, it kept telling me that the compoennts i used for the antenna was wrong, but when i skipped the message, it showed up fine?

anyways i went back and tried searching for more parts that might work, but i just gave up and slightly changed the routing to hopefully make it less cranky and save some copper then i put that on github

(still looks 99% the same tho)
image

goodbye morning

NightshadeXD NightshadeXD added to the journal ago

NOTE TO REVIEWERS + update readme

Note to Reviewers:

In the Blueprint guidelines, one requirement is a "complete CAD assembly." However, this is unreasonable for my project, as it assumes a standalone, enclosed product. My project will NOT go into a case. Instead, my components are mounted into the desk itself, at specific locations required for proper operation. These positions differ for each desk, so a single CAD assembly would not be beneficial. Component placement depends on the desk setup, and different dimensions and layouts require different mounting positions that a CAD cannot capture. Therefore, producing a CAD assembly would be unproductive and would not contribute to the design.

Readme stuff

I created the github repo, wrote out motivation in the readme, and added the wiring diagram, photos of the NFC card schematic, 3D, and PCB in there. I also uploaded the NFC Card's actual .epro file so other people don't have to manually recreate it. And I also uploaded the program into it and sorted the folders nicely.

also i did the github and stuff (i didnt want to put it in a different entry) - like the bom and whatnot

Heres a picture of wiring diagram
image

NightshadeXD NightshadeXD added to the journal ago

writing up the bom

I looked for specific parts of modules I didn't link before, like the PN532 and the ESP32. I made sure to find the cheapest options that I could.

bom:

I'll fill in the prices later, they're wonky right now.
upd: i did it, also updated the github

image

NightshadeXD NightshadeXD added to the journal ago

writing some code

I began to write the code, which required digging through a lot of random articles and weird websites.

However some problems I ran into while writing the code were that:

  1. this reddit post says that i2c on the pn532 doesn't really work with the esp32, so i may have to switch it for SPI instead
  2. shutting down and starting the pn532 back up every 2.5 seconds is really sketchy, but it should save some power. (im not sure if the command to shut down is right)

Features:

  • It saves power by keeping the pn532 in power down mode for most of time
  • Locks automatically when the brightness sensor is low.
  • Reads NFC card of course

Check github for code.

image

NightshadeXD NightshadeXD added to the journal ago

More wiring diagram.

I updated the wiring diagram with the photoresistor part which determines the correct time to close the drawer again.

Then I also found some parts on aliexpress:

image

NightshadeXD NightshadeXD added to the journal ago

Wiring Diagram + Part Changes and Research

While going making the wiring diagram, I went down a rabbit hole trying to figure out how to completely minimize the current draw to make it as low power as possible. The pn532 reader draws around 50mA when polling for boards. I figured having something to trigger the board to turn on would be more power efficient, like using a button the enable the board. I also considered some other alteratives like maybe even a fingerprint reader but I've already designed the NFC card.

I just decided that in the code, I would poll the card slower to use less energy.

After doing some more research on parts, I figured that the MG996R servo would be a better alternative since it is stronger and can also be found for cheap.

Then I had to consider the power supply, which I never did before. At first, I was thinking of one of the many cheap aliexpress power supplies that take AC and turn it to DC. However, then I had the brilliant idea to use a usb A cable. However, as I was putting the wiring diagram together, I thought to myself "will the motor draw more power then the cable can handle?" and the answer was yes :(
ah oh well that's a later problem

image

NightshadeXD NightshadeXD added to the journal ago

Looked for more parts

Now that I've designed the PCB for the card, I need to design the other part - the actual reader module that also unlocks the desk.

At first, I was thinking of putting the entire reader module on my own designed pcb, but then I realized I'll need a whole microcontroller to power it, and I'll have to look through hours of documentation and random stuff. This didn't seem really fun to me, so I decided to go the sane route and use a ESP32.

I've decided to use the PN532 module for receiving the signal, and connect it with I2C.

A problem is that it draws 100mA when active, but I would like this to have as low a current as possible, which means we'll probably have to add something to power the card reader (like a distance sensor maybe). I've also considered a capacitive touch senso,r which uses virtually no power. (or maybe we ditch the whole thing and just use a fingerprint sensor)

I've also begun looking at the motors:
I think a MG90 servo would work nicely, since it has enough torque and speed. The external power supply will be providing 5V, enough to drive it.

image

NightshadeXD NightshadeXD added to the journal ago

Routed schematic

I routed the schematic. There's really not much to say.
However, I did run into one issue where for some reason easyeda kept thinking that the connections to the antenna was incorrect. This was really weird, but I was like 99% sure I did everything right.
I spent a while trying to figure out the problem but I couldn't. Oh well
Then I added my designs to the card.

Here is the final product
image

NightshadeXD NightshadeXD added to the journal ago

NFC Card schematic

So I decided I wanted to make my own NFC Card (even tho there's stuff on aliexpress), making it yourself is cooler.
So I found a tutorial for it. I did my best to not copy it exactly, but there's not a lot you can do when there's like 5 components.

Initially I followed exactly like their tutorial, but after doing some calculations myself and reading through the chip's datasheet, I realized that the resistor probably had too low of a resistance and would pull too much current, so I changed it. I also changed the LED to a different one.

Here's what my schematic looks like:
image

NightshadeXD NightshadeXD added to the journal ago

Idea Overview + Planning

I've been thinking about this idea for a while.
So I have a desk, and I have a lot of important stuff in that desk. And my little brother is very very naughty. So, I want to build a desk lock to lock that desk, and only unlock it with a nfc card (or maybe fingerprint).

Here's what I'm thinking:
NFC reader reads data, sent to arduino (or maybe pi pico or ESP32).
The controller drives a servo motor which unlocks the desk.
There will be a photoresistor or maybe a distance sensor to detect when the desk closes, after which, the desk will lock again.

yeah i didnt know what to put.
image

NightshadeXD NightshadeXD started Desk Lock ago

1/1/2026 7:11 PM - Idea Overview + Planning

I've been thinking about this idea for a while.
So I have a desk, and I have a lot of important stuff in that desk. And my little brother is very very naughty. So, I want to build a desk lock to lock that desk, and only unlock it with a nfc card (or maybe fingerprint).

Here's what I'm thinking:
NFC reader reads data, sent to arduino (or maybe pi pico or ESP32).
The controller drives a servo motor which unlocks the desk.
There will be a photoresistor or maybe a distance sensor to detect when the desk closes, after which, the desk will lock again.

yeah i didnt know what to put.
image

1/1/2026 7:37 PM - NFC Card schematic

So I decided I wanted to make my own NFC Card (even tho there's stuff on aliexpress), making it yourself is cooler.
So I found a tutorial for it. I did my best to not copy it exactly, but there's not a lot you can do when there's like 5 components.

Initially I followed exactly like their tutorial, but after doing some calculations myself and reading through the chip's datasheet, I realized that the resistor probably had too low of a resistance and would pull too much current, so I changed it. I also changed the LED to a different one.

Here's what my schematic looks like:
image

1/1/2026 7:40 PM - Routed schematic

I routed the schematic. There's really not much to say.
However, I did run into one issue where for some reason easyeda kept thinking that the connections to the antenna was incorrect. This was really weird, but I was like 99% sure I did everything right.
I spent a while trying to figure out the problem but I couldn't. Oh well
Then I added my designs to the card.

Here is the final product
image

1/1/2026 10 PM - Looked for more parts

Now that I've designed the PCB for the card, I need to design the other part - the actual reader module that also unlocks the desk.

At first, I was thinking of putting the entire reader module on my own designed pcb, but then I realized I'll need a whole microcontroller to power it, and I'll have to look through hours of documentation and random stuff. This didn't seem really fun to me, so I decided to go the sane route and use a ESP32.

I've decided to use the PN532 module for receiving the signal, and connect it with I2C.

A problem is that it draws 100mA when active, but I would like this to have as low a current as possible, which means we'll probably have to add something to power the card reader (like a distance sensor maybe). I've also considered a capacitive touch senso,r which uses virtually no power. (or maybe we ditch the whole thing and just use a fingerprint sensor)

I've also begun looking at the motors:
I think a MG90 servo would work nicely, since it has enough torque and speed. The external power supply will be providing 5V, enough to drive it.

image

1/2/2026 5 PM - Wiring Diagram + Part Changes and Research

While going making the wiring diagram, I went down a rabbit hole trying to figure out how to completely minimize the current draw to make it as low power as possible. The pn532 reader draws around 50mA when polling for boards. I figured having something to trigger the board to turn on would be more power efficient, like using a button the enable the board. I also considered some other alteratives like maybe even a fingerprint reader but I've already designed the NFC card.

I just decided that in the code, I would poll the card slower to use less energy.

After doing some more research on parts, I figured that the MG996R servo would be a better alternative since it is stronger and can also be found for cheap.

Then I had to consider the power supply, which I never did before. At first, I was thinking of one of the many cheap aliexpress power supplies that take AC and turn it to DC. However, then I had the brilliant idea to use a usb A cable. However, as I was putting the wiring diagram together, I thought to myself "will the motor draw more power then the cable can handle?" and the answer was yes :(
ah oh well that's a later problem

image

1/2/2026 7 PM - More wiring diagram.

I updated the wiring diagram with the photoresistor part which determines the correct time to close the drawer again.

Then I also found some parts on aliexpress:

image

1/2/2026 9 PM - writing some code

I began to write the code, which required digging through a lot of random articles and weird websites.

However some problems I ran into while writing the code were that:

  1. this reddit post says that i2c on the pn532 doesn't really work with the esp32, so i may have to switch it for SPI instead
  2. shutting down and starting the pn532 back up every 2.5 seconds is really sketchy, but it should save some power. (im not sure if the command to shut down is right)

Features:

  • It saves power by keeping the pn532 in power down mode for most of time
  • Locks automatically when the brightness sensor is low.
  • Reads NFC card of course

Check github for code.

image

1/3/2026 8 AM - writing up the bom

I looked for specific parts of modules I didn't link before, like the PN532 and the ESP32. I made sure to find the cheapest options that I could.

bom:

I'll fill in the prices later, they're wonky right now.
upd: i did it, also updated the github

image

1/3/2026 9 AM - NOTE TO REVIEWERS + update readme

Note to Reviewers:

In the Blueprint guidelines, one requirement is a "complete CAD assembly." However, this is unreasonable for my project, as it assumes a standalone, enclosed product. My project will NOT go into a case. Instead, my components are mounted into the desk itself, at specific locations required for proper operation. These positions differ for each desk, so a single CAD assembly would not be beneficial. Component placement depends on the desk setup, and different dimensions and layouts require different mounting positions that a CAD cannot capture. Therefore, producing a CAD assembly would be unproductive and would not contribute to the design.

Readme stuff

I created the github repo, wrote out motivation in the readme, and added the wiring diagram, photos of the NFC card schematic, 3D, and PCB in there. I also uploaded the NFC Card's actual .epro file so other people don't have to manually recreate it. And I also uploaded the program into it and sorted the folders nicely.

also i did the github and stuff (i didnt want to put it in a different entry) - like the bom and whatnot

Heres a picture of wiring diagram
image

1/4/2026 - more pain

while trying to get this into revewing, i was trying to get an order in on jlcpcb but alas, the components were too fucked up

LIKE WHAT DO YOU WANT ME TO DO EASYEDA
oh, you don't want me to connect it
image
oh, you want me to connect it
image
why are there random x's everywhere

but im pretty sure i'll just ignore it

then when i went to submit it, it kept telling me that the compoennts i used for the antenna was wrong, but when i skipped the message, it showed up fine?

anyways i went back and tried searching for more parts that might work, but i just gave up and slightly changed the routing to hopefully make it less cranky and save some copper then i put that on github

(still looks 99% the same tho)
image

goodbye morning

1/7/2026 - did what they said

  1. sure, if i can figure out how. I searched online and couldn't find any good methods to turn easyeda files into kicad files. but after a while i realized i could just open it in kicad anyway idk why this
  2. there is already a bom in csv format in the repo with links and price and qty: https://github.com/22yeets22/Desk-Lock/blob/main/BOM.csv
  3. alright sure - i added 2 more things: the hack club logo and the nfc scan tag thing, as well as a little light bulb icon - i can't think of anything else. Also I moved the ic and capacitor to the side since I was worried that they may hit when the user taps their card.

image

alright i put everything on github

1/15/2026 - added designs for a long time

i did a lot of design thingies

  1. i changed nfc card to my name
  2. then i changed my name to a cool looking font
  3. I added a github qr code to my account
  4. and a chevron arrow thingy that points to the github
  5. Added my name + profile to the back side
  6. Added the large github qr to the back too
  7. Added nice round rectangular border around the antenna + on the back side
  8. also i wrote "zsharpminor is my opp" in the bottom left corner - this counts as art i made

image

1/28/2026 9 PM - tanuki begged me to add a cad

so i cadded a case for the main parts that might need one since these would be housed in the desk itself.

  • esp32 case: partially inspired by someone else, but a lot of changes made by me.
    • features: nice looking, support on the back by 2 screws, pins open to air + exposed. usb port
  • i also cadded the photoresistor + resistor case since the photoresistor will always have to stand straight up to detect light
    • lots of measurements were from random sources so unsure about quality

heres an image of it:
image

1/28/2026 10 PM - + readme stuff

also from tanuki:
i described the project in more detail in the readme.

i added:

  • jobs of each and every components
  • how everthing works together
  • + the cad i just did

old cad image bc nothing really new i js had this extra readme
image

1/31/2026 4 PM - Put some components into the cad

I found a few components online and I put them in their respective positions in the CAD, and I had to adjust some dimensions but it wasn't too bad.
One issue tho was that I mislabed the LDR and 10k resistor text but i fixed it

image

1/31/2026 7 PM - cad servo stuff + case

image

did what the title said: got servo case cad so its easier to glue onto the desk + found the servo fits nicely

also put all the cads i did onto the github

2/17/2026 - small updates to nfc card

in the best interest to reduce pcba costs as much as possible, i swapped out 2 components to corresponding components that were basic on jlcpcb to reduce 6 whole dollars :) (2 per extended component)

also some small updates to readme to make stuff more clear

image
(still looks visually the same tho)

2/23/2026 - update readme + added electronics cad

added a new image of cad to readme, and a short section emphasizing that i did indeed have case cads for every part of my project so that doesn't happen again (also some electronic cads too)

image