For a greenhouse a microcontroller with some extensions and some electric valves is used for moisture and temperature surveillance and for watering control. The environment of that application required feasible water-proofness. To get network connection, an ESP8266 is used.
A professional case was practically out of scope. Moreover a metal case surrounding the processor board would affect the WIFI connection.
So the perfect, hands-on solution was found: A wooden board for housing the valves, wires and connectors and some glass, enclosing the electrical part. Glass would not affect the WIFI like metal, and an attached display would be visible, without the need of cutting an opening. A jar was taken out of the glass-garbage box. With some holes bored and slits cut into the lid, folded up parts of the tin, a holder for the main board was built.
The construction is intended to stay in-place, so the ESP is mounted pluggable to the main board using an old D-Sub-connection from the scrap box two pieces of bended geared rod and nuts (3mm).
Updating the software can be done remotely or the board can be removed, just two moves by hand: Screwing open the jar and pulling off the board from the socket.
There are 6 slave units, each containing a circuit for a moisture sensor and a valve for the watering. Under the floor, built by old pallets, a flexible tube is leading the water hose and the sensor wires to the planting pot. The cylindrical shaped valve is fixed into a hole, the water-part looking out of the board downward and the electrical part upside inside the jar.
The main power is coming from an external power supply, to get the required 12V for the magnetic valves and feed an additional step-down converter on the board to get 3,3V for the ESP.