This is the sixth part of the meta-tutorial, where I talk about designing a cheap plant watering sensor. If you did not already read the first, second, third, fourth and fifth part please do it now. These parts contain a lot information which lead to this point of the tutorial.
The fifth part ended with step 24, where I talked about calculating the total bill of materials. This part will focus on preproduction of a small batch of sensors to solve some final details.
Just note, I obviously do not follow these steps in a perfect sequential way. Often I start with some tasks earlier and things are running in parallel. There are various dependencies and it would make no sense to wait with some task just to follow a strict sequence. 🙂
If you follow my blog you may already read some details about ongoing tasks. I will just briefly talk about them in this article. You will find more details in the other blog posts.
Step 25: Build an Alpha Series
Everything looks very promising, so its time to build a small batch of the final devices to see if they work as expected. This is also a test to see how a larger number of these devices can be produced and what kind of tools are needed for this task.
Order the Components
First I order the components. This is very important, because the availability of electronic components changes all the time. It is nice to have all required components, so you can order the boards with the correct footprints. If you order the boards first and are unlucky, an important component is suddenly unavailable and you have lots of boards with wrong component footprints on it.
Using the new method of measurement, described in this post, I could successfully collect some meaningful data. This time, the read values are the exact values of the final sensor without a different kind of oscillator.
I watered the plant at day zero with quite a great amount of water. From there you can see how the frequency slowly rises, while the soil in the flower pot starts to get dry. There is a small measurement error between day two and three. Here I had a short power loss and no data was recorded which resulted in some zero records. Continue reading Successful Measurements→
I started a second take on the long term tests for the plant watering sensor. This tests are required to be sure, the measurements follow the expected cycles. After watering the sensor, the frequency should go down and while the soil is drying up, the frequency should go up the the initial value.
Logging this measurements is very important to get a good overview of the measurements and be sure if every aspect of the device works as expected. At this point, I especially test the sealing of the foot part of the sensor. If it keeps completely sealed against water, I should get very consistent and repeatable readings.
The curve on the right side shows the measurements of the last 48 hours. These small variations are normal and are most likely caused by the plant itself or because of temperature changes of the board.
If you have questions, miss some information or just have any feedback, feel free to add a comment below.
Currently I am working on the coating for the foot part of the plant watering sensor. Here I already tried a wide range of techniques and materials. At the moment, epoxy seems the perfect material choice – so I am trying different resins and hardeners to get the best results.
Some hardeners are very reactive and produce a very strong exothermal reaction. While I read and prepared everything meticulously for a new process as usual, I still get sometimes very bad surprises.
For the process, I dip the foot parts into the epoxy resin and hang them up for drying. To waste as few as possible epoxy resin, I used very small plastic cups for dipping.
The exact material of this plastic cups is very important I learned. You should never use something which will react violently with the mixed epoxy resin, as you can see in the next picture.
The cup literally started burning after a few minutes and I had to drop it outside on the forecourt to prevent any disaster. In the picture you can see the remains of the process: A beautiful frozen epoxy block, in the middle of the melt down. The cold air outside rapidly cooled down the process, so the burning stopped.
Mental notes for the next experiments:
Use only cups where you exactly know the material.
Keep a stop watch running with the pot time, assume 20% shorter time as specified.
The first long term measurement I made, to test the behaviour of the sensor over a longer time range was a failure. After the five days with the device introduced in this post, the readings made absolute no sense.
The sensor was not moved in the flower pot and the plant was once watered at the begin of the measurement. While it looked promising at the begin, the frequency suddenly went down again, which was very irritating. I am still investigating how this could happen.
To get closer to the real measurement of the final plant watering sensor, I started a new approach.
I soldered a header to one of the LED pads on a fully assembled plant sensor. Next I changed the device for the measurements.
To gather more long-term measurements for the capacitive method I use for my plant watering sensor, I created this small logging device. As you can see, it uses one of the plant watering sensor prototypes for the measurements. Instead of using the ATtiny13A on the board, it passes the oscillator signal directly to the microprocessor of the logging device.
In front there is a very small 128×32 OLED display, where I can see the current measured frequency in kHz. On top, the current time and date is visible, and on the right there is a graph where I can see the values from the last 48 hours graphically. There is not much visible in the graph, because I took the photo just after installing the sensor.
Every minute, the current average of measurements is stored in a CSV file on a SD card. After a few weeks I should be able to analyse this file and see the results. Here I am especially interested in the cycles from watering the plant until the soil got dry again. Continue reading Plant Watering Sensor – Long Term Logging→
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.