Bitten Again

Every now and then I get an idea. It’s typically not an original idea, in that commercial products to do what I’m trying to do already exist, but it’s an idea nonetheless. I like to think that knowing how those commercial products are built may come in handy for one reason or another.

The physical computing bug has bitten me once again, but this time I want to do more than just capture and log environmental data; I want to control things.

The idea stems from a vacation my parents took this year. Don’t get me wrong, I have no problem heading over to their house and checking on/watering their plants, but wouldn’t it be pretty cool if there was a “set and forget” system that would just do the work for them? To that end, I have started collecting components to build a self-refilling irrigation bucket. It’s an interesting sequence of words to be sure, and it’s not completely automated, but it’d be pretty cool if I can build a working device.

I had a couple of design ideas in mind, but settled on a microcontroller in a weather-resistant project box on top of a 3 to 5 gallon bucket with a lid. There are several sensors involved:

  • The most obvious sensor is for soil moisture. It doesn’t make sense to water a plant that’s already been watered, does it? I don’t recall which one I ordered, but I believe it’s the one that senses temperature and humidity.
  • A slightly less-obvious sensor is for water level. I’m not measuring the amount of water entering or leaving the bucket, so the best way to determine when to refill — and how much water to let in — is by sensing how high the water is inside the bucket.
  • The least-obvious sensor is for ambient light. I’ve always been told that it’s advisable to water plants toward the end of the day, and as it tends to get dark around that time, sensing how much light is around is reasonable.

So, that’s all input. If I’m going to control things, it’ll need output as well — and not just a screen or a blinking light or a speaker. No, it’s going to be water this time.

  • The supply of water into the bucket is provided by a garden hose connected to a solenoid valve. When the water level sensor detects that the water reaches a certain height, the microcontroller opens the valve, allowing water into the bucket; once the water reaches the “full” level, the microcontroller closes the valve.
  • Water is supplied to the plant by a tube that is submerged in the water, in the bucket. The tube behaves like a soaker hose: it is positioned on (or slightly above) the soil around the plant. The pump isn’t controlled directly by the microcontroller; rather, it activates a relay to start the pump.
  • A monochrome OLED screen shows current readings/status: water level, ambient light level, temperature, pump/solenoid state, and soil moisture level.

I need to observe how the soil moisture sensor behaves in order to determine how to stop the pump. If the sensor reacts quickly enough, I can deactivate the pump when the soil reaches a certain moisture threshold; if not, I can tell the pump to run for, say, 30 seconds at a time.

There is no internet connectivity required here. It doesn’t report stats, download updates, or anything like that — configuration must be done directly via USB cable. This is not a hard and fast requirement, but I like the idea of not having yet another thing connected to the internet.

Also, while this is a standalone device, only minor modifications would be required to make this “chainable.” This would introduce the requirement for multiple solenoids, which may also create the need for inter-microcontroller communication. That doesn’t necessitate Wi-Fi or cabled Ethernet either — but it’s something that would need to be considered later on.

So … can’t wait for the parts to get in.