With lessons learned from the fist version of the harponics setup and relying on the acquired quality check ideas due to accumulated feedback over time, it seems necessary to re-approach this project again in order to resolve some issues and transmute or redesign the project into a better solution.
The PCB can be simplified a whole lot by removing some modules off the PCB. The relay for the water pump will be kept as a module due to water pumps requiring high amperage in general. However, the PCB also has two step-downs fitted, one for the lights controller from to
and the other from
to
for the ESP. The step-down for the lights controller can be removed because the required
will now be provided via the power regulators but the step-down for the ESP will be kept because it provides stable
.
Even though the LM2596T-5.0 were planned to become the substitutes of the to
step-down, it was decided to use LM7805 rated at max
because each individual light (ie: if the controller leads are split in two) is also rated at
. Meanwhile, we have ordered some LM323T power regulators that also step down
to
but are rated at
and can seamlessly replace the LM7805 given the datasheet.
The LM323Ts are in fact obsolete so they are not produced anymore, but we found a source that is still selling them and they are much better than the LM2596T-5.0. The problem with the LM2596T-5.0 is that they require a whole circuit to be created around the power regulator, and even though the circuit seems easy enough to accomplish, it turned out to be too bulky and would occupy a whole lot of PCB space. Another problem with the LM2596T-5.0 is that they are switching power regulators, along with an inductor that is included on the standard usage schematic that will just end up radiating EMI and hence might influence radio operation.
On the other hand, the LM7805 and the LM323T have suggested operation circuit that only show ripple control via some capacitors without the need for a buzzing inductor. Ultimately, if done right, the LM7805 should be enough for three or four lights.
It was decided to use three power regulators. Given their usage, the LM7805 are almost burning all the time so they need to be cooled. For that purpose, a small aluminum shim was cut and the power regulators screwed onto the shim. Then, for some additional thermal mass, an old CPU cooler was glued onto the aluminium shim using some thermal glue compound. Furthermore, some active cooling is added, mainly due to the fact that the control board will be placed inside the same container where the plants grow where there is no air flow.
The fan is powered by directly from the main power line instead of the
. This now offers sufficient mass to keep the power regulators working consistently and without burning them.
Similarly, while all of this seems very nice from the point of view of "digitizing" a garden, there is not much actual "automation" going on, such that for that purpose, some additional sensors are required. One of the first tasks to accomplish is to be able to water the plants automatically without having to do so manually. Perhaps the easiest way to accomplish that is to use a soil moisture sensor that can be arbitrarily calibrated.
These sensors are very cheap, work on the principle that moist soil is conductive such that placing two terminals within the soil and passing current through the terminals will generate a circuit that will have a certain resistance that can then be measured by a counter. The more moist the soil is, the higher the conductance and the dryer, the less conductance. This is yet another sensor that does not really yield values that are meaningful in a physics sense such that the observed moistness is not really measured in anything but is only observed relatively as "more or less".
The sensor is fitted next to the ESP controller and the required circuitry is created on the other side of the PCB. One deviation from the purchased sensor is that the original Dupont pins are removed and refitted with small JST plugs for better resistance to torque forces. Similarly, the Dupont pins on the actual sensor are removed and that part is also fitted with JST terminals.
On the other end, the sensor is slid inside the planter, right next to the very same water hose that is supposed to water the plants and the small PCB is pushed into the earth, right next to the roots.
The analog pin of the sensor module will provide the ESP with a scaling voltage, along the lines of, the lower the value, the moister the soil. Calibrating the sensor is a breeze and all that has to be done is to turn on the pump for a few seconds, then turn the pump off and then measure the analog value from the sensor while making a note of the analog value which represents the moist value.
The image illustrates a measured value off the wet soil sensor of 3969
right after engaging the water pump and sprinkling the roots and the area around the sensor. The value 3969
is actually fairly good in itself and indicates a good sensor knowing that the range that an analog pin on the ESP32 is between and
. The
3969
value will then be considered the "wet" threshold. For the dry value, after a day or so, the analog voltage is measured again and then a note is made of the analog voltage in order to obtain the dry value.
With the two values collected, the logic is simply to start watering the plants when a threshold around the "dry" value is hit and to stop the water pump when the "wet" value is reached. For robustness, lower values are chosen for the wet threshold in order to make sure that the soil moisture sensor is duly impressed and will react when the plant has been watered sufficiently. To ensure that there will be no floods, an additional feedback sensor will be added later as a debit or flow meter such that an auxiliary judgement will be made on the total amount of time that the water will be allowed to flow. The logic will then be to open the pump till the "wet" value of the soil moisture is reached or the maximal water flow time is reached at which point the pump is closed.
As a reference, the following shows the circuitry on the other side of the PCB.
Even with two sides, there is always one extra "level" that is needed, and that level is mostly created by using rigid copper wire in order to establish bridges across the first layer of the circuitry, so, in principle, the image depicts three separate layers of circuitry (ironically, some copper leads are passed on the component side, thereby creating yet another layer).
The pump is still need and the relay is a high-powered relay which is great such that the relay module is preserved in the revision. However, it was decided to integrate some secondary feedback means to be able to determine if the water is currently flowing or not. This could also be used to fully automate watering the plants and having an additional feedback to be able to determine when the water is flowing or not would make for a much smoother experience.
To that end, a debit meter was added to the project. The flow meter connects to the PCB that provides and a signal pin that can be used with an interrupt pin in order to determine whether the water is running or not. Interestingly, the whole project is powered by the GPIO tool with no particular coding needed and the recent update to the GPIO tool includes reading interrupts.
When the pump is engaged, the water starts to flow through the tubes and goes first through the flow meter. The flow meter will raise an interrupt on the GPIO pin that its signal pin is connected to and the interrupt will be read and sent to a centralized server that will take decisions based on whether the interrupt is triggered or not. Similarly, when the pump is disengaged, the interrupt stops triggering and hence emitting signals to the centralized server, such that it is assumed that the water is turned off and now not flowing anymore through the debit meter.
At this growth height, the plant feels like it needs a larger potting plant such that a transplant should be in order. Instead of purchasing any additional pot, a simple plastic kitchen tray is used.
The best tip one can give here is that ideally one should cut or smash the old planting pot open instead of attempting to dig up the plant. This is due to how roots spread throughout the soil within a pot that might end up ripped in case the plant is just pulled up or the roots could end up cut in case a knife is used to dig up the plant. By cutting or smashing the pot, the pot is wasted but the plant is extracted with its whole roots still entangled around the earth without being bothered.
The plant, roots and soil that the roots cling to is then placed inside the new pot and additional soil is added around the edges to fill the new planting pot up. The roots that already exist are hence not torn and will now additionally have room to extend into the new soil that has been added for the new planting pot.
The Lonicera X Heckrottii Goldflame is said to be fairly resistant and adaptable to dry, moist, dark or sunny environments as well as growing very fast. Indeed, it seems that just a week after the plant is bought and planted inside the environment, the first flowers start to bloom and there are several of them at various ends of the plant which is a good indicator that the project is succeeding.
It is clear that the initial plan was too heavy when it came to light because the lights used are so intense that they fill the room such that the next-up item to create will be curtains. Curtains are easy to create, and it takes some cheap bedsheets or other material that is then cut to size.
The top of the curtains is then fitted with small bits of leather that allow holes to be punched through in order to then be able to suspend the curtains using hoops.
Of course, a neater result would have been attained by sewing the margins in order to prevent those fringes from forming, but the result is good anyway and the only task is to keep the light inside or perhaps with the slight purple glow that makes a good ambient light.
As mentioned, one of the very cool things about the curtain is that they implicitly create some "greenhouse" effect by holding in the light, heat and any humidity inside the small enclosure where the plants are placed.
Even during the development, a Lonicera X Heckrottii Goldflame (Goldflame indicates yellow flowers) was ordered and arrived completely bare without any leafs even hinting that it might have been delivered dead but placing it in a planter inside the created environment made it sprout leaves in a matter of days.
Due to dealing with "hanging plants", it was decided to curl the plant around one of the lights that emit UV and more or less use the UV light as both a growing stick or guide, as well as an active source of lighting that the plant can wrap around. The enclosure creates some form of incubator because the growth of the Lonicera is spectacular. It, of course, remains to be seen if it will bloom because the flowers smell nice and are very pretty.
It should be said that it seems that plants like light continuously and when some plant is advertised as being "shade tolerant" or to "grow in the shade" it just means that it will manage to put up with the darkness, however the lights do not necessarily have to be turned off because the light does not need the shade at all. In other words, there is no true circadian rhythm with a particular "off time" required by the plant and the more light or more water, the happier the plant seems to be (of course, within the limits of harming the plant; no drenched soil or light too bright to burn the leafs).
The curtains are then automated using the curtains automation project in order to remotely pull and curl the curtains back together using Amazon Alexa. One of the thoughts has been to open the curtains depending on the time of day: close the curtains when the sun goes up and then open the curtains when the sun goes down, in order to dual-use the lights as a source of lighting for for the room itself.
Wizardry at Steamworks uses an automation model where all the automation takes place in software whereas all the hardware consists in functional elements that either act or pass data with all the decision-making being centralized and implemented in software as disctinct building blocks. This is mostly out of convenience but also tends to reduce catastrophic failure or limit incidents. In case that the main central decision making unit vanishes, the hardware then does nothing anymore and no catastrophic incident can take place.
This section sums up the various building blocks of the redesign, how they have been implemented along with their corresponding feedback elements and decision trees.
The lighting is assured by a series of pads with LEDs, as well as one fixable table mount with multiple arms meant to steer the growth of hanging plants. As mentioned, plants do not seem to have any cicadic rhythm such that they would be happy to absorb as much light as it is given to them and having said that there is no need to turn the lights off except when deliberately requested by the user.
The automation consists in two flow-level switches (implemented via the blue-gray On
and Off
labeled nodes), one switch on the Node-Red dashboard, a voice control via Amazon Alexa and one light sensor that checks the light level within the enclosure. In case the user does not explicitly request a light state via the dashboard controls, or if the user requests the lights to be on, the flow activates the light sensor and checks every second that the lights are on. In case the lights are not on, the flow activates the relay that powers the LM power converters with the heatsink at the back and turns all the lights on.
Irrigation works by toggling a relay that, in turn, switches a water pump on and then the water is passed through a flow meter though to the plants that need to be watered. The relay is not a latching relay, such that the absence of any power (for instance, in case of a malfunction) will let the relay go and will turn off the water pump.
However, in order to be sure that the pump is turned off, a flow meter is used as well that is continuously read while the water flows as an element of graceful failure in case the rest of the circuit fails. The implementation uses ESP interrupts to bind to an interrupt signal provided by the debit meter that will keep emitting messages on the MQTT bus while the water flows through it. The messages emitted by the debit meter are delayed by a fixed amount of at 10 seconds after which the pump will be turned off.
There is one additional alarm(2)
*nix system-call like countdown that reinstalls every time the interrupt signal is emitted that will only set the water pump state to off once the debit meter stops emitting thereby providing a secondary feedback to the system that observes the state of the pump.
Right under the main flow there is another flow that measures the moisture of the soil periodically using the soil moisture sensor placed inside the plant pot right next to the small plastic water hose. When the moisture level exceeds a certain calibrated value, the flow emits a signal and turns the watering pump on. After the pump switches on, there are only two possible terminations; either the soil moisture level measured by the sensor exceeds the programmed value such that the system emits a signal and turns the water pump off or there is some failure and after a delay of 10 seconds and then the secondary system forcibly disengages the pump to prevent a flood.
As additional automation, the system also has voice control and can be turned on or off using Amazon Alexa and the system also emits a notification via Gotify in order to be able to announce a Desktop computer (for example, via Winify) when the watering cycle starts and ends.
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.