Thermocouple Reference Design © 2010 Microchip Technology Inc. DS51889A Note the following details of the code protection feature on Microchip devices: • Microchip products meet the specification contained in their particular Microchip Data Sheet. • Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. • There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. • Microchip is willing to work with the customer who is concerned about the integrity of their code. • Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.” Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, rfPIC and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Octopus, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, PIC32 logo, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. © 2010, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified. DS51889A-page 2 © 2010 Microchip Technology Inc. THERMOCOUPLE REFERENCE DESIGN Table of Contents Preface ........................................................................................................................... 5 Introduction............................................................................................................ 5 Document Layout .................................................................................................. 5 Conventions Used in this Guide ............................................................................ 6 Recommended Reading........................................................................................ 7 The Microchip Web Site ........................................................................................ 7 Customer Support ................................................................................................. 7 Document Revision History ................................................................................... 7 Chapter 1. Product Overview 1.1 Introduction ..................................................................................................... 9 1.2 What is the Thermocouple Reference Design? .............................................. 9 1.3 What the Thermocouple Reference Design kit includes ................................ 9 Chapter 2. Installation and Operation 2.1 Introduction ................................................................................................... 11 2.2 Features ....................................................................................................... 11 2.3 Getting Started ............................................................................................. 12 2.3.1 Hardware Setup ........................................................................................ 12 2.3.2 Software Setup .......................................................................................... 13 2.3.3 Sensor Calibration and Setup ................................................................... 15 Appendix A. Schematic and Layouts A.1 Introduction .................................................................................................. 17 A.2 Board - Schematic ...................................................................................... 18 A.3 Board -Top Silk and Pads ............................................................................ 19 A.4 Board - Internal VDD Layer ........................................................................... 19 A.5 Board - Internal Ground Layer ..................................................................... 20 A.6 Board - Bottom Silk and Pads ...................................................................... 20 Appendix B. Bill of Materials Worldwide Sales and Service .................................................................................... 22 © 2010 Microchip Technology Inc. DS51889A-page 3 Thermocouple Reference Design NOTES: DS51889A-page 4 © 2010 Microchip Technology Inc. THERMOCOUPLE REFERENCE DESIGN Preface NOTICE TO CUSTOMERS All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available. Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the document. For the most up-to-date information on development tools, see the MPLAB® IDE on-line help. Select the Help menu, and then Topics to open a list of available on-line help files. INTRODUCTION This chapter contains general information that will be useful to know before using the Thermocouple Reference Design. Items discussed in this chapter include: • • • • • • Document Layout Conventions Used in this Guide Recommended Reading The Microchip Web Site Customer Support Document Revision History DOCUMENT LAYOUT This document describes how to use the Thermocouple Reference Design as a development tool to emulate and debug firmware on a target board. The manual layout is as follows: • Chapter 1. “Product Overview” – Important information about the Thermocouple Reference Design. • Chapter 2. “Installation and Operation” – This chapter includes a detailed description of each function of the demo board and instructions for how to begin using the board. • Appendix A. “Schematic and Layouts” – Shows the schematic and layout diagrams for the Thermocouple Reference Design. • Appendix B. “Bill of Materials” – Lists the parts used to build the Thermocouple Reference Design. © 2010 Microchip Technology Inc. DS51889A-page 5 Thermocouple Reference Design CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Arial font: Italic characters Represents Referenced books Emphasized text A window A dialog A menu selection A field name in a window or dialog A menu path MPLAB® IDE User’s Guide ...is the only compiler... the Output window the Settings dialog select Enable Programmer “Save project before build” A dialog button A tab A number in verilog format, where N is the total number of digits, R is the radix and n is a digit. A key on the keyboard Click OK Click the Power tab 4‘b0010, 2‘hF1 Italic Courier New Sample source code Filenames File paths Keywords Command-line options Bit values Constants A variable argument Square brackets [ ] Optional arguments Curly brackets and pipe character: { | } Ellipses... Choice of mutually exclusive arguments; an OR selection Replaces repeated text #define START autoexec.bat c:\mcc18\h _asm, _endasm, static -Opa+, -Opa0, 1 0xFF, ‘A’ file.o, where file can be any valid filename mcc18 [options] file [options] errorlevel {0|1} Initial caps Quotes Underlined, italic text with right angle bracket Bold characters N‘Rnnnn Text in angle brackets < > Courier New font: Plain Courier New Represents code supplied by user DS51889A-page 6 Examples File>Save Press <Enter>, <F1> var_name [, var_name...] void main (void) { ... } © 2010 Microchip Technology Inc. Preface RECOMMENDED READING This user's guide describes how to use Thermocouple Reference Design. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources. MCP3421 Data Sheet, “18-Bit Analog-to-Digital Converter with I2C Interface and On-Board Reference“ (DS22003). This data sheet provides detailed information regarding the MCP3421 device. THE MICROCHIP WEB SITE Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: • Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s guides and hardware support documents, latest software releases and archived software • General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online discussion groups, Microchip consultant program member listing • Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: • • • • Distributor or Representative Local Sales Office Field Application Engineer (FAE) Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://support.microchip.com DOCUMENT REVISION HISTORY Revision A (December 2009) • Initial Release of this Document. © 2010 Microchip Technology Inc. DS51889A-page 7 Thermocouple Reference Design NOTES: DS51889A-page 8 © 2010 Microchip Technology Inc. THERMOCOUPLE REFERENCE DESIGN Chapter 1. Product Overview 1.1 INTRODUCTION The following name and assembly number are found on the Thermocouple Reference Design’s Printed Circuit Board (PCB): • 102-00114 1.2 WHAT IS THE THERMOCOUPLE REFERENCE DESIGN? The Thermocouple Reference Design demonstrates how to instrument a Thermocouple and accurately sense temperature over the entire Thermocouple measurement range. This solution uses the MCP3421 18-Bit Analog-to-Digital Converter (ADC) to measure voltage across the Thermocouple. The ADC has an internal 2.048V reference voltage and a Programmable Gain Amplifier with 1, 2, 4, 8V/V. At a Gain of 8V/V the PGA effectively adds 3LSb to the ADC. This increases the ADC resolution to 21-bit or 2 µV/LSb. Therefore, the Thermocouple EMF voltage is measured with 2 µV resolution. For K-type Thermocouple, measurement system provides a ±0.05°C resolution. The cold-junction compensation is done using a ±1°C accurate 0.0625°C resolution silicon temperature sensor, the MCP9804. This solution provides a reliable and accurate Thermocouple instrumentation without the need for extensive circuit compensation and calibration routines. The ADC output is read using a PICmicro Microcontroller. This controller is also connected to a PC using USB interface. The Thermal Management software is used to plot the Thermocouple temperature data in stripchart format. 1.3 WHAT THE THERMOCOUPLE REFERENCE DESIGN KIT INCLUDES This Thermocouple Reference Design Kit includes: • Thermocouple Reference Design, 102-00114 • K-type Thermocouple • Important Information Sheet © 2010 Microchip Technology Inc. DS51889A-page 9 Thermocouple Reference Design NOTES: DS51889A-page 10 © 2010 Microchip Technology Inc. THERMOCOUPLE REFERENCE DESIGN Chapter 2. Installation and Operation 2.1 INTRODUCTION The Thermocouple Reference Design demonstrates Microchip’s solution to accurately measure temperature using a Thermocouple and an 18-bit ADC, MCP3421. This solution eliminates the need for the traditional analog instrumentation system calibration or gain and offset trimming techniques. In addition, the Thermocouple linearization techniques can be implemented in firmware or software. The Thermocouple Reference Design allows user to evaluate Microchip’s solution to accurately measure the temperature. When measuring temperature using a Thermocouple cold junction compensation is critical. It provides a reference to the thermocouple measurement. The MCP9804 provides the cold junction compensation at ±1°C accuracy. If the Thermocouple is compensated using the compensation equation provided by National Institute of Standards and Technology (NIST ITS-90), then temperature can be measured with ±1°C accuracy over the entire measurement range. The MCP3421 and the MCP9804 serial output lines are connected to a PICMicro Microcontroller. This controller communicates with a PC via the USB interface and commands the ADC to convert voltage. The serial data is then displayed on the PC using the Thermal Management software in stripchart format. 2.2 FEATURES The Thermocouple Reference Design has the following features: • • • • K-type Thermocouple Thermocouple connector Thermal Management GUI MCP9804 Temperature sensor with ±0.25°C (typical) accuracy from -40°C to +125°C • 18-Bit ADC MCP3421 • PIC18F2550 PIC® Microcontroller • USB interface to PC © 2010 Microchip Technology Inc. DS51889A-page 11 Thermocouple Reference Design 2.3 GETTING STARTED This section describes how to quickly configure the Thermocouple Reference Design. A simplified block diagram of the configuration is provided in Figure 2-1. Thermocouple Reference Design Thermal Pad USB Thermocouple PC PIC18F2550 USB PIC Microcontroller 2 MCP3421 18-Bit ADC 2 MCP9804 Temperature Sensor FIGURE 2-1: Thermocouple Reference Design Simplified Block Diagram. 2.3.1 Hardware Setup 1. Connect the USB cable to PC. 2. Start the Thermal Management software. 3. Click the Start icon to start acquisition and measure temperature from the Thermocouple. DS51889A-page 12 © 2010 Microchip Technology Inc. Installation and Operation 2.3.2 Software Setup Once the USB interface is secured, start the Thermal Management Software. When the software starts, if the hardware is successfully detected then the GUI will be displayed. FIGURE 2-2: Thermocouple Reference Design GUI. This configuration window allows the user to set some of parameters, such as measurement unit and calibration temperature. The Play, Stop and Reset icons can be used to perform continuous data-log. The Record icon enables the user to data-log to an external file. The logging interval can be adjusted using the Interval Scroll bar from 100 ms to 30s. Stop Recording Real-Time acquisition Start/Record Real-Time acquisition Reset Real-Time acquisition Stop Real-Time acquisition Start Real-Time acquisition FIGURE 2-3: Real-Time Acquisition. Thermocouple output is using the compensation equation provided by National Institute of Standards and Technology (NIST ITS-90). The linearization is implemented in the PICmicro microcontroller. © 2010 Microchip Technology Inc. DS51889A-page 13 Thermocouple Reference Design The Data Acquisition charting tool can be customized by double clicking the chart, as shown in Figure 2-4. Additional options are available by right-clicking the chart. The user can also zoom into a specific plot range by clicking and dragging the section. The data in the chart can also be exported using the Export button. FIGURE 2-4: DS51889A-page 14 Chart Setup Options. © 2010 Microchip Technology Inc. Installation and Operation 2.3.3 Sensor Calibration and Setup 2.3.3.1 THERMOCOUPLE CALIBRATION The Thermocouple sensor can be calibrated using the GUI. Once the Thermocouple sensor is exposed to the desired calibration temperature, simply type in the temperature in the Calibration Temperature field and click the Calibrate button. When the temperature is calibrated and the calibration offset is stored in the PIC Microcontroller EEPROM, the calibration offset is displayed in the RTD Calibration Offset text box. The Reset button resets the calibration offset to 0. FIGURE 2-5: 2.3.3.2 Sensor Calibration. MCP9804 SETUP The MCP9804 is a silicon temperature sensor which measures temperature with ±0.25°C nominal and ±1°C maximum accuracy from -40°C to +125°C. This sensor has multiple user programmable features such as Alert Output limits, output hysteresis and mode. The output mode can be set up as comparator or interrupt output with an active high or active low levels. The temperature measurement resolution can also be set up. . FIGURE 2-6: © 2010 Microchip Technology Inc. MCP9804 Setup. DS51889A-page 15 Thermocouple Reference Design NOTES: DS51889A-page 16 © 2010 Microchip Technology Inc. THERMOCOUPLE REFERENCE DESIGN Appendix A. Schematic and Layouts A.1 INTRODUCTION This appendix contains the following schematics and layouts for the Thermocouple Reference Design: • • • • • Board - Schematic Board -Top Silk and Pads Board - Internal VDD Layer Board - Internal Ground Layer Board - Bottom Silk and Pads © 2010 Microchip Technology Inc. DS51889A-page 17 Thermocouple Reference Design BOARD - SCHEMATIC M A.2 DS51889A-page 18 © 2010 Microchip Technology Inc. Schematic and Layouts A.3 BOARD -TOP SILK AND PADS A.4 BOARD - INTERNAL VDD LAYER © 2010 Microchip Technology Inc. DS51889A-page 19 Thermocouple Reference Design A.5 BOARD - INTERNAL GROUND LAYER A.6 BOARD - BOTTOM SILK AND PADS DS51889A-page 20 © 2010 Microchip Technology Inc. THERMOCOUPLE REFERENCE DESIGN Appendix B. Bill of Materials TABLE B-1: Qty BILL OF MATERIALS Reference Designator Description Manufacturer Part Number Manufacturer 1 — Ready-Made Insulated Thermocouples with OMEGA® Kapton, PFA, Glass Braid Insulation and Molded Connectors 3 C1, C5, C16 CAP .1UF 25V CERAMIC X7R 0805 Panasonic® - ECG ECJ-2VB1E104K 1 C2 CAP 1.0UF 16V CERAMIC X7R 0805 Kemet® Electronics Corp. C0805C105K4RACTU 2 C3, C4 CAP CER 10UF 16V Y5V 0805 Murata Electronics® GRM21BF51C106ZE15L 1 C10 CAP .47UF 16V CERAMIC X7R 0805 Panasonic - ECG ECJ-2YB1C474K 2 C14,C15 CAP 22PF 50V CERM CHIP 0805 SMD Panasonic - ECG ECJ-2VC1H220J 1 J1 Circuit Board Thermocouple Connectors, Standard PCC-SMP-K-100" OMEGA PCC-SMP-K-100 1 J2 CONN MINI USB RCPT RA TYPE B SMD Tyco® Electronics 1734035-2 5SRTC-GG-K-24-36 1 J3 HEADER 1X6 - DO NOT POPULATE — — 1 L1 INDUCTOR 10UH 100MA 0805 Murata Electronics LQM21FN100M70L 1 PCB RoHS Compliant Bare PCB, Thermocouple Reference Design Microchip Technology Inc. 104-00114 2 R1, R2 RES 4.99K OHM 1/8W 1% 0805 SMD Panasonic - ECG ERJ-6ENF4991V 1 R4 RES 1.0 OHM 1/8W 1% 0805 SMD Panasonic - ECG ERJ-6RQF1R0V 1 R6 RES 10.0K OHM 1/8W 1% 0805 SMD Panasonic - ECG ERJ-6ENF1002V 7 TP1-TP7 TEST POINT PC COMPACT SMT Keystone Electronics® 5016 1 U1 28/40/44-Pin, High-Performance, Enhanced Microchip Technology Flash, USB Microcontrollers with nanoWatt Inc. Technology 1 U2 MCP3421, 18-Bit Analog-to-Digital Converter with I2C Interface and On-Board Reference 1 U3 MCP9804, Memory Module Digital Temper- Microchip Technology ature Sensor Inc. MCP9804T-E/MC 1 Y1 CRYSTAL 20.0000 MHZ SERIES SMT ATS200SM Note 1: Microchip Technology Inc. CTS-Frequency Controls PIC18F2550-I/SO MCP3421A0T-E/OT The components listed in this Bill of Materials are representative of the PCB assembly. The released BOM used in manufacturing uses all RoHS-compliant components. © 2010 Microchip Technology Inc. DS51889A-page 21 WORLDWIDE SALES AND SERVICE AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://support.microchip.com Web Address: www.microchip.com Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4080 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 India - Pune Tel: 91-20-2566-1512 Fax: 91-20-2566-1513 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Japan - Yokohama Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Farmington Hills, MI Tel: 248-538-2250 Fax: 248-538-2260 Kokomo Kokomo, IN Tel: 765-864-8360 Fax: 765-864-8387 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 Santa Clara Santa Clara, CA Tel: 408-961-6444 Fax: 408-961-6445 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 China - Hong Kong SAR Tel: 852-2401-1200 Fax: 852-2401-3431 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 Taiwan - Hsin Chu Tel: 886-3-6578-300 Fax: 886-3-6578-370 China - Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 UK - Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820 China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 12/30/09 DS51889A-page 22 © 2010 Microchip Technology Inc.