Hi, I am glad to announce the arrival of OpenSprinkler Pi (OSPi) 1.0 — a sprinkler or irrigation extension board for Raspberry Pi that provides direct access and control of sprinkler valves. This post serves as a quick introduction to the hardware and software setups. A more dedicated webpage will be available soon. First off, a picture of the board:
and a video introduction:
Since the beginning of Raspi, there have been many published DIY projects on how to use Raspi for home automation need. I bought a Raspi a few months ago, and have been quite happy with it since then, but I at that point I had not thought about designing an OpenSprinkler extension board for it. The idea of OSPi first came when I noticed that several OpenSprinkler users were setting up Raspi to work with OpenSprinkler. There are many good reasons to do so, for example, to enable logging, to customize the default Javascript files, and to allow more advanced features such as weather-based and learning-based control. At one point I started thinking: wouldn’t it be nice to design an extension board for Raspi, so that it can directly talk to sprinkler valves through the GPIO pins, without an additional layer of microcontorller and Ethernet controller? This has been on my todo list for quite a while, until one day I was playing with Raspi, and I suddenly that the I can actually fit a Raspi inside the existing OpenSprinkler enclosure. As soon as I figured this out, I couldn’t resist ordering a small batch of prototype PCBs right away.
The content below has been updated and moved to a dedicated product page for OSPi at http://pi.opensprinkler.com.
This is awesome! I don’t have time to play with it right now, but I will probably grab one of these a bit later on. in the mean time, it would be awesome if you could find a way that we could still use the wired ethernet with the cover on…
That would require an extra cutout on the enclosure. You don’t have to install the cover: without the cover you can still mount the whole thing onto a wall.
Dremel.
It would have been nice if there was a cut out facing the Ethernet port in the enclosure for the Ethernet cable on RasPi. I would like to put RasPi in the same enclosure but routing the Ethernet cable to other end may be tricky. I need to find a thinner, flexible one.
True. As you know, OpenSprinkler Pi uses the same enclosure as OpenSprinkler, so there is currently no separate cutout for the Ethernet port.
Nice work! It makes me want to put in lawn irrigation just to try this out. Can you think of any limitations of using the ARM based processor vs the Arduino’s microcontroller for the Open Sprinkler project?
Here are some differences I can think of:
– Embedded linux is relatively slow to boot up: if you want to restart the controller, a mcu-based one would restart instantly, while it may take 20-30 seconds for Raspi.
– On a related note, if something goes wrong during booting (say the file system crashes or a device fails), Raspi might get stuck. You may have seen those airflight entertainment systems getting stuck on a log-in or boot screen, and requires manual rebooting.
– Mcu-based circuits are easier to prototype at home. As you’ve probably noticed, the OpenSprinkler has a DIY version for anyone who wants to build it from scratch. Also, you can easily get a small quantity of mcus from retailers, while embedded linux chips are usually only sold in large quantity.
– For battery powered controllers, the mcu-based circuit is obviously more suitable. You can put the mcu to sleep most of the time to save power. I can’t think of anything equivalent on Raspi.
That being said, for a lot of home automation products (which are usually powered from wall adapters) I can see embedded linux is really the way to go: it’s only slightly more expensive (assuming volume quantity) but enables so much more.
Wow, here I was thinking I had a unique idea of using Google Calendar to control my sprinklers from a Pi. I look for hardware to interface and here the whole thing is!
Now, if only they weren’t sold out!
Interesting project, and looks promising! My main concern is power loss…unless I missed it somewhere, is the current schedule written to non-volatile memory/EEPROM? I would prefer to set it and forget it, until I wish to adjust the scheduling as the weather warms, and I NEED the schedule to persist through outages, which occur frequently in my town. Cheers!
The schedule will be stored in SD card, which is non-volatile. The Google calendar demo stores schedule in the cloud (but it does require constant Internet connection). If you are referring to the microcontroller-based OpenSprinkler controller (www.opensprinkler.com), that stores schedule in EEPROM, which is also non-volatile.
Thanks for the quick reply Ray! I would be more comfortable with the Arduino route, then (having ‘fried’ a few sd cards in my time) as I’m planning a commercial use case for this setup, but the Google Calender programming is VERY intriguing-my workers and customers would be able to adjust without learning/re-learning a conventional sprinkler timer’s peculiarities. The best of all worlds would be an independent timer (no reliance on wlan for normal function, scheduling/manual use only), and program schedule via Google Calender, with new schedule written to EEPROM. Cheers!
Neat project. I was contemplating buying your sprinkler controller, but I think this is even better for my purposes. I will definitely buy one of these. Thank you.
If you can’t get the Google Calendar and/or the Manual demo scripts to work, please see this post: http://rayshobby.net/phpBB3/viewtopic.php?f=28&t=51
My email was bad. Sorry. I am very excited about this product and do noy want to miss anything about it.
So awesome, I’ve had a raspberry watering my lawn for about a year now and I love the ability to hop online and turn it off while at work. Do you have any plans for humidity, temp or moisture sensors? Something people might not also think about but if you have a cctv security system the ntsc out from the raspberry can be used as a camera source. You can monitor files on the filsystem and have it act as event notification for an external app to update the display. This is the method I’m using to display my property with overlays for each watering zone that turn blue when watering.
Hi Pauldy, temp/humidity sensors are easy to add to the board; to measure soil moisture would require an external sensor. Hardware-wise, these are pretty easy to set up, but I haven’t thought about how to modify the software to account for these sensor values. Regarding using camera to monitor: indeed this is possible, and I’ve seen this done by some OpenSprinkler users before.
Oh, not using a camera on the pi but using the NTSC output of the raspberry pi for status. You can hook it via the yellow RCA port to a TV or in my case I have a 16 channel IP DVR with a few cameras on it, so I popped the NTSC output of the pi on one of the DVR channels and I am using it to see the status of the sprinklers and anything else I might like to show status on.
Right now I’m trying to work through long term solutions for detecting moisture levels in the soil so I can better manage the zones. I’m leaning towards using mono based webservices and more than 1 pi parasiting power off the 24v lighting system. I tried doing weather feeds over the internet but they don’t tell you how much rain you got and it looks like the moisture levels are my best bet for optimizing the system. I ordered when I got the message and I’m looking forward to making the changes to my code so it operates with your shift register design and getting it all mounted so the wife can’t complain about how it looks ;-).
Ray, I like the fact that you can schedule this with Google Calendar. How difficult would it be to modify the design to handle multiple power outlets. In my case it would be to schedule flood lights to cycle on and off in various zones.
Mike
If your lights run on low-voltage AC (e.g. 24VAC) then you don’t need to make any change. If they run on power-line AC (110V/220V) you need to use relays. You can check the information on this page: http://rayshobby.net/?page_id=806
I just wanted to say thank you. I got my OSPI yesterday. I look forward to getting it all set up and installed.
This is a great project. I’m wondering if it is possible for the Pi to auto-detect a valve or expansion board instead of having to manual add the stations in the setup. It would be nice if when the unit was powered on, it automatically detected the number of valves connected to it. Also, I know in commercial sprinkler controllers, there is an automatic field wire fault detection. How could this be implemented in this project?
Thanks for the help.
I have not considered auto-detection of individual valves, but auto-detection of expansion boards is being added to the new expansion board design. The wire fault detection was mentioned in the forum somewhere. It seems one possibility is to have a current sensor that detects the change in current when a valve opens. This is on my todo list but I have not planned to include it in the next version yet.
Hi Ray!
This is simply fantastic! Yesterday I just had the idea of using a RasPi for implementing an automatic irrigation system to control from home and googling today I found this! Exactly what I am after…
However, I have a question regarding the capacity of the system. So far, I’ve found people already using this for garden purposes. What I was planning to do is to install such system in a 1 ha. of avocado trees I have (I live in Ecuador :). The source of the system is a reservoir and I would need to automatically activate one valve right after the reservoir and subsequent three to 8 valves depending on the irrigation system design. Anyway, my question is about the capacity of the system to handle up to 2″ valves or it doesn’t matter how big the valves and the system are?
Look forward your reply and thanks for such a fantastic product!
Cheers,
H
Hi Horace, the physical size of the valve doesn’t matter, it’s the electric spec of the valve that matters. Do you know the operating voltage and current of your valve? The OpenSprinkler Pi is designed to work with 24V AC valves with maximum operating current of 800 mA. If your valve meets the spec, it should be able to work with the controller.
Great platform. Thanks Ray!
I whipped up a quick service to run on the platform which cancels the irrigation if it’s going to rain soon: https://github.com/jeffkowalski/uplands/blob/master/RaspberryPi/flud/flud
Hi Jeff, that’s great. Thanks for sharing. I will blog about it.
Could someone show me an example of a Google calendar that runs this? I want to see what the entires in the calendar look like.
The youtube video above, starting from 6:24 shows the Google calendar demo.
Not really, it shows a glimpse only.
I’d like to see an actual calendar in detail
It’s just a standard Google calendar. The program assumes two things: 1) the calendar is set as a public calendar (so the program can access the calendar without authentication); 2) the title of each event must match a station name (the station names are all defined in the python program). That’s all.
Great DIY project Ray, exactly what I was looking for! I just order an OSPi. I have been a RasPI user for sometime now. I have Rev 2. I already installed all the software on my RasPi, can’t wait for my OSPi!
Regarding your important note wrt the 5V supply voltage. What if I do not power the RasPi from the OSPi board and instead continue to power it from a USB power supply I have been using? I would connect the supply ground and leave the 5V off. I guess if the voltage is not 5V there is a tolerance range for the OSPi which may be wider than RasPi would put up with. Or would you say OSPi should not be used either if the 5V is not accurate? Are we supposed to return it if that is the case? Also what is your confidence level in the switch mode power supply of the OSPi, in terms of reliability if it is indeed pushing 5V? I expect you are asking folks to check the voltage level because you are concerned about build quality, but are happy with the actual switch mode supply design, but I wanted to confirm that.
Thanks,
Frank
Frank, sure, you can power RPi separately from USB. Just make sure you unplug the 3-pin (5V) cable from OSPi. The 8-pin cable has everything needed (including 3.3V, GND, and all the data pins) for RPi to drive the shift register and communicate with RTC.
All OSPi boards have been tested and the output voltage should be between 4.9V to 5.1V. This is well within the USB power standard.
I am asking users to test the voltage just to double check. A lot of factors can influence the voltage, for example, some 24V AC transformers actually output 30V AC, which poses a potential issue. I would like to be extra cautious and reduce the chance of damaging RPi.
OK, got it thanks Ray. Got my board yesterday. Set it up. The voltage is 5.02V. But I did not connect the 3-pin cable, still powering the Raspi with USB power supply. Gave it a test with the manual control on my iphone while walking around in the back yard. I figured out which station is which, I only have 5 for now. Wrote a new version of the selftest to water my lawn and flowers at given intervals, hard coded in for now. I will hook it to crontab, then I am done! Well for now anyway. Once I have figured out where the permanent place for the boards is I will be looking at adding 3 more stations. Then I will need an expansion board for at 8 more. Great DIY Thank you!
Ray, awesome sprinkler projects!
Quick question: I was considering making some hardware changes/additions to the OSPi in conjunction with some software stuff. However, I can’t find your parts list for the OSPi on Github. Can you provide that?
Thanks,
Brian
It’s on GitHub, under the OpenSprinkler project:
https://github.com/rayshobby/opensprinkler
Ray,
I’ve downloaded the files from Github and have looked in the docs, hardware, and software folders under the OpenSprinkler Pi folder and cannot find any kind of parts list. Please help.
Thanks,
Brian
Sorry, I really don’t have any spare time to work on the part list for now. You can export a part list in Eagle, and if the part value of any component is unclear, just look for the OpenSprinkler 1.4s part list: OSPi is a subset of OpenSprinkler.
Ray,
This is exactly what I’ve been looking for. Thanks for sharing with the world! I’ll be purchasing soon. After perusing the schematics and the github source I can’t see any use of the RTC. Any sample code available? Also if I’m connected to the internet and can keep my kernel clock time sync’d using NTP is there any reason to use the RTC?
Thanks!
Greg
RTC is something that’s missing on the Raspi, and it’s useful for time keeping when Internet is lost or if you just want to use it without the Internet at all. Adafruit has a nice tutorial on how to use RTC with Raspi (http://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi/overview). I will add some information about it on the OSPi webpage.
I think I’ve got the RTC Working:
Setup I2c: Follow the directions on this page:
http://www.skpang.co.uk/blog/archives/575
When you are done make sure you can get this output:
$ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: — — — — — — — — — — — — —
10: — — — — — — — — — — — — — — — —
20: — — — — — — — — — — — — — — — —
30: — — — — — — — — — — — — — — — —
40: — — — — — — — — — — — — — — — —
50: — — — — — — — — — — — — — — — —
60: — — — — — — — — 68 — — — — — — —
70: — — — — — — — —
Than use the instructions on this web site as Ray says above:
http://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi/overview
This worked perfectly for me! The instructions warn it doesn’t work on rasbian, but worked for me. Must be updated since article was written.
Thanks for a great product. I just purchased a rainbird transformer at HD. It says its rated output is 26.5VAC. My meter says 29.90VAC. Is it ok to use this one?
Yes, that should be all right.
I’m debugging some issues with my old-school 1.0 OSPI, but much of the information is gone when you removed and redirected to the new page, which seems to only have information on OSPI 1.4+. Is there an archive or some other place I can get information on 1.0 hardware?
FWIW, I found what I was looking for here: https://github.com/rayshobby/opensprinkler/tree/master/OpenSprinkler%20Pi/docs/v1.0