Before we get started... - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

Before we get started...

Description:

Arduino Orientation Step 1: Sensor Wiring Step 2 Code Reading the Analog to Digital Converter Step 3 Code Calculating Voltage and Temperature Processing ... – PowerPoint PPT presentation

Number of Views:220
Avg rating:3.0/5.0
Slides: 37
Provided by: Goo7260
Category:

less

Transcript and Presenter's Notes

Title: Before we get started...


1
Before we get started...
  • Please  sign the sign up sheet at
    http//bit.ly/hicap_signup
  • If you are going to Tweet, please use the hicap
    hashtag

2
Arduino Night IV
  • HI Capacityhttp//hicapacity.org
  • October 11th, 2011
  • Jeremy Chan

3
Tonight
  • Temperature Sensors
  • Reading Sensors
  • Intro to Processing
  • Sensor Visualization
  • What will we do?

Arduino (C/C)
rocessing (Java)
RS232/USB
(Async Serial)
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
  • Thermistors
  • 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 100k? _at_ 25C
  • Pros/Cons Cheap / Non-Linear (Variable
    Sensitivity)
  • Products Available for -80C to 150C (-110F to
    302F)
  • Non-Linear Temperature/Resistance Curves

Omega Thermistor Products
More Info http//www.omega.com/temperature/z/pdf
/z036-040.pdf
7
Thermistor TemperatureC vs R?
Datasheet / Calibration Constants a,b,c,d,
Example Vishay 10k NTC Thermistor Assembly Curve
0C to 100C 27.35k? to 0.974k?
Temperature C
Rk?
Vishay Calculator http//www.vishay.com/doc?2911
3 Vishay Thermistor http//www.vishay.com/docs/29
092/ntcalug.pdf
8
2. Resistive Temperature Detectors
  • Precision PTC Resistors Made of Platinum
  • PTC Positive Temperature Coefficient, R rises as
    T rises
  • Typical Values from 100? -10k? _at_ 25C
  • Pros/Cons Accurate, Linear / Expensive, Low
    Level Signals
  • Products Available for -200C to 500C (-328F to
    932F)
  • Near Linear Temperature/Resistance Curves
  • 0.00385?/C (3 Standard Classes for Different
    Temp Ranges Available)

US Sensor RTD Products
More Info http//www.ussensor.com/prod_Probes_RT
Ds.html
9
RTD TemperatureC vs R?
  • 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

Example Pt100 RTD
Temperature C
R?
Thermistor Steinhart-Hart Equation
- Datasheet / Calibration Constants a,b,c
Curve Fit Error C
RTD, R to Temperature
- Datasheet/Calibration Constants a,b,c
R?
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 -40C to 125C (-40F to
    257F)

Texas Instruments TMP006
More Info http//www.ti.com/product/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 -200C to 1800C (-328F
    to 3272F)
  • Non-Linear Temperature/Resistance Curves
  • Up to 10 curve correction terms necessary for
    extremes

Omega Thermistor Products
More Info http//www.ti.com/lit/ml/slyp161/slyp16
1.pdf
12
Approximate Type E TC Voltage Outputs
Hot Gradient
No Gradient
Cold Gradient
-
13
Type E TC Voltage vs ?Temperature
/- 1.1C Approx, 0-94C
/- 20.5C Approx 0-1024C
14
Ice Bath Cold Junction Compensation
  • Provides absolute temperature measurement vs 0C
  • Impractical for many applications to have an ice
    bath

http//en.wikipedia.org/wiki/Thermocouples
15
Software Cold Junction Compensation
Remote Thermocouple
Analog to Digital Converter
Local Temp Sensor
Cold Jct T/V Known
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
More Info http//www.maxim-ic.com/app-notes/index
.mvp/id/4026
16
Integrated Thermocouple Interface
Adafruit Breakout Board for MAX6675 Type K
Thermocouple Range 0 to 1024C, Resolution
0.25C SPI Serial Interface Many other simple
thermocouple interface products available
More Info http//www.adafruit.com/products/269 Ex
ample Code http//www.ladyada.net/learn/sensors/t
hermocouple.html
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 -55C to 150C (-67F to
    302F)
  • Linear Temperature Curves w/ Error Bounds

Example SOT-23-6
Microchip Tech. MCP9701A TO-92 Package
Microchip Tech. TC1047A SOT23 Package
Maxim Integrated Products MAX6626 SOT23-6 Package
18
Tonights Sensors
  • MCP9701A
  • TC1047A
  • Output 0.4V 19.5mV/C
  • Range -40C to 125C
  • Accuracy /- 2C (0-70C)
  • Supply 3.1-5.5V _at_ 6uA
  • Output 0.4V 10.0mV/C
  • Range -40C to 125C
  • Accuracy /- 0.5C (0-70C)
  • Supply 2.3-5.5V _at_ 60uA

19
ADC High Level Concept
Analog Domain
Digital Domain
ADC
Input Voltage
Compare
Output Count
Software Vin count(5/1023) Vin 2.498V
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? 210 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
    0.00488V/count

21
Let The Hands-On Activities Begin!
  • Arduino
  • Processing
  • 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)
  • 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

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

23
Step 1 Sensor Wiring
  • MCP9701A
  • TC1047A

Red 5V Blue GND White Vout -gt Analog A0
Red 5V Black GND Blue Vout -gt Analog A0
24
Step 2 CodeReading 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)

Initialize Variables and Peripherals
Main Loop
25
Step 3 CodeCalculating Voltage and Temperature
  • void loop()
  • // Read Analog Channel 0
  • int analogValue analogRead(0)
  • // Calculating Voltage, VREF5V,0V
  • float voltage analogValue 5 / 1023.0
  • // Calculating Degrees C (Volts-0.400) /
    19.5mV
  • float deg_C (voltage - 0.400) / 0.0195
  • // 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 (" ")

Main Loop Modification
MCP9701A Only For TC1047, use (voltage-0.5)/0.01

26
Processing Visualizations
Just Landed 3D Visualization of Twittering
Travelers
27
Processing Orientation
  • 1. Software Installation
  • 2. Examples Library Run-Thru
  • 3. Arduino Night IV Code!

28
Processing Code
  • 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

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! VIR -gt RV/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 (Rs) 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. 2.5V _at_ 25C)

?
?
?
36
Measuring Resistive Sensors
  • 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
Write a Comment
User Comments (0)
About PowerShow.com