Update on ‘How to control Orbit 62035 valve’

It has been a while since I updated my blog. Things have been quite crazy the past few months, but now I am back alive writing more blogs sparingly.

The first thing I want to share about is an update to my previous post that talked about how to control the Orbit 62035 valve. There have been a couple of missing pieces there which I would like to clarify. First, I found that a MOSFET cannot reliably control that valve. I am not sure why, but it may have to do with the on-state drain to source resistance. But using a MPSA14 (NPN darlington) works, and it requires a base current limiting resistor, so I’ve updated the schematic as below. Second, I was reminded that two kickback protecting diodes are needed to protect the transistor from the inductive current from the solenoid, so those are also added. These are the two main changes. The circuit below has been tested to work. Feel feel to leave comments.

 

Tesla’s image and Tesla coils


I was listening to the ‘Ask an Engineer’ show on Saturday night, and they mentioned that the $100 Serbian paper bill has Tesla’s image on it. A friend of mine happened to be traveling in Serbia, and so very luckily, I requested one from him 🙂 It seems this is equivalent to 1.29 US dollars.

And speaking of that, I am excited to post this video I recorded at the Make Faire New York 2010. It’s the ArcAttack guys performing in the middle of a bunch of Tesla coils. Totally awesome!

Meet the Arduino WaterValveShield

After finishing the previous minty water valve controller, I decided to make it an Arduino shield. This way, I can easily stack it onto other shields and extend its capability. I also added a few input buttons, and a DS1337 real-time clock, so that it can keep up with accurate time. Now the circuit has become much smaller, so I can’t produce it with home-made PCB any more(sadly…). Instead, I ordered professionally made PCBs from Laen, and here you are, meet the Arduino WaterValveShield!

PCB board:

Components soldered:

Close-up view:

Connected to a serial LCD display

The schematic:

You can download Eagle schematic and PCB design here. Feel free to use it and/or modify it, but be kind to give me some credit for it 🙂

Parts list with Mouser/Digi-key links: valve_shield_parts.zip 

As for sketch code, refer to my previous posts for code to control the valve and read input buttons. To interface with DS1337 RTC, I use this excellent RTC library.

Next steps:

Multiple button inputs using Arduino analog pin

At times I feel short of digital pins on the Arduino to handle multiple button inputs. Here is an easy way to use 1 analog pin to handle many input buttons. The way it works is very straightforward: use a resistor network as voltage dividers, and then let each button feed a different voltage to the analog pin. Thus by detecting the voltage we can tell which button has been pressed.

Schematic:

Download the corresponding Arduino sketch code.

As a downside, it cannot handle simultaneous button presses. To do that, one could potentially use resistors at doubly increasing resistance (1K, 2K, 4K, 8K…). Hence by checking the detected voltage, we should be able to tell which buttons are pressed simultaneously.

How to control Orbit 62035 valve

As an update to my previous post, I took a look at the Orbit 62035 valve, which works with the older Orbit’s yard watering system 62032. This valve is white colored, and has a standard 3-pin 3.5mm stereo audio plug.

To figure out how to control the valve, my initial guess is that the valve contains two coils, one opens the solenoid and one closes it. To verify this, I measured the resistance between the 3 pins of the plug. It turns out that pin 1 and 2 have a 4.5 ohm resistance, while pin 1 and 3 have a 0.9 ohm resistance. The 4.5 ohm resistance is reasonable, as it’s roughly the same with the Orbit 91592 valve that I used previously. But the 0.9 ohm resistance is strange — it clearly indicates a coil but the resistance seems too lower.

Having no other reference, I went ahead to apply voltage on the pins to see what would happen. Interestingly, applying +24v on pin 1 and 2 successfully opens the valve, but doing the same on pin 1 and 3 fails to close the valve. I tried everything I could to figure out what went wrong, but nothing came up. Out of luck, I decided to buy the full kit (62032) and reverse engineer the control unit a little bit. When I opened the control unit, I found that the entire circuit board is covered by a thick layer of water-resistant paste. This didn’t look good. However, I did notice several big resistors, each reading about 3.9 ohm. The size of the resistors seems to suggest that they are rated at 2W.

Given this finding, my suspicion is that applying +24v directly across pin 1 and 3 discharges the voltage too quickly, thus cannot close the solenoid properly. In fact, given the 0.9 ohm resistance, a momentary current of 26 Amp is produced, which sounded quite scary. Adding a 3.9 ohm resistor is probably used to limit the current, slowing down the voltage discharge. This actually helps to build the electromagnetic field in the solenoid, allowing it to close properly. The idea turns out to work like a breeze: I connected a 3.9 ohm resistor between pin 3 and ground, and this time the valve nicely closed. At this point, I’m pretty sure I’ve figured out how it works. 

You might wonder what the differences are between this valve with the Orbit 91592 valve. Here are my two cents:

Pros:
– 3.5mm stereo audio jack makes it easy to connect (in comparison, the 91592 valve requires custom connector)
– Pin 1 can remain connected to +24v, while grounding pin 2 or 3 is used to control the opening/closing of the valve. This simplifies the circuit design a lot. In fact, only two low-side drivers are needed to ground pin 2 or 3, which is much simper than h-bridge driver required by the 91592 valve.

Cons:
– Seems to be of its own kind on the market (my impression is that this is a discontinued product). Most other latching solenoids available on the market are similar to the 91592 valve. Fortunately Walmart still carries this product currently, but I don’t know how long it will last. 

Below is a sketched schematic when using this valve to replace the 91592 valve. As you can see, the circuit is much simpler than before. The driver can use either a darlington transistor (such as MPSA14), or an N-type MOSFET (such as IRF510).

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

The PCB

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:


Assembly

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:


Testing

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!