I have l298N motor driver to drive solenoid valve, this driver can change the voltage output based on ENA pin pwm input.
And change the Polarity Output Based On EN1 and EN2 pin (I need two pin arduino to do this)
EN1 HIGH - EN2 LOW = CW
EN1 LOW - EN2 HIGH = CCW
What i need is to change polarity for fast switching based on pwm signal(Only one pin to do this). So I need to build simple transitor circuit to do this.
So when pin 6 is HIGH will generate EN1 HIGH - EN2 LOW.
Otherwise, when pin 6 is LOW will generate EN1 LOW - EN2 HIGH.
I have PNP 2n3906 and NPN 2n2222. Please help me to build/ correct my circuit. Im beginner in electronic circuit, do i need other component? Like resistor or something?
You not read my question, i already have h bridge module, but to control the direction, two input pin is needed.
What i need is only 1 pin to control the direction
If they replaced all those 1k base resistors with 150 ohms, it might even handle some current without cooking
transistors...
Back to the topic: That 3 transistor circuit in the original posting is completely wrong in most respects.
I simply suggest googling "common emitter NOT gate"
Try to figure out all the errors for yourself in that original circuit - every device has the base
wired in a "novel" manner that cannot possibly work, for instance, and every device shown (plus
the Arduino) will be overloaded and damaged.
Can I question why you would want to reverse the voltage on a solenoid valve ?
Are you trying to make it close quicker ? It may not work, in fact it might well just stay open .
“Solenoids are the most important components used in solenoid valves to control the flow of liquids and gases. Solenoids are electromechanical devices that convert AC or DC electrical energy into linear motion. They usually consist of a helical coil wound concentrically around a movable cylinder, called the armature, made from a ferromagnetic material such as iron or steel. Most solenoid valves have a replaceable coil and can be used with coils with different voltages.
When current flows through the coil, it generates a magnetic field inside the coil which attracts the armature towards the center of the solenoid using the same basic principles as ordinary electromagnets. Since the armature is drawn towards the center of the solenoid regardless of the polarity of the current, an opposing force is needed to return the armature into the starting position when the coil is not energized. This is achieved by using a spring mechanism.”
And change the Polarity Output Based On EN1 and EN2 pin (I need two pin arduino to do this)
Then buy a complete H-bridge IC like the SN754410. That only takes one input to swap the polarity. Mind you it will always be on, you need another Arduino input to turn it on.