<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>drift &#8211; Squix &#8211; TechBlog</title>
	<atom:link href="https://blog.squix.org/tag/drift/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.squix.org</link>
	<description></description>
	<lastBuildDate>Tue, 13 Dec 2016 20:17:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.8</generator>
<site xmlns="com-wordpress:feed-additions:1">121913304</site>	<item>
		<title>ESP8266: Calibrating the Wifi Scale With Temperature Compensation</title>
		<link>https://blog.squix.org/2015/06/esp8266-calibrating-wifi-scale-with.html</link>
					<comments>https://blog.squix.org/2015/06/esp8266-calibrating-wifi-scale-with.html#comments</comments>
		
		<dc:creator><![CDATA[Daniel Eichhorn]]></dc:creator>
		<pubDate>Sun, 21 Jun 2015 16:43:00 +0000</pubDate>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[drift]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[load cell]]></category>
		<category><![CDATA[temperature compensation]]></category>
		<category><![CDATA[wifi scale]]></category>
		<guid isPermaLink="false">http://blog.squix.org/2015/06/21/esp8266-calibrating-wifi-scale-wi/</guid>

					<description><![CDATA[In my last post I talked about my self made scale. There are plenty of applications for a sensor that can sense the weight of things. But I guess the scale should not be tared (or set to zero) every time the ESP8266 wakes up ... <p><a class="read-more btn btn-secondary" href="https://blog.squix.org/2015/06/esp8266-calibrating-wifi-scale-with.html">Read More</a></p>]]></description>
										<content:encoded><![CDATA[<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
In my last post I talked about my self made scale. There are plenty of applications for a sensor that can sense the weight of things. But I guess the scale should not be tared (or set to zero) every time the ESP8266 wakes up from sleep. The load cell is basically a resistor that reacts to tearing and pushing of the metal bar. But like all resistors, they are prone to temperature drift. This means if I want to measure the weight of an object over a long time it either has to be under constant (room) temperature or I compensate for the drifting readings from the sensor by measuring the temperature and correcting the drift by software.</p>
<p>So for this test run I put the scale attached to the NodeMCU in a plastic box on my balcony. Together with the weight (drift) I&#8217;m also measuring the temperature. My hope is that this way I can learn how the load cell drifts with temperature. So now I hope for a cold night and a hot day to get a big range for my test;-)</p>
<h3 style="text-align: left;">
Update (next day)</h3>
<div>
So with thingspeak I could collect some good samples: The temperature went from 15°C up to 21°C and a scatter plot showed that the drift of the load cell was pretty much linear in this range:</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;">
<tbody>
<tr>
<td style="text-align: center;"><a href="https://i0.wp.com/3.bp.blogspot.com/-eOPZFBtBysg/VYhcSkBuOOI/AAAAAAAAAWM/P0_RYm5xuL8/s1600/Screenshot%252B2015-06-22%252B21.02.13.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img data-recalc-dims="1" fetchpriority="high" decoding="async" border="0" height="236" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/06/Screenshot2015-06-2221.02.13.png?resize=320%2C236&#038;ssl=1" width="320" /></a></td>
</tr>
<tr>
<td class="tr-caption" style="text-align: center;">Scatter Plot of the load cell&#8217;s temperature drift: on the Y axis<br />is the deviation from a tared cell, on the X axis the temperature</td>
</tr>
</tbody>
</table>
<div>
So I got a sloap and an offset for line fitting into this scatter plot using the SLOAP and INTERCEPT functions in Excel and Google Spreadsheet. I then used these values to find the offset depending on the current temperature. Now see the result:</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;">
<tbody>
<tr>
<td style="text-align: center;"><a href="https://i0.wp.com/1.bp.blogspot.com/-6bG3fc-BExc/VYhdU4aOkQI/AAAAAAAAAWk/c0zRjMTO1YU/s1600/Screenshot%252B2015-06-22%252B21.01.53.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img data-recalc-dims="1" decoding="async" border="0" height="177" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/06/Screenshot2015-06-2221.01.53.png?resize=320%2C177&#038;ssl=1" width="320" /></a></td>
</tr>
<tr>
<td class="tr-caption" style="text-align: center;">The uncompensated deviation from zero</td>
</tr>
</tbody>
</table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;">
<tbody>
<tr>
<td style="text-align: center;"><a href="https://i0.wp.com/4.bp.blogspot.com/-if7oj9k5PQM/VYhdgprZVgI/AAAAAAAAAWs/nVaRaKe0OC0/s1600/Screenshot%252B2015-06-22%252B21.01.46.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img data-recalc-dims="1" decoding="async" border="0" height="179" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/06/Screenshot2015-06-2221.01.46.png?resize=320%2C179&#038;ssl=1" width="320" /></a></td>
</tr>
<tr>
<td class="tr-caption" style="text-align: center;">The temperature at the same moment</td>
</tr>
</tbody>
</table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;">
<tbody>
<tr>
<td style="text-align: center;"><a href="https://i0.wp.com/4.bp.blogspot.com/-cY9OdUKOlxE/VYhdqbHFMVI/AAAAAAAAAW0/aDpfjMLoHAQ/s1600/Screenshot%252B2015-06-22%252B21.01.39.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img data-recalc-dims="1" loading="lazy" decoding="async" border="0" height="178" src="https://i0.wp.com/blog.squix.org/wp-content/uploads/2015/06/Screenshot2015-06-2221.01.39.png?resize=320%2C178&#038;ssl=1" width="320" /></a></td>
</tr>
<tr>
<td class="tr-caption" style="text-align: center;">The weight calculated after subtracting the temperature drift</td>
</tr>
</tbody>
</table>
<div>
Looks pretty good to me! I am aware that I made some possibly wrong assumptions, but hey, this is hobby science and pragmatism is all I can afford with the little time I have for this project;-).</div>
<div>
</div>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.squix.org/2015/06/esp8266-calibrating-wifi-scale-with.html/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">40</post-id>	</item>
	</channel>
</rss>
