cancel
Showing results for 
Search instead for 
Did you mean: 

energy harvesting on ST25DV-I2C-04K with STM32L476 MCU

Schuyler
Senior

I want to know how to show how to use the energy harvesting feature based on the ST25DV-I2C-04K in combination with an STM32L476 MCU.I have noticed that there is a code named EH energy collection, can you power L476 to make it run normally?


_legacyfs_online_stmicro_images_0693W00000bkcEpQAI.png 

void MX_NFC7_EH_Init(void)
{
 
  ST25DVxxKC_EN_STATUS_E value_eh_dyn;
  ST25DVxxKC_EH_MODE_STATUS_E value_eh_mode;
 
  /* Configuration of X-NUCLEO-NFC07A1                                          */
  /******************************************************************************/
  /* Init of the Leds on X-NUCLEO-NFC07A1 board */
  NFC07A1_LED_Init(GREEN_LED );
  NFC07A1_LED_Init(BLUE_LED );
  NFC07A1_LED_Init(YELLOW_LED );
  NFC07A1_LED_On( GREEN_LED );
  HAL_Delay( 300 );
  NFC07A1_LED_On( BLUE_LED );
  HAL_Delay( 300 );
  NFC07A1_LED_On( YELLOW_LED );
  HAL_Delay( 300 );
 
  /* Init ST25DVxxKC driver */
  while( NFC07A1_NFCTAG_Init(NFC07A1_NFCTAG_INSTANCE) != NFCTAG_OK );
 
   /* Init User button to allow user to change EH configuration */
  BSP_PB_Init( BUTTON_KEY, BUTTON_MODE_GPIO );
 
  /* Init done */
  NFC07A1_LED_Off( GREEN_LED );
  HAL_Delay( 300 );
  NFC07A1_LED_Off( BLUE_LED );
  HAL_Delay( 300 );
  NFC07A1_LED_Off( YELLOW_LED );
  HAL_Delay( 300 );
 
  /* Check status of Energy Harvesting static configuration */
  NFC07A1_NFCTAG_ReadEHMode(NFC07A1_NFCTAG_INSTANCE, &value_eh_mode );
  if( value_eh_mode == ST25DVXXKC_EH_ACTIVE_AFTER_BOOT )
  {
    /* Energy Harvesting is set after each boot, LED 1 is on */
    NFC07A1_LED_On( GREEN_LED );
  }
  else
  {
    /* Energy Harvesting is reset after each boot, LED 1 is off */
    NFC07A1_LED_Off( GREEN_LED );
  }
 
  /* Check status of Energy Harvesting static configuration */
  NFC07A1_NFCTAG_GetEHENMode_Dyn(NFC07A1_NFCTAG_INSTANCE, &value_eh_dyn );
  if( value_eh_dyn == ST25DVXXKC_DISABLE )
  {
    /* Energy Harvesting is disabled, LED 2 is on */
    NFC07A1_LED_Off( BLUE_LED );
  }
  else
  {
    /* Energy Harvesting is activated, LED 2 is on */
    NFC07A1_LED_On( BLUE_LED );
  }
 
}
 
/**
  * @brief  Process of the NFC7 EH application
  * @retval None
  */
 
void MX_NFC7_EH_Process(void)
{
  ST25DVxxKC_PASSWD_t passwd;
  ST25DVxxKC_EN_STATUS_E value_eh_dyn;
  ST25DVxxKC_EH_MODE_STATUS_E value_eh_mode;
  ST25DVxxKC_I2CSSO_STATUS_E i2csso;
  uint32_t tick_start;
  uint32_t tick_end;
 
  /*Detect button press*/
 
  if(BSP_PB_GetState( BUTTON_KEY ) == BUTTON_PRESSED)
  {
    tick_start = HAL_GetTick();
    /* Debouncing */
    HAL_Delay(50);
 
    do
    {
      tick_end = HAL_GetTick();
    } while ((BSP_PB_GetState( BUTTON_KEY ) == BUTTON_PRESSED) && (tick_end - tick_start) <= 1000);
 
	if((tick_end - tick_start) > 1000)
    {
      /* Long Button press */
      /* Wait until the button is released */
      while ((BSP_PB_GetState( BUTTON_KEY ) == BUTTON_PRESSED));
 
      /* Debouncing */
      HAL_Delay(50);
 
      /* When user button is released after 1s, toggle Energy Harvesting static configuration */
 
      /* You need to present password to change static configuration */
      NFC07A1_NFCTAG_ReadI2CSecuritySession_Dyn(NFC07A1_NFCTAG_INSTANCE, &i2csso );
      if( i2csso == ST25DVXXKC_SESSION_CLOSED )
      {
        /* if I2C session is closed, present password to open session */
        passwd.MsbPasswd = 0;
        passwd.LsbPasswd = 0;
        NFC07A1_NFCTAG_PresentI2CPassword(NFC07A1_NFCTAG_INSTANCE, passwd );
      }
 
      /* Toggle static configuration */
      NFC07A1_NFCTAG_ReadEHMode(NFC07A1_NFCTAG_INSTANCE, &value_eh_mode );
      if( value_eh_mode == ST25DVXXKC_EH_ACTIVE_AFTER_BOOT )
      {
        /* Let the user activate energy harvesting */
        value_eh_mode = ST25DVXXKC_EH_ON_DEMAND;
        NFC07A1_NFCTAG_WriteEHMode(NFC07A1_NFCTAG_INSTANCE, value_eh_mode );
        NFC07A1_LED_Off( GREEN_LED );
      }
      else
      {
        /* Energy harvesting activated after Power On Reset */
        value_eh_mode = ST25DVXXKC_EH_ACTIVE_AFTER_BOOT;
        NFC07A1_NFCTAG_WriteEHMode(NFC07A1_NFCTAG_INSTANCE, value_eh_mode );
        NFC07A1_LED_On( GREEN_LED );
      }
    }
    else
    {
      /* Short Button press */
 
      /* Button already released */
 
      /* Debouncing */
      HAL_Delay(50);
 
      /* When user button is pressed, toggle Energy Harvesting dynamic configuration */
      NFC07A1_NFCTAG_GetEHENMode_Dyn(NFC07A1_NFCTAG_INSTANCE, &value_eh_dyn );
      if( value_eh_dyn == ST25DVXXKC_DISABLE )
      {
        /* Enable energy harvesting */
        NFC07A1_NFCTAG_SetEHENMode_Dyn(NFC07A1_NFCTAG_INSTANCE);
        NFC07A1_LED_On( BLUE_LED );
      }
      else
      {
        /* Disable energy harvesting */
        NFC07A1_NFCTAG_ResetEHENMode_Dyn(NFC07A1_NFCTAG_INSTANCE);
        NFC07A1_LED_Off( BLUE_LED );
      }
    }
  }
}
 
#ifdef __cplusplus
}
#endif
 
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

26 REPLIES 26
JL. Lebon
ST Employee

Hello,

EH output is a DC voltage. It is basically the 13.56MHz signal rectified, so it may contains harmonics of 13.56MHz. Additionally, it is not regulated.

So, it is recommended to add some filtering at EH output and some regulation if you want a stable voltage (but this should not be needed for an STM23 as it is tolerant to voltage variations).

All of this is explained in the documentation referred by Rene Lenerve.

Best regards.

Schuyler
Senior

Hi,@JL. Lebon_O​ 

I have measured Veh=3.3V and it‘s output is a DC voltage. So why not just connect the EH pin in ST1 directly to 3.3v to make the STM32 work? I want to use the energy collection mode of EH to power the L4 sensor for data transmission

Kind Regards.

JL. Lebon
ST Employee

Hello,

Yes, you can connect it directly, but as I explained, VEH is not regulated and is only the 13.56MHz rectified, so it will contains harmonics. Veh voltage will vary depending on current drawn.

If you don't care about harmonics and fluctuating voltage (and probably the STM32 can live with it), then I still recommend to add at least a small tank capacitor (a few uF) to prevent current peaks to make the VEH voltage to collapse.

Best regards.

Schuyler
Senior

Hi,@JL. Lebon_O​ ​

Thank you for your reply�?My goal is to power the DC power supply of the VEH pin to the stm32l4. If I connect it directly or add a small tank capacitor, can the stm32L4 run without power?

Best regards.

JL. Lebon
ST Employee

Probably, but is it difficult to say as I don't know how much power you need for your STM32L4. It depends on the power mode you are running at, on the number of GPIOS used, on IP used, etc...

You need to estimate how much power you need for your STM32 (you can use STM32cubeMX for this, there is a tool to simulate the power consumption) and then compare it to the VEH power curves in the AN4913: Energy harvesting delivery impact on ST25DV-I2C Series application note.

Best regards.

Schuyler
Senior

Hi,@JL. Lebon_O​ 

At present, I have checked the power consumption required by the sensor. According to the file, max6675 only needs 47.1mw of energy, and I only need to use the energy of Veh to power MCU to collect sensor data. I think this scheme is feasible.Do you have a better suggestion?

Best regards.

Hello,

I think 47.1mW could be too much power, and you also have to add the power requiered by the STM32.

If you look at the  curves in the application note a I recommended in a previous post, you can see that EH will not deliver more than 30mW in best conditions.

But I think the best is for you to try. Maybe the MAX6675 is consuming less than the 47mW (this may be a maximum in some high temp conditions).

Best regards.