element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog Renesas Solution Starter Kit for RX23E-A: Thermocouple Cold Junction Compensation
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Embedded and Microcontrollers requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 6 Jul 2023 7:08 PM Date Created
  • Views 517 views
  • Likes 8 likes
  • Comments 2 comments
  • RoadTest
  • RX23e-a
  • d2a28d6e-11d8-11ee-be56-0242ac120002
Related
Recommended

Renesas Solution Starter Kit for RX23E-A: Thermocouple Cold Junction Compensation

Jan Cumps
Jan Cumps
6 Jul 2023

I reviewed the thermocouple cold junction compensation analogue circuit of the Renesas' starter kit (Road test: Renesas Solution Starter Kit for RX23E-A) in an earlier post. Here I'm checking how the firmware uses that compensation circuit to improve the accuracy of a K-type thermocouple.

I use cold junction temperature in this blog. A more correct name is reference junction temperature. cold junction compensation operates at 0°C. reference junction compensation operates at the temperature of the spot where the thermocouple meets the PCB copper.

Revisit the analogue circuit

To paint the context, here's the schematics and a summary of the operation:
image

  1. the RX23E-A delivers the 500 uA constant current for what is essential 3 resistors in series.
  2. the 100R pt100 RTD resistance varies by temperature. Because of its placement on the board, it has the same temperature as the location where the thermocouple hits the copper (cold junction)
    The voltage over the RTD is 500 uA x that resistance
  3. The voltage reference for this circuit is generated by a 5K1 precision resistor that also has the 500 uA running through it.  5K1 x 500 uA = 2.55 V. Because both RTD and RREF are served by the exact same current (ratiometric measurement), noise is canceling itself out.
    Because this is a high impedance voltage source, the reference voltage is buffered.
  4. The gain amplifier for the RTD voltage is set to x32.
  5. ADC (over)samples, spawning results at 10 SPS
  6. RRBH lifts the reference voltage off ground, giving it some bottom-head-room (foot-room?).
  7. After sampling, the digital filter attenuates the results. It applies a gain on the sampled results of 0.678. If you run the calibration procedure of this firmware, this is the value that will be adapted based on the calibration outcome.

image

Firmware algorithm for compensation

The RDC voltage gets sampled together with the thermocouple's voltage. I will focus in this mail on how the junction temperature is derived. Then how this is applied to the thermocouple's algorithm.
image
First, the RTDs resistance is calculated based on the sample result.
image

All values, except DATARTD are given before in this post.

Once the resistance is known, two techniques are used to get at the temperature:

  1. there's a lookup able with resistance vs temperature, in 1°C steps, in the source code. The entry above and below the RRTD are looked up.
  2. linear extrapolation between those 2 table entries is used to calculate the temperature at RRTD. Here, the reasonable but not exact assumption is made that the small step change is linear.

image
Then the junction temperature gets calculated:
image
Last step is to convert that into reference junction thermoelectromotive force (in V). This is the same unit that will be used in the thermocouple's measurements.
image

In a next post I will review the thermocouple's algorithms. At that time, I'll point to the outcome that we reviewed here. Once I have a debugger working on the Starter Kit, I'll try to replay the calculations with real values. If that doesn't work out, I'll try to manually check based on the PC Tool register values...

link to all posts

  • Sign in to reply
  • DAB
    DAB over 1 year ago

    Nice start Jan.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • scottiebabe
    scottiebabe over 1 year ago

    Tracking the temperature in Chicago to the nearest milli-Kelvin?

    • 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