You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-7
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,22 @@
1
1
#Thermistor
2
2
3
-
This class makes it simple for an imp to read an NTC (“Negative Temperature Coefficient”) thermistor and determine the temperature. Thermistors are essentially temperature-dependent resistors. To use as a thermometer, a thermistor is used as half of a resistive divider, where the voltage across the full divider is known. The Imp then reads the voltage at the center of the divider to determine the ratio of resistance of the thermistor and the bias resistor (also the nominal resistance of the thermistor), [from which the temperature can be derived](http://en.wikipedia.org/wiki/Thermistor).
3
+
This class makes it simple for an imp to read an NTC (“Negative Temperature Coefficient”) thermistor and determine the temperature. Thermistors are essentially temperature-dependent resistors. To use as a thermometer, a thermistor is used as half of a resistive divider, where the voltage across the full divider is known. The imp then reads the voltage at the center of the divider to determine the ratio of resistance of the thermistor and the bias resistor (also the nominal resistance of the thermistor), [from which the temperature can be derived](http://en.wikipedia.org/wiki/Thermistor).
4
4
5
5
**To add this library to your project, add**`#require "Thermistor.class.nut:2.0.0"`**to the top of your device code**
6
6
7
7
## Hardware
8
8
9
9
A resistive divider can be formed with the thermistor on the top or the bottom; this class allows for either configuration. The top of the divider should be connected to the same rail as an imp’s V<sub>DDA</sub> pin (or V<sub>DD</sub> pin, in the case of the imp001, as V<sub>DD</sub> and V<sub>DDA</sub> are internally connected). The bottom of the divider should be connected to ground.
10
10
11
-
The resistance of the bias resistor in the voltage divider should be equal to the nominal resistance of the thermistor (the resistance at T0). This simplifies the temperature calculation and allows the largest dynamic range.
11
+
The resistance of the bias resistor in the voltage divider should be equal to the nominal resistance of the thermistor (the resistance at T0). This simplifies the temperature calculation and allows the largest dynamic range.
12
12
13
-
The center of the divider must be connected to a pin capable of analog input. On the imp001, any pin can be used as an analog input. On the imp002 or imp003, only some pins can be configured this way, so check the [Imp Pin Mux chart](http://electricimp.com/docs/hardware/imp/pinmux/).
13
+
The center of the divider must be connected to a pin capable of analog input. On the imp001, any pin can be used as an analog input. On the imp002, imp003 and imp004m, only some pins can be configured this way, so check the [Imp Pin Mux chart](http://electricimp.com/docs/hardware/imp/pinmux/). The imp005 does not support analog input.
@@ -31,7 +31,7 @@ The ß and T0 parameters are all available on the thermistor datasheet:
31
31
| Parameter | Meaning |
32
32
|-----------|---------|
33
33
| ß | Characteristic of the thermistor. Most thermistors have many ß values listed, for various temperature ranges. Choose the value for the temperature range you will be operating in. |
34
-
| T0 | Temperature at which the nominal resistance (R) of the thermistor is measured. Typically room temperature (~25ºC) |
34
+
| T0 | Temperature at which the nominal resistance (R) of the thermistor is measured. Typically room temperature (~25°C) |
35
35
36
36
```squirrel
37
37
const b_therm = 3988;
@@ -66,4 +66,3 @@ server.log(kelvin);
66
66
## License
67
67
68
68
Thermistor is licensed under [MIT License](./LICENSE).
0 commit comments