Driving watering electronic timer with Arduino

Hi.

I bought electronic timer for watering the garden which is powered with 9V battery. What I want to do is controlling it with Arduino clone which has 3.3v output.

Timer module can be seperated from the module with valve. Those two modules are connected with cinch.

I’ve measured ON/OFF signal with oscilloscope (see image below) - it sends about ±8,5v pulse.

Any idea what is the best way to control that valve with Arduino?

https://dl.dropboxusercontent.com/u/226 … /timer.jpg

https://dl.dropboxusercontent.com/u/226 … signal.png

Thanks

Can you provide more details about the brand and model number of the timer and valve? Maybe there is more information on the internet about it.

At first glance it seems simple enough to do with a NPN transistor which is switched on by the Arduino with a current limiting resistor to the base. Then the collector with a pull-up/load resistor to 9 volt, and the collector connected to the valve input. The emmiter connected to ground of both the arduino and of the valve. But the devil is usually in the details. Hard to say without more info on the schematic.

It really depends on how much current is pulled by the valve. Google “controlling 12v with arduino”

You could use a MOSFET, transistor, relay… But this would depend on the current is.

Thanks for answers.

Some more details.

Timer brand:

https://dl.dropboxusercontent.com/u/226 … er_box.jpg

It’s some low cost timer, can’t find any details about it on the web.

I took apart valve module, there is just 1 dc motor:

https://dl.dropboxusercontent.com/u/226 … _motor.jpg

I’ll try to take apart that timer module.

Thanks for the hint with transistor. I need to wire it somehow so it will work in both (+9V and -9V). I probably need to use 2 transistors? (sorry for stupid questions, I’m newbie :oops: ).

I’m not understanding how all the pictures fit together. Which one has the 9 volt battery compartment?

If the valve is only a dc motor then operating it does indeed need both positive and negative voltages applied to it. I couldn’t see that from the oscilloscope plot, as it only shows one pulse polarity. For dual polarity (opening and closing of the valve) you need a 4-transistor motor driver setup known as an H-bridge to redirect the current the other way through the motor. ([Wiki article) This is probably already built into the timer module.

To decide what you need to drive the motor with an arduino it is important to know how much current that motor takes when it is operating. (Though it can’t be much if all is powered by a 9 volt battery with lousy capacity and internal resistance) So try to measure that current with a multimeter as you are operating it.

If the meter-display isn’t quick enough to register the engaging/disengaging of the valve then another way to show it is by measuring the voltage across the current (and common) -input of the multimeter with a oscilloscope probe. For that you need to know the resistance value of the current-shunt inside the multimeter. (using another multimeter set to measure the shunt’s resistance) Measuring the voltage drop across the shunt with the oscilloscope and using Ohm’s Law gets you the current through the motor. BUT, make sure the valve, multimeter and timer isn’t in any way connected to mains earth. (probably not) As this might ruin your oscilloscope otherwise.](H-bridge - Wikipedia)

Hi Valen.

There are 2 modules that are connected with cinch connector:

  • timer module with 9v battery, manual ON/OFF and other buttons

  • and other module with valve.

However I found out that the “motor” in valve module isn’t a motor at all. It is a DC Latching Solenoid!

https://dl.dropboxusercontent.com/u/226 … valve0.jpg

And [here is a video of that solenoid in action :smiley:

Specifications are probably something like the one on [this site.

If you look closely at oscilloscope plot, there are two pulses (I pressed ON and then OFF button when measuring). First (+) pulse is covered with vertical cursor lines. EDIT: sorry, looks like forum cropped image, [here is a link to full image.](https://dl.dropboxusercontent.com/u/2261256/forums/watertimer/on_off_signal.png)](http://www.china-solenoidvalves.com/products/LATCH-VALVE-170367.html)](https://dl.dropboxusercontent.com/u/2261256/forums/watertimer/%20Latching_Solenoid_demo.mov)

Ok, a solenoid is still similar to a dc motor in terms of electrical behaviour, meaning it is an inductive load that needs current going both directions. Yeah, due to the cropping I didn’t see the 2nd pulse. So, a dc-motor driver board operated by an arduino should suffice. But the unanswered question is still how much (current). Can you measure the resistance of the coil alone?

Valen:
… Can you measure the resistance of the coil alone?

I’m not sure how to do that? Should I disconnect the motor and measure resistance on + - wires?

Disconnect it from the timer and put the probes on each end of the cinch connector.

My multimeter says 5.4ohm. So I need about 1.5A?

https://dl.dropboxusercontent.com/u/226 … urrent.jpg

Yes, a dc motor driver with atleast 1.5 A current rating. The internal resistance of the 9 volt battery limits the current further, but that would make it a safe margin.

Thanks for hints. I’ll try to google that.

Some guy on other forum is working on simillar project (also using solenoid) and he shared [this schematics (work in progress), but I’m not sure how it works (it looks too advanced).](https://dl.dropboxusercontent.com/u/2261256/forums/watertimer/SprinklerControl.pdf)

Me neither. At least, no idea what he’s doing with the parts (D1, L1, Q5, C1 R3, R4) below the Moteino block. The parts on the right are an H-bridge made up of 4 mosfets driving the solenoid. But they are connected to eachother. So who knows how they interrelate.

This module generates the voltage (12V, but can be shifted in SW to 9V) and give you a healthy pulse to drive the solenoid to one state or the other. I’ll ask Tom (author) for more details and let you know how it works.