On an Arduino Uno, the PWM pin 3 is connected to the gate pin of an N-channel MOSFET STP16NF06L. The source pin is connected to ground of a 12 V power supply and drain pin connected to a multimeter. The other end of the multimeter is connected to the positive terminal of the power supply.

Question: When Arduino varies its PWM output from 0 to 255, the multimeter reading goes from 11.50 V to 12.10 V. Why isn't it 0 to 12 V?

When the FET gate is connected to the Arduino pin that outputs either 0 V or 5 V, the multimeter reading is as expected at 0 V and 12 V respectively.

  • 1
    Because there is no current??????? Check this schematic: Add one side 10kOhm resistor to the +5V, attach multimeter to another. And other end of multimeter to GND. BOOM its ~5V. Why? Because no current! Add all variables to Ohms law – Martynas Feb 24 '15 at 6:27
  • Connecting a load helps! Why is it that when using digitalWrite, the multimeter is able to read 0 or 12V, but not when using PWM with analogWrite? – Nyxynyx Feb 24 '15 at 19:16
  • Briefly: Current makes the voltage to drop. You should read some basic info: en.wikipedia.org/wiki/Voltage_drop or what ever. – Martynas Feb 25 '15 at 8:14

Assuming you have a suitable FET You should have a circuit in line the following. http://elinux.org/RPi_GPIO_Interface_Circuits#Using_a_FET

You should have some kind of load (a multimeter will have too high an impedance). Use a resistor 4.7k or smaller. You should also have a resistor on the gate

| improve this answer | |
  • It works! Whats the reason for using a resistor at the gate? – Nyxynyx Feb 24 '15 at 19:16

When the FET is saturated (pin 3 is high), I would expect the instantaneous voltage to be the full 12 v. When pin 3 is at 0v, there should be no connection across the FET; I would expect the voltage to fluctuate randomly. you might see the same if you measure voltage with nothing touching the probes, especially if the probes move relative to each other.

I'm fairly new to FETs, so I may be on completely the wrong track.

| improve this answer | |

Also put a LED with a resistor connected trough drain, then you read the voltage across the resistor and also have visual feedback with the LED. Resistor should be with 0V when your pin is LOW. It's easier to work with transistor knowing if there is current or not.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.