Plant monitor

The beginning of something green



Created by: Bram den Ouden, 2020-01-21


Plant monitor

An easy way to brighten small dorm rooms is to add some plants. Of course, these plants will need some care which I, admittedly, have forgotten many times. Unfortunately, my plants have developed a habit of dying after not receiving water for well over a month. Luckily, there is an easy solution: let the plants water themselves!

General idea

The general idea for this project ‘grew’ when I added a fast-growing plant to my balcony. Since it grew so fast, it required a lot of water. The plant also required a lot of sunlight, causing me to put the pot near the edge of my balcony where it would receive the most hours of sunlight. This caused a conflict with my laziness: I didn’t want to get up to the balcony to check whether the plant needed more water or not, yet I really liked this one and wanted to keep it alive as well.

The solution: Create a device that measured the soil moisture and could communicate this to me. Additionally, this device could use a pump to water the plant from its attached reservoir. This meant that I only needed to get up when this reservoir would be depleted.

Figure 1: The plant on my balcony.

The components:

So far, both the general idea and a proposed solution have been discussed. In order to realize this solution, I chose to use the following components:

  • Pump: a very simple 3-6V from AliExpress, this cost me around €1,50.
  • Tubing: the silicone tubing I used came from Intratuin, it costs about 20 cents per meter.
  • Soil moisture sensor: I chose the more expensive capacitive soil moisture sensor from AliExpress over the cheap resistive sensor since the resistive sensor is prone to corrosion and needs to be replaced very fast. This cost me about €1,-.
  • Temperature and relative humidity sensor: Adding these sensors to you project provides a lot more information about weather circumstances but is not necessary. A standard DHT11 holds both sensors and would cost you about €0,70. It’s big brother, the DHT22, is a lot more accurate but will costs you about €2,50.
  • Microprocessor: The choice for this part is highly depending on the chosen way of communicating to a server and will also be discussed in more detail. It will set you back about €3 to €5.
  • Solar charger with DC boost and LiPo battery: This part will be discussed in more detail later on, the costs for this part are around the €3,- mark.

Microprocessor

As the brains of the operations you could either choose something like an AttTiny84 and add a 433MHz transmitter and a real time clock module, replace all these components with a Wi-Fi based microprocessor like the WEMOS D1 mini or use Bluetooth. All these options have their advantages and disadvantages:

  • The AtTiny84 is very small, cheap (it only costs about €1) and, combined with a 433MHz transmitter, has a much greater range than a Wi-Fi based device. Although the price advantage is nullified by the need to buy a separate RF transmitter and RTC, the range advantage makes this a real competitor: The free path loss at 433MHz is about 15dB lower when compared to a 2,4GHz signal.[1] Consider this option if you either have these parts laying around or find your plants having a bad Wi-Fi reception. Keep in mind that you will also need to create a receiving station for the 433MHz transmitter which could input the received data into a computer or server. Despite these awesome features, it is the only device listed here using one-way communication: if a package gets lost, you have to wait until the next one is sent.
  • A WEMOS D1 mini is a well-known ESP8266 based board and will cost you around €2,- at AliExpress. It has the advantage of being well documented and a massive online community which can help you if any trouble occurs. To use this board, you will need to connect it to your Wi-Fi network and setup a server to receive and process the data. Advantages are its simplicity in use and the features added by the internet. Not only will the WEMOS be able to easily send the data to any webservice, it is also able to use these services to receive the current time and date. It is for example also possible to connect to a weather service to automatically decide to either water the plant now or wait until the afternoon rains have passed. The biggest disadvantages of this device are that it consumes the most power out of the three listed and it is highly dependent on a good Wi-Fi connection.
  • A Bluetooth module uses by far the least amount of power out of the three options mentioned here. Two-way communication is possible and almost every device nowadays has a Bluetooth transceiver built in so setting it up is relatively easy as well. A major disadvantage can be found in its range: about 10 meters in a free space path and this range rapidly decreases when objects get in the way.

Power supply

Since this project will be applied to an outdoor plant it would be ideal to use the same source of energy as the plant itself: The sun. Using solar power means it is also required to add a battery since this form of power is unreliable. The obvious choice for a battery would be either a LiPo or Li-Ion battery. Both output a maximum voltage of 4.2V when fully charged and a minimum of about 3.3V when completely discharged. Since all my sensors and microprocessors accept 5V, a boost circuit is required. We could go on and design and test our own circuit, but that takes a lot of time and iterations. Instead a quick google search resulted in a complete design of such a circuit made by our German friend: GreatScott.[2] Figure 1 shows his design, it is based around the MT3608 boost IC featured on most Chinese boost circuits up to 2A output and the VN3065, a very common solar charge IC. Both these IC’s can be bought for a very low price at most vendors. For a detailed explanation on this circuit, please watch his video on youtube: ‘Solar Battery Charger (LiPo/Li-Ion) || DIY or Buy’. As for the battery: I would like to be able to continue 2 days of transmitting data without receiving any solar charge. This would not be continuing transmissions but more like hourly or 2 hourly updates. Whether this is possible has to be determined during later tests.

Figure 2: Solar charger with boost function

conclusion

By now you must think “when will he finally show the results??” and rightfully so. Unfortunately, my previously mentioned laziness combined with a lot of different interesting projects have prevented me from building it so far. Despite this, most individual components have been successfully tested and the final project is a matter of creating the PCB and order it. I hope you enjoyed this little project and look forward to hearing your thoughts about it or to see your versions of it.


Sources:

  1. 433MHz range: https://devzone.nordicsemi.com/f/nordic-q-a/6621/how-to-compare-power-consumption-of-433-mhz-and-2-4-ghz
  2. Solar charger and boost converter: https://easyeda.com/GreatScott/SolarLiPoChargeProtectBoost

This project was originally published in Maxwell 22.2: Autonomy