<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Building a Dual Thermistor Air Temperature Sensor</title><link>/technologies/open-source-hardware/b/blog/posts/building-a-dual-thermistor-air-temperature-sensor</link><description>Introduction 


 How does it work? 


 Building a Temperature Sensor 


 Summary 

 IntroductionThis blog post describes a really simple (near-trivial) project – wiring up a thermistor! Thermistors are great, but have a limited operational temper...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Building a Dual Thermistor Air Temperature Sensor</title><link>https://community.element14.com/technologies/open-source-hardware/b/blog/posts/building-a-dual-thermistor-air-temperature-sensor</link><pubDate>Mon, 10 Feb 2020 10:16:30 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:aaed2b87-1285-4976-9736-37a2e4ff1e18</guid><dc:creator>dubbie</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;A very interesting project. It will be interesting to see some real room temperature data and to see how the temperature varies due to drafts, people walking about and so on.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I was once involved with trying to measure the temperature inside a fridge using a battery powered sensor and Bluetooth communication link. We didn&amp;#39;t get very far and I couldn&amp;#39;t think of any way of calibrating the temperatures obtained. I cannot remember what temperature sensor was used.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Dubbie&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8695&amp;AppID=18&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Building a Dual Thermistor Air Temperature Sensor</title><link>https://community.element14.com/technologies/open-source-hardware/b/blog/posts/building-a-dual-thermistor-air-temperature-sensor</link><pubDate>Sun, 09 Feb 2020 12:04:59 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:aaed2b87-1285-4976-9736-37a2e4ff1e18</guid><dc:creator>michaelkellett</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Ah, a fine excuse to talk about my fridge controller.&lt;/p&gt;&lt;p&gt;When I bought the fridge (at work) I used it to temperature test some weighing scales that were too big for my fancy env. chamber. It was controlled by a little industrial PC running Windows 2K and using&amp;nbsp; a PICO thermocouple logger to measure temperatures. The weighing scales are long gone and I just used the fridge for shopping and milk. Eventually the PC died (last June) so I built a new controller for the fridge.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This is based on an ST Nucleo board with an STM32G070 processor. It measures temperatures for compressor, ambient, fridge and load using precision thermistors and the 12 bit ADC on the processor. It was also an excuse to try the amazingly cheap Chinese 8 digit LED displays.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I haven&amp;#39;t done any detailed checking of the thermistors which are compensated using the classic equation - I was more interested in the control of the fridge.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x465/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-aaed2b87-1285-4976-9736-37a2e4ff1e18/3480.contentimage_5F00_205992.jpg:620:465]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The display means that the fridge interior is at 4C and the compressor body at 16C. (That&amp;#39;s rather cool for the compressor - I wonder if the sensor has fallen off - the data isn&amp;#39;t used except for the display.)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The controller algorithm isn&amp;#39;t that clever but it does take care to observe minimum on and off times for the compressor.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The Chinese display uses a MAX7219 The whole display with LEDs cost less than half of what normal suppliers want for the 7219 on it&amp;#39;s own. The same people sold me bag of 7219s for about 30p each.&lt;/p&gt;&lt;p&gt;The display works OK but occasionally stops listening to instructions - my remedy for this is to reset it at intervals.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;My thermistor is in series with a low temperature coefficient resistor and the chain is biased by the ADC reference voltage.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here&amp;#39;s the code:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;ref_r is the value of the series resistor&lt;/p&gt;&lt;p&gt;therms25 is the resistance of the thermistor at 25C&lt;/p&gt;&lt;p&gt;r_cable is the resistance of the wire to the thermistor&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;static float calc_temperature(uint8_t chan)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;float fadc;&lt;/p&gt;&lt;p&gt;float rt;&lt;/p&gt;&lt;p&gt;float t;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;fadc = adc_data[chan];&lt;/p&gt;&lt;p&gt;if (fadc &amp;gt; MAX_ADC) fadc = MAX_ADC;&lt;/p&gt;&lt;p&gt;if (fadc &amp;lt; MIN_ADC) fadc = MIN_ADC;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;rt = (ref_r * fadc)/(fs - fadc);&lt;/p&gt;&lt;p&gt;rt -= r_cable;&lt;/p&gt;&lt;p&gt;t = (1.0/298.15) - ((1.0/therm_beta)*log(rt/therms25[chan]));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p&gt;t = 1/t;&lt;/p&gt;&lt;p&gt;t -= 273.15;&lt;/p&gt;&lt;p&gt;temperatures[chan] = t;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This is it controlling the fridge:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x93/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-aaed2b87-1285-4976-9736-37a2e4ff1e18/6518.contentimage_5F00_205993.jpg:620:93]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The precision thermistors I used are about £0.80 each (NTCLE413E2103F102L, Farnell 2492885) - how much do the dual linear parts cost ?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;MK&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8695&amp;AppID=18&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Building a Dual Thermistor Air Temperature Sensor</title><link>https://community.element14.com/technologies/open-source-hardware/b/blog/posts/building-a-dual-thermistor-air-temperature-sensor</link><pubDate>Sat, 08 Feb 2020 19:26:56 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:aaed2b87-1285-4976-9736-37a2e4ff1e18</guid><dc:creator>neuromodulator</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Very nice! I&amp;#39;m doing something very similar to what you did in the first blog, which I just noticed now. I&amp;#39;m using a single unbranded thermistor which I first characterized its T/R curve using a lab mercury thermometer and a 6.5 digit DMM. As I took more than 3 T/R measurements the problem turned into an overdetermined system, which I solved using a linear regression (which is what it is if you consider R and T constant, and A, B, C variables). Just like you, I also generated a T/V curve with different resistances in the divider, but what one really wants to maximize is not the voltage range but the minimum dV/dT, so basically I chose the resistance that had the highest minimum dV/dT in the T range of interest. &lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8695&amp;AppID=18&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>