ESP32-S3 HomeKey NFC Reader

by aidenvigue in Circuits > Wireless

546 Views, 7 Favorites, 0 Comments

ESP32-S3 HomeKey NFC Reader

IMG_2999.jpeg
IMG_2985.jpeg

Hi! I'm a sophomore at Purdue University studying computer science. I'm fascinated by wireless technology and we have a very old keypad lock for our garage door back at home. I knew I could make something better to take its place. I decided to make an Apple HomeKey compatible NFC reader powered by an ESP32-S3.

The NFC reader also works with generic NFC cards, and even EMV-enabled credit cards as well.

Supplies

Screenshot 2024-05-30 at 3.11.25 PM.png
Screenshot 2024-05-30 at 4.52.07 PM.png
Screenshot 2024-05-30 at 3.12.25 PM.png

You'll need access to a 3D printer, as well as a computer. The BOM for the circuit board is available on GitHub, and they can be ordered on Digikey or LCSC. LCSC ended up being about $70 for 3 boards.

I suggest ordering extra capacitors and resistors as they are small and will inevitably end up all over the floor!


https://github.com/acvigue/esp32-airreader

Design Circuit Boards

Screenshot 2024-05-30 at 4.52.01 PM.png
Screenshot 2024-05-30 at 4.51.55 PM.png
Screenshot 2024-05-30 at 4.51.51 PM.png
Screenshot 2024-05-30 at 4.51.44 PM.png
Screenshot 2024-05-30 at 4.51.37 PM.png
airreader 1.png
airreader 2.png

I went through many revisions of the board design as this was my first time doing anything with PCB trace antennas. I ended up borrowing the component placement of Adafruit's PN532 breakout board for the RF portion of my board, and then recalculated the antenna matching network to work with the custom antenna I designed.

I designed the board in Altium and I've attached the source files in the GitHub repository in case you would like to make any changes. The compiled Gerber outputs are also available in the repo.

Manufacture Circuit Boards

IMG_2665.jpeg

I uploaded the Gerber board files to JLCPCB and ordered them along with a solder stencil. I got 10 boards for under $25, including shipping. You can also opt to have them assembled at their factory with the attached BOM and CPL files.

It's much less expensive and more fun to build them yourself though! ( even if it involves burning your fingerprints off sometimes :) )

Assemble Circuit Boards!!!

IMG_2670.jpeg
IMG_2671.jpeg
IMG_2658.jpeg
IMG_2666.jpeg
Screenshot 2024-05-30 at 5.02.32 PM.png

I like using Altium Designer, as it has an assembly assistant that guides you through the assembly process. Using this, you can solder the components in any order that you want and it will track your progress.

I kept a grab bag of all the parts next to me and as I grabbed a bag, I would just click on the ID in the assistant and it told me where to place the parts.

I think it's easier to use a hot air gun or a rework station for this step, especially for the ESP32 and PN532, as the leads aren't exposed.

(Optional) Test Boards & (Not Optional) Upload Firmware

IMG_2668.jpeg
IMG_2657.jpeg

I highly recommend testing the boards after they are done being assembled. Using the firmware I have in the GitHub repo, you can ensure that the boards function properly and that the NFC reader works. It's easier to do this now then after you put it in the case.

I had an issue with one of mine and used a logic analyzer to find the problem.


Either way, you need to use esptool or PlatformIO to upload the firmware to the circuit boards.

CAD

Screenshot 2024-05-30 at 2.52.47 PM.png
IMG_2986.jpeg

I threw together a quick enclosure in Fusion 360 to protect the PCB from the sun. I'm not concerned about water ingress as the final mounting location is mostly protected from rain. I ended up printing this in black ABS.

Configure & Enroll Keys!

Screenshot 2024-05-30 at 4.47.36 PM.png
IMG_2996.jpeg
IMG_2997.jpeg

The current version of the firmware is a fork of the main ESP32-HomeKey project, however I'm working on a new version that is compatible with ESPHome. Currently, the steps to configure the PCB are identical to the ones here.

I will update my repository with the ESPHome firmware as soon as it is ready and working with the integrated Secure Element.

Mount & Done!

IMG_2998.jpeg
IMG_2995

I ran a 5V cable to the exterior wall and plugged it into the JST connector. You can also plug in a LIPO battery to this port!