Automated Houseplant Maintenance

May 24, 2022

We’ve got a 3 week vacation planned, and a subject of contention was over how to deal with our great deal of houseplants. We’ve got a finnicky Calathea , two holey Monsteras and a gangly moneyplant.

Ordinarily we’d have a friend come over and water them every week, but distance (most of our friends live in Manhattan while we’re deep in Brooklyn) and convenience, made asking someone over every week a tall order.

The solution was some hacky automation that took a few hours to get together. I’m writing this during some downtime on said vacation so pictures of it all are sparse.

The Arduino 5V ecosystem is pretty neat - a relay and four pumps was all I needed to get it working. What made things easier was grabbing one of those Arduino project kits (which also came with the tubing!). Unfortunately the instructions weren’t great, but the wiring and code was easy enough to figure out.

The kit also came with mositure sensors, but I didn’t want to deal with the headache of calibration and sensitivity. I have low patience for sensors already, trying to get sensors from a cheap kit to work would have sent me spiraling.

const int pumpRelay[4] = { 2, 3, 4, 5 };
const int ON = LOW;
const int OFF = HIGH;

#define SECOND 1000UL
#define MINUTE (SECOND * 60UL)
#define HOUR (MINUTE * 60UL)
#define DAY (HOUR * 24)

void setup() {
  Serial.begin(9600);
 
  for(int i = 0; i < 4; i++) {
    pinMode(pumpRelay[i], OUTPUT);
    digitalWrite(pumpRelay[i], OFF);  
  }
 
  delay(500);
}

void loop() {
  for(int i = 0; i < 4; i++) {
    digitalWrite(pumpRelay[i], ON);

    delay(20000);

    digitalWrite(pumpRelay[i], OFF);
  }

  Serial.println();
  delay(6*DAY);
}

I’ve figured out the way to get a project done, and it involves not caring about how hacky a solution is. This is a bigger epiphany to me than it may seem, mostly because a good deal of projects get sidetracked to death by optimizing before a working solution even exists. Another key is having your fiancee breathing down your neck during the process.

It works fairly well, and I’m happy with the (input hours)/(results) ratio. I think it’s a solution that I’d like to build on and possibly scale for the next time we’re out for a good chunk of time. Some things I’d like to change for the future include:

I think I’ll actually do these things over time.

Bonus picture of where I am right now: