As mentioned in my article about designing a cheap plant watering sensor, I built a small adapter which can be used to pre-program the ATtiny13A. This is necessary, because once soldered on the board, I only have a debugWire interface, which has to be enabled first.
The adapter has a small 50mil JTAG header, where the Atmel ICE can be connected with the board. There is also room for a USB mini jack, which is used to power the MCU while programming. A small on-off switch is used to power the MCU and a LED is placed as indicator to see if the MCU has power. The assembled board looks like this:
Today I tested a number of SMD LEDs for the plant watering sensor project. I soldered all 13 LEDs I shortlisted onto a small board and connected it to an Arduino Zero Pro. So I could try the different flashing styles I planed to use more or less automatically. That way I could focus on the LED flashing itself, without being distracted by switching cables.
This is the board I made. Very simple but functional. I used red and blue male header to mark the anode and cathode of the LEDs. There is a sticker on the bottom with the LED numbers on it.
I mounted everything on a very small breadboard and did all connections to the Arduino.
This is the second part of the meta-tutorial, where I talk about designing a cheap plant watering sensor. If you did not already read the first part, please do it now. It contains a lot information about constraints and decisions made which lead to this point.
The first part ended with step 11, building a working prototype with the selected key components. So let us start with the next steps in this journey.
Step 12: Analyse and Measure the Prototype
Never forget why you actually built a prototype. It is your tool to verify all assumptions you made in the design phase. To do this you need the right measuring instruments.
The Power Usage
I start measuring the current of the circuit. This will show if my assumptions about the battery life will be true. For this test I use a multimeter which has a good resolution measuring in the µA range. The multimeter I use is the Testo 760-3 which is not a very well known brand. Multimeters are usually really poor at measuring low currents on low voltages, so let us see if this will work.
I also use a Fluke 114, but this one has no current measurement. It is sometimes very handy to have two multimeters, one to measure the voltage and a second one to measure the current.
For the first test I program the MCU to do all the tests in a loop and connect the power directly to the second part of the circuit. Now the power is always on and I can measure the current used by the MCU while doing the measurement.
Yesterday I found some time to put the fan controller in a casing. I used a very cheap no-name case with the dimensions 130 × 68 × 44 mm. First I drilled some 2.5mm holes into the lid, and fastened the Arduino board on it using M2.5 spacers. You see the bottom of the case in the photo – I mounted everything top down, because this simplified everything.
I experimented with the spacer size, until I found the right height, so the display is more or less at the same height as the case bottom. Next I put very small bits of double sided tape onto the corners of the display and put the case bottom on top of the lid. After removing the bottom, the exact position of the display was marked at the bottom with these double sided tape bits.
First I drilled four holes at the expected corners to see the position from the other side. Next I used a Dremel tool to cut the rectangle out of the case.
As usual: This was my expectation of the result… 😉
…, and this was the actual result:
No, seriously, I did not expect much. I just hoped the controller will fit into the case and I cut the rectangle at the right place. So, this worked out very well.
In this article I will talk about how I designed a cheap plant watering sensor. My goal is some kind of meta tutorial, where you can see the steps involved from the initial idea to the final sensor. If you ever planed to create a own device, I hope this article give you some inspiration to start your own project soon.
Why a Plant Watering Sensor?
I have a couple of plants in flowerpots and this plants not only like some light, they also need water from time to time. Watering this plants is something I often forget, with sad results. There are ready made solutions for this, but I have some objections with all of them. To be clear: There are really smart products out there – it is absolutely nothing wrong with them. It is just as I like to build my own fan controller, I like to build my own plant watering sensor in my very own fashion.
Here a list of already existing projects and devices I own or checked out:
After deciding to create a own plant watering sensor, I spend some days to think about my expectations and goals for this sensor.
For my personal case, I like to put a small sensor in each flowerpot. There will be five and more pots, therefore that number of sensors are required. A single sensor should be really cheap, so I can distribute as many of them as I like. Battery life should be at least one year, better two years. I collected all this thoughts into the following list:
Cheap: Ideally less than €5 including the PCB.
Visual Signal: A flashing LED, simple to notice but easy to ignore.
Simple: Easy and simple to build with few components.
Beautiful: It should ideally look like a decoration.
Long Battery Life: The battery should last at least 1 year or longer.
Small: The sensor should be almost invisible from far away.
Reliable: The measurement should be reliable and the sensor must not corrode or degrade over years.
Safe: The sensor must be safe for the plant and environment.
Low Battery Indicator: The sensor should detect if the battery is at end of life and signal this.