1
\$\begingroup\$

I received a sample latching solenoid valve:

https://www.alibaba.com/product-detail/Top-Quality-Dc-5V-Latching-Solenoid_60415603817.html

I want to control it using an Arduino Pro Mini, running a 5V. AFAIK, I can't control it just connecting it to a digital pin since the absolute max current is 40mA.

As per the description pulse width should be 25ms. Not sure how to do that with the Arduino.

Setup is powered by a 18650 battery + MT3608 boost module (5v).

09/04 - More info from the manufacturer: Valve opens on (+) pulse, closes on (-) pulse. It can be powered with 5v and a pulse of 25ms. The current is 0.23A.

It definitely looks like I need an NPN BJT (will a 2N2222 or equivalent work?). How do I send a negative pulse?

\$\endgroup\$
8
  • \$\begingroup\$ I think it's pretty simple. It's latching. So it is "pulse on" and then "pulse off." You need to supply at least 25 ms duration of 6 V into its 16 Ohm load (say, at least 40 mA.) The timing requirements aren't at all difficult for an Arduino. The only thing you require is a 6 V source (or perhaps slightly more or less) and an NPN BJT and resistor (or two.) It's not hard. For the Arduino, just drive the I/O pin high and set up a timer for the 25 ms (or else just sit in a loop that long, or longer.) You may require a way of detecting the valve's current state, if it truly latches with power off. \$\endgroup\$
    – jonk
    Commented Sep 4, 2019 at 8:17
  • \$\begingroup\$ @jonk I added more info I received from the manufacturer to my original post. Thx \$\endgroup\$
    – vazquezjm
    Commented Sep 4, 2019 at 11:40
  • \$\begingroup\$ The negative pulse is probably requiring an opposite polarity. You may require two half-bridges to achieve that. What voltage sources so you have available to you? \$\endgroup\$
    – jonk
    Commented Sep 4, 2019 at 15:49
  • \$\begingroup\$ @jonk I'm powering the Arduino and sensor with a 18650 battery + MT3608 step up to get 5v out of the bat. \$\endgroup\$
    – vazquezjm
    Commented Sep 4, 2019 at 19:55
  • 1
    \$\begingroup\$ The valve relay specifies \$6\:\text{V}\$. It's been my experience with "normal" relays (not ones that actuate a valve, though) that their specifications claim they operate with as little as 70% of the nominal voltage. If this applies to your valve's relay, then perhaps \$\ge 4.2\:\text{V}\$ can operate it. But it's a risky situation. With a \$5\:\text{V}\$ rail, there isn't a lot of headroom. For an H-bridge, assuming best cases here, that's only \$400\:\text{mV}\$ headroom for each of the high side and low side switches. And that assumes best cases. Do you want a discrete solution? \$\endgroup\$
    – jonk
    Commented Sep 4, 2019 at 20:21

2 Answers 2

3
\$\begingroup\$

The Situation

It's hard to know, for sure, but some additional information can be adduced from the existing electromagnetic relay data. Two pieces you have in hand are the \$25\:\text{ms}\$ specification and the \$16\:\Omega\$ specification. From that, I can guess that the inductance is on the order of \$16\:\Omega\cdot 25\:\text{ms}\approx 400\:\text{mH}\$. (The actual inductance will likely be a little less.)

Given this is a two-wire device and that the seller told you that you require opposite pulsing to make it work, this is a single-coil latching relay. These often require a full h-bridge (or a pair of half-bridges) in order to operate them from a single supply rail.

I mentioned this in comments elsewhere: but another piece I can add is that the class of relays I'm more familiar with actually specify on their datasheet that they will typically require at least 70% of the rated voltage in order to properly operate. This relay also says \$6\:\text{V}\$, so I suspect it may work okay from as little as \$4.2\:\text{V}\$.

But you will most certainly need to test that fact without a datasheet saying so.

I want to emphasize the above line. You are attempting to use a battery power source and also a boost converter, neither of which have sufficient voltage to meet the stated voltage for your valve relay! The only thing going for you is that you might be able to successfully operate it with the boosted voltage from the regulator. And that is a maybe. So, you do need to make some tests if you want to be sure. The only saving grace is that the valve doesn't cost that much and neither does the circuitry to attempt it. So the very worst that happens is that you can't use the selected valve with your existing power supply rails and that you may be out a little bit of money uncovering this fact.

Finally, given \$6\:\text{V}\$ and \$16\:\Omega\$, this implies a fairly hefty \$\frac{6\:\text{V}}{16\:\Omega}=375\:\text{mA}\$ (given the stated \$25\:\text{ms}\$ needed to rise to that point.)

This is a lot of current. I normally like BJTs for circuits like this. But at this peak value, the need for high base drive recombination current means an excessively wasteful and complicated circuit for BJTs. So this pushes hard for MOSFETs, instead.

Assuming Success

So let's assume you can succeed with your existing \$5\:\text{V}\$ rail. One circuit you can find on the web (for example, see OMRON: 6-10 Example of Power-saving Drive Circuit for Single-winding Latching Relay) could suggest something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

The above circuit, though, requires some careful tweaking of part values to carefully match up with the relay. Also, \$C_1\$ needs to be rather large and it, along with \$R_2\$, will need to be tinkered into the right values before this becomes anywhere close to reliable. I honestly don't believe this is the right approach for your valve relay, though. It requires way too much drive current for this idea to succeed.

So this leaves us with the more obvious choice: an H-bridge. Perhaps something like this:

schematic

simulate this circuit

You may not actually require the indicated four resistors shown in the above circuit. They are there mostly to deal with HF oscillation. But given the drive impedance of your I/O pins, it's unlikely to be a problem. So you may consider simply removing the above resistors, bypassing them with wires, and be just fine. This makes for a very simple circuit.

(Well, it might. If you don't care about shoot-through, which can be a special problem with low-threshold mosfet H-bridge designs that are this simple. Adding analog circuitry to mitigate against shoot-through can be a pain and will add parts.)

Note that in the above schematic, you might start out with your Arduino having both I/O lines at LO or ground. Then, when you want to pulse the relay coil in one direction, you'd raise I/O 1 to HI and leave I/O 2 at LO for \$\ge 250\:\text{ms}\$, after which you'd raise I/O 2 to HI and leave it there until you wanted to change the relay. When you wanted to do that, just lower I/O 1 to LO, keeping I/O 2 at HI for \$\ge 250\:\text{ms}\$ (after which you'd lower I/O 2 to LO, again.) This would work okay, I think. (I've greatly increased the active-time in order to make sure sufficient time is allowed for the required drive current to arrive. You might tinker with this timing to get a faster response. But that's an experiment for you to perform.)

Summary

There are many alternative driver ICs you could consider adding for this purpose. Most of these will be MOSFET driver ICs that still require a discrete MOSFET. All they do is help drive them. I am not sure they are worth the trouble. But that doesn't mean you shouldn't consider them and see if you might prefer that approach.

I found a few web pages suggesting some alternative ideas. One using a part that's no longer recommended (and may be difficult to find) was the MAX5054. To see it being recommended on the web for this purpose, look here on EDN. Another, readily available still, is the ULN2003. To see it being recommended (I wouldn't use it, though), look here on EDN. But it has a worst-case active output voltage that (especially) when combined with your lower voltage rail almost certainly means you cannot be assured of operation with it. Even half-dridges, such as the UC2950 have worst case saturation voltages that are concerning.

What all of this tells you is that it will take a careful reading of datasheets for ICs you might consider using, if you go that way. I don't have any good IC suggestions to offer you. But others offering an answer may have some good ideas. (I just don't know of any, myself.)

At this point, I feel you are being squeezed fairly tightly and that you will need to buy one and then do some validation for using it. Your relay specifies \$6\:\text{V}\$ on the visible label and I would take that to mean that there is a chance that your \$5\:\text{V}\$ rail may be sufficient and that, lacking other good options for a valve and wanting to try this one, that you have a good shot at it. No guarantees. But at least a good shot at being able to make it work out, okay. But I think you will need to either create a discrete H-bridge out of appropriate MOSFETs or else find an IC (half or full bridge) that promises low drop-out voltages when actively driving.

Update Notes

The OP has pointed out in comments that the actual device under consideration has different specifications than earlier seen. (Different picture, now.) The actual device is specified for \$5\:\text{V}\$ operation and presents \$22\:\Omega\$. It's still indicating \$25\:\text{ms}\$ for the pulse width, implying \$22\:\Omega\cdot 25\:\text{ms} \approx 550\:\text{mH}\$.

This doesn't change my above thinking that much. I still think a discrete MOSFET H-bridge is better. (BJTs would still require way too much base drive current to permit a simple circuit, thus adding further complexity the OP clearly doesn't want.) I also still don't know of a good IC choice. The OP's "find" of boards based on the L9110 doesn't really alter my opinion. The datasheet is poor; and although the outputs are specified as "push-pull" (good), I can't tell if the voltage drop of as much as \$1.5\:\text{V}\$ on the high side is due to the gate threshold voltage of an nFET used there or instead due to higher on-resistance of some pFET used there. So I can't guess how it might operate when running from a \$5\:\text{V}\$ supply rail and a peak current that is \$\frac13\$rd their specified value. I'd have to buy one to find out.

BJT-Only H-bridge

There are lots of ways to go with a BJT H-bridge. Just google them up and you'll see plenty. The one I'll provide won't be the first or second schematic you might find. But it may work okay for you:

schematic

simulate this circuit

The diodes provide a path for the relay coil to release its magnetic energy when it is turned off. The four BJTs nearest the relay coil are your h-bridge "switches" and they must provide up to about \$230\:\text{mA}\$ for the relay coil. This is well within the capability of small signal BJTs. (Please keep all wiring short and tight and you might also provide nearby power supply rail bypass capacitors -- not shown.) The other BJTs are added to provide the necessary base current. The resistors help manage all the details and allow the driver BJTs to avoid going into deep saturation (which isn't needed.) That's about it.

The above circuit also includes six more parts to deal with minimizing shoot-through, as well. So this is the much closer to a full design than the mosfet example above. But I think you can see a few more parts involved.

\$\endgroup\$
10
  • 1
    \$\begingroup\$ I'm so grateful @jonk! Looks like H-bridge are the way to go. I found some of them which are used mostly to control RC cars, or motors on robotics projects like this one electroschematics.com/13797/l9110-motor-driver-primer This is easy to find and I guess more affordable than building my own. \$\endgroup\$
    – vazquezjm
    Commented Sep 5, 2019 at 17:10
  • \$\begingroup\$ @vazquezjm I don't think the L9110 gives you the best possible shot at things. The datasheet suggests perhaps one and a half volts of drop across it -- and I don't think you can afford that (or even more with two L9110's involved.) This is why I think it will be difficult for you. Your situation is over-tight and you have to squeeze every possible drop out of what you attempt. Sadly, most ICs tend to assume that you can tolerate wider margins than you have. Just FYI. \$\endgroup\$
    – jonk
    Commented Sep 5, 2019 at 17:47
  • \$\begingroup\$ Now I realize where the 6v come from. I only share the link to the generic part... My bad. The actual valve I have is this one imge.to/i/vUzf1s (5V, 22ohm, 25ms pulse). \$\endgroup\$
    – vazquezjm
    Commented Sep 5, 2019 at 20:59
  • \$\begingroup\$ @vazquezjm That helps reduce the tight squeeze on your voltage margins (or the lack of them.) And the peak current is now about \$230\:\text{mA}\$, which is easier to hit. This increases the odds that a standard IC might work okay from about 0 to something slightly higher. But it's still a tight situation and probably would still be better done with discrete parts as shown in the last schematic above. (The first schematic still won't work in my opinion because the current needed is still too much.) \$\endgroup\$
    – jonk
    Commented Sep 6, 2019 at 0:06
  • \$\begingroup\$ Good to hear @jonk. If going with the discrete version, I saw many examples using 2N2222, will it work? If not, what values should I look for in othre BJTs? Thanks for your help! \$\endgroup\$
    – vazquezjm
    Commented Sep 6, 2019 at 21:17
0
\$\begingroup\$

Hmm, that solenoid site doesn't provide much info...

The fact that it lists a 25 ms pulse width as an input makes it seem like their is some sort of pulse-position modulation ("PPM") control that serves as an input to an embedded actuator that then opens/closes the valve. This is how RC servos are controlled.

If there are more than 2 wires (such as power, ground, and "signal"), then there are some electronics built into the valve that let you control it with a low current source such as a microcontroller. In that case, use different pulse widths of the arduino to see if you can control the valve without the step-up converter.

How many wires are coming in and out of the valve? If there is just two (power and ground), then your arduino definitely cannot open and close it. You should find a benchtop power supply and see what is the minimum voltage and current you need to fully open and close the valve. Then, find a MOSFET or high-side switch that would let you control this "high" voltage using the arduino. If you use that N-FET I linked, make sure you place it between the load and ground. If you use the high-side switch, place it between load and power.

\$\endgroup\$
4
  • \$\begingroup\$ Looks like I'm out of luck. This valve has only two wires. I'll contact the manufacturer and see if they have the data on the current required to open/close the valve. \$\endgroup\$
    – vazquezjm
    Commented Sep 3, 2019 at 22:52
  • \$\begingroup\$ This is close up pic I took as soon as it arrived vUzf1s.jpg \$\endgroup\$
    – vazquezjm
    Commented Sep 3, 2019 at 22:54
  • \$\begingroup\$ I would try to find a bench top DC power supply with a voltage and current display and just read how much current it puts out at different voltages to open and close the valve. \$\endgroup\$
    – techSultan
    Commented Sep 4, 2019 at 0:29
  • \$\begingroup\$ Hi @techSultan I added more info I received from the manufacturer to my original post. Thx \$\endgroup\$
    – vazquezjm
    Commented Sep 4, 2019 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.