element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RFID or NFC
  • Challenges & Projects
  • Project14
  • RFID or NFC
  • More
  • Cancel
RFID or NFC
Project14: RFID or NFC Competition Low-Power NFC Thermometer
  • Blog
  • Forum
  • Documents
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RFID or NFC to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: misaz
  • Date Created: 19 Dec 2022 6:18 PM Date Created
  • Views 9184 views
  • Likes 10 likes
  • Comments 13 comments
  • rfidornfcch
  • tag
  • temperature
  • stm32
  • max31875
  • nfc
  • ST25
  • ST25DV64KC
Related
Recommended

Low-Power NFC Thermometer

misaz
misaz
19 Dec 2022
Low-Power NFC Thermometer

Hello everyone.

In this blog post I would like to describe my second project for a NFC or RFID Project14 Competition. In this project I utilized my own dynamic tag. This project tis about thermometer with output readable via NFC. Idea is that thermometer reads temperature at the background and saves output to the NFC tag. When you touch phone (or other NFC reader) to the tag, you can read the latest measured temperature.

Sample Sponsors

Experiments was also sponsored by ST. ST send me free samples of ST25DV64KC-IE6T3 NFC Tags. I ordered them in the time when shipping on their store was free, so I received them totally for free.

See it in the action!

On following video, you can see my final build in the action. Before recording I opened window. For this reason, ambient temperature decreased to about 16 °C. Then I touched thermometer by finger which increased temperature and after thermometer recorded new temperate (short green LED blink) I read new temperature with my phone again. Phone application is standard NFC reader app. It is designed for use without need to use project specific application.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Components

Devices integrates 4 components:

  • STMicroelectronics STM32G031 microcontroller in SO8 package.
  • Maxim Integrated (ADI) MAX31875 I2C Temperature Sensor on my own breakout board.
  • STMicroelectronics ST25DV64KC-IE6T3 Dynamic I2C NFC Type-5 Tag
  • Green LED

image

BOM

Bill of Materials

Product Name Manufacturer Quantity Buy Kit
STM32G0316-DISCO, Discovery Kit, STM32G031J6M6U, 32 Bit, ARM Cortex-M0+ STMICROELECTRONICS 1 Buy Now
ST25DV64KC-IE8T3, NFC Tag STMICROELECTRONICS 1 Buy Now
MAX31875R0TZS+T, Temperature Sensor, ± 1°C, -20 °C, 150 °C, WLP4 MAXIM INTEGRATED / ANALOG DEVICES 1 Buy Now
CRG0603F4K7, SMD, 4.7 kohm, ± 1%, 100 mW, 0603, Thick Film NEOHM - TE CONNECTIVITY 5 Buy Now
C1608X7R1E104K080AA, SMD MLCC, 0.1 µF, 25 V, 0603, ± 10%, X7R TDK 2 Buy Now
TSW-106-08-L-S-RA, Pin Header, 2.54 mm, 1 Rows, 6 Contacts, THT, Right Angle SAMTEC 1 Buy Now
CC0603JRNPO9BN560, SMD MLCC, 56 pF, 50 V, 0603, ± 5%, C0G / NP0 YAGEO 1 Buy Now
MC0603N100J500CT, SMD MLCC, 10 pF, 50 V, 0603, ± 5%, C0G / NP0 MULTICOMP PRO 3 Buy Now
885012206078, SMD MLCC, 150 pF, 50 V, 0603, ± 10%, X7R WURTH ELEKTRONIK 1 Buy Now
MCL053GD, LED, Green, THT, T-1 3/4 (5mm), 20 mA, 2.1 V, 570 nm MULTICOMP PRO 1 Buy Now
MCF 0.25W 330R, THT, 330 ohm, 250 mW, ± 5%, 250 V MULTICOMP PRO 1 Buy Now
MC001795, Breadboard, 830 Tie Points MULTICOMP 1 Buy Now
MC001810, Jumper Wire Kit, Multicolour, 2 mm - 125 mm, 22 AWG, 140 Piece MULTICOMP 1 Buy Now
 

Additional Parts

Product Name Manufacturer Quantity
NFC Tag PCB OSHPark 1
MAX31875 Breakout PCB OSHPark 1

Schematics

Schematics is very similar to block diagram. Interconnects are very simple. There are only 3 MCU GPIOs connected. Two for I2C (SDA and SCL) and third for LED. Other pins are used for reset and SWD, but they are not important for the project. At the end of this blog you can download this schematics in PDF format.

image

On breadboard it looks as follows:

image

Custom NFC Tags

In this project I used my self-designed NFC tags. I designed more types of tags. If you are more interested in my tags, you fan find more detailed description in my second project Custom NFC Tags which I did as part of this Project14 contest.

Firmware

Firmware is developed using STM32CubeIDE and it is written in C. I used STM32CubeMX configurator for generating drivers for I2C, GPIO and RTC controllers (I will describe reasons for RTC later). For interfacing MAX31875 temperature sensor it utilizes my own Open-Source library which I published on Github. As part of this project, I ported it to the STM32 platform. For writing NFC tag, I wrote very simple function which can write first 255 bytes of user memory area of the tag. This is sufficient for this project. It is implemented in DynamicTag.c file. Application logic is implemented in ThermometerApp.c file. It integrates error handling and error correction. Application can “survive” errors from both sensor and NFC tag and try to reinitialize it after error occur. Application also checks for CRC errors from temperature sensor (and also properly generates CRC when configuring sensor). You should never face invalid temperature reading. CRC is good capability of MAX31875 temperature sensor.

Tag Memory Lifespan

Application read temperature every 4 seconds, but NFC tag memory lifespan is not infinite. It is about 1 000 000 writes (depends on temperature, million is at 25 °C). When writing new temperature to the tag every 4 seconds it lifespan is limited to about 46 days. For this reason application do it differently. It remember last temperature written to the tag and saves new temperature to the tag only if it changed from previously saved value by at least 0.3 °C and at least 20 seconds (5 measuring cycles) elapsed since previous write. This mean that if temperature do not change rapidly (which is common behaviour of ambient temperature) tag is write-stressed only rarely. Three times per hour or something like this.

Low-Power Operation

I designed application as low power. It incorporates only 3 chips and I deployed the deepest possible stop mode in MCU firmware (there are also modes when MCU memory is not retained, but I did not go sleep so deep). For waking up I use RTC peripheral which is configured to wake up MCU after 4 second elapsed since going sleep.

Because I recently received Nordic Power Profiler Kit, I used it for analysis. I connected PPK 2 to the STM32G031 DISCO:

image

Then I start collecting power consumption traces. Following screenshot from the profiler shows power consumption of the device.

image

On screenshot you can see spikes which occurs every 4 seconds. This make sense because sensor every 4 second wake up and collect temperature measurement form the temperature sensor. You can see that many spikes are very similar but there are 4 (5 if you count the latest spike on the right edge) which are higher. In case of these spikes, device not only collected temperature but also evaluated that it is needed to update output in NFC tag and blink by LED for 50ms. Following screenshot shows spike that occurred when device was issuing I2C transaction to the temperature sensor (and both devices were executing their logic). It is about 3.5 mA spike every 4 seconds. We can also see detail of power consumption which looked like noise on previous screenshot. They are some smaller spikes, but they are irregular. Some of them are missing and frequency is not very fixed. Now I know their source and I will show it later.

image

Following screenshot show detail of larger peak which contains NFC write and LED blink operation. It is easy to understand all parts of this operation. Power consumption is most of the time below 5 mA but it is increased to this level for significantly higher amount of time in comparison with spikes which do not result to NFC write.

As far average (long-term) power consumption of the device is about 85 uA (0.085 mA). This power consumption is good for battery powered device but still can be much better. It is caused mostly by frequent small spikes which was visible on second image (and on first image they were visible as noise). There are three candidates for their source:

  • MCU and especially its LSI oscillator and RTC peripheral which are the only peripherals running.
  • Temperature Sensor and its internal engine/timer for scheduling regular measurements.
  • NFC Tag which is black box. “Nobody” knows what is inside.

I tried to disconnect temperature sensor and spikes did not disappear, so temperature sensor is not their cause. Before disconnecting MCU (which virtually disconnect everything) I tried to disconnect NFC tag and noise disappear. After reconnecting it appears again.

So now I know source of the most power consumption of the device. Next, I checked datasheet how to minimize power consumption of the NFC Tag chip and found reference to Low power down mode. According to the datasheet it reduces power consumption to less than 1 uA. Note that spikes are

about 400 uA. But unluckily this feature is available only on packages with more pins. Frowning2 It is good point to choose right package when choosing dynamic tags for low-power application.

image

But for me this was sufficient outcome from the project. Now I know that power consumption of the MCU and temperature sensor is very low (when sleeping) and NFC tag requires more polishing than I originally expected but it is still good result, I think.

Conclusion

This is all form my project presentation. Thank you for reading this blog post. In this blog post you have seen my project with my custom dynamic NFC tags used for making user interface to the low-power application without and display or connectivity. It was cool project for me because I was using dynamic tags for a first time. I had also opportunity to measure (and analyse) power consumption by Nordic Profiler Kit. If you are interested in making this project yourself, feel free to download attachments below. BOM table with links to components is above in the BOM section.

Resources

  • Schematics (PDF)
  • MAX31875 Breakout Schematics (PDF)
  • MAX31875 Breakout Gerbers (ZIP)
  • MAX31875 Breakout Kicad Project (ZIP)
  • MAX31875 Library (Github)
  • ST25DV64KC Dynamic NFC Tag Schematics (PDF)
  • ST25DV64KC Dynamic NFC Tag Gerbers (ZIP)
  • ST25DV64KC Dynamic NFC Tag Kicad Project (ZIP)
  • STM32G031 Firmware Sources Project (ZIP)
  • STM32G031 Firmware binary (ELF)
  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 2 years ago +3
    Nice project! Incidentally there are NFC ICs that have a 'SRAM pass-through' mode, e.g. NXP ones, which would provide infinite read/write. I know this is an ST-component project, I'm only mentioning…
  • shabaz
    shabaz over 2 years ago in reply to shabaz +1
    (can't edit the typo, replace " IC to me " with " IC to be")
  • misaz
    misaz over 2 years ago in reply to shabaz +1
    ST have similar functionality in tag which I used but it requires issuing special command which standard NFC reader (avalaible on iPhone) do not use. I did not find any way how to map this region to standard…
  • misaz
    misaz over 2 years ago in reply to shabaz

    Powering both sensors from GPIO is good idea but I have to deal with backpowering via I2C wires which are pulled high. I think I can let VCC of tag and sensor permanently at 3V3 level, SDA and SCL pulled high to 3V3 in a standard way and drive GND pins of the sensor and tag by GPIO. When it will be 3V3 then all pins of parts will be at the same level (no voltage difference between any pins) and when I turn GND pin to low they became powered. I am not sure about decoupling capacitor. It need more thinking but thank you for sharing this idea.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 2 years ago in reply to misaz

    I'd not seen that comment notifications were off : (

    Oh, I see. I'd compared the current consumption with I2C active, since the NT3H datasheet does not specify the current in a normal standby (it may well be lower than ST25, I could measure it since I have a NT3H, but I guess there's no point since the newer better-spec'd NTAG 5 exists now anyway). I figured deep sleep if required was not a major issue since the part could be powered from a GPIO pin.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • misaz
    misaz over 2 years ago in reply to shabaz

    I mention it in article. When you let NFC tag in standby mode it's power consumption is in range of tens uA but the same tags in higher density packages have pin which can be used for triggering lowest power mode and in this mode they consume ~1uA. It is over 50x less in case of ST25DV04KC. I checked datasheets of ST25DV04KC (which I used in project), NT3H2111 (which you mentioned) and newer generation NTAG 5 Link (which interests me):

    image

    I think it make sense thinking about it because reducing power consumption by 50 times is good deal. Especially I think about making my thermometer on the PCB with coin battery and in this case, it make sense to increate battery lifespan by using tag with possibility to use deepest sleep mode.

    NTAG 5 is good candidate for this project: over ST25DV64KC it have SRAM buffer and lower power consumption. It is good candidate for trying I think.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 2 years ago in reply to shabaz

    (typo, can't edit, I meant NT3H2..., not MT3H2...)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 2 years ago in reply to misaz

    Nice, I'd not checked the latest NXP parts.

    For config purposes, I'd placed a microSD card socket on the Pico Eurocard dev board, but now I'm thinking I should have added the option for NFC too. Way cheaper/simpler than sticking on a keypad etc., for basic configuration tasks that might also not need large volumes of data as with the micro SD card.

    Another nice option would be to make a little daughter card with right-angle socket, so that it temporarily pushes onto the header pins, whenever configurability is needed, or to read back any status information.

    I've probably missed something, isn't the power consumption similar between the ST part and the old-generation MT3H2... part. briefly to me it looked that the current consumption at 3.3V was approx 240 uA. Is it much higher in the new chips?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube