1N4148 Diode for 3V-5V PWM

diodespwm

I have 2 PWM ports, one generates 5V PWM and another at 3V. But only 1 will be generating at a time. However, their output is going to a same wire or pin. So, to avoid the current to pass into each other, I want to put diodes on each port as protection. For this, I would need fast switching diodes as PWM frequency is KHz or few MHz. I searched for fast switching diodes and found 1N4148. It does what I need but its forward voltage is 1V. So, for 3V and 5V, it will blow up ? or am I understanding the datasheet wrong ?

I read in this answer that forward voltage is voltage drop ? so if its voltage drop, whats the max voltage that it can support ? also 3V will come out as 2V, so I will be required to level it up to 3V again, right ?

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

The forward voltage itself is not really the value that you need to worry about - using it in this circuit won't break it as you aren't going to be intentionally dropping large voltages across the diode. In fact it is the power rating of the diode you need to look at.

Why? Well, you will need something at the output to pull it down when both are low - e.g. a resistor.

With the diodes your signal output levels will e reduced - by the forward voltage drop of the diodes. So if you have say a 10k pull down resistor, this would mean when the 3V logic signal is pulsing you will get a 0V low level (pulled down by the resistor) and a 3-Vf=2V high level (sourced through the diode). In this case you would have Id=2/10k=0.2mA flowing through the diode which should be fine for most diodes (it is only ~0.2mW).

For the 5V logic signal you would have a 4V high level output, and in this case there would be 0.4mA flowing through the diode, which again should be fine.

The problem with this is that if the load on the PWM signal is quite highly capacitive then it will switch from high to low quite slowly as you only have the resistor doing the switching. If the PWM signal was driving a large power transistor which would have a fairly high gate capacitance, this slow switching could cause excessive heating in the transistor (but that is a whole other story).

If you want to switch faster you may find you need to reduce the resistor value to increase the speed in which the output is pulled low. When doing this you have to be mindful of the current that flows through the diode and on through the resistor during a logic 1 and hence the power dissipation in the diode (Vf * Id).

Given you have a 3V signal and a 5V signal, what you can do (and I have done in the past) is use a TLL level 2-input OR gate (e.g. 74HCT32). These tend to have high input voltage thresholds (Vih) which are quite low and can thus run at 5V but support a 3V input (e.g. this 74HCT32 has a Vih of 2V on a 5V power supply). By using an OR gate like this you eliminate the issue of voltage dropped across diodes and get a Push-Pull output - the output of the logic gate sources and sinks current, so you don't need the pull down resistor.