Feed on

Minty Water Valve Controller

I’ve always been fascinated by minty projects — circuits that fit neatly into a mint tin. There is an entire webpage on Make that documents such projects. For a long time I’ve been thinking of my own minty project: what can I build in a small mint tin?

Recently an idea came up: I had a new lawn installed in my backyard a couple of weeks ago, and I needed to start watering the lawn regularly everyday. I was looking into some automatic watering option like this one, but it provides limited functionality and does not suit my need. So I thought that perhaps I can build a water valve controller myself; and best of all, I can fit the circuits entirely in a mint tin. Voila, here comes my minty water valve controller!

Before describing how to build it, let me highlight some features of it:

  • A single li-poly rechargeable battery drives the circuit and a 24v latch solenoid
  • An Arduino pro mini programs the valve control
  • An RF module enables wireless control
  • Above all, it fits neatly into a mint tin

Here is a video demonstrating the controller in action:

The Design

For the water valve, I picked the Orbit yard watering valve. It’s widely available in home improvement stores, and it is cheap. It has two pins: applying +24v opens the valve, and -24v closes the valve. It uses a latch solenoid, drawing power only when you open or close it. This makes it very power efficient.

To use a single li-poly battery to drive the valve, I needed a voltage booster to raise the 3.6v provided by the battery to 24v momentarily before connecting to the valve solenoid. For this I chose an LT1303 DC/DC step-up converter, but any similar converter will do as well. Switching between applying +24v or -24v to the solenoid is achieved by using some MOSFETs. I can’t use small BJT transistors because they won’t handle the large impulse current through the solenoid (as high as 5A). Darlington transistor would work but I prefer MOSFETS for their power efficiency.

To program the valve, I use an Arduino pro mini. It’s adorably tiny and perfect for a mint tin project. I initially wanted to use the 3.3v/8Mhz version, as it can be directly powered by the 3.6v battery. But later I found that the wireless RF module only works with 5v anyways, so in the end I went with the 5v/16Mhz pro mini. This requires another voltage booster to raise the 3.6v battery to 5v. Fortunately I didn’t have to build another voltage booster for it; instead, I reused an existing minty boost which I soldered a while ago. I took off the tiny circuit board from it. Again, it fits cutely inside the space-limited mint tin.

The wireless module I used is an RF link 434MHz transmitter and receiver from SparkFun. They are small and easy to use. In particular, the receiver is quite thin and can sit comfortably along one side of the mint tin.

The schematic of the circuit is included below:

Parts List

  • LT1303 DC/DC step-up converter
  • AOP605 complementary MOSFETs (each contains 1 N-channel and 1 P-channel)
  • 2N2222 BJT transistor
  • 1N5817 and 1N4001 diodes
  • RF link 434MHz transmitter and receiver
  • Li-poly rechargeable battery
  • Various resistors, capacitors, and inductor as specified in the schematic.
  • (note that the 2200uF capacitor C2 must be rated 25v or above)

The circuit directly draws power from the 3.6v battery. I use the Arduino pin 6 to control the shutdown pin of LT1303. This way, I turn on the voltage booster only when I need to open or close the valve. The voltage booster outputs roughly 24.4v.

Arduino pin 8 and 9 are used to control opening or closing of the solenoid. Both pins are set to low at start. Next, setting pin 8 to high causes +24v to apply on the solenoid, opening the valve; on the contrary, setting pin 9 to high causes -24v to apply, closing the valve. Don’t try to set both pins to high at the same time, as it may short the circuit and cause damage.

Both the Arduino and the RF receiver are powered by the 5v output from minty boost. The data pin of the RF receiver is connected to Arduino pin 9 (which supports PWM).


I soldered the initial prototype on a perf board. I made a mistake in connecting the MOSFET IC pins. This produced a spark and instantly fried the IC. Well, careful playing with 24v. After fixing the issue, the circuit worked like a charm.

But the perf board looks a bit ugly and is too bulky for the mint tin, so I decided to design a custom PCB using Eagle CAD. This is the first PCB I’ve ever designed and made, so I felt quite a bit excited. I used the toner transfer method to produce the PCB. Playing with etching chemicals was not very pleasant. Here are two snapshots of the PCB:


I picked some mint tin cans from Whole Foods. They have beautiful cover images. Assembling everything to the tin proved to be tricky than I thought: it’s not that I can’t fit everything, but because working with a bunch of wires and fixing buttons to the side of the can in such a small space made me feel like sowing embroidery. Tweezers are absolutely must-have tools. Also, I puts lots of electric tapes inside the tin and on various circuit parts to cover exposed area. You don’t want to accidentally short wires and cause trouble. Finally, I used hot glue sparingly to fix parts together. Below are snapshots of the parts before and after they are assembled into the tin:

Additionally, I added a power switch on the front and two buttons on the right to allow for manual control of the valve. Everything packs neatly!


Here is an annotated snapshot showing where each part is located:


As the tin is not water-proof, I use a zipper plastic bag together with a paper clamp to seal it. I built a simple RF transmitter circuit on a breadboard to test the wireless control. It did work, but the range is currently limited to about 5 meters. I attribute this to the low voltage (3.6v battery) I used to power the transmitter. I am sure using 12v will increase the range a lot.

The whole circuit is reasonably power efficient. I’ve run it for two days and it is still working. The battery I use is a 900mAh rechargeable battery. A nice feature I would love to have in the future is to have it solar powered. This will completely eliminate the need to recharge the battery manually.

There are currently plenty of pins left on the Arduino unused. This provides some space to possibly control more valves using the same Arduino. But I am unsure if everything can still fit neatly in a mint tin anymore. Perhaps surface mounts are the way to go.

I haven’t programmed the Arduino to timer control the valve yet, but this should be straightforward. Some more advanced features can be included, such as installing a rain sensor to delay watering when it rains; or even better, use weather reports from online websites for intelligent watering! The wireless feature of the controller makes many options possible.

Code and Schematic Files

The Arduino code, Eagle CAD schematic/board files are attached below. Enjoy!

70 Responses to “Minty Water Valve Controller”

  1. jptrue says:

    Amazing project, and many thanks for sharing!

  2. K4GDW says:

    A very cool project. I'm bookmarking it for use in a future project. We have 7 horses and this could be the base for an automated watering system.

  3. David Mann says:

    Nice project. I own a couple of the valves and 2 of the controllers that you linked to. The programming for the Orbitz controller left a lot to be desired so I considered rolling my own timer as well. Maybe when I am ready to take on a project like this I can cannibalize my current controllers for 24v switching hardware 🙂

  4. Chris says:

    Thanks for posting the awesome detail on this project. I'm working on a similar on/off application for the Arduino, and I'm excited to experiment with your RF circuit. I know the mint tin is the coolest thing since shrink tubing, but what about a waterproof GPS case? You could fit a watertight grommet for your solenoid lead, and if you got a clear one, maybe your solar cell could live inside, safe and dry. Thanks again for an informative and interesting post.

  5. Tom says:

    Wonderful project. 2 Quick Questions… I have an orbitz watrering system, but am using a slightly different module (link is http://www.orbitirrigation.com/products/Timers/01/04/04/236/). Do you know if it works the same way as the one you indicated? Also, how did you back out the programming/control requirements for the current model your project call out for?
    Thanks again, have been wanting to do this for ages.

  6. Ray says:

    Reply to Chris: yes, a waterproof case would be great. Currently I put the mint tin in a zipper bag; but even so, I still fear that heavy rain may accidentally destroy it. I am looking into the solar power option. That would be next step.

  7. Ray says:

    Reply to Tom: yes, I am aware of this other type of valve. It has a 3.5mm stereo plug. I've actually had one before, and my guess is that it has two coils, one for opening and one for closing. I am not entirely sure. If you have the watering station that control it, you may consider reverse engineer the way it works. This is how I figured out the model I used: I bought an Orbit 1 dial 1 outlet timer (http://www.orbitirrigation.com/products/Timers/01/01/14/1960/) and I took it apart, found a big capacitor. I measured the voltage deposited on it when I open the valve, which turned out to be about 24v. You will need an oscilloscope or a multimeter that records the maximum voltage during a short period of time, because the voltage rises and then drops almost instantly.

  8. Li-Yi Wei says:

    Nice project, and definitely much more than an ordinary blog entry! ;-D

  9. Rajesh says:

    Very impressive project both for design and execution!

  10. Rik says:

    Thanks for doing this project. I am working with the orbit valve myself on project. I am using a 24 VDC 1200 mA adapter to power the valve. When I connect it up all I get is a click and nothing opens. I want to use 2 relays to control a single valve as I am not advanced enough to build the circuit you show in the schematic and get it to work correctly. I do want to go the wireless route in the future and will do that once I get the valve working for my application. Any advice you can give me on what I need to do to get the valve to open and close?


    Rik Kretzinger

  11. Ray says:

    Rik, relays should work as well. The reason I used MOSFETs is because I planned to drive everything using 3.6v battery and I can't seem to find a relay that works with 3.6v. If you have enough voltage (at least 5v), relays certainly will work. Basically, you need two relays, and each will control one pin of the valve. At rest the relays connect both pins to ground; apply power on the relay coils will direct the relay contact to connect to the 24 VDC you provide. The relay only need to be activated for 0.5 second or so, as it's enough to open or close the valve.

  12. Nigel says:

    Would you consider selling the custom PCB?

  13. Ray says:

    Nigel: are you interested in just a couple PCBs, or bulk? You can email me directly at rui.wang@gmail.com

  14. yzf600 says:

    Thanks for posting this project. I took your schematic and board and expanded on it by adding a custom RF module I'm working on that will Internet enable a device. A side benefit of my module is it's pin and footprint compatible with Xbee modules.

  15. If you didn't have any of the parts and pieces already, how much would a project like this cost for the parts and pieces?
    I'm more of a web/business type programmer, but have always been intrigued by these types of projects and experimenting.
    Don't really know what I'm getting into, yet.
    But what you have sounds like it could be similar to something I was thinking of experimenting with.

    Could the RF be replaced with a USB connector and be a way to provide power without the li-poly battery as well if the device was sitting next to a PC?


  16. Ray says:

    The parts and pieces probably add up to 30-40 dollars. If you make your own PCB, the cost is a few dollars. If you order professionally made PCB, the cost depends on how many you are ordering. Ordering only one is probably going to cost 15-20 dollars; but if you order many, the per-piece cost will be much lower.

  17. Ray says:

    Yes, the USB can provide sufficient power for the RF chip. Or you can provide the power with any 5V power adapter. The current draw typically very low, probably less than 100mA for the entire circuit.

  18. When you walk across a lush lawn, admire a gorgeous garden, or relax under a cooling mist, there’s a good chance you’re experiencing the work of Orbit Irrigation Products.

    Founded more than 40 years ago, Orbit is one of the leading manufacturers and suppliers of irrigation and watering products in the world. We distribute more than 2,000 products to landscapers, gardeners, and homeowners in 40 countries across five continents.

    Our goal is to be the best at providing irrigation and watering products that meet or exceed each individual customer’s needs. This is why we continually push ourselves to provide better customer support and to design better products – products that beautify your lawn and garden, conserve your community’s water, reduce your water bill, and make your life easier. Visit us at http://www.orbitonline.com/sprinkler-system-designer/

  19. Fluid Studio says:

    Sweet project! And thanks for buying an Orbit product! Another great program is Orbit Irrigation's Sprinkler System Designer. Just download the program and it will help you to design the prefect system for your space. Then it will tell you exactly which parts you will need.

    Check it out at http://www.orbitonline.com/sprinkler-system-designer/

  20. Anonymous says:

    Hello Ray,
    you may find nice RF modules on 3.3V made by Linx Technologies.
    Nice article.

  21. pstein says:

    Great project!
    Thanks for sharing

  22. plumbing says:

    Once you locate the valve handle, turn it clockwise until it stops. If it is frozen in position, put a few drops of lubricating oil around the valve stem and wear a work glove to turn the handle or, if necessary, turn it with the help of a pipe wrench.

  23. Rich Love says:

    Great info here. Thanks. It inspired me to build my own water timer using a relay. The information for my project is here…

  24. gas valves says:

    Very nice idea! Thank you for sharing

  25. Chris says:

    I've just started working on home project with these valves, and have already blown up one solenoid. I'm also using relays as an earlier commenter said, and I don't fully understand how the MOSFETs work. Are you using any sort of current limiting resistors with the solenoid, or are you just using a very short pulse from the controller to keep from releasing the magic smoke?

  26. Ray says:

    To Chris: the +24V is charged to a 2200uF capacitor and released to the valve from there. The actual charge that flows through the valve is very small (which can be calculated from the voltage and capacitance). Note that you shouldn't connect the valve directly to a sustained +24V source — that will either blow the valve or the source. You can find more information about the way MOSFETs work here by search 'MOSFET H-bridge'.

  27. […] finishing the previous minty water valve controller, I decided to make it an Arduino shield. This way, I can easily stack it onto other […]

  28. Stephen Larcara says:

    In your Makezine Blog video “Using Arduino to Interface with a Remote Controlled Power Switch” you turn on an LED array. Did you make that array yourself? Would you please provide more information so that I can build one like it?

    Thank you,


  29. mikedev says:

    Why you use LT1303 instead of MC34063? Is there any reasons/preference behind that?
    MC34063 is a step-up/down and inverter, can be used to step up to 24V (voltage booster) or even provide the -24V to the new style valve (non-3.5mm audio jack).

    Most important is, MC34063 is $0.58 each (@ Mouser) while LT1303 is $4.77 each (@ digi-key, out-of-stock too)

    Please correct me if I am wrong in anyway.

    Thanks for sharing this great idea anyway.

    • ray says:

      Well, the reason is exactly because I didn’t know about MC34063 when I worked on the project 🙂 You are correct that MC34063 is a much more economic solution here.

      I am working on making this a DIY kit in the upcoming months. I actually am not planning to use any separate boost converter, because the voltage boosting can be achieved by using the microcontroller’s PWM output and an analog pin to regulate voltage.

  30. Eddie says:

    Hey Ray.. I’ve been trying to make something very similar to this for a few weeks now.. but I’m a total newbie to electronics.. I’ve done some basic Ardiuno stuff but really struggling to convert the schematic into the real world 🙂

    Do you know of any sites or short courses that you can do that would bring me up to speed. I get a bit lost on how to do the bit from diode 1N5817 and the 2200uh / 1N4001.

  31. Behrad says:


    Thanks for the project. I am planning to use a similar system but I like to use USB to send RF signal to control the valve by using scheduled timer and also based on hose water ban times and weather condition. If it has rained enough or if it is forecasted to rain, no reason to water your plants.

    Just a question. Do you think there is any standard RF wireless control? Can I use an RF remote control sender that can send the code on the correct frequency to your circut?

    • ray says:

      I don’t think there is a standard wireless control. You can get a RF transmitter/receiver pair and design your own transmission protocol. The RF transmitter/receiver I used in my project is a pretty generic 434MHz type. It’s available on my hobby shop: http://rayshobby.net/?page_id=562#rf.

      Regarding scheduled timer, you should check out the OpenSprinkler project: http://opensprinkler.com.

      • Behrad says:

        I took a look at the OpenSprinkler project. It is a nice one. The one I have in mind is a bit different. It has three components:

        1) RF Controlled Hose Valve: each valve is a battery powered and is controlled by RF signal. It has no LCD or scheduling feature. Just accepts two commands:
        a) turn on for minutes.
        b) turn off (Actually this command would rarely be used because we normally turn on with a timer).
        Each valve has an RF identifier and setup code so that you can have more than one in your garden. The main reason to use the timer limited turn-ons is to avoid water less if the central control crashes or to any other reason fail to receive the off command.

        2) Central remote controller: This is a USB RF remote control and accepts two simple commands through USB serial port communication:
        a) turn on valve for minutes
        b) turn off valve .

        3) Software: Is connected to the remote controller. All scheduling, weather control, remote web access, monitoring, etc happens here.

  32. IDF says:

    Great design and execution. I am curious about why you did the following in the circuit:
    Why did you use a voltage divider on the pmos’s gate? why not use just one resistor with very high resistance between the +24V and the BJT and the the gate of the pmos will be connected directly to the collector of the BJT, so when the Arduino pin is high, you will get the BJT’s Vgs, i.e. 0.7V, instead of ~18V you put there now. I am a bit rusty, so I am probably missing something/ reading the schematic wrong, so any answer will be great…

    • ray says:

      @IDF: very good question. I also thought about it. The context is that this design comes from reverse engineering an existing sprinkler timer, and the voltage divider exists in their circuit. I am pretty sure using just one resistor as you described also works. Now, just for the sake of finding an explanation of the voltage divider, it might be because they want to fine tune when the pmos should turn off. You see, as the +24V charge from the capacitor is dumped to the solenoid, the voltage will drop, and at some point the source-gate voltage of the pmos will fall below the threshold and the pmos will turn off. By using the voltage divider, you can control when, during the drop on the +24V line, the pmos will turn off. Not sure why this is useful or necessary, but just thought it could be a justification.

      • IDF says:

        Thanks for the prompt replay.
        I must say that the straightforward effect of using the voltage divider is that the pmos will get a voltage level that is far off from the expected ‘0 volts’ in its gate (as I mentioned its more like ~18 V) thus it will be only slightly open and the voltage the solenoid will get will be far from 24V, and also its current supplied will be limited.
        Do you agree?

        • ray says:

          The pmos gate voltage does not need to be 0 volt — the only thing that matters is the voltage difference between source and gate. As long as that’s above the threshold voltage (typical threshold is 2V, see V_GS parameter in the datasheet), the mos will open. So 24-18=6 is well above the threshold voltage, and the mos will definitely open.

  33. Nate says:

    I am trying to build this, but the AOP605 mosfet has been discontinued. I don’t know what to do.

  34. Blankly says:

    I just wanted to thank you for the great information posted here. I made my own version of the design for Hunter 9-12v DC latching solenoids using a low-power relay instead of an H-Bridge so that it can be directly driven from a 3.3v logic µC pin. I haven’t built it yet so I don’t know how it will perform. I have posted the schematic below. Any comments would be much appreciated!



    • ray says:

      It’s ok to use relay instead of MOSFETs. The main reason to prefer MOSFETs is their low cost and compactness. I took a quick look at your schematic, and noticed that you use only one relay and one Arduino pin to control the relay. This means the voltage from the 2200uF capacitor is always applied on the solenoid, whether positively or negatively. There is no ‘floating’ state. You need the ‘floating’ state so that the solenoid will be disconnected from the 2200uF capacitor when it’s not being opened or closed. So I think you will need two digital pins and two relays to achieve this.

      • Blankly says:

        Well I also have a pin controlling the LT1303. I was going to control the pulse by turning on and then turning off the LT1303. Is that not a valid solution? I’m also going to power the circuit off of a LiPo not VCC like it says. I was told that in this circuit the C2 value can be lowered at 9vdc since it is a filter cap so I will probably change that as well. (maybe down to 330uF) Thanks!

        • Blankly says:

          Correction 12vdc*

        • ray says:

          That won’t work. If you don’t disconnect the valve from C2, there is a direct path from VCC to the valve through L1 and D1. Because the valve resistance is very low (3 to 5 ohm), this presents a short circuit situation. I don’t think Arduino can even start in this case. Also, C2 has to be sufficient large, because it serves as a ‘bucket’ to store enough charge that can open or close the valve in a pulse. It is not a filter cap, and 330uF is unlikely to work.

          • Blankly says:

            Awesome, okay I’ll stick with a 2200 uF cap at C2 and add a second DPDT relay in series with the polarity switching relay. I’ve also been told I should add a MOV across the solenoid for flyback protection. Thanks for the help!

  35. Wade says:


    Just wondering if the pin on the diode at D1 should be jumpered to the pin 7 on the IC1.


  36. Stan says:

    Ray I have a question for you. I am working with the newer Orbit valves such as their 91592 or 58874. I attached a 9 volt battery and it opened and when I removed the battery it closed. It would appear that these newer valves are normally closed and are only open when power is applied. Do you know if this is the case and what the proper voltage is? For my experiments, 6 volts was not enough but 9 volts worked. I want to open the valve with a small solar panel. This site was very interesting and helpful. Thanks very much!

    • ray says:

      Hmm, that’s strange. If that’s the case, the valve is not latching valve any more. Can you measure the resistance between the two wires of each valve? Latching valves usually have pretty low resistance (down to a few ohms) whereas non-latching ones should have higher resistance.

  37. Stan says:

    If I did this correctly, the 91592 was 5.3 and the 58874 was 1.5. Does that make any sense to you? (Novice here) They both look identical but the former I just got from Amazon and the latter from a local hardware store with faded package. It is the new one 91592 that I was able to open with a 9volt battery. I have not tried that on the other one. I’m still amazed to learn I’m not the only one abusing lawn and garden equipment. Thanks very much. Stan

  38. Stan says:

    I tried the 9 volt battery again on both and now neither one works. I might try 12 volts just for fun. Thanks again!

  39. Stan says:

    I just tried again with the battery and the one with the 5.3 resistance works and the other does not. However, I am now confused about which part number is which because they look identical and there is no number on either one. Sorry for my confusion. I think the one that works is the 58874 but I’m not 100% sure. Cheers!

    • ray says:

      I suspect the fact 9V battery worked is just due to luck. These valves needs probably at least 12V to open or close. That’s why the circuit has a boost converter. With 9V I think it will be unreliable.

  40. Stan says:

    As much as I like the Orbit stuff, I think they change their products too often to use them as a component. I just found a great inexpensive alternative. It is a 12 volt normally closed valve that sounds perfect and is easy to control. What an awesome forum you have here. Most of it is over my head. Check this out:

    Thanks again!

    • ray says:

      As I said, anything like ‘normally closed’ means it’s not latching solenoid valve, and therefore they are not meant for battery-operated controllers. This is because non-latching valves require constant current draw to remain open, and that will drain the battery very quickly. Latching valves are much more power efficient because once on or off, it will remain in that state indefinitely until you send a voltage pulse again.

  41. Stan says:

    Hi Ray
    Thanks so much for taking the time to help me. I’ve learned a lot from you and I think my plan to open a normally closed valve with a small solar panel might actually work! My goal is to make a water timer that needs no batteries. Start time is determined by the direction the panel is pointed and duration is controlled by “blinders” that shade the panel so that it is only in full sun for a limited time. If it rains it won’t water. Sundial meets solar panel. If it works I might come back to pick your brain for a way to enhance it to make it only water every other day…..
    Best wishes

  42. andrew says:

    Sorry in advance for the newbie question. I see from the software code, the Arduino pin 4 is used to set, and pin 5 is used for the reset. On the schematic, are those labelled JP4 and JP5 and does the round circle inside the 2 boxes refer to the 2 prongs from the water value? Also I could not see where on the schematic, the wiring for the manual open/close switches was – were these omitted to keep the schematic simple? Thanks in advance.

    • ray says:

      JP4 and JP5 are indeed the connector to the valve. The manual switches are not shown in the schematic. If you look at the Arduino code, it’s using pins 10 and 11 for the manual buttons.

  43. roger says:

    My orbit valve is 50ft from my circuit. Only get it to partially open with 24V and fully open with 27V. I’m using 18 gauge wire. Does that sound correct? Is there really a 3V drop over that distance? I don’t see the voltage drop when using a multimeter but maybe that is because i’m measuring it with very little current? I tried a 3300uf at 24V but that didn’t seem to help.

    This was working for a short period of time, but now my 2nd valve has failed to close. Is this because my voltage is too high? Or is 3300uf allowing it to pull too much current?

    • ray says:

      The wire thickness seems fine. I don’t know why it can’t fully open on 24V — generally opening the valve requires lower voltage than closing the valve. Unless if you connect a persistent 24V power supply to the valve, it’s very unlikely the valve will be damaged due to high voltage — the charge comes from a capacitor and so the current is only an impulse. That can’t damage the valve. I don’t know what circuit you are using to control the valves so I can’t provide much insight.

      • roger says:

        The system seems to be working better now. I made the connections between the 18 gauge wire and valve better with solder and shrink wrap. I also was using 25V max capacitors (in series and parallel to get to 27V). I swapped those out for a 50V max capacitor. I was able to lower the voltage to 26V after all of that. I’ve had a few more older valves stop working but all of the new ones seems to be going strong. I haven’t read great things about the reliability of these valves so maybe a 2 year life span is expected.

        Your blog has been an amazing resource. Never would have figured this out without it. Thanks!

Leave a Reply