My new (and first) automation project

This is a minimal graphical representation of my project. As shown in the image, there are 4 device classes.

Let me briefly explain how it works. I have two enclosures designed to house two different types of animals (hermit crabs and geckos). The different species have different habitats, so they need to be managed independently. However, the factors to consider are the same.

  • For geckos, the enclosure should ideally be divided into two zones (left and right) with different temperatures and humidity levels: a cool, humid zone and a warm, dry zone.

  • For hermit crabs, the enclosure is divided into two zones (air and ground), both of which should be kept warm and humid.

So, despite some differences, the parameters to consider (albeit in different ways) are the same: temperature and humidity. The idea is therefore as follows. In the hermit crabs' tank, I insert the two THS3 (3) and SHS (4) sensors. In this way, I monitor the temperature + humidity of the air and the humidity of the soil, respectively. In the gecko's tank, I insert two THS1 (1) and THS2 (2) sensors to monitor the temperature and humidity of the right and left areas.

Under the hermit crab's tank, I place a large heating mat HM2 (12) in the center to uniformly heat the entire tank. Under the gecko's tank, on the right, I place a small heating mat HM1 (11) so that it only heats the right side (which must always remain warm and dry).

I set up a large box that can hold several liters of water. On the lid I mount the ultrasonic sensor WLS (5) which monitors the water level and warns me if it needs to be refilled. On the bottom of the box I mount the BP (6) on the right and the FG (10) on the left. The box is almost (but not completely) divided in half by a divider. The purpose of the divider is to ensure that the fog produced by the FG (10) remains inside the chimney, for two reasons:

  1. Prevent the fog from interfering with the ultrasonic sensor's detection of WLS (5).

  2. Facilitate the extraction of all the fog produced.

Thanks to the divider, the water can flow freely from one side of the box to the other, but the fog produced by FG ​​(10) is channeled to the right place.

I place LP (7) on the lid of the box. Every time FG (10) is turned on to generate fog, LP (7) also turns on so as to suck up all the fog and push it under pressure into the tube leading to the two cases. The tube forks, and each of the two secondary tubes is interrupted by a valve: V1 (8) and V2 (9). The purpose of the valves is to make the humidification system operate independently. In this way, depending on my needs, I can humidify only one case, only the other, or both at the same time.

Now let's see the cases that the system handles

  1. If the SHS (4) reads that the humidity of the hermit crabs' soil is too low, the BP (6) is activated and pushes water up to a pipe inserted into the hermit crabs' enclosure. The pipe is perforated so that the water can irrigate the soil. When the correct humidity level is re-established, the BP (6) switches off.

  2. If THS2 (2) detects a temperature that is too low, it turns on HM1 (11). The mat is placed only on the right side of the gecko tank because the left side of the gecko tank must remain cool, for this same reason HM1 (11) is not managed by THS1 (1). HM1 (11) turns off only when the temperature detected by THS2 (2) reaches the desired level.

  3. If THS3 (3) detects a temperature that is too low, it switches on HM2 (12) and switches it off only when the temperature reaches the desired level.

  4. If THS1 (1) detects that the humidity is too low, it turns on FG (10), turns on LP (7) and opens V1 (8) so that fog flows into the gecko's enclosure. When THS1 (1) detects the right humidity level, it turns off FG (10), turns off LP (7) and closes V1 (8).

  5. If THS2 (2) detects that the humidity is too low, it turns on FG (10), turns on LP (7) and opens V2 (9) so that fog flows into the hermit crab's enclosure. When THS2 (2) detects the correct humidity level, it turns off FG (10), turns off LP (7) and closes V2 (7).

  6. The LCD screen (20) constantly displays all the values ​​provided by the THS1, THS2, THS3, SHS, WLS sensors. The activity status of BP, LP, V1, V2, FG, HM1, HM2 is also displayed.

At this point I have a series of questions:

  1. For THS3 (3), do you recommend a specific sensor, or are two screws inserted into the ground and calibrated to make them a sensor sufficient?

  2. Beyond the specific case of the previous point, do you have any suggestions on the type of sensors to purchase for humidity and air temperature?

  3. Do you think LP (7) is sufficient to effectively deliver the fog produced by FG ​​(10) to the two cases?

  4. Do you think it's better

  • a single small LP pump (7) and two valves V1 (8) and V2 (9)

or

  • two small pumps and no valves?

In the first case, I always turn on the same LP pump (7) and direct the mist through the two valves V1 (8) and V2 (9). In the second case, I would direct the flow directly by turning on or off the pump dedicated to the gecko and the pump dedicated to the hermit crab.

  1. In my scheme I considered a single FG (10) composed of many components, all connected together. It would certainly be more refined if I managed them separately (or at least in pairs or triplets) so as to be able to modulate the fog generation depending on the situation. Do you think it is really useful or a waste of time (and money, since I would have to buy more relays)? If it wasn't necessary to manage them independently, I could directly buy a 24V nebulizer only.

  2. Have you noticed any other critical issues? Do you have any other suggestion?

I think you are going to have to simplify things a bit.
Broadly speaking, it's all doable. It's just sensors and control.
Do you have any experience of how to convert ideas into something workable?
Or use of microcontrollers?
You could do the whole lot with commercial stuff.
The code for something like this is not insignificant.
And there's the issue of the creatures well-being.
A room thermostat is one thing, a stable environment for animals another.

This type of sensor can be used for either air or soil temp/humidity:

Since you need 4 of them, you will probably also need an i2c multiplexer. 4-channel multiplexer boards are available but less common than the cheaper 8-channel boards, so I would choose an 8-channel one.

I would recommend 2 pumps over 1 pump and 2 valves, for simplicity (and maybe price).

It's not clear what voltage, power, AC/DC your pumps and heaters require, but if they are low voltage DC, you could consider MOSFET modules instead of relays.

I would recommend a 20x4 LCD display with an i2c backpack as a simple solution.

You could also use an 8-channel i2c I/o expander board to control your relay/MOSFET boards.

With all these i2c components, you won't need many pins on your microcontroller, since they can all share the same 2 pins. So even a small microcontroller board like one of the ESP32 mini boards could be sufficient, and allow you to expand your project to remote access/control at a later stage as your skills increase.

Won't the fog just condense on the inside of the pump and tubes?

Have a look at this: