N-channel Mosfet working opposite to expected

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?

I've linked my circuit info below.

Circuit schematic with meter readings

Physical circuit

IRLZ44N Datasheet

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.

Hi 6v6gt,

You’re quite right, I quickly googled the mosfet code but must have clicked the wrong link.

This is the correct datasheet.

I would have used a BJT but only have a mosfet on hand, Is there a difference in operation? (I know mosfets can generally handle higher currents).

Is there a difference in operation?

Night and day. BJTs are current controlled devices, whereas MOSFETs are voltage controlled.

It would be a good idea to read up on the theories of operation.

This is a typical MOSFET motor control switch:

In your circuit then Jremington, the motor will be on when DIG OUT is low correct?

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.

Thanks J, thats what I thought initially.

In that case, is there somewhere I can place R2 in my circuit where it will read 0V when the gate is LOW, and 5V when the gate is HIGH?

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.

It is much easier to change the logic level in your program, than to build a new circuit.

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?

Hi,
Can you please explain what you are trying to do?

If you are trying to control a servo, why do you think you need to have a MOSFET in the servo signal circuit?

Thanks.. Tom... :slight_smile:

Hi Tom,

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

Hi,
Forget fritzy, hopeless CAD.

A pen and paper is better, you have an infinite array of component outlines and configuration, then post a picture.

The BLDC motor controller does it have a PWM input?

Tom.... :slight_smile:

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.

trojanhawrs:
Hi Tom,

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?

We see to be in xyproblem territory again: http://xyproblem.info

Cheers Tom and Mark,

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.