When I started working on my soil moisture sensor, I had little idea about how harsh an environment the soil really is. In this 🧵, cool failure modes & solutions when sticking electronics in the ground:
If left completely unprotected, water will slowly creep in when we stick a PCB in soil. In my tests, this takes from a few weeks to a couple of months.
The solder mask adds some protection to the top and bottom of the board, but the edges of the PCB are completely exposed and usually where water gets in first.
In the beginning, I've experimented with the hack of adding a few coatings of nail polish to the edges. This helps, but eventually the solder mask also fails.
I then moved on to a real "conformal coating" approach. I bought one of these Plastik 70 acrylic sprays and gave it a go in some boards. Here are they drying up.
Since these are capacitive soil sensors with coarse precision, adding a super thin layer of coating had no measurable effect in its readings.
I was pretty happy with this solution for a while, and I have a few boards that still look pristine after almost a year of service.
But let's take a closer look at this one. Note that, on the very tip, the coating chipped off and it lost its battle against rust.
When drying in the "upright" position, some of the coating ends up accumulating on the tip, in the form of a little acrylic blob that sticks out. This created an area of stress when inserting and removing it from the soil. Eventually, it broke off, exposing the uncoated board.
So, not only the coating matters, but also how it dries. We want a nice, smooth and uniform layer on top of the board.
I then built this PCB rotisserie that spins the boards while they dry, hoping it would make the coating layers more uniform.
I'm happy to say this is now the method that's been working best. Here's a shot of a finished coated board:
I've also experimented a little with epoxy resin instead of acrylic. It's thicker and feels more durable than the acrylic, but it's not as convenient to use as the spray can, and there were more blobs. For small batches, it's more wasteful, since you can't save the leftovers.
Another interesting failure is when water shorts something on the board. I tend to also coat the components (even the temp sensor!), and it's fine. The battery clip on the back, on the other hand, cannot be easily coated, since it needs to make good contact with the battery.
When water gets in there, not only the battery drains quickly, but this also happens to the clip:
This happens when watering the plants, as the water level can briefly rise above the soil and reach the battery clip.
I revised the board and made it a little longer, so the battery is further from the soil. I've also 3d printed cases for all my sensors, which I had only been using for the outdoors ones.
With the properly applied coating and case, I expect these boards to last a long time. Thanks for reading!
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.
