Presentation is loading. Please wait.

Presentation is loading. Please wait.

Before we get started... Please sign the sign up sheet at If you are going to Tweet, please use the.

Similar presentations


Presentation on theme: "Before we get started... Please sign the sign up sheet at If you are going to Tweet, please use the."— Presentation transcript:

1 Before we get started... Please sign the sign up sheet at If you are going to Tweet, please use the #hicap hashtag

2 HI Capacity October 11th, 2011 Jeremy Chan Arduino Night IV

3 Tonight What will we do? Temperature Sensors Reading Sensors Intro to Processing Sensor Visualization Arduino (C/C++)rocessing (Java) (Async Serial) RS232/USB

4 Temperature Sensor Applications Cooking (Hot Plate and Oven Control) Soldering (Soldering Irons, Reflow Ovens) Thermal Management (Servers, HVAC) Environmental Monitoring Thermal Safety (Motors, Boilers, Batteries) Food Safety (Refrigeration/Freezing) Characterization (Thermal Conductivity)

5 Temperature Sensors Overview on: 1.Thermistors 2.Resistive Temperature Detectors (RTD) 3. Non-Contact IR Sensor (TI TMP006) 4. Thermocouples (Wide Range) 5. Semiconductor Band-Gap (Easy Interface)

6 1. Thermistors –Resistors Made of NTC or PTC materials NTC: Negative Temperature Coefficient, R falls as T rises PTC: Positive Temperature Coefficient, R rises as T rises Typical Values from 2.2k to 25C Pros/Cons: Cheap / Non-Linear (Variable Sensitivity) Products Available for -80°C to 150°C (-110°F to 302°F) –Non-Linear Temperature/Resistance Curves More Info: Omega Thermistor Products

7 0C to 100C 27.35k to 0.974k Thermistor Temperature[C] vs R[] Datasheet / Calibration Constants: a,b,c,d,… Example: Vishay 10k NTC Thermistor Assembly Curve Vishay Calculator: Vishay Thermistor: R[k] Temperature [°C]

8 2. Resistive Temperature Detectors –Precision PTC Resistors Made of Platinum PTC: Positive Temperature Coefficient, R rises as T rises Typical Values from C Pros/Cons: Accurate, Linear / Expensive, Low Level Signals Products Available for -200°C to 500°C (-328°F to 932°F) –Near Linear Temperature/Resistance Curves ~ /°C (3 Standard Classes for Different Temp Ranges Available) More Info: US Sensor RTD Products

9 All excitations induce some self-heating –Less power = Less self-heating = Less error = Less signal Excitation can be disabled, but be aware of fluctuations in temperature due to transient self-heating RTD Temperature[C] vs R[] Thermistor: Steinhart-Hart Equation - Datasheet / Calibration Constants: a,b,c RTD, R to Temperature - Datasheet/Calibration Constants: a,b,c R[] Curve Fit Error [°C] Temperature [°C] Example Pt100 RTD

10 3. Non-Contact IR Temperature –Infrared Thermopile Sensor: TMP006 Tiny chip-scale package IR sensor (1.6mm x 1.6mm) Pros: extremely small, non-contact measurement, serial output Cons: extremely small, IR emissivity cal. reqd., requires well-laid PCB TMP006 Measures for -40°C to 125°C (-40°F to 257°F) More Info: Texas Instruments TMP006

11 4. Thermocouples (TC) –Any two dissimilar joined metals form TCs Seebeck effect voltage developed over entire length of wire Several standard thermocouple types available Pros/Cons: TRange / tiny signal (uV), relative temperature only Products Available for -200°C to 1800°C (-328°F to 3272°F) –Non-Linear Temperature/Resistance Curves Up to 10 curve correction terms necessary for extremes More Info: Omega Thermistor Products

12 Approximate Type E TC Voltage Outputs Hot Gradient No Gradient Cold Gradient -

13 Type E TC Voltage vs ΔTemperature +/- 20.5C Approx C +/- 1.1C Approx, 0-94C

14 Ice Bath Cold Junction Compensation Provides absolute temperature measurement vs 0C Impractical for many applications to have an ice bath

15 Software Cold Junction Compensation More Info: 1. Measure (TC Voltage) and (Cold Junction Temperature) 2. Use (Cold Jct. Temperature) to calculate (Compensation Voltage) - Use TC curve to calculate cold junction voltage 3. Add (Compensation Voltage) and (TC Voltage) 4. Use TC Curve to calculate temperature at remote TC junction Remote Thermocouple Local Temp Sensor Analog to Digital Converter Cold Jct T/V Known

16 Integrated Thermocouple Interface More Info: Example Code: Adafruit Breakout Board for MAX6675 Type K Thermocouple Range: 0 to 1024C, Resolution: 0.25°C SPI Serial Interface Many other simple thermocouple interface products available

17 5. Semiconductor Band-Gap –Band-Gap Reference Based Sensor Precision current forced through diode –Diode forward voltage based on temperature –Voltage measured, amplified –Multiple output options: Alarm Logic, Analog, Serial Pros/Cons: Small, Cheap, Easy / T Range, Remote Fragility Products Available for -55°C to 150°C (-67°F to 302°F) –Linear Temperature Curves w/ Error Bounds Microchip Tech. MCP9701A TO-92 Package Microchip Tech. TC1047A SOT23 Package Maxim Integrated Products MAX6626 SOT23-6 Package Example SOT-23-6

18 MCP9701A Output: 0.4V mV/C Range: -40C to 125C Accuracy: +/- 2C (0-70C) Supply: 6uA TC1047A Output: 0.4V mV/C Range: -40C to 125C Accuracy: +/- 0.5C (0-70C) Supply: 60uA Tonights Sensors

19 ADC High Level Concept Analog Domain Digital Domain Software V in = count*(5/1023) V in = 2.498V ADC Input Voltage Compare Output Count

20 How are we going to read the sensors? To read voltages, use an analog to digital converter! Converts voltage into a numerical count Arduino ADC 10 bits of counting (a.k.a. 10 bit resolution/quantization) How many levels? 2^10 = 1024 Highest count? 1023, because 0 takes up one of them! Single-Ended (input is always referenced to Arduino GND) By default: VREF+ = 5V, VREF- = 0V (single ended) VREF- is the voltage at the 0 count VREF+ is the voltage at the full-scale 1023 count All counts 0 and 1023 are essentially equal increments 1023 counts amongst 5V is 5/1023 ~= V/count

21 Arduino Step 0: Installation / Orientation Step 1: Connecting MCP9701A Step 2: Reading Analog to Serial (Code) Step 3: Converting Analog to Voltage and Temperature (Code) If we have time Step 4 Extra: Formatting Standard String (Code) Processing Step 0: Installation / Orientation Step 1: Drawing Boxes Step 2: Serial Input and Events (String Example) Step 3: Parsing Serial Strings Step 4: Real-Time Bar Graph Step 5: Real-Time Chart Step 6: Logging CSV Files If we have time Step 7 Extra: User Input, Events, and Screenshots Step 8 Extra: Exporting Applications Let The Hands-On Activities Begin!

22 1. Software Installation 2. Essential Hardware Features for Tonight 3. Examples Library Run-Thru 4. Disconnect Arduino for Wiring Step Arduino Orientation

23 MCP9701ATC1047A Step 1: Sensor Wiring Red = 5V Blue = GND White = V out -> Analog A0 Red = 5V Black = GND Blue = V out -> Analog A0

24 Step 2 Code Reading the Analog to Digital Converter void setup() { // Setup Serial Port, 9600bps // Implied: 8-N-1: 8 Bit Transfers, No Parity, 1 Stop Bit Serial.begin(9600); } void loop() { // Read Analog Channel 0 int analogValue = analogRead(0); // Print Line via Serial Port Serial.println(analogValue); } Initialize Variables and Peripherals Main Loop

25 Step 3 Code Calculating Voltage and Temperature void loop() { // Read Analog Channel 0 int analogValue = analogRead(0); // Calculating Voltage, VREF=5V,0V; float voltage = analogValue * 5 / ; // Calculating Degrees C = (Volts-0.400) / 19.5mV float deg_C = (voltage ) / ; // Calculating Fahrenheit = 9/5 C + 32 // Note: A common mistake is to use 9/5. 9/5 = 1 (Integer Math) // Use 9.0/5.0 to ensure floating point math ( = 1.8) float deg_F = (9.0/5.0)*deg_C + 32; // Print out voltage, degrees C, and degrees F Serial.print(analogValue); Serial.print (" "); Serial.print (voltage); Serial.print (" "); Serial.print (deg_C); Serial.print (" "); Serial.print (deg_F); Serial.print (" "); // Extra space for easy parsing Serial.print ("\n"); // Send Line Feed (New Line) // Delay 66ms, slowing to rate of about 15Hz updates delay(66); } Main Loop Modification MCP9701A Only For TC1047, use: (voltage-0.5)/0.01;

26 Processing Visualizations Just Landed 3D Visualization of Twittering Travelers

27 1. Software Installation 2. Examples Library Run-Thru 3. Arduino Night IV Code! Processing Orientation

28 Step 1: Drawing Boxes Step 2: Serial Input and Events (String Example) Step 3: Parsing Serial Strings Step 4: Real-Time Bar Graph Step 5: Real-Time Chart Step 6: Logging CSV Files Processing Code

29 Questions about the Arduino?

30 Special thanks to Ian Kitajima and Oceanit!

31 Backup Slides

32 Measuring Resistive Sensors –Resistance of Thermistors & RTDs Ohms Law! V=IR -> R=V/I (Resistance = Voltage / Current) Provide V or I excitation to find resistance ? ?

33 Measuring Resistive Sensors –Method 1: Excite with current, measure voltage Difficulty: Precision low-current source required –Limited ICs available (100uA, 200uA are common) –Not simple to build precision low-current sources –Question: Why not a high current source? ?

34 Measuring Resistive Sensors –Method 2: Excite with voltage, measure current Difficulty: Precision measurements of current required –Precision Current Sense Resistor (R s ) Required »Low Temperature Coefficient Ideal –Smaller current sense resistors are better for linearity ? ? ?

35 Measuring Resistive Sensors –Method 3: Excite with significant voltage divider Difficulty: Measurements of R are very non-linear –Precision Voltage Divider Resistor Required Allows biasing of nominal temperature voltage (e.g. 25C) ? ? ?

36 All excitations induce some self-heating –Trade between error and magnitude of signal –Low enough excitations induce no noticeable error –Excitation can be pulsed on/off to minimize self-heating »Leads to transient increase in temp, so keep pulses short »Much less predictable offsets than constant excitation Current running through remote measurement leads can drop voltage, resulting in measurement errors –Look for 3 wire and 4 wire configurations for more accuracy Look-up tables can be used to speed up calculations –Linear approximations between points on an exponential curve –Trade between accuracy and computation time Measuring Resistive Sensors


Download ppt "Before we get started... Please sign the sign up sheet at If you are going to Tweet, please use the."

Similar presentations


Ads by Google