Crossed a major hurdle yesterday – the sensor package now communicates back and forth with the HyperRail hub.
The sensors wait for a signal from the hub, which sends an array of zeros and ones telling each sensor whether or not to take a reading. Once the readings are complete, the data is saved to the Adalogger SD card, then the values are sent back to the hub.
Next, we’ll work on the timing at the hub to move the sensors a specified distance, wait for data, then move on. After that, I’ll work on a live stream to the internet (Adafruit.io or Google sheets) from the hub.
Abstract: I have assembled the new evaporometer. This post will be a quick update of the progress.
Update: Here is an image of the assembled Evaporometer Type S:
I started by assembling the electronics on the inside because that would be the fastest thing to do. This also included the strain gauge and then humidity/temp sensor that goes on the lid of the system. Then I did the wiring of the light sensors because that would take the longest. The light sensor wiring was the longest because of the intricate soldering on the pins of the sensors, plus passing all the wiring through the cordgrip was very time-consuming.
In the end, the whole assembly takes about 2-2.5 hours to accomplish. This is not counting the time to print the parts. At the time of this post, we are still working on three other evaporometers:
And we have more on the printer.
In total we are making four evaporometers with the ETA attachment and four without it.
I have created a new version of the evaporometer where everything is stacked. The main reason for this is to shade the strain gauge from the sun. In this post, I will summarize the design of the evaporometer and show some images of the early iterations of this design.
The image above shows the CAD of the casing of the electronics; inside it will also hold a 6000mAh battery. This part will have an attachment, like the previous versions, where it will have a slide mechanism for easy setup. This version also has a cork gasket so that it will have a better seal between this piece and the cap making it weatherproof.
The image above shows the important elements of the cap. The first, the strain gauge will connect directly to the cap. The second, the little hump that is close to the edge will allow airflow through a slit that will be going right next to the SHT31 sensor, allowing for Humidity/Temp data. And last, the little hole that will allow for the wiring of the strain gauge to go to the microcontroller.
The water container was changed much from the last iteration. This iteration alllows for the strain gauge to be connected from the bottom.
The container is actually made from two pieces. The first piece is bolted to the bottom of the container and then that same piece gets bolted on the strain gauge. The image above shows the assembly of the pieces.
The image above is the attachment that will hold the two TSL2561 sensors. The bottom sensor will have attached using a twist lock mechanism and the top will be on a swivel.
A temporary voltage divider circuit was created with resistors to knock the K30’s data lines down from 5V to 3.3V for the Feather. A logic level shifter (https://www.sparkfun.com/products/12009) is on its way for the proper setup.
I’ll work on getting everything up on the GitHub page including wiring.
A probe was built as described in this build-guide. The following data was returned from the sensor.
An Adafruit Feather M0 with Lora capabilities was used to take measurements from the sap flow sensor. It activated an NPN mosfet that was connected in series with the +battery the heater probe and ground (or -battery).
Analog values were recorded by the board’s dedicated analog in pins. As per default, these readings were 10-bit although the M0 chip has the capability to do 12-bit ADC (detailed in this link). This would increase the theoretical precision four-fold and is something that should be investigated in the future. These raw values were logged onto an SD card. The electronics were run off of a 4AH battery until it died (after around days).
Additionally, an Adafruit SHT31-D breakout board was wired up and placed in the enclosure to provide ambient temperature values that also recorded day-night cycles.
The following graph was determined from the plant data. As you can see, there is a cyclic pattern happening, with the temperature differential. However, there are also several large “spikes” in the data. Talking with the greenhouse manager, it turns out that the timing of those spikes corresponds directly with the time he waters the plants. Best guest, water either cooled down one of the probes or got into the connections and acted as a short briefly before evaporating. The full raw data can be downloaded here.
To determine the exact temperatures from the two probes, two equations were used. The first one was a simple voltage divider equation to get the resistance of the thermistor. From the resistance, the thermistor beta equation was used to determine the temperature. The beta value for the beta value of the thermistor used (link here) was determined from its product datasheet. Unfortunately, the exact equations used were removed when I saved the file as its native CSV format after editing it in excel instead of saving it in an excel format (learn from my mistakes!).
This post will provide step by step instructions on how to build your own thermal dissipation sap flow sensor. Seperate blog posts fully explain the what a thermal pulse sap flow sensor does, the idea behind this design, and the code involved (coming later).
Apply thermal epoxy
Wire it up
Install in a plant.
Step 0: Required Tools
Before jumping into the project, it’s important to mention that this project requires a few specialty devices to make.
When ordering the electronic parts I would highly suggest you buy spare parts, especially any 0603 resistors (I baked those into the single sensor BOM). It’s important to note the tolerance of the bias resistor (line 5), a lower tolerance can be used if it is calibrated for (a later blog post should talk about this).
Step 2: Solder Probes
Once you’ve received all the parts, it’s time to break out the soldering iron, tweezers, and reading glasses (optional) to tackle the most difficult step of this build: soldering on US0603 sized resistors. Soldering these on is a major test of patience even for veteran electrical engineers, but not impossible for first-time solders. Here are a few tips and tricks that should help: article from build-electronic-circuits.com, video from Engenuics Technologies.
For the current design, three resistors need to be soldered: two thermistors and one low-ohm heater resistor. I find it helpful to mark which one is which immediately after soldering with some nail polish so I don’t get them confused because they look identical.
After the tiny resistors are in place on the end of the probe, its time to move down and solder on connectors on all the probes, 100K ohm bias resistors on the thermistor probes, and “short” the bias resistor on the heater probes using a large clump of solder on the 0603 pads (circled in red below). Use a multimeter to make sure all solder points are good and that the probe resistor is not shorted. The temperature probe should have a resistance of ~100k (this will vary based on temperature). The heater probe should have a resistance of 50 ohms (or whatever heater ohm is chosen).
As kind of a placeholder, the current connectors on the probes are 90 deg female headers. Eventually it would be a good idea to add a waterproof connector onto the ends; I’ve had my eye on TE’s DEUTSCH DTF13-3P for a while for this purpose.
Step 3: Apply Thermal Epoxy
The next step involves the thermal epoxy. This is used in order to evenly spread out the effect of the heat pulse and to get better contact when inserted into a tree bore-hole. This is best applied using a 3D printed mold. Ideally, this would be printed on a high resolution SLA printer because of the small size of the mold. Formlab’s Form 2 was used to make the molds in the images; it provides up to 0.025 mm layer size. It’s also suggested that mold release spray be used on the inside of the mold to help the epoxy from sticking.
The epoxy in the BOM is a two part epoxy with a curing time of 45 minutes. To use, squeeze out equal parts from the A and B syringes and mix this well with a mixing stick before applying this to the inside of the mold. Put the mold on the tip of the probe so that the resistor is centered and press down. Gently wipe away any excess epoxy. Wait at LEAST 45 minutes before removing the mold, suggested overnight. Make sure that disposable gloves are used during this step.
After the epoxy is set, gently wipe with sandpaper to remove any major impurities. Next, coat the entire probe with silicone conformal coating with two coats, letting dry completely in between. This will seal the epoxy to prevent plant moisture from seeping in and changing the properties of the probe over time. It will also waterproof the rest of the board. Make sure to avoid getting and silicone in the connector.
Step 4: Wire Things Up
The probes should be wired to the board as shown to work with the current code.
If you’re feeling savvy, feel free to play around with what pins are used. It’s important that the probes output goes to an analog in pin on the M0 (A0 to A5 shown below). The trigger can be moved to any pin, provided that the code is updated to match.
The heater probes could be attached to the 3.3V output pin (identified by “3V”) in order to further stabilize the power delivered as battery voltage decreases as it dies but the 3.3V should always be the same. However, this would reduce the energy efficiency of the system as the 3.3V output pin goes through the M0’s internal voltage regulator which burns off the excess voltage as heat. Also, the 3.3V supply has a max supply of 500mA which is near the current draw of a single heater probe.
Step 5: Program the Microcontroller
The code for the basic program described in this build guide is posted at this link. A future blog post will walk through the important functions. Further in the future, a stand alone library and/or incorporation with project Loom is planned.
If you’ve never used an Feather M0 before, check out these two pages on Adafruit’s tutorial:
If you’ve never programmed in Arduino before (or ever), I would highly recommend reading though a few of the fundamental tutorial pages on the Arduino website until you grasp basic the basic concepts and idea of what Arduino is. Linked here.
Step 6: Install in Plant
This part of the process will change slightly based on what plant this is being installed into.
In order to to ensure that the probes are properly spaced, a 3D printed guide should be used. This version has a 7mm spacing between the probes. Future tests should test with different probe spacing. This doesn’t need to be as precise as the thermal epoxy mold; I used a Lulzbot Taz 5.
Insert the probes into their respective holes in the guide with the heater in the middle. Turn all of the PCB boards to face the thin side of the guide such that all the boards are parallel and facing to the same side (not up or down); this will help to deliver the heat pulse to the thermistors symmetrically. Optionally, use epoxy/superglue to fix them in place.
If you’re installing in a tree, holes will need to be drilled into the wood at a proper diameter (~2.75 mm) using an additional “guide”. As of now (6/11/2018) these have not been tested in a tree.
Based on preliminary tests it should take about a day for the temperature to regulate and good data to start coming in. A later blog post will go into further detail on best practices for installing in different plants (especially trees) after some more tests are conducted. Potential things include: installing all probes in the north side of plants to avoid the sun (south if you’re on the wrong side of the world), filling any drill hole cavity with thermal grease via a syringe prior to inserting the probes (improve contact with the tree) and filling the end of the hold with putty/glue to seal it.
If you have any questions or suggestions for this design please please please reach out to me, Brett, at email@example.com. Happy building!
One metric for plant health is simply how “hydrated” the xylem is. This can be an indication of how much water the plant has been drinking and could change if it is living in a stressful environment.
This sensor would be very similar to capacitance sensors used to measure volumetric water content (VWC) in the soil. An open sourced implementation of that is the Gravity Capacitance Soil Moisture Probe which is from DFRobot. It uses the TLC555I pulse generator to generate a signal which passes through a transmission line (on a pcb) that is immersed in the soil. Depending on the VWC of the water, the properties of that embedded transmission line changes.
For the tree implementation, the transmission line would go along a probe similar to the one used for the thermal sap flow sensor.
By far the most annoying part of designing a thermal sap flux probe sensor is the “thermal” part. Without a proper heat pulse, there is no sensor. The problem is generating heat requires raw energy. According to my calculations, the heater makes up ~99% of the total energy requirements for this sensor. One of the goals of this project is to make the sap flow sensor as energy efficient as possible which will require a lot of testing to find the most efficient way to send out a heat pulse.
To find that maximum efficiency, there are a couple of design “knobs” that can be adjusted to find the maximum efficiency. Unfortunately, due to the short amount of time on this project, not all of these are going to be tested. Here is a list with what I believe are going to be the most important factors first:
Energy Delivered (joules)
Time of Pulse (second)
Depth into Tree (inches from the edge of the tree’s cambium)
There’s a possibility that a “wrap” sensor could be possible like Dynamax’s Dynagague which uses thermojunctions on a flexible PCB
Size of the Probe
The *IDEAL* Physics
I’ve put together a simple spreadsheet of a few different heater resistance values. Since this sensor is primarily being designed to integrate into other OPEnS Lab projects (namely the Evaporometer) a 3.7 voltage supply is assumed (uses 3.3V logic but runs off of a 3.7V battery, the heater will draw power from the battery).
One thing that should be noted when finalizing the resistance: the wattage rating for the resistor. There exists a lot of SMT resistors on the market, Digikey lists near 50 thousand, however, only a small minority possess the wattage requirements to provide that much heat (this can be seen in the “wattage” column of the attached table). If a resistor is chosen that does not satisfy the wattage requirements it will most likely fail. If a specific resistance is desired that is not available at this wattage, two identical resistors can be placed together in series, essentially halving this wattage requirement.
The temperature delta was calculated assuming that the heat capacitance of sapwood is 8 joules/C. This is an estimation.Further research into the exact heat capacitance of sapwood should be conducted.
Thermal sap flux (or flow) sensors have been popular amongst environmental sensing experts since the mid-20th century. They measure the velocity of sap through the stem or trunk of a plant using an array of heaters and temperature sensors.
A modern sap flow variant, proposed by Grainer, is made up of two temperature sensing probes directly above and below a heater probe—all spaced evenly. When a measurement is taken, the heater probe turns on and emits a heat pulse for several seconds. Then the temperature difference between the upper and lower probe is recorded. The temperature difference over time can be used to track sap flow (the specifics of this will be talked about in a later blog post).
To construct a sap flux sensor using surface mount technology (SMT) which can be manufactured using an entirely automated setup given a pick-and-place machine but can still be made by hand by a person with adept soldering skills.
Limitations in commercial PCB etching process are a limiting factor in the minimum size of these probes. Also, if a sufficiently small probe size is achieved, the number of plant types this can be used on increases. For example, a large probe may only be used on trees of a sufficient diameter while a smaller one could be used on crops such as corn.
For the temperature sensor probe thermistors were chosen to be the sensor component. Thermistors were chosen because of their high level of sensitivity when compared to other sensors. Thermistors act as variable resistors that alter their resistance based on their temperature. The main drawback to using thermistors is that their output is not linear, but rather follows a logarithmic curve and so they are difficult to work with. For this probe, a voltage ladder was used to retrieve the resistance of the thermistor as shown in the schematic in the results section.
The heater element consists of a 50 ohm, US0603 footprint resistor with a 0.38 wattage rating. A future blog post will go more in-depth on how the resistance was calculated.
To maximize contact with the plant’s xylem, thermal epoxy was used in a mold around all three PCB probes. This was designed in SolidWorks 2017 and printed on a FormLabs Form 2 SLA printer for maximum resolution. The inside of this mold was coated in mold release spray to prevent the thermal epoxy from sticking to it. After the epoxy was sufficiently dried, a layer of silicone conformal coating was applied to waterproof each of the probes.
To control the sensor, a microcontroller with built-in ADC’s (here an Adafruit M0 Trinket) was used. The output pins on the temperature sensors were connected to the analog inputs of the microcontroller. An NPN transistor sat between a voltage source and the heater and was controlled by an output pin on the microcontroller.
Images of the final PCB are shown below. It uses standard US0603 footprint resistors.
The bill of materials used is below.
A future blog post will go into a more detailed, step-by-step tutorial on how to build your own! It will also have finalized design files and best pracitces.
Room for Improvement
As with any project design, there are a multitude of ways that this could be improved. A few ideas with good potential are listed below in no particular order:
Linearizing voltage output using a parallel thermistor configuration
A/D conversion on the probe sensor to avoid signal loss across the line
Housing to protect the temperature probes from solar radiation
Insulation to protect the probes from ambient temperature fluxes