A probe was built as described in this build guide. The following data was returned from the sensor. This probe is was designed by Dongjun Lee and Jonathan Fookes using the previous design from Brett Stoddard.
Because our probe was designed with an Ethernet connection, we created a PCB with an eight pin connector that sat directly on top of our Adafruit Feather M0 with Lora capabilities. Instead of using an NPN mosfet similar to the one used in the Orchid Test, a voltage regulator kept the voltage across the heater at a steady 3.3 V. These device was fully integrated with the LOOM interface for easy setup and implementation, as laid out in our LOOM implementation guide. The electronics were run with two batteries: 12 V, 2 AH to power the heater in pulses, and a 3.7 V, 2.5 AH battery to power the M0.
Similar to the Orchid Test, 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), therein increasing the theoretical precision four-fold.These raw values were logged onto an SD card.
The waterproof enclosure was built to contain the fully constructed circuit and each of the batteries. Even though the tree was too far away from the lab to successfully transmit and received LORA data, there is space for an antenna and LORA can be set up using the LOOM interface if desired. The waterproof Ethernet connector is where the probe can connect to the circuitry, ensuring a secure connection. A hot glue gun was used to add an extra waterproof seal.
Energy Saving: The Power Problem
Our design uses heat pulses in order to save energy. Given the current models and code for both the TDM and HRM sapflux measuring methods, we conducted a current draw test with the batteries we had on hand to see if our designs will be able to run continuously in the field for 2 weeks as requested.
Current Draw: 20.88 to 20.91 mA while on, 0.13 mA while off (not negligible)
TDM heater Pulse: 4 minute pulse every 30 minutes, aka 8 minutes an hour, 192 minutes per day. This is 3.2 hours.
The TDM probe uses: 67 mAh per day(Heater on) + 2.7mAh per day(Heater off) ~= 70mAh per day. The TDM heater probe can be on for 28.5 days with a 2,000 mAH battery.
Assume we measure SHT31D + probe temperatures + soil moisture
M0 Current draw: 25 mA in Idle, and +130mA when measuring and transmitting data. (25mA * 24h per day) + (130mA * 48sec per day) = 600 mAh(idle) + 1.73mAh(Transmit data) = 601.73 mAh per day. The M0 can run for 16.6 days when we use a 3.7V 10,000mAh battery.
Current Draw: 225 to 237 mA
HRM Heater pulse: 2.5 sec on and 2.5 sec off. It works on 2 minutes every 30 min, aka 2 minutes an hour, 48 minutes(0.8 hours) per day. 180 mAh to 190 mAh per day. The HRM heater can run for 10.5 days when we use a 12V 2,000mAh battery. For 2 weeks test, we need higher capacity of battery.
M0 Current draw: 25 mA in Idle, +130mA when measuring and transmitting data, and 156 mA when relay switch is on.
Relay switch is on for 2.5sec and off for 2.5 sec. It works on 2 minutes every 30 min, aka 2 minutes an hour, 48 minutes(0.8 hours) per day. (156mA *0.8h per day) + (25mA *23.2h per day) + (130mA * 48sec per day) = 124.8mAh(Relay on) + 580mAh(Relay off and idle) + 1.73mAh(Transmit data) = 706.53mAh per day. The M0 can run for 14 days when we use a 3.7V 10,000mAh battery.
TDM Test: Return of the Data
After a couple of failed test runs, we were finally able to graph data using our TDM probe. We used the Dynamax data calculation example from their website and created the following graph for the sap flow in a wild Cherry tree for about
We have a two-week long test of our TDM probes coming up in the following weeks, where we will be able to show more conclusively if our probes are providing accurate sap flow data.
HRM Test: The Phantom Data
Our first HRM test was a success, however we are still working on a method to calculate sap flow from the data we have collected. Below is the data we collected in the wild cherry tree. We are continuing to work with the Heat Ratio equation to plot Sap Flow in grams per hour with respect to time.
While we do not have calculations for Sap Flow yet, we know that a lower difference means that there is an increase in sap movement up the trunk of the tree, and a higher difference means less. We can infer this from the Heat Ratio Equation. The HRM difference data shows that the lowest difference occurs between ~11:30am and 7:00pm. This is consistent with our TDM data, shown in the section above. While our TDM measuring method is more complete and can render Sap Flow calculations, we are confident that our HRM measuring method can be used to produce accurate readings as well.
What’s next for the Sap Flow Team?
Now that we have gathered promising data from a tree, we will be deploying both our TDM and HRM prototypes in an orchard, where we will attempt to gather data for two weeks continuously. More on this to come!
The custom PCB’s are in, and the system is nice and stable. The Powerboost 1000c powers everything well, running off a 3.7V battery. The wireless inductive charging system also works as planned.
The first iteration of a 3D-printed enclosure could use a couple of adjustments, but it will work for initial testing. The main issue is that the HyperRail may be long enough to require an antenna for the nRF chip, which will not fit in the current enclosure.
The software reliably integrates the sensor system with the HyperRail with easy customization of time and distance intervals. Data can be transferred to the hub and forwarded to a second base with Ethernet capability up to 400 meters away. Construction, deployment, and experimentation begin in early September.
Check out the pics below for the enclosure, PCB, and powering system.
This post will provide step by step instructions on how to build your own thermal dissipation sap flow sensor using everything provided on this blog and the following steps: ordering / creating parts, soldering the probes, applying the thermal epoxy, wiring to an Ethernet cable, implementing the circuit, programming the microcontroller, and installing into the tree.
Order and Create Parts
Apply Thermal Epoxy
Wiring the Probe
Creating the Circuit
Programming the Microcontroller
Install in a Tree
Step 0: Required Tools
Before jumping into the project, it’s important to mention that this project requires a few specialty devices to make.
Below are two different bills of materials (BOM) that contain all that is required to build one of these sensors. The files for the pcb board can be found in this zip file. Base_v1 is the version we used in the design listed here. Base_v2 includes an updated switch to easily switch between TDM and HRM implementations (coming soon?). To edit, you will need to download Eagle by Autodesk as well as a few part libraries including Brett’s personal library of Eagle PCB parts. The total cost of a sensor is estimated to be just under $170! The comprehensive list of all parts used to make either an HRM or TDM probe run in working order are included in the Bill of Materials below.
The Feather M0 can be substituted for any micro controller with analog-in pins with some changes to the code to accommodate these new pins (mentioned briefly in Step 4) and if a different voltage batter is used, you should take a look at this blog post and change the heater resistor value. We used the Adafruit because their boards work well with each other. In addition, the Feather M0 with LoRa can transmit data for remote data gathering and troubleshooting. See more on that here.
When ordering the electronic parts I would highly suggest you buy spare parts, especially any 0603 resistors (baked into the single sensor BOM).
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 this design, two thermistors need to be soldered into their nodes on two of the probes, and a heater resistor on one of the probes. The location for these on the probe are illustrated in the picture below. (NOTE: Keep the thermistors and heaters separate so as not to confuse them)
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. In the past, this was done using a 3D-printed mold, but we discovered applying the mold by hand is just as effective.
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. Use the mixing stick to apply a thin layer of epoxy, gently wiping away any excess epoxy with a paper towel. Wait at LEAST 45 minutes to dry, suggested overnight. Make sure that disposable gloves are used during this step. t’s also suggested that mold release spray be used on the inside of the mold to help the epoxy from sticking. Once the epoxy has dried, lightly sand the probes to remove rough edges and create a smooth surface. Here is a picture of our HRM Ethernet probe for a visual of what the finished product should look like.
As we make more probes, we will include more pictures to show the application process in greater detail.
Step 4: Wiring the Probe
The probes should be wired to the board as shown to work with the current code.
We used an ethernet cable to connect the proper M0 pins to the probes as shown in the schematic. This was done by carefully routing our specially built PCB 8-Pin connector board (Base_v1 as listed above), specially designed to properly connect the probes with the color-coded guides listed below and the 8-pin connectors listed in the BOM. Cut off one end of the Ethernet cable to expose the 8 wires inside the protective inductor outside. Use the following schematics and Ethernet color chart to properly connect the probes so that they work as desired.
Insert probe guide from the PCB for which pin (on each probe) goes to which color of wire (with Ethernet color-coded cable pinout)
1 VCC – White & Orange – Pin 1 on the Heater Probe
2 A0 – Orange – Pin 2 on the Heater Probe
3 GND – White & Green – Pin 3 on the Heater Probe
4 V_BAT – Blue – Pin 4 on the Heater Probe
5 GND – White & Blue – Pin 5 on the Heater Probe
6 VCC – Green – Pin 1 on the Thermistor Probe
7 A1 – White & Brown – Pin 2 on the Thermistor Probe
8 GND – Brown – Pin 3 on the Thermistor Probe
1 VCC – White & Orange – Pin 1 on Thermistor Probe 1
2 A0 – Orange – Pin 2 on Thermistor Probe 1
3 GND – White & Green – Pin 3 on Thermistor Probe 1
4 V_BAT – Blue – Pin 4 on the Heater Probe
5 GND – Blue & White – Pin 5 on the Heater Probe
6 VCC – Green – Pin 1 on Thermistor Probe 2
7 A1 – White & Brown – Pin 2 on Thermistor Probe 2
8 GND – Brown – Pin 3 on Thermistor Probe 2
Here is a picture of our finished TDM probe. A picture of the finished HRM probe is included in thermal epoxy application section.
Step 5: Creating the Adafruit Board Circuit
The circuit for the sapflow probe is made with a variety of Feather boards from Adafruit, including Feather M0 with LoRa Radio, Power Relay FeatherWing, and Adalogger FeatherWing with SD add-on. Our custom PCB is also used, which has the voltage regulator used for the TDM method, the 8-pin connector, and tracing that allows to switch between the TDM and HRM methods (depending on which probe is ended up chosen). Currently, both models require a 3.3V battery that can power the Feather M0 board and a 12V battery that can power the heater. Below is a picture guide for how to set up the stack of boards, using a FeatherWing Tripler PCB board from Adafruit as a mount.
This TDM circuit for our probe uses a voltage regulator instead of the power relay. This is soldered directly onto our custom PCB. Below is on picture of the boards used for the TDM circuit. NOTE: not used with the 8-pin connector, this particular model was made before we had received these. Note the labels and picture caption for construction. For differences between the TDM and HRM implementations, visit our Second Tests: Cherry Tree page for an extensive list of differences.
Step 6: Program the Microcontroller
This device can be fully integrated with the OPEnS designed LOOM interface. The code for the program described in this build guide is posted here (LINK). This post (LINK TO LOOM) explains these different functions in LOOM and how to use them. The following is a setup guide for how to setup the user interface to run the Sap Flowmeter data collection.
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.
This is the current model of the enclosure. Its features include: snap-fit lid, compartments for the 3.3V & 12V batteries, mounts for the Adafruit FeatherWing tripler to hold the circuit in place, hole for the waterproof Ethernet cable gland, hole for LoRa antenna (6mm near the mounts), and hole for the soil/moisture sensor aux cable gland (9.5mm across from antenna hole). The compartments in the back right corner are to hold the batteries and prevent them from sliding around. The mounts on the base of the enclosure are design to hold M2 size screw bases. M2 screws fit through the holes in the Adafruit tripler board, thus securing it to the enclosure.
To fully waterproof the enclosure, we recommend treating the enclosure and its lid with acetone to fully seal the plastic. We also recommend lining the lid with a sealant (hot glue, caulk) to make sure no water seeps in and messes up the circuitry inside during testing. The lid of the enclosure, for now, takes some work to get off, so we designed handles to make this easier.
Again, the model for our enclosure is always updating as we improve our design, so this is not a final design by any means.
Step 8: Install in Tree
NOTE: Make sure to read and understand this section entirely before proceeding with an install.
In order to to ensure that the probes are properly spaced, a 3D printed guide should be used. This version has a 30 mm spacing between the center of the two outside probes. Future tests should test with different probe spacing. This doesn’t need to be as precise as the thermal epoxy mold; we used a Lulzbot Taz 5.
Once the probe is all set up, drill holes in the chosen tree such that each probes fits inside perfectly and inside the tree up to the probe guide. For the best results, drill the holes approximately 1 meter from the ground (CITE). To find the perfect placement for these holes, I traced the bottom portion of the probe guide onto a piece of paper to make sure the holes were perfectly spaced. Make sure to use the proper size drill bit!
Install the probe will the heater probe above the temperature probe. This is important for TDM testing. Fill the holes with the thermal paste to keep the holes sealed and the probes in place. As of right now, we have not tested with the thermal paste.
Once the probe is in the tree, make sure to cover it with some layers of protection. For an example of this, checkout the Dynamax installation video. Here is a picture of our method:
A big step for eGreenhouse today – we’re connected to the internet! PushingBox code is integrated into the HyperRail hub code that pushes sensor data directly to Google Sheets. I set up my own account, so I can log up to 1000 data points per day (roughly every minute and a half).
Other new developments:
By digging into the documentation and doing some testing, we’ve determined that the whole system can run well on 5V. This means we can use a 3.7V battery pack with a Powerboost 1000C breakout board to boost up to 5V. This setup should be nice and efficient.
Also, the UART data lines (RX/TX) on the CO2 and particle sensors both run on 3.3V logic, so there’s no need for a logic level converter.
I’ve crafted the new streamlined version with everything included into a custom PCB that’s ready to send off for manufacture when can verify the Powerboost works as anticipated.
I built a 3-meter HyperRail in the OPEnS Lab, so I’m ready to scale up to the full version at the experimental location when parts arrive.
Run a 3-4 day experiment on campus to work out any kinks in the system before full deployment
Calibrate the K30 using an Irgason on campus
Design an attachment system for the sensor package on the rail