Q&A

# Confused about the amplitude and shape of output voltage pulse

+2
−0

In the circuit below, I am applying a $3.3Vpp$, $63kHz$, 50% Duty Cycle, PWM input signal at the gate of the mosfet and I am expecting to see a similar waveform with different amplitude at the LED cathode. (I am expecting $3.3V - V_{F,led}$ when the Mosfet is ON or $0V$ when the mosfet is OFF). According to the datasheet, the typical forward voltage of the LED is $V_{F}=1.3V$ for a forward current of around $I_{F}=10 mA$.

The input PWM signal as well as the voltage at the cathode of the LED (or equally the voltage across resitor $R2$ plus the Mosfet's $R_{DSon}$) are shown in the two images below as captured from the oscilloscope.

My question is three-fold:

• As you can see, when the input voltage at the gate is at $3.48 V$, the voltage at the LED's cathode is at $2.52 V$. Why isn't the voltage on the cathode of the LED in this case at $3.43 - 1.3 \approx 2.1V$? I.e, where does that extra $0.5V$ come from?
• Additionally, why is the $V_{cathode}$ at $1.36V$ and not $0V$ when the PWM input is $0V$?
• Lastly, what's the effect that causes $V_{cathode}$ to be a bit wavy and not identical in shape with the input PWM pulse?

Thank you and Merry Christmas.

Why does this post require moderator attention?
Why should this post be closed?

+2
−0

You haven't explicitly stated what is the voltage supply at the anode of the LED, but according to your schematic, it is apparently 3.3V. So, I'll assume this value in what follows.

There is a flaw in you logic:

Whenever the PWM signal is high, the mosfet is conducting (ON state) and the voltage at the cathode of the LED, measured with respect to the ground, should be $3.3 - V_{F, led} = 2V$ (assuming its forward voltage is 1.3 V).

Now, whenever the PWM signal is low, the mosfet is not conducting (OFF state) and the voltage at the cathode of the diode should be, ideally, 3.3 V. Nevertheless, your ammeter (or oscilloscope) has a finite probe impedance of 10 Mega ohm (say), and whenever you measure the voltage at the cathode of the diode, a small current flows through the probe and generate a small forward voltage drop. Furthermore, the mosfet is never entirely off, and a small current flows through the mosfet as well, generating a small forward voltage drop as well. So, in fact, the voltage at the cathode of the diode will be actually measured somewhat below 3.3V.

That means that you are inverting things: whenever the mosfet is off, you see a cathode voltage of 2.52V, that is, a forward voltage drop of about 0.8V due to the 10 M Ohm input impedance of the probe.

Whenever the mosfet is on, you see a cathode voltage of 1.36V, while you should see 2V. But this can explained as follows: if the current flowing through the LED were 10mA as you think, then the resistor would induce a voltage drop of 0.75V, far below the expected 2V. That means that the current flowing through the LED is much bigger than 10mA (actually, it is equal to 1.36/75 = 18mA), and it induces a larger LED forward voltage drop of almost 2V. Hence the observed 1.36V.

Finally, I add that if your aim is to make a switch where the off state is ground, and the on state is Vcc, then a P-chanel mosfet from the above is the normal way to do it. In your circuit, you simply connect and disconnect the diode, but you do that from the bottom, meaning that the cathode voltage remains high. That's OK if that's your aim.

Would you have any explanation on the wavy-ness of the pulses?

That is probably due to the inductance of the resistor + wire, acting together with the capacitance of the mosfet. Recall that a mosfet has usually a relatively large capacitance. When the mosfet switches to the ON state (cathode diode voltage at 1.35V), the current starts to flow in the resistor and the wire, and the underlying RLC network causes a slight oscillation. This oscillation is not too big, but still visible because of the relatively high frequency. Try to switch the mosfet at 1 KHz, and see if the oscillation has disappeared.

On the other hand, I see no oscillation when the mosfet switches to the OFF state (cathode diode voltage at 2.52 V): only a slight voltage ramp that may be due to the inductance of the ground terminal of your oscilloscope probe, or the probe is not well calibrated. Another cause may be a small stray capacitance somewhere near the diode or the resistor. Whenever the mosfet switches to OFF, the capacitance absorbs a part of the voltage, then charges up to 2.52V, hence the ramp. Try to reduce the length of the wires in your circuit, and use planar geometry. Then see if the ramp effect has been reduced.

Why does this post require moderator attention?

Thank you so much, that's very helpful. I confirm that the current is around 18 mA (by connecting an amperometer between R2 and the LED cathode. And I also understand how my logic was inverted, the values really make sense now. My aim is simply to have a controllable LED brightness based on the PWM duty cycle. Not really concerned about the timing of the switch. Would you have any explanation on the wavy-ness of the pulses? Could it be a settling effect due to a large current draw of ~18mA? Georgian‭ 4 months ago

Maybe. But I have to go now. I'll try to answer to this question tomorrow in the evening. Michaël Bensimhoun‭ 4 months ago

+2
−0

Coquelicot's answer explains what is going on, so I won't duplicate that.

However, one of the sources of confusion is that you are looking at the two waveforms in isolation. Your scope obviously has at least two channels, since we can see a unused blue line in each picture.

Use both channels. Set everything up like in the first screen shot, meaning to show and trigger off the input signal. Then put the probe for the second channel on the LED cathode. Now you will see both signals together. The fact that your circuit inverts will be immediately obvious.

mistake on my part, to assume the x-axes would be matched

Yes. The scope is clearly set up to trigger on a rising edge, when it crosses about 2 V. When you look at each trace separately, each signal will be shown aligned to the trigger point at a rising edge. If the signals happen to be inverted (as they are in this case), then the two signals will be shown phase shifted by 180° relative to each other when viewed separately.

When a scope shows multiple traces, they are shown together in time. You choose which signal will be used as the trigger. I suggested using the input signal as the trigger, since it's the cleaner and more obvious signal, and what is causing the other signals. When you do that, you will see the LED cathode voltage go down as the input goes up, and vice versa. This would actually be a good lesson.

Go try it, even though you may already know what you will see. Then you can crank up the time scale and see that the signals are not exactly inverted from each other. When you get to 1 µs/div or less, the delay should be apparent. It would actually be quite educational to see how exactly the LED cathode responds to the input signal at the sub-microsecond level. You will notice some asymmetry in the response too. Think about that for a bit, then come back here and ask another question if you can't figure out what is going on at the detail level.

Why does this post require moderator attention?