NHS3152 power only from NFC field and load Capacitor

cancel
Showing results for 
Search instead for 
Did you mean: 

NHS3152 power only from NFC field and load Capacitor

844 Views
tom_sander
Contributor II

Hello,

I would like to power the NHS3152 chip only through the NFC field and perform a measurement with it. Unfortunately the measurement seems to consume too much current, so I inserted a capacitor (100µF) between PIO0_7 (high-drive-pin) and ground. Now I want to charge this capacitor through the field first and then use the stored energy of the capacitor plus that of the field to perform a measurement. I have created the following program for this purpose:

int main(void)
{

   // TODO: Load Capacitor

   Board_Init();


   Chip_IOCON_Init(NSS_IOCON);
   Chip_GPIO_Init(NSS_GPIO);

   Chip_Clock_Clkout_SetClockSource(CLOCK_CLKOUTSOURCE_SYSTEM);

   Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_7 , IOCON_FUNC_0 | IOCON_RMODE_INACT | IOCON_LPF_DISABLE | IOCON_CDRIVE_FIXEDVOLTAGE | IOCON_DDRIVE_ULTRAHIGH);

   Chip_GPIO_SetPinDIROutput(NSS_GPIO, 0, 7);

   Chip_GPIO_SetPinOutHigh(NSS_GPIO, 0, 7);

   Chip_Clock_System_BusyWait_ms(300);

   GetData();
   Chip_NFC_Init(NSS_NFC);
   NDEFT2T_Init();
   sendData();

   return 0;
}

However, this does not work yet. I want to read a NDEFT message with a smartphone. Furthermore I noticed while measuring the voltage over the capacitor that it rises to approx. 1.8 Volt. However, not every device seems to have enough power to reach this voltage. My question is whether I have the pins correctly driven or whether I still have other configurations to make.

Many thanks in advance.

Yours sincerely,

Tom

8 Replies

373 Views
driesmoors
NXP Employee
NXP Employee

Hi Tom,

Can you give some more detail? What seems to be working, and what not?

Are you sure the cap is necessary? Can you check the system clock? Did you also check with a scope plot?

When reconfiguring pin 7 as output, all current will flow to the (huge!) capacitor, resulting in a voltage drop to near 0. The code will need to charge the cap slowly.

Via NFC, only 1.8V can be supplied to the IC. Think of the NF controller as a power supply of 1.85V, with a resistance of about 200 ohm in series. The code must make sure the load is not too high, to prevent a too sever voltage drop.

An external capacitor can be charged in two ways:

  • configure pin 7 as input, with a pull-up. This will slowly charge the cap.
    When the cap is nearly full (at least more than half-way) reconfigure pin 7 as output, to get rid of the resistor.
    This works, but with a pull-up resistor of 75 k ohm, the charging will be very slow. A faster way is:
  • [correction] Connect a second pin to the capacitor, with a resistor in series of, say, 4700 ohm. First configure that second pin as input with pull-up. When the cap is sufficiently charged, reconfigure both pins as output.
  • [correction] Connect a second pin to the capacitor, with a resistor in series of, say, 4700 ohm. Configure that second pin as output.
  • [correction] When the cap is sufficiently charged, reconfigure pin 7 as output too.

Also, best is to use a smaller cap, to reduce the charging time. 2 µF already seems plenty.
[addition] With 4.7 ohm and 2 uF, waiting 20 ms seems OK (time constant = 4.7 kOhm * 2.2uF = 10.34 ms).

Below a scope plot which shows the steady voltage supply after charging a cap. The small jump on the green graph is when the pins are reconfigured to output. After that, the code is performing several I2D and ADC conversions. pastedImage_1.png

The NHS3152's NFC controller is type 2 compliant. There is no way to pause the NFC communication, or to delay the tag reader's readout of the tag's NFC memory. This means you must prepare an NDEF message as soon as possible. 

This means that your passive program cannot make the measurements in time: it must revert to displaying the result of the previous tap.

So the order would be, on the <n>-th tap:

  • power-up due to NFC
  • start charging of the cap
  • create an NDEF message with the result of the measurements performed at tap <n-1>
  • wait until the cap is charged
  • start measurements
  • store the result in EEPROM
  • wait until the NFC field is removed and the chip dies.

Kind regards,
Dries.

373 Views
tom_sander
Contributor II

Hello Dries,

Sorry for the late answer. I have charged as you have written, the capacitor. This works quite well now. The problem I have now is that as soon as I want to send a NDEFT2T message nothing works anymore. With a battery as power supply the program works fine, but I want to supply the device passively through the NFC field without a battery.
I have already tried to send a message right at the beginning of the program and after the capacitor is loaded. Both times the capacitor is not loaded at all.
In my program the values from the n-1 measurement are loaded first, then the capacitor is loaded and afterwards a further measurement is carried out, which is then stored. In the best case, a message would be sent to a smartphone immediately after loading.

Yours sincerely,

Tom.


My program in rough:

int main(void)

{

   // Init
   Board_Init();
   Chip_NFC_Init(NSS_NFC);
   Chip_IOCON_Init(NSS_IOCON);
   Chip_GPIO_Init(NSS_GPIO);
   NDEFT2T_Init();

   // Pins config Pin 7 -> Capacitor to Ground ;  Pin 3 Resistor to Pin 7
   Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_7 , IOCON_FUNC_0 | IOCON_RMODE_PULLUP | IOCON_LPF_DISABLE); 
   Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_3, IOCON_FUNC_0 | IOCON_RMODE_PULLUP | IOCON_LPF_DISABLE);

   

  while(1){

      LoadData();

      // Doesn't work with SendMessage();

      sendMessage();

      //Charge up Capacitor
      Chip_GPIO_SetPinDIRInput(NSS_GPIO, 0,IOCON_PIO0_3);

      // Wait to charge
      Chip_Clock_System_BusyWait_ms(1);
      Chip_GPIO_SetPinDIROutput(NSS_GPIO, 0, IOCON_PIO0_3);
      Chip_GPIO_SetPinDIROutput(NSS_GPIO, 0, IOCON_PIO0_7);
      Chip_GPIO_SetPinOutHigh(NSS_GPIO, 0, IOCON_PIO0_3);
      Chip_GPIO_SetPinOutHigh(NSS_GPIO, 0, IOCON_PIO0_7);   

      

      Measure();   

      

      saveData();

   }

   return 0;

}

0 Kudos

373 Views
driesmoors
NXP Employee
NXP Employee

Hi Tom,

Can you send me the program in full? Either here or in a private post to me?

KR,
Dries.

373 Views
2574155474
Contributor II

Hello Dries

          Rencently,I try to light led on NHS3152 demo pcb when it power only by NFC feild, but failed . The led can be light by battery.Does the capacitance of the antenna have to be welded ? If it is needed , how much the value of the cap 1?

Rex(唐)

0 Kudos

373 Views
driesmoors
NXP Employee
NXP Employee

Hello Rex,

Are you using the on-board red led? I just re-tried, flashing the blinky firmware did blink the led when used in a passive way. Can you check if your led is red too? Via NFC only ~1.8V is provided.

Best,
Dries.

373 Views
2574155474
Contributor II

Hello Dries

Thanks for your help.Now I can light the led.There was a problem with the chip welding.

Best

Rex

373 Views
tom_sander
Contributor II

Hello, Kan,

I don't suppose it's the antenna design because I'm testing the application on the demo board. Furthermore, the ADC and DAC units work fine in passive mode. However, I would like to measure the current, but as soon as I run the program without external power supply (only with the NFC field) the tag does not react anymore. Even if I don't connect a resistor and the measured current should be zero, the chip doesn't react. For this reason my idea was to charge a capacitor, which can deliver additional power during the measurement. In the data sheet under the chapter "System power architecture" it is described, that in passive operation it is recommended to connect a capacitor in parallel to a GPIO pad. I hope this describes my problem better and hope for another answer.

Yours sincerely,

Tom

0 Kudos

373 Views
Kan_Li
NXP TechSupport
NXP TechSupport

I am sorry, but I don't understand why "addional" power is needed, from my understanding, after a smartphone is close to the device, and before the smartphone gets what it needs, the RF field should be always available, and so the device keeps power on in that case, if the device still could not work, you might have to check the antenna design.


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos