Difference between revisions of "Electronics notes/Temperature sensing"
m (→DHT11, DHT22) |
m (→Thermistor) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 25: | Line 25: | ||
===Thermistor=== | ===Thermistor=== | ||
− | Most resistors vary their resistance with temperature. A thermistor ('''therm'''al res'''istor''') | + | Most resistors vary their resistance with temperature. |
+ | |||
+ | A thermistor ('''therm'''al res'''istor''') | ||
does it intentionally, and more pronounced. | does it intentionally, and more pronounced. | ||
Line 61: | Line 63: | ||
as a current limiter and/or (self-resetting) overcurrent protector. | as a current limiter and/or (self-resetting) overcurrent protector. | ||
− | One use is to | + | |
− | * place in series with the primarily | + | One use is to spread the inrush current (in transformers and such) over more time: |
+ | * place in series with the primarily coil | ||
* when cold (just switched on) it typically has a few hundred ohm resistance | * when cold (just switched on) it typically has a few hundred ohm resistance | ||
* and once it warms it (few seconds later) goes to under an ohm. | * and once it warms it (few seconds later) goes to under an ohm. | ||
Line 73: | Line 76: | ||
===Diodes=== | ===Diodes=== | ||
− | The voltage across a diode <!--(or any PN junction?{{verify}}--> will decrease by | + | The voltage across a diode <!--(or any PN junction?{{verify}}--> will decrease by approx 2 mV per °C in a fairly linear way. |
You need amplification and probably a DAC, | You need amplification and probably a DAC, | ||
Line 97: | Line 100: | ||
: reported to 1% but don't assume more than ±5 %RH accuracy | : reported to 1% but don't assume more than ±5 %RH accuracy | ||
− | E.g. in | + | E.g. in a quick test with two DHT11 modules next to each other, temperature was reported 0.0 to 1.0 degrees apart on average, but humidity was ~11 %RH apart on average (fairly consistently so you can probably improve this a little via calibration against a known value). |
Latest revision as of 16:04, 3 December 2019
This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me) |
Contents
Thermocouple
Inexpensive High range of temperature Not highly accurate - assume you won't get better than 1 degree Celcius of resolution, less if you don't calibrate well
Age with time and high-temperature use, so will need occasional recalibration and/or replacement.
They produce voltage due to the thermoelectric effect - on the order of millivolts so most uses, and accurate use, requires amplification (with high input impedance to avoid the measurement affecting the thermocouple itself).
https://en.wikipedia.org/wiki/Thermocouple#Types
Thermistor
Most resistors vary their resistance with temperature.
A thermistor (thermal resistor) does it intentionally, and more pronounced.
NTC: negative temperature coefficient, resistance drops (logarithmically) as its body temperature increases
PTC: positive temperature coefficient,
The 'at-rest' resistance varies with intent
They are frequently used in temperature sensing, temperature regulation, and (over)current protection.
Perhaps the he simplest way to get a voltage from a thermistor (think ADC, comparator) is to have it be one leg of a voltage divider.
Power thermistor
A power thermistor is a very low-resistance (NTC) thermistor in series with your main current, as a current limiter and/or (self-resetting) overcurrent protector.
One use is to spread the inrush current (in transformers and such) over more time:
- place in series with the primarily coil
- when cold (just switched on) it typically has a few hundred ohm resistance
- and once it warms it (few seconds later) goes to under an ohm.
This lessens the magnitude of the sudden current that can happen right after you switch something on.
See also:
Diodes
The voltage across a diode will decrease by approx 2 mV per °C in a fairly linear way.
You need amplification and probably a DAC, accuracy isn't great, but it's very convenient inside FPGAs, processors, and such.
Unsorted
DHT11, DHT22
Measures:
- Temperature (NTC thermistor)
- 0-50 ℃
- reported to 1℃ but don't assume more than ±2℃ accuracy
- Relative Humidity
- Range: 20-90 %RH (note: range and accuracy vary somewhat with temperature)
- reported to 1% but don't assume more than ±5 %RH accuracy
E.g. in a quick test with two DHT11 modules next to each other, temperature was reported 0.0 to 1.0 degrees apart on average, but humidity was ~11 %RH apart on average (fairly consistently so you can probably improve this a little via calibration against a known value).
Pins: 3.5-5.5V, data, NC, Gnd. You will want a pullup resistor on the data pin, mostly because it's bidirectional onewireish(verify).
Power: ~0.5mA while measuring, 0.1mA idle
DHT22:
- RH: 0-100% range, 2-5% accuracy
- Temp: -40 to 80°C range, ±0.5°C accuracy