TLDR; Do you sell seeedstudio’s Grove - I2C Motor Driver (TB6612FNG) ? I see you have two older models which use the less efficient L298N chip.
I am particularly attracted to its Grove i2c interface, and it is already supported by ESPHome and Home Assistant.
Background
I have located a Latching Solenoid Valve to use in my greenhouse, with specifications including:
- Working voltage: DC 4.5V
- Working mode: positive pulse open valve, negative pulse off
- Pulse width: 30ms
By latching at the solenoid valve it will use a lot less battery power … but I’m not sure how to connect to ESP32 and provide +ve and -ve pulses.
I have looked into generating -ve voltage, which led to the DPDT relay rabbit-hole, and from there to H-bridge.
I’m not into electronics (and at 66 my goal is not to become a professional electronics engineer) and I don’t trust my soldering - so an off-the-shelf module would be preferable. Over in the Home Assistant ESPHome forum someone suggested the “TB6612FNG could be good choice here”, and I found that seeedstudio have one with a Grove interface and ESPHome driver … which I assume means there will be no need for flyback diodes or other electrical wizardry 
I checked Core’s website and discovered you stock Seeed Studio’s Grove - I2C Motor Driver (SS105020001) and Grove - I2C Motor Driver (SS105020093) - but not the TB6612FNG version. I have come across the comment that the FB6612FNG is “More efficient than the L298N with no significant voltage drop”, and it appears to be newer than L298N chip … so wondering if there was any issue with it that prevents Core from selling it ?
Is there another product you would recommend ?
Hi Donald
You are right. It is a bit difficult to get a negative pulse with a single power supply.
You need to generate a suitable positive pulse and have the means to invert or reverse it.
There are more ways to reverse a signal than using an H bridge which sometimes can get a bit messy. One pretty clean way is to use a DPDT relay. The size depends on what sort of current the valve needs.
If the current is quite small there are relays with an IC type DIP16 or similar form.
Suggested circuit attached.
The relay pin numbers relate to an LY style device. The actual numbers will depend on the type used
Be aware that a lot of this style relays have the flywheel diode included in the package and thus becomes voltage conscious
In operation you would probably set the relay for the desired direction then generate the operating pulse. Pretty clean and simple.
Cheers Bob
Hi Pix
This escaped my attention but you will need a flywheel diode across the valve solenoid coil. As the voltage applied to this coil changes direction the only place to put it will be between relay pins 11 & 21 with cathode at pin 11
Hi again Donald
More thinking about this.
As you prefer not to solder the H bridge motor driver option need not be too messy and as you suggest the flywheel diodes are taken care of on board. Make sure of this.
Firstly select a device that has 2 inputs. Direction and PWM.
Connect the valve voltage supply to Motor V IN
Connect the valve solenoid to the Motor terminals
Connect 1 GPIO to DIR terminal
Connect 2nd GPIO to PWM terminal
In use apply the required DIR signal to open or close the valve.
Then apply a pulse of a bit more than 30msec to PWM point.
This should open or close the valve. This could be a better option as with the relay system you still have to arrange to generate the pulse which the H bridge motor driver will do for you.. With the relay you would still need probably one of the Mosfet switches that Core stock to generate this pulse.
Suggest you arrange the valve position to default to OFF.
I don’t know how you are going to arrange a fail safe condition to be OFF . As I see it once the valve is turned ON it will stay there unpowered until it receives another pulse of opposite polarity to turn it OFF.. As I think this is an automated system a situation like this could be some sort of disaster.
This would apply to both Relay and H bridge reversing system.
Maybe you should have a rethink on this water valve latching business. These valves I think would stay in their last state even if the power failed which is probably NOT a good thing. You might have to forget about this part of battery saving. I believe the use of latching relays would be the same. There may be types of latching valve and relay that will fail safe to OFF in the event of power loss. I don’t know off the top of my head. A bit of research required (more).
This might not work either. If you removed power to conserve battery as I think you intend the valves would turn OFF anyway. GRRRRRR. Back to the drawing board. Maybe you just can’t safely have a latching system in an unattended situation.
Will think about it.
Cheers Bob
Hi Robert, thank you for your concern, but I have already gone down the DPDT Relay rabbit-hole, to H-bridge and ended up interested in a particular product - Seeed Studio’s Grove - I2C Motor Driver (TB6612FNG).
I am aware there are much cheaper DPDT relay and H-bridge breakout boards … and yes, a Motor Controller does seem overkill - but this board has only an i2c interface (so I assume it doesn’t require any further electronics); and it has an ESPHome driver so easy for me to add to my greenhouse automations.
Regular relays need to be powered to remain open (or closed). The whole point of Latching is that it does not require ongoing power to maintain its state.
Your comment “even if the power failed” reveals your assumption that electronics must be connected to mains 240V power - which is not possible for my greenhouse.
My greenhouse ESP32-S3 runs for a couple of minutes then powers off for 30 minutes before doing the same again. Monitoring Li-Po battery voltage is essential for ensuring intervention to ensure the battery doesn’t run flat. In my program I expect to use a global variable to remember the water valve state between awake sessions; and maybe to vary the length of sleep depending on how much watering is wanted. I could also add a pre-emptive valve close as part of the boot proceedure.
Hi Donald
Looks like you have most of it sorted.
Yes I remember. This came up before and I had forgotten about that. A fair while ago and my memory could be slipping a bit. I apologise,
That would be a good idea in case half or more of the valves start up in the closed condition. As I understand it a positive pulse opens the valve and negative closes it so if the valve is already closed nothing should happen. No harm done.
Cheers Bob