Hello, this is my first post on the Arduino forum. I am working on a project that involves controlling a 12V 6W ball valve with Arduino. The valve has three wires: ground, open, and close.
I want to use MOSFETs or Transistors instead of relays to switch the power to the valve, but I am not sure how to wire them correctly.
The valve I am using is this one: [12V DC 6W Electric Ball Valve]. It has a motor that rotates the ball 90 degrees to open and close the valve. It also has two limit switches that indicate the position of the valve.
The MOSFETs I am using are these ones: [IRF3205 and IRF1405].
I also have a 12V DC power supply that I use to power both the Arduino and the valve. I have a DC power jack that I connect to the VIN and GND pins of the Arduino. I also have a common ground wire that I connect to the ground wire of the valve and the GND pin of the power supply.
This is the schematic that I have made
the code that I have written to test the valve is just a basic one for now that cycles the pins 12 and 11 from high to low after a delay.
When I upload the code and run it, the valve does not work properly. I have tried using different types of transistors from my kit, such as BC327, 2N2222, 2N3907, and others. But I either get a very low output around 4V instead of 12V, or the transistor won't shut down even though I have a pull-down resistor. I have checked the connections and the power supply, and they seem to be fine. I have also tried swapping the open and close wires, but it did not help.
I do not have to use MOSFETs, I can also use other types of transistors if they are suitable for this project. I have a transistor kit with various values, such as BC327, 2N2222, 2N3907, and others. You can see the photo of my kit below. The Arduino is powered by the same power supply that is usually used for powering the motor.
Can anyone please help me figure out what I am doing wrong and how to fix it? I would really appreciate any advice or suggestions. Thank you very much in advance.