Documente Academic
Documente Profesional
Documente Cultură
4 User Manual
(Updated Nov 18, 2014)
Contents
Introduction .................................................................................................................................................. 2
Hardware Interface ....................................................................................................................................... 3
Hardware Setup ............................................................................................................................................ 3
1. Test Power Supply ................................................................................................................................. 3
2. Attach RPi to OSPi ................................................................................................................................. 4
3. microSD card ......................................................................................................................................... 4
4. Web Connectivity .................................................................................................................................. 5
5. Wiring Sprinkler Valves ......................................................................................................................... 5
6. Zone Expansion Board........................................................................................................................... 6
7. Rain Sensor............................................................................................................................................ 7
8. Mini-Relay (Advanced Topic) ................................................................................................................ 7
9. Analog-Digital Converter (Advanced Topic) .......................................................................................... 7
Software Setup ............................................................................................................................................. 8
1. OSPi Pre-configured SD Image .............................................................................................................. 8
2. OpenSprinkler Interval Program (by Dan Kimberling) .......................................................................... 8
3. OpenSprinkler Mobile App (by Samer Albahra).................................................................................... 9
4. sprinklers_pi Program (by Rich Zimmerman) ....................................................................................... 9
5. Google Calendar Program ................................................................................................................... 10
Technical Details ......................................................................................................................................... 10
RPi Pin Uses ............................................................................................................................................. 10
Specifications .............................................................................................................................................. 11
Terms and Conditions ................................................................................................................................. 11
Open-Source Links ...................................................................................................................................... 11
Introduction
OpenSprinkler Pi (OSPi) is an open-source sprinkler / irrigation extension board for the Raspberry Pi. Its
an easy and low-cost solution to transform your Raspberry Pi into a capable sprinkler controller with
unlimited number of stations, for lawn and plant watering, farm irrigation and other similar applications.
The OSPi v1.4 kit includes the enclosure (with a clear acrylic window), assembled and tested OSPi circuit
board, terminal blocks, and microSD to SD adapter (excluded in the Plus version). The built-in
components include 24V AC to 5V DC switching regulator, solenoid drivers, rain sensor terminal, DS1307
RTC and battery, PCF8591T 8-bit A/D D/A converter (4 input and 1 output), fuse, mini-relay, per-station
transient voltage protectior. The image on the right below shows the final assembled product.
To get started, you will also need the following, which are NOT included in the kit and have to be
purchased separately.
a Raspberry Pi (any revision. NOTE: to use RPi A+ or B+ you must choose OSPi Plus version)
a nano-size USB WiFi dongle (or alternatively a RJ45 Ethernet cable if not using WiFi)
a 4GB or above microSD card
24V AC sprinkler transformer (output voltage 22V AC 30V AC, note that its AC, not DC!)
24V AC sprinkler valves (note that its 24V AC valve, not DC or latching solenoid valve!)
(Sold separately)
Hardware Interface
The left image marks the connectors, and RPi mapped out pins. The right image below marks the
locations of the USB WiFi dongle, SD card, and wired Ethernet cable (if not using WiFi) on the RPi.
Standard Version
Plus Version
Hardware Setup
1. Test Power Supply
Insert the sprinkler transformer wires into the orange screw terminal, then plug it in to the matching
terminal on OSPi. The green LED should light up, indicating power is on. See pictures below.
Power indicator
Warning: if the LED doesnt light up, or if anything smokes, please unplug the power immediately.
Check if there is any visible damage. If you cant figure out the problem, send an email to
support@rayshobby.net, or post a message on the Forum (http://rayshobby.net/phpBB3)
3. microSD card
Plus Version: Raspberry Pi model A+ or B+ already uses a built-in microSD card slot, so there is no need
to use microSD to SD adapter.
Standard Version only: OSPi v1.4 includes a microSD to low-profile SD adapter. A microSD card (4GB or
above) is recommended because a full-size SD card will not fit in the enclosure. Instructions on how to
burn pre-configured software onto the microSD card can be found later in the Software Setup section.
Push the microSD card into the adapter; then insert the adapter into RPis SD card slot as shown below.
The adapter is relatively thick, so you may need to use some force to insert it all the way to the left. To
remove the adapter, use your thumb to gently push the adapter until it comes out of the slot.
The advantage of microSD card is that its compact; the disadvantage is that its access speed is typically
slower than a full-size SD card. If you prefer using a full-size SD card, you have two options:
Use a dremel to make a cutout on the enclosure, for the SD card to pass through;
Alternatively, you can cut a full-size SD card in half to make a half-size SD card. Make sure you
burn software onto the SD card, before cutting it in half.
4. Web Connectivity
OSPi fits a nano-size USB WiFi dongle. You can insert the dongle into any of the available RPi USB ports.
COM 1 2 3 4 5 6 7 8
7. Rain Sensor
If you have a rain sensor, you can connect it to OSPi v1.4 via the rain
sensor terminal. The rain sensor has two wires and is essentially a
rain-activated switch. The OSPi software can decide what to do when
rain is detected, such as turn off stations or ignore rain.
Warning: the PCB traces and pinouts for the relay are designed for low-voltage operation
(<=40V) and have not been tested on power-line (120V240V) devices. Use your own
discretion if you plan to use the relay for power-line devices.
The latest version: OSPi SD Card Image 2 (with Interval Program v2, update 06/25/14)
o SHA1SUM: 1cc26d3271b6dad35f0bc423412981530da5de41
o MD5SUM: cbb0e246f6daf0db68d68c7f0731e78d
The process to burn the image onto an SD card is the same as burning a Raspbian image. Below is a brief
summary. Detailed instructions can be found on this website.
Once the SD card is ready, pop it into your RPi. As WiFi is not configured yet, you should first connect RPi
directly to your router with a wired Ethernet cable, or connect it to a screen and keyboard, set the WiFi
SSID and password, then you can use the wireless connection.
The system will attempt to register host name ospi on your network. So open a browser, and type in
http://ospi/ and see if you can get to the one-page instruction. If not, go to your routers configuration
page; find the IP address assigned to your RPi (say, http://192.168.x.x). Next, open a browser and type
in the IP address. You should see a welcome page with further instructions. If you see this page,
congratulations, the image is successfully burned onto your SD card.
To ssh or log in to RPi, the default user name is pi, and password raspberry.
The software is available on port 8080. Open a browser and type in http://ospi:8080 (or if that doesnt
work, http://192.168.x.x:8080). You should see the web interface of this program.
The user manual of the interval_program can be found on http://www.opensprinkler.com
Changing settings in the interval_program requires a password. The initial password is
opendoor.
To update the program, ssh to RPi, cd to the OSPi directory, and run git pull.
The interval_program is under active development with new features and plugins. If you want to find
out more or contribute to the development, please check the following resources:
ssh (or log in) to RPi (default user name pi, password raspberry)
Run sudo /home/pi/select_program
Once switched, the sprinklers_pi program is available on port 8080 (http://192.168.x.x:8080)
If you want to find out more or contribute to the development, please check the following resources:
The /home/pi/demo folder includes a couple of addition demo programs for testing purposes, and they
provide start-up examples to show how to control sprinkler valves in Python and C.
Technical Details
The OSPi v1.4 circuit design consists mainly of a 24V AC to 5V DC switching converter (based on
LM2596S-5.0), shift register (74HC595D), solenoid drivers (based on BT1308W triac), RTC with battery
(DS1307), 4-channel ADC (PCF8591T), relay (HK4100F-5.0V).
Open-Source Links
OSPi Github Repository
OSPi homepage