Weighing Plants - Part 2

by phidgeteer in Circuits > Sensors

180 Views, 0 Favorites, 0 Comments

Weighing Plants - Part 2

weighing_issues.jpg

This project is based on the Weighing Plants project which can be found here: https://www.instructables.com/Weighing-Plants/


In part one, we set out to monitor the moisture of a plant and the weight of a plant to determine the best time to water it. After setting up a scale and monitoring system, we found some interesting issues with our data:

  1. Our weight seemed to fluctuate up and down when we expected it to slowly go down.
  2. Our soil moisture ramped up quickly after watering but then dropped suddenly.

In this project, we will take a look at why these things occurred, and how we fixed it!


Supplies

weight_plants_supplies.jpg

Reference previous project!

Impact of Temperature on Load Cell

plant_temp.jpg
weight_v_temp.PNG

When looking at the fluctuations in the weight data, we had a hunch that temperature may be impacting our measurements. In order to confirm this, we added two temperature sensors to our project and logged the data.


The first sensor is a Humidity Phidget (HUM1000) that is great for measuring ambient temperature. The second was a Thermocouple Phidget (TMP1101) that has higher resolution data. Only one temperature sensor is required, but we added both because they were available.


In the second image above, we compare the ambient temperature to the weight value. As you can see, there is definitely a correlation between the two! Now that we know that temperature is impacting the load cell, we can modify our code to mitigate it.

Temperature Compensation

We modified the code from the previous project and added some temperature compensation:


setTemp = 22
scaleFactor = 18
weightval = 24168000 * (scale.getVoltageRatio() - scale.offsetVal)
correctedWeight = weightval - ((hum1000Temp - setTemp) * scaleFactor)


This compensation can likely be improved and we will update this project when an improvement is available.

Temperature Compensation - Results

plant_corrected.PNG
plant_weight_web.jpg

After applying the compensation, our weight graph looks much better!

Moisture Graph

plant_moisture.jpg

After solving the weight issue, we started to look at the Moisture Phidget to see what could have gone wrong. Luckily, this was quite an easy fix! It turns out, the conformal coating on the Moisture Phidget had been previously damaged, and after swapping it for a new one, the data looked much better.


There is still a creep up in Moisture Data before it starts decreasing which is quite interesting. This is something we will be keeping an eye on in future watering events.

Questions?

Let us know if you have any questions about this project by leaving a comment below.