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