# Precise environmental control



## Draikan (Oct 23, 2015)

Hey everyone! This is a build thread for a terrarium controller. I've been working on this for the last 3 months or so, the first few posts will just be catching up to where I am currently.

I've been growing various orchids in a roughly 60g terrarium for about two years now, and trying to improve my methods. I've messed with different configurations of fans/timers/mistking/lights/etc. and never felt like I really achieved a good balance of airflow vs. humidity. I won't go into details for everything I've tried, but feel free to ask if anything stands out.

I was able to go to the cloud forest in Costa Rica a few years ago, and see orchids in their natural habitat. I was really surprised by how much rain and airflow the plants were exposed to. It POURED rain there daily, but the plants had a constant breeze that helped evaporate the water off them. It was way more rain and way more airflow than I had been providing in a terrarium. They also generally didn't have much material around the roots, maybe some live moss. It really changed my understanding of what these plants need.

Issues I'd like to overcome include things like:
-Hard to evenly water mounted plants without getting some too wet
-Hard to increase humidity without getting leaves wet
-Hard to provide enough airflow without drying out plants
-Fans are either on or off
-even with a repeat cycle timer there are long durations of no airflow
-hard to measure conditions in the terrarium
-VERY difficult to take a reliable humidity measurement
-humidity sensors are cheap garbage (they last like a week then break)
-no ability to log environmental data over time
-conditions in the terrarium vary with conditions in my home (hot days dry out the plants unless I mist extra)
-seasonal variations (timers need adjusting regularly)
-inability to provide stable conditions to plants
-sphagnum mounts cause soggy roots if not watered carefully
-bare mounts dry out too easily

Obviously these can all be overcome with careful husbandry and practice, but I'd like to make something automatic, precise, and super reliable.


----------



## Draikan (Oct 23, 2015)

Some plant and tank pictures to get started!


----------



## Draikan (Oct 23, 2015)




----------



## minorhero (Apr 24, 2020)

Your setup is pretty cool!

I won't be able to help with most of what you want but I have a little. 

I have been using a Govee Bluetooth Hygrometer and Thermometer these past 2+ months. I originally had it in the vivarium taped to the cieling but it fell down (double sided tape didn't have a larger contact area) so I put it on top of the vivarium on a screen vent with the sensor hole facing down. I calibrate and spot check the Govee with a more precise hygrometer. What I found is that there is almost a 10 point difference in humidity between the bottom of my tank and the top (insitu tank). The Govee sitting outside the viv reports results that tends to be somewhere around the middle the of the tank. The temperature is accurate for the top portion of the viv. Best of all it keeps track long term for temperature and humidity. Here is a days worth of data and a week.



















Since its not in the viv and getting sprayed every day I have faith it will live much longer then in viv hygrometers.

Your setup also looks you are not using mistking style nozzles. I don't know how your nozzles perform but the mistking produces a very fine mist that tends to go most places in my viv pretty evenly. With as many nozzles as you have you should be getting very good coverage. Something that can be done is you could put a very large powerful fan (relatively) that only turns on when watering to blow your mist around more. There are also computer fans out there that are variable speed or you just use more of them so you could have one small fan running all the time and larger fans that turn on only immediately after watering etc. Its not clear to me in pictures if your viv has a door or not. If it doesn't then clearly that would help a lot to make sure the conditions in your viv do not always follow those of your house.

Also have you tried other types of moss for roots? Sphag is pretty much the wettest stuff out there but not all moss is equal in this regard.

Hopefully some of this is helpful.


----------



## Draikan (Oct 23, 2015)

I don't actually have the big tank with me right now. I was in the middle of an inter-state move when Covid started, so the tank is setup at my Mom's house. I've setup a 10g to let me test out the environmental control bits until I'm able to finish moving everything.

The tank is not open on the front. It has a clear plastic sheet over the front, sort of like a curtain. The tank is just a PVC frame covered in the same clear plastic sheet. This stuff. And then the whole thing sits in the black plastic tray. It's not a display tank, so I wanted it to be cheaper and lighter than glass.

The misters actually produce a finer mist than mistking nozzles. I'll post more about them in a bit.


----------



## Draikan (Oct 23, 2015)

workbench and current test tank:


----------



## Draikan (Oct 23, 2015)

The controller is based on the Metro M4 Airlift Lite from Adafruit. This is an Arduino compatible board, that uses a more powerful processor and has a built in coprocessor to handle all the wifi stuff. I'm not great with software so I wanted to stick with Arduino so I could focus on the actual functionality I am trying to build.

Paired with the Metro M4 is a custom shield that takes care of the interfaces to the hardware, letting me connect the sensors, fans, and solenoid valves. I've built just the bare minimum to let me test the hardware, so it is not very cleanly done. Eventually I'd like to get a circuit board made to clean up all this electrical hardware and put nice connectors on everything. I'll also add ports for multiple fans/solenoids/sensors/etc.

The system really only does five things:
-Measure temperature and humidity (working but humidity sensor has some issues)
-Calculate a target humidity (working)
-Control the fan speed (working)
-Control the misting solenoid valve (working)
-Send data to an IOT dashboard (working but still suffers from occasional disconnects)

You can see live data from the test tank here: https://io.adafruit.com/jdamelio/dashboards/tank-1-air-quality?kiosk=true

Some pictures of the hardware:


----------



## Draikan (Oct 23, 2015)

I started this project by looking for a product I could use to achieve what I wanted rather than having to build something myself. The only thing that came close were the Apex aquarium controllers. They have a great web interface, but they don't really support the hardware necessary for terrariums, and they are super expensive. They also do not have a humidity sensor.

The humidity sensor is the single most important part of this system. All the hardware control (fan/misters/etc.) ends up being based off the humidity measurement. I have used a bunch of cheap in-terrarium sensors, and they all broke eventually. I've also worked with a couple humidity sensing systems at my job for more industrial applications, but even those had some issues.

There are really only two types of humidity sensor that are widely used, and they both have significant drawbacks:
-Capacitive, these sensors are tiny integrated circuits that measure how the capacitance of a polymer membrane changes as it absorbs water from the air. This is what pretty much all affordable humidity sensors including handheld meters, the govee, and other terrarium products are based on. Unfortunately these are not waterproof, if water gets onto the sensing element it can permanently damage the sensor. Obviously this is bad if we are spraying mist around. This type of sensor is also not able to withstand prolonged exposure to humidities above about 80%. In a high humidity environment the sensor output will drift up, causing the sensor to report a humidity that is erroneously high.
-Chilled Mirror Hygrometer (CMH), this is a precision optical instrument that uses a reflectance sensor to chill a gold plated copper mirror until condensation forms, and then measure the mirror temperature. The temperature at which condensation begins to form is the dew point of the air. These can be very accurate and robust, but typically cost $5k-10k.

I am trying to adress the shortcomings of the capacitive sensor, so it can be used in terrarium conditions. If that does not work, I may try to build a cheap CMH.


----------



## jgragg (Nov 23, 2009)

That looks like a nice collection, and you seem like you know what you're doing with them.

If I could, I'd like to sort of play around with the framing of "your problem" by asking some questions:

Is your litany of objections really something that one electronic gadget is going to fix? 
Do all those orchid taxa really require identical husbandry? Is a solitary tightly-controlled set opf parameters going to serve them all equally well?
Or could your current environmental drivers - misters, timers, and fans - provide enough variety if the spacing and arrangement, and perhaps in some cases the mounting, of the plants was altered? 
Maybe if you added another pump and timer, could you run two separate misting schedules?
 Speaking of separate pumps and timers - what if some of those taxa would prefer water dripped (or sprayed) onto their substrate, or their exposed roots, more than they want their leaves wet?
Your enclosure sounds pretty simple and cheap. Truly, I say that with admiration, not derision. Could you expand it a little bit, so you could more readily group (and isolate) smaller sets of taxa with common husbandry needs? Some sets might get just one mist head, drippers for some plants, and a fan. Some might get 3 or 4 mist heads and no fan or drippers. Maybe behind one set of plants, there's a little bit of screen in place of a bit of the plastic sheeting. All just for example, totally made up of course.

I hope this stimulates some good thinking and conversation. Again - nice bunch of plants you got there.

Good luck!


----------



## Draikan (Oct 23, 2015)

For the temperature and humidity sensor I am using the SHT85 from Sensirion. The little white patch at the end is the sensor, the rest is just circuit board and connector.










This component has a +/-1.5% relative humidity accuracy. Sensirion is one of only a few manufacturers that offers their sensors with a PTFE membrane over the sensing element. This membrane allows water vapor to diffuse through it to reach the sensing element, but blocks liquid water droplets and dust. This is a critical feature for survival in a terrarium. Most capacitive sensors do not have this feature and the sensing element is just exposed, like this:










I'm using 1/2" pvc, a cable gland, and a plastic filter to further protect the sensing electronics. For something that literally cannot be sealed and still function, this is about as close to waterproof as you can get.


































The plastic filter should block most of the mist before it can reach the sensor, and the gland prevents any water from running down the cable. The trapped air volume around the sensor slows down the measurement a bit, but temperature and humidity generally change pretty slowly anyway, so this hasn't been too much of an issue.

This sensor has been running in the test tank for about two months now with no signs of water damage. I think this protection is sufficient for a terrarium environment.

Measurement drift after prolonged exposure to high humidity is still an issue. If I take this sensor out of the test tank, which has been held at about 85% humidity for the last month, it reads about 5% higher than other sensors that have just been in ambient air around 50-60% humidity. This 5% error is significant. If I am trying to maintain 90% relative humidity, and the real humidity is 85%, that air is 50% drier than the controller thinks it is. As of today,this is the state of the temperature and humidity sensor. If this were a fixed 5% error, I might be able to calibrate it out, but the fact that it drifts over time, depending on actual humidity, means this needs a better solution.

To correct for this I am working on a second version of the sensor electronics. This version will use a tiny heater to heat the humidity sensor, drying the air at the sensing element to avoid over-exposing the sensor to moist air. The controller will then use the humidity and temperature at the sensor to calculate the absolute humidity. A second temperature sensor will be used to measure the terrarium's air temperature, and that air temperature will be used to convert the absolute humidity back to the relative humidity.

If anyone really wants the low level details on how these sensors and calculations work, this document is an excellent reference: https://www.silabs.com/documents/public/application-notes/AN607.pdf

This adds complexity to the sensor, but I think it is the best way to keep the sensor accurate. The humidity sensor only needs to be heated by about 10 degrees C to drop the humidity by about 40%, and the actual sensor is so small it only takes a tiny amount of power to get a 10 degree rise. This keeps the sensing element well away from any potentially problematic humidity levels. I am not sure yet if I will be able to fit the air temperature sensor in the same housing as the humidity sensor. I'd like to keep it compact, but I'm concerned that the heater might throw off the temperature measurement slightly. The conversions between absolute and relative humidity are very temperature sensitive, so small temperature errors could cause large humidity errors.


----------



## minorhero (Apr 24, 2020)

You have really taken this to the Nth degree, I think its pretty awesome! It also means I have nothing to add since you are WAY beyond what I am doing. Most folks are much less precise. As I noted my 24" high viv has a 10 point difference in humidity between the top and the bottom. So maintaining one humidity throughout is impossible, but that doesn't bother me because I am definitely shooting for a range which my viv falls within. 

Does putting the sensor inside that housing actually contribute towards its life expectancy? I would have thought you would want the exact opposite where its attached to a fan to keep dry not being inside a container that might trap moisture.


----------



## Draikan (Oct 23, 2015)

Being able to measure those different regions of the tank over time and better understand the microclimates that develop is one of the reasons I am doing this. I do think that once I am able to run more circulation, the environment will become more consistent throughout the tank.

With the sensor protected this way, there _should_ be no way for moisture to accumulate in the first place. I am running it in the test tank where it gets misted regularly, and it has held up well so far. Only time will tell. I need this stuff to run for many months before I can really be confident in it's longevity. It has already outlived all other sensors I have used.


----------



## Draikan (Oct 23, 2015)

jgragg said:


> That looks like a nice collection, and you seem like you know what you're doing with them.
> 
> If I could, I'd like to sort of play around with the framing of "your problem" by asking some questions:
> 
> ...


Thanks for "challenging" my starting point! I'm here for the discussion =)

You are right to point out that gadgets won't be the whole solution, there is absolutely no substitute for good husbandry, know how, etc. And none of this is actually necessary. However, I do think there are improvements that could be made to to humidity measurement, airflow, and moisture control.

It seems like some parts of this hobby have been almost perfected (mistking and ABG mix come to mind), but others still have room to grow. To the best of my knowledge, there truly is no terrarium suitable humidity sensor available (that I can afford ).

I'm currently running just the test tank, and the big orchid tank. Eventually I'd like to run multiple tanks, so these systems are meant to be very scalable. I'll be able to tailor the environment in the tank to the plants that are in it. So for example, really high airflow plants could be in the high flow tank.

The tanks will always have microclimates. The bottom back corners for example are always relatively dim, lower airflow, and wetter. In general though, I want to be able to provide significantly more airflow to the plants without worrying about the humidity dropping too far.

For example the fan currently in the 60g orchid tank is a 70CFM fan. I have to run it for 5 minutes on/15minutes off to avoid drying out the tank. There is no speed control, so there is no airflow other than natural convection when the fan is off.

In the 10g test tank I am running a 150CFM fan, but I have complete control over the speed. You can see from the dashboard I linked that it generally runs at about 15% of it's max speed. Every 10 minutes there is a stronger breeze, and once an hour there is a big gust to knock water off the leaves and give the plants a bit of agitation. This isn't necessary, but I do think it will be beneficial. It is also very adjustable. This fan would dry out the tank in minutes without the solenoid valve keeping the humidity up.

I am definitely planning on multiple misting channels. The setup on the test tank uses a single mistking and pressurized tank, and the channels are controlled by solenoid valve. The valves are about $20, which makes adding drippers or individually controlled nozzles much more practical than needing an extra pump. I'd like to do this customization on a tank by tank basis.


----------



## Draikan (Oct 23, 2015)

I'll also add that while the humidity monitoring and control are very interesting to me, and I _think_ they will be valuable to the plants, that part of the project may not pan out.

If that's the case, this will still be a multi-channel fan speed controller, and multi-zone mist valve controller. Those functions should both be useful.


----------



## Draikan (Oct 23, 2015)

Dashboard link: https://io.adafruit.com/jdamelio/dashboards/tank-1-air-quality?kiosk=true

Lets take a look at the misting system! This is what I am running on the test tank to control air humidity, it isn't really for watering plants.

I believe the mistking uses a variation of this nozzle:Plastic Mist Nozzle-Plastic Mist Nozzle Manufacturer - RELAB This is a 0.4mm nozzle. Other 0.4mm nozzles I have tested produce very similar mist to the mistking, so I am pretty confident that it is in fact a 0.4mm nozzle.

I am trying to produce short bursts of very fine mist that quickly evaporate. I am trying to use this to raise the humidity without wetting the plants. With the fan running, fine mist evaporates within a few seconds. It is important to produce the smallest mist particle size possible to speed the evaporation. I have switched to these 0.3mm nozzles: https://www.amazon.com/gp/product/B06ZZDLCP7/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1 They are excellent, but they do not have the built in filter or check valve of the mistking. They do produce a finer mist than the mistking, and the flowrate is lower, which is perfect for fine control.

There may be some concern about using brass nozzles. It hasn't been an issue for me so far. I left a handful of them in RO water for a month and couldn't measure a TDS difference after. It isn't exactly science but it made me feel better! I'm not sure I'd risk it for frogs/tads if folks are super worried about copper leaching, but for plants I'm not sure it matters much. Stainless steel 0.3mm (0.012") nozzles are available if anyone needs them, but they cost more: https://www.mistcooling.com/mist-nozzles-10-24-thread.html

I should also note that the 0.3mm nozzles probably aren't better for most people using a mistking. They produce a very fine mist that sort of swirls around the tank without settling. It's actually harder to get things properly wet with these nozzles, and you have to run the pump longer. Vertical surfaces are particularly challenging, as the mist has very little inertia. It can't really "impact" a background and wet it, they just float around and sink to the bottom of the tank.

You can not use an orifice smaller than 0.3mm with the mistking. There is not enough pressure to force water through the smaller orifices. A higher pressure pump and smaller nozzles would produce finer mist that evaporates faster, but it is significantly more expensive and harder to find parts.

The plumbing diagram for this system is below:









The pump is used to pressurize a 2 gallon RO tank: https://www.amazon.com/gp/product/B079Z1R4GD/ref=ppx_yo_dt_b_asin_title_o09_s00?ie=UTF8&psc=1

The check valve prevents the pressurized tank from flowing back through the pump. Check valve: https://www.amazon.com/gp/product/B010JAQZK4/ref=ppx_yo_dt_b_asin_title_o08_s01?ie=UTF8&psc=1

A pressure switch will be used to keep the tank pressurized. I have not actually tested the pressure switch yet. I don't have the right electrical connectors. I pressurized the tank to 80psi a month ago, it has been running on and off since then and only dropped to 60psi. Once there are multiple zones running from the same tank, the automatic pressure control will be more useful.

The valve is this one: https://www.wicvalve.com/1-4-Inch-P...ctric-Solenoid-Water-Valve-DIN-2PCK-1-4-D.htm
It's guts are all plastic and stainless. It works great and switches in under 20ms, which is important for generating short bursts of mist. I am using the 24VDC version. You could use the 110VAC version with a standard outlet timer if you wanted to.

I considered using a cheaper valve: https://www.amazon.com/DIGITEN-Solenoid-Reverse-Osmosis-System/dp/B00X6RAHMU but decided I didn't want to risk it.

This system currently mists for 250ms whenever the humidity in the tank drops below the setpoint. You can see this on the humidity plot on the dashboard. Whenever the tank humidity (green) drops to the setpoint (red) the solenoid activates briefly to push the humidity back up. If the fan speed is increased, the solenoid will mist more frequently, and *the humidity will not drop below the setpoint.*

These solenoids could be used for extra mist zones, drippers, whatever. You can run many many zones on a single pump and tank because the pump does not have to supply all the flow, the tank supplies the peak flow. I am doing this with the entry level mistking pump. This is a cheaper way to add zones to a mistking system than buying more pumps, it also gives much better control over mist timing, if you want all your zones timed differently.

The humidity control I am using this for *requires* an accurate humidity sensor to be useful. If we just want individually timed zones, the sensing is not important.

Enjoy this boring closeup of the tank:









And here is a valve:


----------



## Draikan (Oct 23, 2015)

Ok last up is the fan!

The main things I wanted over typical fans were:
-waterproofing
-a tachometer for measuring speed and checking for stuck or broken fans
-speed control

I have tested a bunch of fans. Some handle the humidity really well and some die almost instantly.

This one has been running in the orchid tank for over a year with no problems: https://www.amazon.com/gp/product/B01J76IYL4/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1

The first fan I used in the test tank died the first time I got it wet. It's really hit or miss when they aren't meant for a wet environment.

I settled on the industrial PPC series from Noctua. These are IP67 rated, which means they are dust proof and can be submerged in water to a depth of 1 meter for up to 30 minutes.

IP ratings for the curious: https://en.wikipedia.org/wiki/IP_Code

The noctua fan is working great. It is situated under the mister, and has been constantly wet for weeks. It has a built in tachometer. The speed control works down to 15% of max speed. It's flowrate is 110CFM. This is the exact fan I am using: https://noctua.at/en/nf-a14-industrialppc-24v-2000-q100-ip67-pwm I may eventually switch to the 160CFM version, but there is a bit of a tradeoff with the 15% minimum speed.

I have had good results using the biggest, slowest fan possible. They tend to be quieter and produce more uniform airflow. The small diameter fans really blast tighter spots.

This fan is currently running in the test tank. You can see it's speed on the bottom most plots of the dashboard.

Fan in box:


----------



## Draikan (Oct 23, 2015)

And that just about catches us up to current!

The test tank is still running. I occasionally take it offline while I'm working on part of the controller.

My next steps are to:


Fix humidity sensor drift issues on a prototype heated sensor
Fix a random disconnect issue that requires the controller to be manually reset before it can reconnect to the dashboard
test the tank pressure switch
make a small batch of humidity sensors
make a small batch of controllers to clean up all the wiring mess and custom electronics
Eventually get my plants back once travel is normal again
Probably get some new plants before that
test the controller with plants


----------



## jgragg (Nov 23, 2009)

Well, looks like you're having a damn good time, which I applaud and support. 

I will say, I'm kind of glad you're not subjecting animals to all this. I mean, just the thread title gives me shivers. Not the good ones. I just go the opposite route of keeping my animals in a cool basement room, built just as a herp room, and ensure each viv has a wide (but within bounds) range of temps and RHs in both time and space. The plants are secondary to the animals - but I still try to do right by them, and mostly seem to do OK. The animals are very satisfied, I believe. I think for their taxa, I have probably set a couple of captive longevity records. Skinny and chilly makes them last. Ha ha.

But hey, to each their own. Like I said, I'm glad you're having a blast.


----------



## jeffkruse (Jun 5, 2018)

I've considered making my own system but just haven't yet.
What I really would like to see is a timer system that doesn't do the same thing every day. It needs to change with the seasons!


----------



## DaveMorris (Sep 23, 2017)

I love seeing people do these types of projects. It is a great learning tool for your build and allows you to further enjoy your hobby in other ways. I have been a reef tank geek for the better part of 20 years and was a beta tester for one of the controller companies (Now out of business). They actually made a controller called the Herpkeeper that was around $120 and worked great. Temp/Humidity control and measurement along with the ability to control multiple power outlets to control lights, misting, etc. I use the Reefkeeper on my 130g vivarium to control lights, fans, and misting. 

I am an avid supporter of using controllers on fish tanks and to a somewhat lesser extent on vivariums. It doesn't seem to be as time sensitive on a vivarium for controlling things. In a reef tank things can die in an hour if certain things fail. Controllers allow you to create consistency and allow you to track trends. This in turn can help you provide a better environment for your animals.

Good luck with the build and keep posting on it. It looks very interesting.


----------



## jgragg (Nov 23, 2009)

> What I really would like to see is a timer system that doesn't do the same thing every day. It needs to change with the seasons!


Why? More precisely, what would you change?

Equatorial photoperiods are basically invariant.
https://www.orchidculture.com/COD/daylength.html 

If you want to change with the seasons then I suggest looking at precip regimes for the source localities of your charges. E.g.,
https://en.climate-data.org/north-america/panama/bastimentos/bastimentos-874729/


----------



## Draikan (Oct 23, 2015)

I have looked at the herpkeeper multiple times. It had all the right features, but the reviews were really bad. I'm pretty sure their humidity sensor was nothing special.

I have used the Apex products for freshwater aquariums. The stability and monitoring are very valuable. Aquariums are different though in that water conditions (temperature/chemistry/etc.) tend to be very stable in nature. Terrariums are trying to emulate a different part of nature. I think terrestrial environments see much more variation in conditions than aquatic environments. Air just can't buffer temperature the same way water can, and humidity can be very sensitive to all kinds of parameters, standing water, air movement, temperature, and more.

For animals you guys are probably right that traditional methods are more than sufficient, or even outright better. Someone said it earlier, the animals don't need perfect parameters. They just need "in range" parameters, and they have the ability to move around to whatever conditions best suit their immediate needs.

For fish, there won't really be much variation throughout the tank since water tends to mix quickly enough to maintain uniform temperature and chemistry. The fish can't seek out conditions that suit them better, so providing conditions as close to perfect is very important. Note that this is only true while the pump is running, aquarists know that once the pump shuts off and circulation stops, conditions can become unfavorable very quickly.

This is part of my inspiration for providing more airflow. I want better mixed, more uniform air, so it can't develop super wet or dry conditions in parts of the enclosure. I don't feel like I've been able to keep humidity "in-range" for the amounts of airflow I want to provide. And plants can't move themselves to the parts of the tank that suit them best.

I don't want to set an absolute rock solid humidity that never changes (like you would with an aquarium temperature controller). I'm more trying to set a minimum humidity. After a big misting humidity will be super high for a few hours, I'd expect the humidity controller to only kick in once things have dried out a bit. It should maintain that minimum humidity until the next big watering.

I have no plans currently to try to control air temperature.

As for weather, it might interesting to simulate wet/dry seasons. That may be reasonable to do with manual adjustment though since the timescale is so long. I'm really interested in the hours/days timeframe. Things like a big storm (high airflow, extra misting), then a still day after (gentle breeze/steady humidity). That sort of thing would be a lot of work to do manually, but could be programmed to happen every two weeks or so, just as an example.


----------



## Draikan (Oct 23, 2015)

minorhero said:


> You have really taken this to the Nth degree, I think its pretty awesome! It also means I have nothing to add since you are WAY beyond what I am doing. Most folks are much less precise. As I noted my 24" high viv has a 10 point difference in humidity between the top and the bottom. So maintaining one humidity throughout is impossible, but that doesn't bother me because I am definitely shooting for a range which my viv falls within.
> 
> Does putting the sensor inside that housing actually contribute towards its life expectancy? I would have thought you would want the exact opposite where its attached to a fan to keep dry not being inside a container that might trap moisture.


You had some good intuition about the sensor housing! I finally got a drop of water wicked through the threads between the gland and the 1/2" coupler. It did not get onto the sensor directly, but it did drive up the humidity inside the housing. Below is a plot of the result:










Region 1 is normal operation, where the mister goes off a few times an hour to maintain the target humidity.

Region 2 shows a spike in humidity. It takes a long time for the humidity to drop off, and when the mister finally goes off, there is a long time before the next mist.

Region 3 shows me taking the sensor out of the tank, removing the filter and drying out the inside with a q-tip. I then left the sensor out of the tank, right next to the ambient air sensor (home humidity on the plot). After the initial large drop between regions 2 and 3 you can see that the in tank sensor reads consistently higher than the ambient sensor. This is the humidity error from spending too much time in a high humidity environment.

Hopefully the heated sensor is better at burning off extra moisture. I will also seal these threads better. I may need to do what you suggested and provide more airflow directly around the sensing element. Gotta keep testing!


----------



## jhupp (Feb 27, 2004)

A couple of thoughts:

Ditch the plastic for the sensor housing. Stainless or something nickel plated would be a better choice. For high precision humidity measurements most plastics are to be avoid due to sorption/desorption.

You might consider aspirating the sensor housing. That will help with response time and potential condensation. I think I saw somewhere above saying you are heating it. So maybe condensation is not an issue anyway.

Misting is not a particularly effective means of keeping humidity constant in an enclosure. It is inherently cyclical and certainly has some temperature artifact. If you want truly constant humidity, ventilating with an air stream already at the desired humidity would be the way to do it. Bubbling air through water at the desired dew point temperature will get you an air stream at the humidity you want.


----------



## Draikan (Oct 23, 2015)

Ooh jhupp you are giving me a lot to think about!

I'm not so sure about stainless/nickel plate. I do have one aluminum fitting I am testing with so that might be an ok route. My objection is mostly for cost reasons. If the plastic soaking anything up is even remotely significant, then I'm just not providing enough airflow to the sensing element. The cable gland will have to be plastic, stainless glands are just too expensive.

Based on the issue I had with a drop of water in the sensor yesterday, I think aspirating the housing is something I will need to do. I'm not sure yet _how much_ because I also really want to protect the electronics. I might turn to conformal coating the electronics if I really need to get more direct airflow to the sensing element. Conformal coat is probably a good idea anyway just for the solder joints. The humidity sensors are a bit sensitive to fumes, so researching conformal coats is its own little mini project that I haven't had time for yet.

With the sensor I'm trying to keep things simple, but there will be a certain amount of complexity that is necessary for proper function. I'm trying to add protections slowly and only once I know they are required. The heating is my immediate next step because I HAVE to heat the sensor to avoid long term drift in high humidity environments. After I make that change, I'll test for a bit and see what the next biggest issue is.

There are definitely some temperature effects. You can actually see that the tank air temperature sits roughly 0.3-0.4 degrees below ambient, probably from evaporative cooling. I don't have any lights on the test tank yet so there is no heat source like you'd see in a normal terrarium.

Plot of tank and ambient temperature:








Red line is where I took the sensor out of the tank to work on it. Before the red line, the temperature is slightly below ambient, but after it tracks much more closely.

I will have to think more about bubbling through dewpoint controlled water.


----------



## Draikan (Oct 23, 2015)

I was able to do some tests today with a heated sensor. I used the heater built in to the sensor IC. While the built in heater is not strong enough to produce the 10 degree rise I am targeting, it is still enough to test the calculations I want to do.

For this test the sensors are sitting out on my desk, in still air, with the filters removed. I am measuring the temperature (in degrees C) and relative humidity (%) from two sensors. Sensor #1 has the heater off, and Sensor #2 has the heater turned on. For each sensor, I am using the temperature and relative humidity to calculate the absolute humidity (g/m^3). 

Once the absolute humidity of the air is known (from sensor #2, which hopefully will be able to survive in a terrarium environment due to its heater), and the real air temperature is known (must be from an unheated sensor to be accurate, here I'm using sensor #1's temperature), I can calculate other air parameters like relative humidity or VPD. In this test I have a corrected relative humidity, which is the relative humidity calculated from the temperature at sensor #1, and the absolute humidity from sensor #2.










The bump in the middle is me breathing on the sensors.

I hope that explanation was ok. What I am checking here is if the absolute humidity can be measured accurately by a heated sensor. I was a little concerned that the dryer air at the heated sensor would absorb moisture from the air around it, and read an incorrectly high absolute humidity, but that doesn't seem to be the case. This method seems to work!

This isn't a perfect test. The sensing elements are a few inches apart so they aren't quite measuring the same air. I don't want to risk letting sensor #2 heat sensor #1. The resulting relative humidities aren't exactly the same, and there is no way to say which is more accurate. I have no way to measure the "real" humidity of the air. However, I was seeing errors well over 5% humidity from the unheated sensor. These two RH measurements are roughly <1% off from one another, which is excellent.

The dashboard will be offline for the next few days while I get a heated sensor ready to sit in the test tank for a few weeks. I need to confirm that the heated sensor can withstand terrarium conditions better than an unheated sensor, and that will take time.


----------



## Draikan (Oct 23, 2015)

oops typo, the red line is T1


----------



## jhupp (Feb 27, 2004)

Draikan said:


> The resulting relative humidities aren't exactly the same, and there is no way to say which is more accurate. I have no way to measure the "real" humidity of the air.


Might I suggest looking into building a "salt cup". Old school tech for generating calibration standards for humidity sensors. When done well you will know the humidity and you can get at who's more accurate or not.


----------



## Draikan (Oct 23, 2015)

https://io.adafruit.com/jdamelio/dashboards/tank-1-air-quality?kiosk=true

Dashboard is back up. I got the parts for the heated sensor sooner than expected. The air temperature sensor is the TMP117. The sensor is extremely accurate, it's guaranteed to <+/-0.1 degree C, which is great for not introducing additional error into the humidty measurement. For reference, this corresponds to about +/-0.5% additional humidity error at 25 degrees and 90% humidity.

I am running the heated sensor without the plastic filter for now, and the temperature sensor is not waterproofed at all, so the sensors are both behind the mister for now to stay dry. The TMP117 is just zip tied to the side of the humidity sensor. If the humidity sensor still reads accurately after 30 days in the tank, I'll go back to working on the waterproofing. If it loses accuracy, I'm not sure what else I can do to protect the sensing element from long duration high humidity.

I also have the lights on the tank going finally. You can see they add about 2 degrees to the tank temperature over ambient. I'm trying to get closer to "real" terrarium conditions to continue testing with. I really need to get some plants and other material in too, the glass walls have very little surface area for evaporation, which isn't very realistic.

I did have to partially cover the opening on the top of the tank to reduce the frequency the mister runs at. The amount of circulation I am running is unrealistically high since the test tank is only 10 gallons, so the humidity gets blown out pretty quickly.


----------



## jeffkruse (Jun 5, 2018)

jgragg said:


> Why? More precisely, what would you change?
> 
> Equatorial photoperiods are basically invariant.
> https://www.orchidculture.com/COD/daylength.html
> ...


Maybe the lighting doesn't matter that much but even just 5 degrees can be over a half an hour difference. In general most places vary by an hour or more but as you said maybe it doesn't matter so much. 

I would couple a variable timer with variable temperature. Temperatures that vary by the season and day and night. I would also adjust the amount of misting based on the season.


----------



## jgragg (Nov 23, 2009)

> Maybe the lighting doesn't matter that much but even just 5 degrees can be over a half an hour difference. In general most places vary by an hour or more but as you said maybe it doesn't matter so much.
> 
> I would couple a variable timer with variable temperature. Temperatures that vary by the season and day and night. I would also adjust the amount of misting based on the season.


In my experience, most creatures know what time it is. Maybe in a windowless room you could trick them. But with snakes at least, if there's a window, they know the difference between say June and August. At my latitude anyway. Even multi-generation CBB know what time it is.

I guess my basic request to a "nice digital timer" maker, would be to *add a MM/DD field* to the usual "day", "hr", "min", and "sec" options. A whole step up would be to add the option to upload a file with climatic variables. My current charges come from a place with warmish (~80-68F DTH/NTL), quite wet summers and quite cold (~48F is a good hibernation temp), drier but still humid winters. It's actually pretty dangerous to slowly cool snakes in the fall - it invites respiratory infections - so I'd probably just program in some pretty fast step-downs on my own (instead of using weather-observatory data). But for plants I could see the utility of being able to just upload a file.


----------



## Draikan (Oct 23, 2015)

Tiny update. The heated sensor has been in the tank at >85% humidity for about 4 days now. I think I would be starting to see the drift after 4 days, but not sure.

I just pulled the sensor out of the tank for an hour and it matches the ambient sensor almost perfectly, which is great news. I'm seeing <0.5% difference between the two sensors, so no drift yet.










Sensor is back in the tank now.


----------



## Draikan (Oct 23, 2015)

Dashboard link for convenience: https://io.adafruit.com/jdamelio/dashboards/tank-1-air-quality

So I got tired of looking at the bare tank and placed an order with Ecuagenera. Supposed to ship in a few days. 

The heated sensor now has over two weeks in the tank at >85% humidity. The manufacturer recommends the sensors spend only a few hours in these conditions. I compared it to the ambient sensor a couple days ago and they still match very closely! I will continue testing for a few more weeks, but it looks like this is working, and I can move on to the waterproofing and housing.

Are there parts of this system that you guys would be interested in seeing as a product? The full humidity controller is a bit of an advanced use case, but we could break out smaller pieces.

Maybe a simple fan speed controller + timer would be useful? It could have a few channels, and be compatible with any standard computer fan. It would work like an outlet timer, but also provide speed control. This would make it really easy to dial in airflow for circulation fans. Instead of messing with vent coverings or trying multiple different fans, you could just tune the speed profile. See the Fan Speed plot on the dashboard for an example of a fan speed profile.

Let me know what you all think. I'm interested in feedback and appreciate what I've gotten so far.


----------



## cameronfarris627 (Dec 4, 2017)

Wow, love this setup and where this is going! Cannot wait for more updates


----------



## Draikan (Oct 23, 2015)

Got the plants from Ecuagenera! These are all new species for me so I am super excited to have them. They were all listed as medium-high humidity and airflow, so hopefully they appreciate the conditions in the test tank.

From left to right they are:
Platystele apoloae
lepanthes telipogoniflora
Lepanthes mariposa
Trisetella hoeijeri
Lepanthopsis astrophora
Trisetella andreettae
Stelis guianensis var Maria
Lepanthes dictydion
Pleurothallis niveoglobula




























In general they came through fine. Pretty impressive since they import to florida then ship out from there. I was pretty nervous unboxing them, most of the plants were unmounted and had been shaken up pretty badly in their little containers. Lots of dropped leaves.

The Stelis guianensis var Maria had a really rough time in the mail. It dropped all but two leaves, and those two are a little sad and limp. It had some decent roots though, so hopefully it can get some new leaves out before it deteriorates.

The Lepanthes mariposa only has 4 leaves remaining but they look semi healthy.

Lepanthes telipogoniflora is TINY. Each of its four leaves are about 3mm wide. I knew it was small, but wow, it's different to actually see it.

The Lepanthopsis astrophora looks great, which is awesome because this plant is the reason I placed this order. I love the look of this plant and can't wait to get blooms from it! I hear it's an easy grower so hopefully it doesn't take too long...

Dashboard is still up: https://io.adafruit.com/jdamelio/dashboards/tank-1-air-quality

I haven't done much on the tech side. Just accumulating hours on the sensor. I'm trying not to mess with it too much while the plants are settling in.


----------



## Draikan (Oct 23, 2015)

Trisetella hoeijeri is down to just two leaves this morning.

Stelis guianensis var Maria still has it's two sad leaves. I'm not sure if they are doing it any good, but since they are the last two I guess I'll leave them...

The rest of them haven't shown any change. It's interesting how some species drop otherwise healthy leaves from the base when stressed, and others just keep the leaf while it withers.


----------



## Draikan (Oct 23, 2015)

Quick follow up on this project:
I'm maintaining a similar thread on orchid board, since this info is relevant to them too. It has more plant pictures if you're into that . Find it here: Terrarium growing experiments - Page 6 - Orchid Board - Most Complete Orchid Forum on the web !

I was finally able to move all my plants and equipment from California. They are in ok condition. Most are alive, but many have signs of less than ideal conditions: algae on the mounts, dried root tips, etc.

The heated humidity sensor has now been in the tank at >85% humidity for over 4 months, and it continues to function excellently, no signs of error or drift. It has been accidently sprayed (oops!) on multiple occasions and shows no signs of damage or reduced accuracy. The elevated temperature seems to help it evaporate liquid water off the sensing element quickly, as well as maintaining the accuracy. I currently only have two prototypes of this sensor. One was sensing the small test tank environment, and the other was an ambient air sensor as control. I have moved the ambient air sensor to my large orchid tank to provide data from the environment where most of my plants are currently kept. This means I will not be able to confirm the accuracy of the sensors again until I build the next batch. I was feeling confident in the longevity and accuracy of this version after months of testing, so I decided that data from the large orchid tank would be more valuable than maintaining the ambient sensor.

Live data from these two tanks is still available here: Adafruit IO
Tank 1 is the tiny test tank (controlled humidity)
Tank 0 is my bigger orchid tank (without fan speed control or humidity control)

This environmental data has given me so much insight into what effects my actions have on the environment I'm trying to maintain. You can see everything on the temperature and humidity plots. I can tell when the lights go on and off, when the misters mist, when the fan changes speed, if my apartment is dry, if the apartment heater turns on, or if I left the front flap too far open. In particular, the VPD value derived from the temperature and humidity data was an eye opener. I didn't really expect how sensitive VPD would be to slight changes in temperature and humidity. Watching the VPD readings has really helped me understand what extremes the plants experience, why forced airflow seems beneficial in some cases but harmful in others, and how easily parameters can go "out of range" in this particular type of environment. Most importantly, by combining these measurements with observations of the plant's health, my understanding of what conditions these plants actually need has improved.

It's hard to explain, but it's one thing to read what orchids need to be healthy, and drop a plant into an environment that you think matches these needs. It's another to really understand the nuances of airflow, temperature and humidity. I'm developing a better feel for what it means for a plant to need (for example) "moist" conditions. There is some nuance in this, does it mean the plant doesn't want high airflow? that it needs >90% humidity? that it needs to watered daily? that the mount should not be allowed to dry out? or that it must be mounted in sphagnum? each of these could be a way to achieve "moist" conditions, but the plant may not respond the same to all of these options. For me at least, it has been very helpful to have real data showing what the plants are actually experiencing to help make sense of the plants responses.

For my application (which is growing mini orchids in non-naturalistic terrariums) the humidity control and constant high airflow has been mostly successful. I have seen better growth during this experiment than I have achieved in any other conditions. I have seen no dried aerial root tips, no rot, no dropped flower buds, minimal algae on the mounts, and lots of growth.

Some evidence:
This is Stelis andreetae, and I love its weird blooms!
























And here is Lepanthopsis astrophora









My next steps are to setup a second large orchid tank, to replace the tiny test tank. I will move most of the plants into that second tank to continue testing their response to high airflow with a controlled minimum humidity and automated watering. This will allow me to see how more species respond to these conditions, while I work on a tidier version of the sensor and controller.

I really appreciate all the responses I've gotten so far. I did not mean to imply in previous posts that this exact type of control or automation would be an improvement for dart frogs specifically. However, I do think that accurate, persistent, and live temperature/humidity data could be a useful tool for most folks working with terrariums. It's the health of your inhabitants that is the ultimate sign of whether your husbandry is effective or not. But I think the intermediate step of measuring the conditions you created is important, and can help us all understand *why* certain actions or methods produce a positive response.


----------

