House of Zephyrus

The one task I hate when gardening is hardening off plants. I tend to rush it and my poor seedlings pay the price. Usually, I am pretty good about limiting sun exposure but not so good about setting up wind breaks.

This year I decided to try introducing wind to my plants while they are still in the grow room. Sure, I could go plonk down $50 and get something bespoke here, but this is a perfect opportunity to use some of the extra PC case fans I have sitting around. It took all of two minutes to prototype a working “plant fan” by connecting a 9V battery across the fan terminals and cable tying the fan near my bell pepper plants.

That worked, until the battery gave out a few hours later. Also there was just one speed, “On,” and I might want to baby some plants or give them the occasional break. A good reason to dig through my parts box and pull out the trusty old Arduino.

There is basically nothing to fan speed control: just send a PWM signal on pin 4 and the rest is same as before. The microcontroller can send PWM signals for you so you just need to set the level. I put a pot between +5V and GND as a speed knob and wrote a quick sketch, and bam! Code here.

Power to the Arduino is on the same power strip as my grow lights, plugged into a smart power switch. The wind and sun get turned off according to the clock, or Alexa.

I don’t lack for Linux capable SBCs around here but there is something refreshing about the simplicity of Arduino.

Arduino pumpkin lights

Lacking creativity this year, I kind of phoned in the pumpkin carving. We went with regular old triangle-eyed Jack-o-lanterns. It turned out this suited Alex fine: he has decided lately that a certain level of traditionalism is called for. Watching keenly as I cut away bits of pumpkin, he was quick to point out whenever I was doing it the wrong way.

Anyhow, not wanting Halloween to pass buy without doing something new, I decided I’d write a pumpkin light control sketch for Arduino. I have the original board with the Atmega8, and the last time I touched it, the SDK was arduino-0011, which was released about seven years, three domiciles, and one country ago. Since then, I’m happy to see that arduino-mk landed in Debian, and the SDK hasn’t changed APIs in any noticeable way, so it was easy to get back up and running.

The concept is pretty simple: write PWM patterns to an output pin to control the brightness or on/off state of the pumpkin light. I came up with three patterns: fade up and down; random toggle; and sequential stepping. The sketch code is over here.

Arduino light controllerOn the hardware side, I used 3 LEDs for each pumpkin, snipped from a roll that I had left over from my cabinet lighting project. The LEDs expect a +12V supply. On the spool, they are wired in series with a 150 ohm resistor and each LED has a 2.7V voltage drop. Powering that would stretch the Arduino, so I used a separate 12V power supply for those, and used the Arduino to switch an NPN transistor corresponding to each light. I soldered the LEDs to some speaker wire and put the rest of the components on an Arduino protoshield inside a box. This was essentially a lunch hour’s worth of work to get the basic functionality going, and then a little more time to make it neat.

This year Alex and Ian went as Bumblebee and Iron Man respectively (-ENOTPICTURED). Sadly, with store bought costumes — homemade ones will have to wait until one of us learns to sew something other than kites.