Feed on
Posts
Comments

Over time I’ve received some questions regarding the hardware design of OpenSprinkler. Here are some common questions and my answers:

Why using a switching regulator?
Since OpenSprinkler uses a single power supply (i.e. 24VAC sprinkler transformer), it is necessary to step down 24VAC to 5VDC and 3.3VDC in order to provide power to the circuit. The simplest and most common way is to use a 7805 linear regulator. But here is a catch: due to the relatively high current consumption of the ENC28J60 Ethernet controller, the whole circuit draws about 150 to 180mA current during operation. Using a linear regulator in this case will cause a lot of power waste. Specifically, (24-5) * 0.18 = 3.42 Watt will be wasted on heat due to the voltage conversion. This is pretty bad. That’s why I made the conscious decision to use a switching regulator to achieve higher efficiency. The switching regulator in this case is estimated to have 75% efficiency, so the power waste is more like (5 * 0.18 / 75% – 5 * 0.18) = 0.3 Watt. Much better and green!

Why having both 5VDC and 3.3VDC supply voltages?
This is because the LCD requires 5V supply, and the rest of the circuit requires 3.3V. The microcontroller can work with both voltages, but the ENC28J60 Ethernet controller and the RFM12B transceiver require 3.3V. That’s why the circuit provides both 5VDC (VIN) and 3.3VDC (VCC).

Why using triacs to control solenoids? What about relays?
While a lot of other sprinkler control circuits found online use relays to switch solenoids, I made the conscious decision to adopt triacs. There are many reasons this is more preferable. First, triacs are semi-conductor components, so they are much smaller than relays, more durable and act much faster. Second, they are low-cost and significantly cheaper than relays. Third, they are also slightly more power efficient: each triac requires only 5 to 7 mA holding current to switch on solenoids, while relay coils often consume more current. In fact, a sophisticated design can use an AC triggering circuitry to trigger triacs only during zero crossings, further reducing the power consumption. All in all, triacs are great choices for switching low-voltage AC devices.

Why does OpenSprinkler v1.2 adopt a USBtiny programmer?
If you’ve noticed, the previous versions of OpenSprinkler relied on external FTDI programmer. That was designed to be compatible with standard Arduino and variants. The main advantage of FTDI is that it not only does re-programming, but also it is a USB-to-Serial converter, which allows the microcontroller to easily send and receive messages from your computer. However, it also has two main downsides. First, it is expensive: an FTDI programmer or cable can easily cost more than 15 bucks, and we don’t like to stock it due to the cost. Second, using FTDI requires a bootloader, which takes away some (512 bytes) program space from ATmega328. Therefore we have decided to go with an on-board USBtiny ISP programmer based on ATtiny45. We like this solution a lot better because this way every OpenSprinkler board has a built-in USB programmer, so you don’t need to worry about purchasing a programmer separately. It is low-cost and does not require a bootloader, so it’s a win-win choice.

The initial version of the interval schedule program is now available for download in my GitHub page:
https://github.com/rayshobby/opensprinkler

Note that all demo programs are moved to the Libraries->OpenSprinkler->examples directory. This makes it easy to load a demo program in Arduino. For example, once you put the OpenSprinkler library in your Arduino’s Libraries path, you can access a demo program by following the screenshot below:

And here is a screenshot of the interval schedule program:

Basically, it allows you to set an interval and duration for each station. In the above example, stations 1 and 2 are scheduled to be on for 20 seconds every 4 hours, stations 3 and 4 are scheduled to be on for 20 seconds every 6 hours, and the remaining four stations are scheduled to be on for 5 minutes every 50 minutes. So it’s pretty simple.

An added feature is that if more than 1 stations are scheduled to be on at the same time, they will be serialized: in other words, the controller will turn on each station one after another instead of simultaneously. The serialization is activated by setting the Multi-Station value to 0.

The program is still in a primitive state, and I am working to strengthen it so that it can support a weekly schedule. Basically, the idea is to allow the user to add any number of schedule items, where each item contains a list of selected stations, days in a week, start time, end time, interval, and duration. For example, you can specify an item like ‘schedule stations 1, 2 and 5 for every Monday and Wednesday, start at 8am and end at 6pm, turn them on for 5 minutes every 4 hours’. You can add as many schedule items as you want, or modify them later. This will make the OpenSprinkler schedule algorithm significantly more flexible and powerful. So stay tuned!

Yup, you heard it right, version 1.2u of OpenSprinkler will debut at Maker Faire Bay Area on May 19 and 20. If you are going to Maker Faire, you are welcome to drop by and see our live demos. I started working on v1.2u shortly after releasing v1.1, and we were lucky to get the PCBs and components just in time for Maker Faire. The PCBs and components are shipped directly there, so it is not yet available for online purchase until May 23. But it is available for purchase at the Maker Faire and will be available online shortly after that.

So what’s new in this version? The main improvement is an on-board USB programmer. Specifically it’s a USBtiny ISP programmer built on a pre-programmed ATtiny45. USBtiny is one among many choices to directly program an AVR microcontroller without using a bootloader. The main advantages are that it is low cost (costs just a couple of dollars) and it enables the entire program space on ATmega328 (since no bootloader is needed). It is based on a post by Tequals0 and this version makes use of the internal clock and PLL on ATtiny45 to implement USBtiny with only three external resistors. Very elegant. With the on-board USB programmer, you don’t need any external programmer any more. Note that this version is named v1.2u, where u refers to the USB connectivity.

The second change is that some components have been replaced to adopt more common parts, including the switching regulator, the Ethernet jack, and the LCD. Also, there is now a rain sensor screw terminal, and a pinout for sensing power loss. The program will be updated to support these features soon. Another change is that the LCD pin assignment is slightly modified to free up analog pin 1, which is useful for talking to sensors. Finally, the extension board connector is also updated to use more common 2×3 pin header and cable. Note that this is still compatible with the previous version of extension board. If you have the previous version of extension board, it still works with v1.2u by switching a pin on the extension cable.

If you are interested, check the detailed release notes here and the release video below.

You heard it right: we are going to this year’s Maker Faire at San Mateo, California on May 19 & 20!

Maker Faire 2012

We will be giving live demonstrations of the OpenSprinkler, AASaver, and two exciting upcoming open-source projects: OpenSprinkler Bee (battery-operated sprinkler controller), and SquareWear (a compact wearable electronics platform). If you are planning to go to Maker Faire, please make sure to drop by our booth (Maker # 7870). If you haven not decided, Maker Faire is a really fun event. You won’t regret it. So make your travel plan today!

OpenSprinkler v1.1 Released

After several weeks of hard work, I am excited to announce that OpenSprinkler v1.1 is now available!

So what’s new in this version? The biggest improved feature is hardware support for arbitrary (>8) number of stations through extension boards. This was actually quite easy to implement: the main hardware change is added pinouts for the 74HC595 shift register, which allows cascading additional shift registers to expand the number of stations. The latest software has also been updated to generically support any number of stations. So this leads to a very economic way to expand the number of stations, which is often very expensive with commercial sprinkler timers.

Another change is that the station terminals now use a common wire + individual station wire design, compatible with commercial sprinkler timers.

Other minor changes include an added 750mA fuse for current protection, and added RTC pinouts to support external I2C RTC breakout board.

Check detailed Release Notes here. The kit is now available in my hobby shop. You can get it either as a DIY kit, or a fully assembled and tested product. Detailed assembly instructions can be found here.

V1.1 Update Video

Link to the previous (v1.0) release video.


« Newer Posts - Older Posts »