Post History
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 fla...
Answer
#5: Post edited
- 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 absorb 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.
- 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.
#4: Post edited
- 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.
- 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 absorb 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.
#3: Post edited
- 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, 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.
- 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.
#2: Post edited
- 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, and it induces a larger LED forward voltage drop of almost 2V. Hence the observed 1.36V.
Another remark: you switch the mosfet with 3.48V, and that seems low. It is generally accepted that 10V is a good value to be certain to fully switch a mosfet ON (admittely, much less is necessary in general). So, I'm not so sure the mosfet is fully on.- 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.
- 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, 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.
#1: Initial revision
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, and it induces a larger LED forward voltage drop of almost 2V. Hence the observed 1.36V. Another remark: you switch the mosfet with 3.48V, and that seems low. It is generally accepted that 10V is a good value to be certain to fully switch a mosfet ON (admittely, much less is necessary in general). So, I'm not so sure the mosfet is fully on. 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.