Working mode: positive pulse open valve, negative pulse off
Pulse width: 30ms
Is there an existing module which can connect to ESP32 and provide +ve and -ve pulses ? I'm not into electronics (and at 66 not here to become a professional electronics engineer) and I don't trust my soldering - so an off-the-shelf module would be preferable.
I have been trying to figure this out but need a hint, or preferably a pointer to a explanation/tutorial.
and a regular Solenoid Valve ... pretty easy to program in ESPHome ... and then another user asked
MUCH less power required to do the latching at the Solenoid ... and so off down that rabbit-hole ... but I only found some on aliexpress which have two wires and look like this
I started a new thread since this seems a very different piece of hardware and I didn't wish to confuse the two issues - especially since I may need to go back to the other thread if this Latching Solenoid Valve doesn't work out.
Back to the Latching Solenoid ...
I understand that a regular relay or solenoid needs power applied to turn ON and hold it ON, and opens the contact immediately the power is removed effectively turning it OFF. I guess this is what you mean by "When it is positive, it is on. When it is not positive, it is off".
However a latching relay stays in its current state when the power is off. I assume that "positive pulse open valve, negative pulse off" is requiring a +4.5V 30ms pulse to open the valve, and a -4.5V 30ms pulse to close the valve. In effect a +ve voltage is when the electrons flow in one direction, and -ve voltage is when they flow in the other direction
Continuing down the rabbit-hole I think "DPDT relay" and "H-Bridge" are the keywords I need.
Latching solenoid needs polarity swap, not negative voltages. Motor driver would be my choice to drive them since they have built-in flyback handling and protection circuitry. Relay doesn't.
TB6612FNG could be good choice here (I don't know your valve coil specs though). You can get those from AE for $1.
Ps. for next time, consider using battery powered irrigation timer as hardware and just replace the controller with Esp. For about $10 you get all hardware in convenient enclosure.
But my local supplier only has seeed's earlier Grove L298N Motor Driver board ... which looks as though it should be driven with the ESPHome H-bridge Fan component.
H-bridge fan is compatible with normal TB6612FNG (not I2C) and L296N but you don't even need that for simple polarity swap . You can use two gpio switches on driver IN1/IN2 pins to change direction (polarity). L298N is really antique and inefficient while TB is more modern mosfet driver.