Sprinkler controller upgrade part III – setting it up

Putting the OpenSprinkler and Raspberry Pi together was easy, getting them to run showed my inexperience when it comes to playing with hardware. The overall install went pretty smoothly and the documentation is good and easy to follow so I’m not going to ramble on about it for very long, but just throw up some notes.

First, my old card reader didn’t want to play with any of my computers. Now, the card reader is ancient, but should have been able to work with an SD card. No joy under and available OK, so I ended up having to get a new SD/microSD only card reader.

When writing the ospi image file to the SD card using Mac OS, make sure you write to the raw device and not to the slice (in my case /dev/rdisk4 and not /dev/disk4s1), otherwise you’ll end up with a non-booting OSPI and wonder why. Don’t ask me how I know

Also, the OSPI image doesn’t have Emacs pre-installed, so I obviously had to fix that. I mean, how would I be editing configuration files otherwise?

The hardware installation (aka screwing the controller to the wall and wiring it up) was pretty simple, to facilitate the install I had taken photos of the way the old controller was wired and use that as a guide.

The whole install went pretty smoothly and the controller has been running our sprinklers for a while now. Unfortunately the sprinkler_pi program that I really wanted to use to seems to have encountered a bug that has it trigger multiple valves at the same time; I’m planning to upgrade to the latest version and if necessary debug it a bit because I like its UI better than the default interval_program. The latter however just worked out of the box.

The only concern so far is that the CPU temperature on the Raspberry Pi seems a little high (it’s usually hovering around 60-65° Celcius as it’s outside in the garage. I might have to experiment with a CPU heat sink on that one.

The latest project – improving the home’s sprinkler system, part I of probably a lot

I normally don’t play much with hardware, mainly because there isn’t/wasn’t much I want to do that tends to require hardware that’s not a regular PC or maybe a phone or tablet. This one is different, because no self-respecting geek would want the usual rotary control “programmable” timer to run their sprinkler system, would they?

We do live at the edge of the desert and we have pretty strict watering restrictions here. I’m all for it – water being a finite resource and all that – and I want to improve our existing sprinkler system at the same time. It doesn’t help that the people who set up the sprinklers were probably among the lower bidders, to put it politely. OK, to be blunt they seem to have failed the “giving a shit” test when they put the system together. I’ve spent a lot of  last year’s “gardening hours” just trying to make it work somewhat. Not well, just “somewhat”. Time to fix that.

First step was researching hardware. I’m comfortable with Unix type OSs (obviously) and with seemingly the world and their dogs releasing small, low power consumption embedded Linux devices I figured one of them would be perfect. The original plan was to get a Raspberry Pi or a BeagleBone with relay shield/cape and drive the sprinkler valves that way. A bit more poking around the web led me to the various OpenSprinkler modules (standalone, Raspberry Pi shield and BeagleBone cape) and they look ideal for what I have in mind. I’m planning to order the Raspberry Pi version as one of the nice touches is that the Raspbian repository has packages for the Java JDK, which gives me bad ideas of hacking parts of the sprinkler system in Clojure or Armed Bear Common Lisp. I’m not sure that the system is powerful to run either, but one can dream.

The good thing about the various OpenSprinkler systems is that they have the 24V to 5V converter on board so the power supply isn’t a problem. There is already open source software for them that covers the normal requirements and either of them can control enough valves for our current needs without resorting to genius solutions like running two valves off the same controller output because someone installed a wiring loom that is one wire short of being able to control all valves individually. Apparently the fact that the water pressure wasn’t high enough to run two zones at the same time fell in the category of “not giving a shit”.

The next step after getting the hardware is to run convert the existing system to run off the new controller with some additional wiring to be able to control all zones individually. This will require fixing up some of the wiring issues and will also have to tie in with my project of running some Ethernet wiring around the house unless I decide to go wireless for the sprinkler controller. Haven’t figured that part out yet. Given that the controller is “headless” I’m tempted to hide it away out of sight and just run Ethernet and 24V power to it.

Once it’s all up and running I’ll look into adding some sensors for a bit more fine-grained control over the system. Rain sensors are not really helpful out here as it hardly ever rains during irrigation season. I’m thinking about adding at least a couple of moisture sensors for some of the more sensitive plants to ensure that they get the appropriate amount of water but not more than necessary. Not sure I’ll get around to that part this year, first the system needs to be up and running reliably before I go and break it again.

Stay tuned.