Feed on
Posts
Comments

This is an official announcement of several recent OpenSprinkler updates: the fully assembled OpenSprinkler 2.1s, a new firmware revision 2.0.4, and a GUI-based firmware update tool.


First, the hardware:

os21sIMG_3968

So what’s new in OpenSprinkler 2.1s? Here are the main updates:

  • ATmega644 mcu running at 12MHz with USBasp bootloader.
  • Added per-station transient voltage suppressor (TVS).
  • Added TVS and 2A fuse on the 24V AC line.
  • 24V AC terminal block is changed to orange-colored with 3.96mm spacing.
  • Added on-board 120V/2A mini-relay.

These pretty much follow the same updates we made in the DIY kit 2.1u. With these updates, it brings the fully assembled 2.1s to the same page, in terms of hardware features, with all other OpenSprinkler variants (e.g. OSPi, OSBo). OpenSprinkler v2.1s is now available for purchase at the Rayshobby Shop.


Next, the firmware 2.0.4:

This is a minor revision, but with important changes in preparation for Samer Albahra’s awesome new OpenSprinkler Mobile App. This new app is snappier and even more polished than the current version. It will have native apps on all mobile platforms. and it will also have cool new features such as language localization (yay!) and automatic discovery of OpenSprinkler devices. I am very grateful for Samer’s help and continued contributions to this project, and I’d also like to thank Balazs for contributing to the weather and the language localization features.

So technically what have changed in this firmware? Since I have never blogged about firmware 2.0.2 and 2.0.3, I ‘ve included the accumulated changes below:

  1. Added support for JSON and fixed several bugs.
  2. Added support to change Javascript URL.
  3. Stores controller operation enable bit, manual mode bit, rain delay time in EEPROM.
  4. More options are made editable through the web interface.
  5. Added support to change time manually (enabled when NTP sync is turned off).
  6. Added LCD auto-dimming feature (after 30 seconds of inactivity, the LCD brightness will lower down to the LCD Dimming value set in options).

About the first bullet, let me explain with more details. Support for JSON output has been added since firmware 2.0.2. This is very useful for integrating OpenSprinkler with mobile apps, external control programs, and jQuery and AJAX in the future. The specific JSON outputs are:

  • http://x.x.x.x/jo: returns options.
  • http://x.x.x.x/jc: returns controller variables.
  • http://x.x.x.x/jp: returns program data.
  • http://x.x.x.x/jn: returns station names and data.
  • http://x.x.x.x/js: returns station status bits.

where x.x.x.x is the OpenSprinkler’s IP address. Right now the JSON code co-exists with code that spits out HTML pages, so there is a considerable amount of redundancy. This will soon change and the code will be significantly simplified in the near future.

About the second bullet, the firmware now supports Javascript files stored anywhere, including on a microSD card inserted in the controller itself. These Javascript files are required to render the controller webpages. They are usually too big to store in the microcontroller internally, but can be stored on an external path. The default path is http://rayshobby.net/scripts/java/svc2.0.4. To change it, use http://x.x.x.x/su, where x.x.x.x is your OpenSprinkler’s IP address. To host the Javascript locally on the microSD card, copy the necessary Javascript files to a microSD card (2GB or less, formatted to FAT), and insert to OpenSprinkler. Then change the Javascript path to . (i.e. a dot), indicating the files are served locally. With these changes, the controller can be truly independent, without the need to reference the Internet. So you can access the controller even if your local network is not connected to the Internet.

Firmware 2.0.4 is compatible with OpenSprinkler 2nd generation (including 2.0s and 2.1s/u). The source code is available for download at the OpenSprinkler Github repository. Please note that 2.0 and 2.1 use different microcontroller frequencies (8MHz and 12MHz respectively), therefore the compiled firmware files are different for them. If you’d like to upgrade to this firmware, please read on.


Finally, the GUI-based Firmware Update Tool:

Update: the information below is outdated. Please check the new OpenSprinkler Firmware Updater 2.0.



As OpenSprinkler has gone through many different hardware and firmware revisions, updating firmware has become more and more confusing. That’s why I’ve decided to make a GUI-based firmware update tool. This doesn’t completely get rid of the technical challenges, but it certainly makes the process less confusing πŸ™‚

The updater is written in Processing, so it’s naturally cross-platform. The usage is pretty simple: you select your OpenSprinkler hardware version, and the updater provides a list of available firmwares. You select which firmware you want (defaults to the latest version), and click on Upload. That’s it. The GUI provides some basic descriptions of the hardware (in case you forget which hardware you have), and instructions to enter bootloading mode.

osFWUpdater_1osFWUpdater_2osFWUpdater_3

The firmware information is all stored in a file named os_firmware_info.txt. The avrdude program is packaged together with the tool so you do not need to install it separately (except in Linux, where you can easily install avrdude by sudo apt-get install avrdude).

There is one remaining piece, though — if you are a Windows user, you need to install USBtinyISP driver (for OpenSprinkler 1st-gen and OpenSprinkler 2.0) or USBasp driver (for OpenSprinkler 2.1u/s). Please refer to the Firmware Update instructions for additional details. This is probably the biggest technical hurdle and we are trying to find a more user-friendly solution. Basically, if you are using Windows XP, Vista, or 7 users, it’s not too bad; but if you are using Windows 8, it gets really messy — you need to disable driver enforcement before you can install the drivers. If you are lost, try to google ‘Windows 8 USBtinyISP’, or ‘Windows 8 USBasp’ and you should be able to find successful solutions.

If for the life of yours you simply cannot get the driver installed, you are resort to the Rayshobby pre-configured VirtualBox image — is creates a Virtual Linux in your host Windows OS, and passes the USB programmer directly to the Virtual OS, thus bypassing the Windows driver issue.

The Firmware Updater Tool can be downloaded following the links below:

Please run the ‘osFirmwareUpdater’ program in the folder that corresponds to your operating system.

Note: if you see messages such as avrdude: warning: cannot set sck period. Please check for usbasp firmware update., and avrdude: error: usbasp_transmit: usbasp_control_msg: sending control message failed, these are normal and can be safely ignored. These warnings / errors have to do with the behavior of the bootloader upon reset. They do NOT mean the firmware upload has failed.

Mac Users: if you encounter an error Application is damaged and canΒ’t be opened, you need to temporarily change a Security and Privacy setting in System Preferences. See the details in this work-around.

This is a first step towards making the update process more user friendly. Comments and suggestions are welcome!


Great news, OpenSprinkler v2.1u semi-assembled DIY kit has now been officially released and available immediately for purchase at the Rayshobby Shop! This version marks a major upgrade from the previous DIY kit v1.42u. With ATmega644 MCU, microSD card slot, and injection-molded enclosure, it not only brings the DIY kit up to speed with the fully assembled v2.0s, but it actually strives to be a little better (hence the migration on the version number) πŸ™‚

In particular, it adds a mini-relay for general purpose switching (similar to the one on OpenSprinkler Beagle), changed the 24VAC terminal to an orange colored one with different pin spacing, and increased MCU frequency from 8MHz to 12Mhz. It also uses a USBasp bootloader built-in on the ATmega644 MCU for firmware flashing (while all previous versions use a separate ATtiny45 chip). The USBasp bootloader significantly improves the firmware upload speed, and is therefore very helpful if you are making frequent changes to the firmware. These changes are all described in the prototype sneakpeak preview post. Finally, the MCU is pre-loaded with the latest firmware 2.0.3 with several new features compared to the previous firmwares.

osdiy_headerIMG_3758

Another notable change is that v2.1u is the first semi-assembled DIY kit which comes with a partially assembled circuit board with through-hole components. I’ve designed it this way to help reduce the amount of soldering you have to do, while still let you enjoy the process of building, assembling, testing, and hacking the circuit. It’s a first-time experiment, so I will keep my fingers crossed.

In any case, if you’ve been waiting for OpenSprinkler DIY kits, go grab one quickly before it’s gone; if you already own an OpenSprinkler or have heard of OpenSprinkler one way or another, I would appreciate if you can help me spread the word. Thanks!

IMG_3762

This is a special note that we are offering a Thanksgiving promotion for OpenSprinkler 2.0s: use coupon code turkeyday8 to get 8% off regular price. The coupon is only valid on the four days of Nov 27 to 30. The coupon can be applied in the ‘View Cart’ link. If you are thinking of getting an OpenSprinkler 2.0s, either for yourself or as a gift for friends, there is no better time than this! πŸ™‚

  • OpenSprinkler Beagle kit is available for purchase at Rayshobby Shop.

Following the sneak-peak preview, I am excited to announce that OpenSprinkler Beagle (OSBo) v1.0 is now officially released! OpenSprinkler Beagle is an open-source sprinkler / irrigation extension board for the BeagleBone Black. It uses four GPIO pins to control an unlimited number of sprinkler valves. Using this board, you can easily convert your BeagleBone Black into a low-cost, web-connected smart sprinkler controller. You can use online weather data to help regulate sprinkler water time, and remotely change settings and programs when you are traveling away. Best of all, it’s an open-source project — you are welcome to tinker with the hardware and/or software to create your own customized sprinkler controller.

osbo_headerosbo_3

The idea of OpenSprinkler Beagle came from the OpenSprinkler Pi, which is a sprinkler extension board for the Raspberry Pi. Since OpenSprinkler Pi was released earlier this year, it has been a very popular product. Over time I’ve received requests from users to develop a similar board for the BeagleBone Black. While the BeagleBone Black is similar in nature to the Raspberry Pi (i.e. both are low-cost embedded Linux boards), it offers some interesting benefits such as a large number of GPIO pins, build-in analog pins, build-in eMMC, microSD card slot (i.e. smaller profile). faster CPU etc. Undoubtedly it makes sense to develop an OpenSprinkler variant for the BeagleBone Black.

The hardware design of OpenSprinkler Beagle is similar to OpenSprinkler Pi: it contains a 24VAC to 5VDC switching regulator, shift register, triac, DS1307 RTC with CR1220 battery, zone expansion board connector. It also currently shares the same enclosure as OpenSprinkler Pi. But it also offers several improvements, specifically:

  • Added a total of 10 bidirectional TVS for protection against transient voltages: one for each of the eight stations, one for the 24VAC port, and one for the rain sensor port.
  • The BeagleBone Black is now plugged down into OSBo, and all GPIO pins are mapped out to the pinout area.
  • Added a 5V mini-relay for more general-purpose switching. The relay has a contact rating of 120VAC / 2A. It can be used for switching low-power lighting, or garage doors etc.
  • The 24VAC terminal block is changed to orange color with 3.96mm pin spacing. This helps prevent incorrect connection to other terminal ports. There is also a solder-on 2A fuse on the 24VAC line.
  • Added a rain sensor port with pull-up and current limiting resistors.

Below is an annotated diagram that shows the various components of the board:
osbo_v10_diagram_interface


OpenSprinkler Beagle Homepage

Below I am going to give a very brief overview of the hardware and software setups. For details, please watch the tutorial video above, and visit the official OSBo homepage at http://beagle.opensprinkler.com.

Hardware Setup

The hardware is pretty easy to set up. The kit comes with an assembled OpenSprinkler Beagle circuit board, enclosure, screws, terminal blocks, and extra pin headers in case you want to map out additional GPIO pins. In addition, you need to provide a BeagleBone Black, a nano-size WiFi dongle, and a 24VAC sprinkler transformer (these are not included in the kit and need to be purchased separately). The board makes use of the first 2×10 pins on port P9 of the BeagleBone Black for interfacing with shift register, RTC, rain sensor port, and mini-relay. Plug in the BeagleBone Black into OSBo, connect the 24VAC power, plug in the common (COM) wire and individual station wires, and that’s it. The interface is the same with other sprinkler controllers. If you have a rain/freeze sensor, you can connect it to the rain sensor terminal.

Software Setup

Follow the recent update on OpenSprinkler Pi, the software setup for OSBo has also been made a lot easier. Specifically, I’ve created a SD card image with pre-installed software. Download the image, burn it to a microSD card, pop it in to your BeagleBone Black, and you are ready to go. The pre-configured SD card runs a Ubuntu operation system (default user name ubuntu, password temppwd), and sets Dan’s interval_program to start by default. As soon as the system has booted and is up online, you can open a browser and type in http://x.x.x.x:8080 (where x.x.x.x is your BeagleBone’s IP address). This will bring up the interval program’s web interface. The interval program has a rich set of software features, such as setting multiple sprinkler programs, preview programs, run-once program, manual operation, logging, rain delay etc. The details are all explained in the user manual of the interval program.

The SD card has also pre-installed Samer’s mobile web app, which provides a nice front-end for mobile devices such as pads and phones. It is available at http://x.x.x.x/sprinklers.

In addition, there are three demo programs installed in the /home/ubuntu/demos/ folder. There is a self-test program, a relay test program, and a Google Calendar-based sprinkler program, which makes use of a Google Calendar for scheduling water events. I’ve received many good comments regarding the Google Calendar-based program — while it looks simple, it’s quite convenient to use and very suitable for the less technical minded people.

Since the software is pretty much all adapted from OpenSprinkler Pi, feel free to refer to the OpenSprinkler Pi documents if anything is unclear. I will try to make the OpenSprinkler Beagle website more self-contained, and it will have to be polished over time.

Naming

In the previous post, I asked for naming suggestions. Thanks to everyone who made comments there. After careful thoughts, I’ve decided to use the full name OpenSprinkler Beagle, and short name OSBo. Particularly, the short name OSBo is picked because it goes well with OSPi (OpenSprinkler Pi), is easy to distinguish with OSBee (openSprinkler Bee), and Bo is a name of a dog. So overall I consider this to be the top choice.

Thanks for reading this post. If you are interested in buying the OpenSprinkler Beagle, we have a limited number of kits immediately available, at the first link below. Feel free to leave comments and suggestions below or at the Rayshobby Forum.

Links


An OpenSprinkler Pi user Michael Wilson sent me this nice illustrated document he wrote about setting up OpenSprinkler Pi and the mobile web app. He successfully installed OpenSprinkler Pi to replace his previous Toro controller. The document has somehow slipped out of my mind and has been sitting in my mailbox for a few months. I should have posted it when I received it! Anyways, thanks Michael for sharing it with us!

Download as PDF

« Newer Posts - Older Posts »