Feed on
Posts
Comments


OpenSprinkler Switching Other Devices


Check this blog post for a simple way to use OpenSprinkler to control remote power sockets.

With some modifications, OpenSprinkler can be used to switch other electronic devices via the same web interface. In essence it is really a general-purpose development board that has a microcontroller, Ethernet controller, LCD, buttons, output drivers and terminal blocks to control devices. The on-board triacs can be used to switch other AC devices, so long as the voltage required by these devices fall below 28VAC. The limit is due to the fact that the controller uses a single power supply design, and the switching regulator’s maximum input voltage is 40VDC.

Besides, the triacs can be replaced by MOSFETs/transistors to switch DC devices, as long as the DC input is below 40VDC. If you need to switch high-voltage devices, such as power line devices, you can use the controller to switch 24VAC relays, and the relays will in turn control high-voltage devices. Alternatively, you can use the controller in conjunction with an RF transmitter to send switch signals to a remote power socket. This provides an easy and safe way to control power line devices.

The diagrams below show how various devices can be connected and switched by controller, allowing them to be scheduled from the same web interface. I’ve also included a couple of demonstrations that I quickly put up together as proofs of concept. If you have thoughts and suggestions, be sure to drop me a line. Thanks!

 

Example 1: Switching DC Light Bulbs

Here I replaced the triacs with MPSA14 darlington transistors in order to switch DC components. The replacement is very simple because the triac pinouts match the transistors exactly, so they are inserted the same way into the PCB. I then bought a number 12VDC 4-Watt landscape light bulbs and connected them to terminal blocks. Voila, I have a web-controlled light bulb array! Maybe use it to light up Halloween pumpkins?

Caution: Your transistors must have sufficient current and voltage ratings to drive the DC output. For example, if your device works with 12V DC and draws 500mA when turned on, the transistor’s maximum voltage and current ratings must be at least 12V DC and 500mA.

Caution: Since DC has polarity, you have to distinguish between the positive and negative pins. For light bulbs this doesn’t matter, but in general you should pay attention to polarity. I’ve marked the image below to indicate positive and negative leads. The input power is protected by diode D1, so if you happen to connect the power incorrectly it shouldn’t blow up the circuit. However, the driver ports are not protected, so make sure you are connecting your devices in the right direction! (This diagram is only for OpenSprinkler v1.0! For other versions please refer to the circuit board design).

Finally, I did a quick demo to show that it’s possible to output PWM signal (through the shift register) to the DC components to provide analog control, for example, adjusting the brightness of the light bulbs.

 

Example 2: Switching Power Line Sockets using Relays

I didn’t put up a demo for this, but the idea is similar to example 1, except the relay coils will be replacing the light bulbs. Part of the reason I didn’t put up this example is that I don’t want to mess with high voltage. That’s why I found the next example is more practical, as it completely shields me away from power lines.

 

Example 3: Switching Power Line Sockets using Remote Controlled Switches

Update: check this blog post to learn a simple way to use OpenSprinkler to control remote power sockets.

I looked around Amazon.com and found these remote controlled switch sockets that works great and are really cheap. The package comes with a remote control and three sockets that can be individually turned on or off. After studying the remote control a little bit, I found it consists of a encoder (HS2262A) and a simple 434MHz RF transmitter. When you press a button, the RF signal is received at the socket, decoded, and used to control a relay that turns power on or off. This is great for controlling power line devices — all I have to do is to hacking the remote control to interface with my controller, no danger of touching high voltage!

The details are documented on this blog article. Long story short, on most remote controls, each button sinks a MCU pin to ground, so it’s very easy to simulate the button press by using a NPN transistor that serves as current sink. However, on this particular remote, each button connects +12V to the encoder pin, so I need a current source. This turns out to be not very difficult — it just requires an addition PNP transistor coupled with the NPN transistor to provide source. In any case, my blog article explains the details. Demo video is attached below.

29 Responses to “OpenSprinkler User Manual — Other Uses”

  1. Luke says:

    Excellent ideas!

  2. Daniel says:

    Aquarium controller… :)

  3. david says:

    I thought low-voltage landscape lights were generally AC. If so, then I would think that the SVC could be used with the stock triacs to control them. Am I missing something?

    • ray says:

      Yes, your are right. It’s just that the only low-voltage bulbs I could found in my local store are rated at 12V, and I don’t have a 12V AC transformer. My 24V AC sprinkler transformer may blow them up, so I went with a 12V DC option.

  4. Martin says:

    Just to share an idea:

    Since your hardware can be fitted with a RFM12B, you can use it directly to control 433Mhz devices instead of emulating button clicks. That may make an excellent wireless SVC :)

    Check this code:
    https://github.com/jcw/jeelib/blob/master/examples/RF12/kaku_demo/kaku_demo.ino

  5. Jay says:

    Is it possible to have a combination of TRIAC’s and transistors so that I can control AC and DC loads from the same controller? For example; an AC line voltage load on channel one and sprinkler valve (24V AC) on channel two?

    Jay

    • ray says:

      No, I don’t think this would work. The controller uses a single power supply, and if you want to control both AC and DC devices, there is a conflict on which power supply you would use. The only way I can think of is to use relays. For example, if most of your devices work at 24VAC, you can use 24VAC as power supply and triacs for switching, and get 24VAC relays for your DC devices. This way, the DC power is decoupled from AC. Alternatively, if most of the devices you want to control are DC, then you should use DC as main power supply and transistors/mosfets for switching, and get DC relays for your AC devices.

    • Jay says:

      Thanks for the reply. After reading your reply I realized that I was overthinking my situation and didn’t think to use 24V AC relays. I had it in my mind that the relays would be DC.

      Thanks again for the speedy reply.

      Regards,

      Jay

  6. Jay says:

    I should have been more clear in my previous post. I mean use a combination of TRIAC’s and transistors so that I can control both AC and DC loads using the same controller.

    Jay

  7. Vitamins says:

    Hello There. I discovered your weblog the use of msn. That is a really neatly written article. I will be sure to bookmark it and come back to read extra of your helpful info. Thanks for the post. I’ll definitely comeback.

  8. Very cool Mr. Elliot. I’m starved for missives from the mailbox. I’ll admit it, I even open junk mail. (Hey, maybe it’s a check with a lot of zeros at the end.) Such a sad existence for me when my one particular a small rush of importance is ripping open junk mail. Bills can wait around, so a real letter sounds excellent. Will subscribe.
    Cheers, Iris

  9. Thierry Schuepabch says:

    Just a comment on what else can I drive with the excellent device.
    Christmas is coming and most of the led outdoor decorations do use 24 VAC.
    Cheers,

    Thierry

  10. Alfio says:

    Hi
    I was needing to use a device like that to plan watering on a very peculiar way , basically it is every 9 days in the morning and in the night from May to October. Would it be possible to plan some specific watering events over the year ? 20 would be OK, instead of being linked to intervals of 2 to 5 days ?

    Thanks for the support

  11. Alfio says:

    Hi
    thanks for the clarification, but just to be sure I pass the exact requirement , the interval is not on an integer number of day. It is 8,5 days or 172 hrs to ensure it happen during the daylight once and the other during the night. Planning it on a calendar would be simpler.
    Regards

    • ray says:

      Given that you can use multiple programs, perhaps you can split the schedule into several programs to achieve what you want.

  12. Tony says:

    Hey,
    Would it be possible to control an HVAC system with OpenSprinkler? I have multiple HVAC zones in our house and am looking into building a web-enabled controller, ideally one that can replace more than one thermostat.

    Thanks!

    • ray says:

      Technically it’s possible to use the on-board triacs to control HVAC system, because the control system for many heaters use 24VAC and that’s the same with sprinkler systems. However, lacking of knowledge about how a particular HVAC system works, I would suggest not use the triacs but rather use relays. You will also need to add temperature sensors as OpenSprinkler does not have built-in temperature sensors.

      I was not planning to announce this yet, but since your post is relevant, I am happy to say that I am currently developing an open-source thermostat. It will support multiple zones and will be battery powered. I have a prototype circuit but there are still many engineering issues I have to figure out. So stay tuned to my blog!

      • Paul says:

        Hi Ray, great to hear! I have a current thermostat, but our heating zones are manually controlled. I’d like to add automation to the zones based on time to reduce heating costs.

  13. Bren says:

    Hi Ray,

    I am planning on implementing an opensprinkler to replace a very old sprinkler system in my greenhouses. The current system operates 20 zones with solenoid operated diaphragm valves. These 20 valves are 24Vdc 0.3 Amp.

    My question is basically if I use a supply voltage of 24Vdc 0.3Amp to the opensprinkler circuitry will it suffice to replace the triacs with MPSA14 transistors? Please be gentle electronics is completely new for me.

    Bren

  14. Bren says:

    Another option I was looking at is to fit diodes in line with the solenoids. Not sure if this will suffice or if it would also be necessary to fit a capacitor to smooth the output?

  15. Bryan Carter says:

    I have a 6 zone sprinkling system so I don’t need all 8 zones for sprinklers. Would it be possible to use one of the zones to trigger my garage door opener (wired). I would like to just tap it into the wall button switch that I push to open and close the door now. I know I would need a relay of some sort. Any ideas?

    • ray says:

      Hi Bryan, note that all current versions of OpenSprinkler, OpenSprinkler Pi, and OpenSprinkler Beagle have on-board relay. You can use the relay to trigger garage door opener.

  16. noski says:

    Do these other uses apply to any opensprinkler board including OSPi and OSBo?

Leave a Reply