Either I'm misunderstanding how the MOSFET works, or theres something wrong in my circuit.
I'm trying to adjust a voltage output with PWM (not to provide power just as a reference) but when I ground the gate I'm getitng full supply voltage at R2, and sending the gate high (3.3V) is giving me 0V at R2.
I've checked the datasheet and I'm pretty certain my gate-drain-source is in the right orientation.
Can anyone explain this? I was sure the transistor is supposed to be OFF when the gate is at 0 volts?
Your circuit diagram doe not show a Mosfet, it shows a standard BJT type transistor. Also, it is not clear what Mosfet you are using. The link marked IRLZ44N points to an IRFZ44N which not a logic level Mosfet.
But, anyway, if D6 is low, the connection marked "Motor Signal" will be high (via 20k) if Q1 is an N channel device.
The MOSFET is on when the voltage applied to the gate (relative to the source) exceeds the gate-source threshold voltage, Vgs(th) by a significant margin (e.g. by 1 V or so). Check the MOSFET data sheet for Vgs(th) values.
A logic level N-MOSFET is typically fully turned on if its gate voltage exceeds roughly 3V.
You are looking for a high side switch, which uses a P-MOSFET or PNP bipolar transistor. The circuit posted in reply #3 is a low side switch. See below. For 5V motor supply, you don't need the bipolar transistor, but you would need a logic level MOSFET.
Anyway, you appear only to be providing a 5 volt, 0.25 mA PWM signal to a servo motor.
You could do that from an Arduino pin without a transistor.
What you have described in your OP is exactly how a N channel mosfet (or npn transistor) would behave in that circuit. When the device is switched on, it pulls the resistor network low, so it is effectively inverting the output of Arduino pin. When the device is off, it allows the resistor network to go high.
If you need to do invert a signal, and you want to do it in hardware, you could directly exchange the bjt transistor in your original circuit for the N channel irlz44n mosfet.
In the OP you mention 3.3volts and 5volts. Where are you deriving the 3.3 volts?
I'm trying to, hypothetically, control a BLDC motor that uses a potentiometer to adjust the speed control signal. The supply is actually 12V, I was just using 5V to prove it worked and reduce the risk of blowing anything up.
I'm using a STM32 board which runs on 3.3V so thats my "HIGH" signal from D6. I should probably take more time finding the right components on these fritzing schematics eh?
I don't know if resistor R2 would be required in the actual circuit, I was just thinking extra protection but I suppose its already through a 10k
jremington:
The MOSFET is on when the voltage applied to the gate (relative to the source) exceeds the gate-source threshold voltage, Vgs(th) by a significant margin (e.g. by 1 V or so).
The significant margin is a factor of 3 or so, not 1V. 1V is the typical variation between devices anyway.
The threshold voltage is when it turns fully off, nothing to do with it being fully on.
jremington:
The MOSFET is on when the voltage applied to the gate (relative to the source) exceeds the gate-source threshold voltage, Vgs(th) by a significant margin (e.g. by 1 V or so). Check the MOSFET data sheet for Vgs(th) values.
A logic level N-MOSFET is typically fully turned on if its gate voltage exceeds roughly 3V.
Typical logic-level MOSFETs are spec'd for 4.5V or more to turn fully on. Some have a lower spec.
I'm trying to, hypothetically, control a BLDC motor that uses a potentiometer to adjust the speed control signal. The supply is actually 12V, I was just using 5V to prove it worked and reduce the risk of blowing anything up.
Then you may need an analog voltage, and thus have to low-pass filter your PWM.
You should provide us with full details of any hardware involved, what is this motor with the potentiometer
control? Datasheet?
The datasheet does not specify a PWM input. You can refer to this thread for the datasheet etc.
I suggested a circuit for another forum member to try which I thought was along the right lines for BLDC motor control, he said it doesnt work and now I want to know why.