Bussiness Card PCB
I envisioned this project as a way to learn more about NFC communication while simultaneously applying it in a creative and useful way. I also had an interest in furthering my skills hand soldering SMD components. This project involves many electrical and computer engineering problems to conquer such as microcontroller integration, antenna design and programming. The most important requirements for this project are efficiency and portability. The card needs to be portable while maintaining a small form factor.
PCB design.
The project started with component selection and PCB layout:
In an effort to keep this project small when it came to part selection my goal was to keep most passive components in the 603 package.
A common 2032 3V battery holder was used for power this ensured a small form factor with less supporting components compared to a lithium polymer battery charging circuit.
Next, the ST25DV64K was my choice for NFC integration due to its I2C bus connectivity which would blend well with the ATmega328 MCU. The ATmega328 provides a well flushed out platform to develop on while benefiting from a powerful instruction set.
Once the main ICs were chosen using specifications given from the ST25DV64K I designed an antenna by calculating the equivalent inductance of the circuit at its resonating frequency.
After exporting the design into KiCad I settled on a 2-layer board. This would keep costs down while still ensuring functionality.
I designed a six-pin header for the ATmega328 to use a FT232RL serial programmer. This allowed me to reflash new links into the ST25DV64K later.
I opted to run the ATmega328 at a slower clock of 8 MHz to lower power usage and to achieve this a clock was created with a simple RC crystal oscillator.
After adding the necessary supporting capacitive components for bypassing and resistive components for current limiting the LEDs the layout was finished and exported for fabrication.
Firmware.
To tie this all together custom firmware was needed to control the embedded devices:
For the backend of this project, I used VSCode and PlatformIO to design a few basic C functions to read, write, and maintain the rom in the ST25DV64K.
Next, I wrote a few functions to handle button debouncing using a watchdog timer to discard multiple false inputs.
Then, the built in I2C library was used to direct communication between the MCU and the NFC ICs.
Lastly, I created LED control functions to animate button presses and load data into the I2C pipeline.
The result is an embedded NFC card that can be reprogrammed using the buttons on the fly with 2 separate keys for my LinkedIn profile and my Resume. Once a button is selected the appropriate link is flashed into rom, the LEDs will play an animation, and it is ready to be scanned by a reader.