Tuesday, June 15, 2010

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!


  1. Amazing project, and many thanks for sharing!

  2. 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. 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. 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. Wonderful project. 2 Quick Questions... I have an orbitz watrering system, but am using a slightly different module (link is 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. 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. 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 ( 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. Nice project, and definitely much more than an ordinary blog entry! ;-D

  9. Very impressive project both for design and execution!

  10. 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. 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. Would you consider selling the custom PCB?

  13. Nigel: are you interested in just a couple PCBs, or bulk? You can email me directly at

  14. 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. 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. 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

  19. 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

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

  21. This comment has been removed by a blog administrator.

  22. Great project!
    Thanks for sharing

  23. 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.

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

  25. Very nice idea! Thank you for sharing

  26. 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?

  27. 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'.


This blog no longer accepts new comments. Please leave comments at the new site

Note: Only a member of this blog may post a comment.