Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
PLC Front-end Curtis Mayberry Texas Instruments HPA Linear Applications 8/19/11 Background • Student at Iowa State University • Originally from Ames, IA • Interest in Analog applications and design • Graduating December 2011 Coop Term Goals • Complete PLC Front-end reference design including: – – – – Schematic Layout Testing Documentation • Continue developing analog circuit analysis skills • Create a board-level analog circuit design • Learn about applications engineering and its role in TI’s business • Learn about TI as an employer Programmable Logic Controller • Programmable automation controller • Used in a variety of industries including the automotive, chemical, and food industries • Microcontroller offers reprogrammable real-time control solution • 4 major Components: – – – – Power supply Controller Communications Input/Output • • • • • • Universal voltage Input: 0-5v, ±5v, 0-10v, ±10v Current loop sensor communication: 0-20mA, 4-20mA Temperature sensors: thermistor, RTD, thermocouple Pressure, flow, level, vibration and motion sensors Digital I/O (GPIO) Analog Output (DAC8760) Motivation • #1 collateral request from FAEs • Existing ADI reference design • Customer Requests and New Customer Opportunities Project Definition • PLC Analog Front-End • Focus on analog Inputs: – Universal voltage Input: 0-5v, ±5v, 0-10v, ±10v – Current loop sensor communication: 0-20mA, 4-20mA – Temperature sensors: thermistor, RTD, thermocouple • SM-USB-Dig controller • Labview Interface to SM-USB-Dig • Documentation – Create design review and final presentation – Ensure a smooth transition to next stage of project Block Diagram Stage 1 Stage 2 RTD TC Thermistor +/-10v, +/-5v 4-20mA Signal Conditioning ADC Microcontroller High-Accuracy Stage 1 Only Super-Mini Dig Labview DAC Implementation Schematic • Schematic design review • Minor schematic design revisions made following review Layout • Optimized Analog inputs – Short, symmetric traces • Recessed power and control circuitry Board Assembly and Troubleshooting • No Errors in Analog Front-end • Assembled V and I Front-end for early software development • Minor Errors contained in power and Control circuitry • Five known errors: – Pull up resistors on LDO EN pins – Move pull up on digital switch (trace needed to be cut) – Ground connection needed to SMUSB-DIG – Need to move SM-USB-DIG connector closer to edge of board – Need pull-up resistors on CS lines Software • Started with SM-Dig shell • Added CS control to select front-end • Added DMM Control • Added Data logging Labview Interface Front Panel • Added Data Displays for 6 front-ends • Added configuration capabilities for all 6 front-end modules Labview Interface DMM Control Testing: Temperature Sensing Testing: Temperature Sensing • All Temperature Sensors were submerged and read between 0 oC and 125oC • Thermal bath wasn’t settling at negative temperatures • Post-processed 3 point calibration Thermistor Input (Direct) • Uncalibrated Worst Case Error: 0.4 oc • 3 point Calibration (35oc, 65oc, 105oc) • Calibrated Worst Case Error: 0.3 oc – 0.24% accuracy Thermistor B Input (Bridge) • Uncalibrated Worst Case Error: 0.9 oc • 3 point Calibration (35oc, 65oc, 105oc) • Calibrated Worst Case Error: 0.38 oc – 0.304% Accuracy RTD Input • Outlier Removed at 15oC • Uncalibrated Worst Case Error: 0.9 oc • 3 point Calibration (35oc, 65oc, 105oc) • Calibrated Worst Case Error: 0.015 oc – 0.012% Thermocouple • Uncalibrated Worst Case Error: 1.2 oc • 3 point Calibration (35oc, 65oc, 105oc) • Calibrated Worst Case Error: 0.4 oc – 0.32% error Results: Temperature Sensing Maximum calibrated Error 0oC – 125oC • Thermistor: 0.3oC • Thermistor B: 0.38oC • RTD: 0.015 oC Error Summary • Thermocouple: Calibrated Uncalibrated Mag (oC) Percent Mag (oC) Percent Thermistor 0.3 0.24% 0.4 0.32% Thermistor B 0.38 0.30% 0.9 0.72% RTD 0.015 0.01% 0.9 0.72% Thermocouple 0.4 0.32% 1.2 0.96% 0.4oC Testing: Universal Inputs Testing: Universal Inputs • Post-processed 3 point calibration • Tested using a Fluke precision voltage and current source in 0.5 V or 0.5 mA step size • Input measured using HP 8.5 digit digital multimeter Universal Voltage: ±10v • Outlier Removed at 5.5 V • Uncalibrated Worst Case Error: 10 mV – 0.05% Accuracy • 3 point Calibration (-6v, 0v, 6v) • Calibrated Worst Case Error: 0.153 mV – 0.000765% Accuracy Universal Voltage: 0 - 10v • Outlier Removed at 5.5 V • Uncalibrated Worst Case Error: 10 mV – 0.1% Accuracy • 3 point Calibration (2v, 5v, 8v) • Calibrated Worst Case Error: 0.35 mv – 0.00175% Accuracy • Worse than +/-10v Universal Voltage: ±5v • Outlier Removed at -0.5 V • Uncalibrated Worst Case Error: 3 mV – 0.03% Accuracy • 3 point Calibration (-3v, 0v, 3v) • Calibrated Worst Case Error: 0.25 mV – 0.0025% Universal Voltage: 0 - 5v • Uncalibrated Worst Case Error: 2.5 mV – 0.05% Accuracy • 3 point Calibration (0.5v, 2.5v, 4.5v) • Calibrated Worst Case Error: 0.15 mV – 0.003% Accuracy Current Loop: 4-20 mA • Uncalibrated Worst Case Error: 1.8 uA – 0.0115% • 3 point Calibration (6.5mA, 12mA, 17.5mA) • Outlier removed at 14mA • Calibrated Worst Case Error: 2.5 uA – 0.0156% • Calibration ineffective due to no consistent gain or offset error, main error component is current source • Change in Error when the source changed output range Current Loop: 0-20 mA • Uncalibrated Worst Case Error: 22uA – 0.11% Accuracy • 3 point Calibration (3.5mA, 10mA, 16.5mA) • Calibrated Worst Case Error: 21 uA – 0.105% Accuracy Results: Universal Front-Ends Calibrated maximum error: • Universal V – – – – ±10 v: 0.153 mV 0-10 v: 0.35 mV ±5 v: 0.25 mV 0-5 v: 0.15 mV • Current Loop – 4-20 mA: 2.5 uA – 0-20 mA: 21 uA Error Summary Calibrated Uncalibrated Mag Percent Mag Percent ±10v 0.153mV 765u% 10mV 0.05% 0-10v 0.35mV 1.75m% 10mV 0.10% ±5v 0.25mV 2.5m% 3mV 0.03% 0-5v 0.15mV 3m% 2.5mV 0.05% Accomplishments • Completed PLC Front-End Design – – – – – – – – – PLC Research Sensor Research Component Selection Schematic Design and Review Layout Design and Review Fabrication Software Debugging Testing • Completed Forum Post • Learned a lot about board-level development, Op-amps, and about TI’s business Other Accomplishments • Volunteered: – Day of Hope – Disability Connection Carnival • Networked with teammates and other coops • Learned about analog applications • Learned about the relationship between field and factory applications engineering • Developed a better understanding of all the engineering roles Project Continuation and Career Plans Final Goal: Complete PLC Reference Design utilizing TI parts • Progress will continue during second stage • Potential Microcontroller TI 32-bit Stellaris LM3S1Z16 • Potential output DAC: DAC8760 Career Plans: • Attend graduate school for analog design • Return to TI for another Coop Experience as a graduate student Feedback • Great Project – Interesting and rewarding – Well-defined and complete • Excellent Mentoring by Pete and Collin – Given Freedom to work independently while still having support available – Great job with on-boarding and providing the resources I needed – Great teachers for both Technical and non-technical material • AFA conference and Tucson Testing Trip were Great Opportunities • CORT relocation service hard to work with before coming to TI Thank You • Special Thank You to my mentors: Collin Wells Pete Semig • Also to my managers: Art Kay Matt Hann • Data Converter Applications Team Tom Hendrick, Greg Hupp, Kevin Duke, Tony Calabria Appendices • Appendix A: Elaborated Testing Results • Appendix B: Design review Appendix A: Elaborated Testing Results Calibration Curves, raw data plots, resistance plots Thermistor 3 point Regression 120 y = 0.9986x + 0.1225 100 80 Temp: 35, 65, 105 c 60 Linear (Temp: 35, 65, 105 c) 40 20 0 0 20 40 60 80 100 120 Thermistor B 3 Point Calibration 120 y = 1.0082x - 0.182 True Temp (C) 100 80 60 Calibration: 35, 65, 105 c 40 Linear (Calibration: 35, 65, 105 c) 20 0 0 50 100 Measured Temp (C) 150 RTD Input with Outlier Removed RTD 3 Point Calibration Curve 90 y = 0.9985x - 0.8924 80 True Temp (C) 70 60 50 Calibration: 25, 50, 85 c 40 Linear (Calibration: 25, 50, 85 c) 30 20 10 0 0 50 Measured Temp (C) 100 RTD Input with Outlier at 15oc Thermocouple Thermocouple 3 Point Calibration 90 y = 0.9907x + 0.0014 80 True Temp (C) 70 60 50 Calibration: 25, 50, 85 C 40 Linear (Calibration: 25, 50, 85 C) 30 20 10 0 0 20 40 60 Measured Temp (C) 80 100 Universal Voltage: ±10v – no outlier 3 point Regression: +/-10v 8 6 True Voltage (V) 4 -10 y = 0.9991x - 0.0008 2 Regression: -6, 0, 6 v 0 -5 0 5 -2 -4 -6 -8 Measured Voltage (V) 10 Linear (Regression: -6, 0, 6 v) Universal Voltage: ±10v – with Outlier Universal Voltage: 0 - 10v – no Outlier 3 Point Regression 0-10v 9 y = 0.9991x - 0.0006 8 True Voltage (V) 7 6 5 Regression: 2, 5, 8 v 4 Linear ( Regression: 2, 5, 8 v) 3 2 1 0 0 5 Measured Voltage (V) 10 Universal Voltage: 0 - 10v –with Outlier Universal Voltage: ±5v – no Outlier 3 point Regression: ±5v 4 3 y = 0.9995x + 0.0003 True Voltage (V) 2 -4 1 Regression: -3, 0, 3 0 -2 0 2 -1 -2 -3 -4 Measured Voltage (V) 4 Linear (Regression: -3, 0, 3) Universal Voltage: ±5v - with Outlier Universal Voltage: 0 - 5v 3 Point Regression: 0-5v 5 4.5 y = 0.9994x + 0.0004 True Voltage (V) 4 3.5 3 3 Point Regression: 0.5, 2.5, 4.5 V 2.5 2 Linear (3 Point Regression: 0.5, 2.5, 4.5 V) 1.5 1 0.5 0 0 2 4 Measured Voltage (V) 6 Current Loop: 4-20 mA - no Outlier DMM I Reading (mA) 3 Point Regression: 4-20mA 20 18 16 14 12 10 8 6 4 2 0 y = 1.0002x - 0.0014 3 Point Regression: 6.5, 12, 17.5 Linear (3 Point Regression: 6.5, 12, 17.5) 0 5 10 15 Measured I Reading (mA) 20 Current Loop: 4-20 mA with Outlier Current Loop: 0-20 mA - no Outlier 3 Point Regression 0-20mA 18 y = 1.0001x - 0.0008 DMM I Reading (mA) 16 14 12 3 Point Regression 3.5, 10, 16.5 10 8 6 Linear (3 Point Regression 3.5, 10, 16.5) 4 2 0 0 5 10 15 Measured I Reading (mA) 20 Appendix B: Design Review Original Design Review 7-5-11 Revised Project Description Block Diagram RTD TC Thermistor +/-10v, +/-5v 4-20mA Signal Conditioning Stage 2 Stage 1 Cost-Effective ADC High-Accuracy Super-Mini Dig Labview Microcontroller The Plan • May 16: First Day • May 21: Project Definition & training (1 week) • June 5 - June 10: FAE conference in Tucson (1 week) • July 5: Block Diagrams, calculations (accuracy), simulations, Part selection & ordering, initial schematic (4 weeks) • July 14: PCB layout (2 weeks) • July 21: Basic LabView Coding & Testing preparation (1 week) • July 29: Initial lab results -Oven(~1 weeks) • August 3: Accuracy tests (Tucson?) • August 5: Final Report (2 days) • August 10: Preliminary Presentation (2 days) • August 12: Final Presentation (2 days) • August 18: Last Day (1 week) Universal Inputs 0-10v and +/- 10v, 0-5v and +/- 5v, 4-20mA Universal Voltage Input • 0-5v, 0-10v, +/- 5v and +/- 10v universal voltage input • Change resistance values to change input voltage levels • Second order RC filter with poles at 39 Hz and 3900Hz • Opamp to scale down input • 2.5v reference generated to scale input • Opa2333: Low offset voltage and drift, rail-to-rail input, dual opamp part Noise Calculations: Voltage Reference • 2.5v Reference – REF5025: 625nVRMS enREF 5025 12 (7.5V pp ) 625nVRMS – OPA333: 869 nVRMS BB noise : 55 nV Hz (no 1/f noise) BWn (159 Hz )(1.57) 249.63Hz enBB (55 nV Hz ) 249.63Hz 869nVRMS – Filter KTC noise: 202.8nVRMS (1.38 1023 KJ )( 298.15k ) en filter 202.84nVRMS 100nF – Reference Output 10kΩ: 202.8 nVRMS BWn (159.15Hz )(1.57) 249.9 Hz enR 4(1.38 1023 KJ )( 298.15k )(10k)( 249.9 Hz ) 202.8nVRMS – Total Noise: 1.108µVRMS enREF (869nV ) 2 2(202.8nV ) 2 (625nV ) 2 1.108VRMS – Current Noise: 26.34nVRMS (negligible) enBB (100 nV Hz ) 249.63Hz (16.67k) 26.34nVRMS Noise Calculations • Input Filter – 82nF filter KTC noise: 224 nVRMS – 820pF filter noise: 211.47 nVRMS enR 4(1.38 10 23 KJ )( 298.15k )(50k)(38.818Hz )(1.4) 211.47nVRMS – Total Noise: 308.5 nVRMS • Amplifier Noise: – Feedback Network (16.67kΩ): 828nVRMS – OPA333 noise: 869.5nVRMS BB noise : 55 nV Hz (no 1/f noise) BWn (159.15Hz )(1.57) 249.9 Hz enBB (55 nV Hz ) 249.9 Hz 869.5nVRMS – Total Noise: 1.2µVRMS Noise Calculations: Total • ADC V+ input noise total: 1.503µVRMS 20k enV ((1.2)( 120 )1.108V ) ((1.2)( 100kk )308.5nV ) ((1.2)1.2V ) (202.8nV ) k 120 2 Ref 2 input filter 1.503VRMS • ADC V- input noise total:1.089uVRMS enV (869nV ) 2 (202.8nV ) 2 (625nV ) 2 1.089VRMS 2 amplifier output filter 2 Noise Calculations: Bringing it all together • ADC noise: 1.35 µVRMS – Noise at Apga =1 and 5 SPS Ouput noise (1.35V ) (1.503V ) (1.089V ) 2 ADC 2 V 2.295VRMS 13.771VPP 60bits 0.000358% of FS V- 2 Resistor Mismatch Errors (Worse Case) • Resistor Options (worse case) Set 1 – Set 1: 668.7 µV (0.1% resistors) VERROR (1.67v)( 20 0.1% * 20 20 ) 668.67 V 100 0.1% * 20 100 Set 2 – Set 2: 3.337 mV (0.1% resistors) 20 20 0.1% 20 ) 120 20 0.1% 100 0.1% 100 3.337mV VERROR (1.67v)( – Set 2: 1.668 mV (0.05% resistors) 20 20 0.05% 20 ) 120 20 0.05% 100 0.05% 100 1.668mV VERROR (10v)( – Set 2:666.8 µV (0.02% resistors) 20 20 0.02% 20 ) 120 20 0.02% 100 0.02% 100 666.8V VERROR (10v)( – Total: 1.797mV Total Mismatch Gain Error (668.7 V ) 2 (1.668mV ) 2 1.797mV Resistor Tolerance Monte Carlo Simulation • Ran Monte Carlo Simulation using 0.1% resistors • 2.5 mV max error on output • Used an ideal op-amp to isolate the error source • Small variation between resistor tolerances Error Estimation • ADC – – – – – 6 15µV offset * 4v 24V 10 INL: 6 ppm 0.0002 * 4v 800V Gain Error: 0.02% External Reference: 0.05%*2.024V = 1.024 mV Total: 1.230 mV 6 • Level shifting OPA2333 – – – – Offset: 10 µV Offset drift: 0.05 µV/oc CMRR CMRR >106 dB Vo, cm AcmVin, cm Vin, cm Ad 10 20 PSRR: 5 µV/V (max) Vo, PSoffset VPSnoiseAd PSRR • 2.5v Reference OPA2333 – Offset: 10 µV – Offset drift: 0.05 µV/oc range) – CMRR >106 dB – PSRR: 5 µV/V (max) (3µV over 25oC ± 60oC temperature Error Estimation • Resistor Mismatch: 1.797 mV • REF5025 2.5v reference: 1.25 mV offset is cancelled out • Total: V (1.230mV ) 2(10V ) (1.797mV ) 2((0.05 o C )(T 25 C )) 2(Vin,cm Ad 10 2 2 2 o 2 CMRR 2 20 ) 2(VPSnoiseAd PSRR ) 2 with no “interference”: 2.178 mV (1.23mV ) 2 (1.797 mV ) 2 2.178mV Simulation: +/- 10v Simulation: +/- 5v Universal Current input • 4-20mA • Second order RC filter • Internal 2.048v reference • 221Ω shunt converts 4-20mA to 884mV-4.420V • OPA2333: Rail-to-Rail common mode input, low offset voltage and drift Simulation 2.5v reference Differential output Noise Analysis • OPA333 buffer noise: 869.5 nVRMS BB noise : 55 nV Hz (no 1/f noise) BWn (159.15Hz )(1.57) 249.9 Hz enBB (55 nV Hz ) 249.9 Hz 869.5nVRMS • Resistor Noise – 10kΩ: 202.8 nV – 16kΩ: 123 nV – 1.6kΩ: 31.1 nV • V+ Total Noise: 901.8 nVRMS • V- Total Noise: 1.089 µVRMS (Same as Vinput V-) enV (869nV ) 2 (202.8nV ) 2 (625nV ) 2 1.089VRMS • ADC noise: 1.35 µVRMS – Noise at Apga =1 and 5 SPS • Total noise: 11.729 µVPP Ouput noise (1.35V ) (901.8nV ) (1.089V ) 2 ADC 2 V 1.954VRMS 11.729VPP 49bits 292 10 6 % of FS V- 2 Error Estimation • ADC – – – – – 15µV offset 6 * 4v 24V INL: 6 ppm 106 gain error: 0.02% 0.0002 * 4v 800V Noise error: 7.78 µVpp External Reference: 1.024 mV • Shunt resistor tolerance: 20mA*221*.1% =4.42 mV • Level shifting OPA333 – – – – Offset: 10 µV Offset drift: 0.05 µV/oc CMRR >106 dB PSRR: 5 µV/V (min) Vo, cm AcmVin, cm Vin, cm Ad 10 Vo, PS offset VPSnoiseAd PSRR CMRR 20 • 2.5v Reference OPA333 – – – – Offset: 10 µV Offset drift: 0.05 µV/oc CMRR >130 dB PSRR: 2 µV/V (3µV over 25oC ± 60oC temperature range) • REF5025: 1.25mV • Total V (839V ) 2(10V ) (1.25mV ) (4.2mV ) 2((0.05 o C )(T 25 C )) 2(Vin,cm Ad 10 2 2 2 2 o (839V ) 2 2(10V ) 2 (1.25mV ) 2 (4.2mV ) 2 4.669mV 2 CMRR 2 20 ) 2(VPSnoiseAd PSRR ) 2 Temperature Sensors Thermistor RTD Thermocouple Targeted industrial temperature range: -40oc to 85oc Thermistor • Temperature proportional to resistance • Calibrated: 25oC and 85oC • NTC thermistor – 30kΩ ±1% @ 25oC 25 / 85 3992 1% 30k R 1 1 exp( 3992( ) 398.15k T • 2 Designs: – Single-ended – Bridged Simulation Error Estimation • Resistor Mismatch: 374.81µV (30k )(30k 30k * .001) 15k ) 60k 30k * .001 374.81V ErrorR mismatch (50A)( • Current Accuracy:0v – Ratio metric measurement • Thermistor Errors: 5.027 mV (40k )( 40k 40k * .001) 20k ) 80k 40k * .001 3.731mV Error thermistor R - (50A)( – Thermistor 25oC R-tolerance: 3.731mV (R±1%) – Beta Error: 3.37 mV (Beta±1%) Output Voltage Temperature Dependence 800 • ADC Errors: • Minimum 4.4 mV/oC • Total Error: 5.425mV (~1.23oC) 700 600 Output Voltage (mV) – 15µV offset 6 * 2v 12 V – INL: 6 ppm 106 0.0002 * 2v 400V – gain error: 0.02% – External reference R: 2mV 500 B nominal 400 B + 1% B - 1% 300 200 100 0 0 20 40 60 temp (degrees C) 80 100 Simulation Error Estimation • Resistor Mismatch: 1.677mV (0.1% resistors) (50 A)(30k * .001) 1.5mV Right : (50 A)(15k * .001) 750 V Error R mismatch (1.5mV ) 2 (750V ) 2 1.677 mV • Current Accuracy: 0v – Ratio metric reading (external ref) – Mismatch between current sources: • ±0.15% of FS (50 µV) = 75nV (negligible) • Thermistor Errors: 5.027 mV – Thermistor 25oC R-tolerance: 3.731mV (R±1%) – Beta Error: 3.37 mV (Beta±1%) • ADC Errors: 400.5µV 6 * 2v 12 V 106 – 15µV offset 0.0002 * 2v 400V – INL: 6 ppm – gain error: 0.02% • Minimum 4.4 mV/oC • Total Error: 5.311mV RTD • PT100, PT 1000 • Resistance proportional to temperature • Callendar-Van Dusen equation Simulation Error Estimation • Class A RTD probe: ±0.15oC @ 0oC • ADC Errors: 400.5µV – – – – 15µV offset 6 * 2v 12 V INL: 6 ppm 106 gain error: 0.02% 0.0002 * 2v 400V External reference tolerance: ErrorREFERENCE (100A)( 20k * .001) 2mV (worst case) • Total Error: 2.040 mV Thermocouple • Seebeck effect • Need to measure voltage across the element • Cold junction compensation: RTD close to the cold junction • PCB layout designed to keep the cold junction isothermal with the RTD • Types: K, J, T, E, N, R, S, B • Different materials, temperature ranges, TC • Example: K type: ~55µV/oC Error Estimation • RTD Error: 2.040 mV • Thermocouple element error: Varies by type • Max element error (using K type): 1.1oC or 0.4% Digital Interface SM-USB-DIG Stage 2 Interface • Add MCU • Excluded from stage 1 (Rev. A) • MCU controls data converters • MCU communicates through SM-USBDIG to computer • Adds extra capabilities Power • Powered by a lab supply for prototyping • Banana plug input jack Floor plan Front-Ends Control and Power The Plan • May 16: First Day • May 21: Project Definition & training (1 week) • June 5 - June 10: FAE conference in Tucson (1 week) • July 5: Block Diagrams, calculations (accuracy), simulations, Part selection & ordering, initial schematic (4 weeks) • July 14: PCB layout (2 weeks) • July 21: Basic LabView Coding & Testing preparation (1 week) • July 29: Initial lab results -Oven(~1 weeks) • August 3: Accuracy tests (Tucson?) • August 5: Final Report (2 days) • August 10: Preliminary Presentation (2 days) • August 12: Final Presentation (2 days) • August 18: Last Day (1 week)