Hi,
I am looking to build a solenoid driver circuit that will be able to work both with Arduino 5V digital pin out and with synthesizer GATE signals (usually between 5V and 10V)
I have look around this forum and have seen that people are saying that the IRF540 is not a logic level MOSFET and therefore will not work with arduino.
If I understand the way MOSFET working - when a Gate signal that is higher then the 'Gate Threshold Voltage' specify in the Datasheet, the gate should open the path for electron to flow from drain to source.
at the IRF540 Datasheet it written that the 'Gate Threshold Voltage' is min 2.0V and max 4.0V . Why a 5v signals from arduino (or other source) will not work?
how is my circuit below to drive solenoid between 9V to 12V up to 1A
That is incorrect. The gate threshold voltage is the voltage at which the MOSFET turns off, not on.
The specification that tells you the voltage that the MOSFET will turn on is contained in the Rds(on) spec. In the IRF540 data sheet, look at the Rds(on) spec and see what voltage that Rds(on) is specified. In this case it is 10V. A logic level MOSFET will be specified at 5V or lower. The graphs in the data sheet will show how the MOSFET will conduct with various other gate voltages.
Your gate resistor (10K) is way too high. That resistor is there to limit the current that flows into the gate capacitance when the MOSFET is turned on. The MOSFET should be turrned on as quickly as possible to limit the time that the MOSFET is in the linear region.* It has been debated if the resistor is actually needed. I use a 180Ω (5V processor) just to be on the safe side.
*The MOSFET acts like a resistor while in the linear region. The longer in the linear region, the more power that the MOSFET will dissipate as heat.
The Gate Threshold Voltage is the voltage at which the device conducts only a small current, not enough to be useful for switching high current devices.
To conduct a useful amount of current, the gate voltage must be considerably higher than the threshold voltage.
Why a 5v signals from arduino (or other source) will not work?
They usually will, but not enough to switch a high current solenoid or motor.
So when 0V is applied the MOSFET is ON and when a voltage above the Vgs is applied the MOSFET is off? so Why to pull the MOSFET gate to ground? like that it will be alway ON when no signal is apply at the Gate?
No. When 0V is applied the MOSFET is off, of course. Look at it from 10V gate voltage where the MOSFET is fully on. As the voltage falls the MOSFET starts to turn off. As the gate voltage decreases, the resistance across the MOSFET increases until at the gate threshold voltage the resistance is so high that the MOSFET is considered off.
We pull the gate low because without the 10K to ground the gate is floating. Like the Arduino input, a floating gate will respond to stray electric fields and its state will be indeterminate. The pulldown puts the gate in a known state.
10k - but really no lower might work given that said optocoupler has a minimum CTR 0f 50% (suggesting it is a near-obsolete part), The optocoupler loses gain.
I'm not sure actually - maybe a faulty in the solenoid powered supply? I've seen people use it when driving loads with synthesizer signals to protect the synth if something goes wrong