Close

Solved the NFC outputs on scan

A project log for dynamic nfc business card

wifi/ble and nfc connected business card.

0x0630ff0x0630ff 06/19/2024 at 06:000 Comments

After diving into the datasheet and Arduino Library (STM32duino ST25DV) for the ST25DV NFC tags, I was able to get output from the NFC IC's GPO pins as well as output transmitted power form the Energy Harvesting output pin. However, the energy harvested power level seems to be inconsistent and sometimes very weak. Unsure if i messed up a setting in the code or if it is something else. The output was able to light up an LED at the very least.

The trick ended up being a setting written over i2c to the Energy Harvesting Config register and the GPO setup registers. Refer to the GPO and EN register sections to see which bits to set. See the code below for bits used in my example. They output energy when a field is present. 

The code looks a bit like this:

#include "ST25DVSensor.h"
#include "ST25DV_IO/st25dv_io.h" // arduino library for st25dv

void
setup()
{     // attach interrupt to GPO pin pinMode(NFC_GPO_PIN, INPUT_PULLUP); attachInterrupt(NFC_GPO_PIN, nfc_tag_cb, RISING);     // enable Energy Harvesting output st25io.ST25DV_i2c_ConfigureGPO(0b10001000); st25io.ST25DV_i2c_WriteEHMode(ST25DV_EH_ON_DEMAND); }

It just occurred to me that I should have routed the energy harvesting output to the charging circuit so that I could put this device on any NFC enabled wireless charging pad and add some juice to the battery. I went ahead and tried that, however I am not sure if the Energy harvesting output is going to generate enough power. The charge light sure doesn't turn on. I will try other things at a later date.

I don't plan to order a rev2 of this board (definitely not in time for the contest) because I am contemplating changing things up for this idea and using the PN7150 reader/writer IC instead to open the door for even more NFC fun, just as someone else in the contest has also done. I have a breakout board I designed a while back using the PN7150 but didn't use it due to having mediocre antenna performance. This path seems much more interesting to me. 

Stay tuned to see how this journey goes as it changes to a read/writer as well as tag emulator. 

Discussions