Electronic – Protecting NPN transistor from negative base-emitter voltage

diodesnpntransistors

I have a circuit that converts 5V RS-232 polarity signals (logical 0 = +5V, logical 1 = -5V) to 3.3V TTL polarity (logical 1 = 3.3V, logical 0 = 0V) using a BC548 transistor.

It forms a NOT gate so that when the RS-232 output is high, it pulls the output low and vice-versa.

For reference, the RS-232 device (a GPS receiver) is transmitting at 9600bps and is connected to a Raspberry Pi's UART.

My circuit looks like this:

However, this configuration results in the transistor seeing a voltage of -5V across the base-emitter junction due to the negative voltage of the RS-232 input. The BC548 has a maximum Vbe of -6V, but I'd like to protect the transistor by minimizing any negative voltages across the base-emitter junction.

After some searching I came across a post on the Raspberry Pi forums that suggests the following circuit to protect the transistor from negative voltage:

I've constructed the circuit and it seems to be successful: the lowest Vbe voltage is around -0.5V. My digital multimeter only updates about 5 times per second and I don't have an oscilloscope to see things more clearly, but it previously showed the lowest Vbe voltage at around -5V.

My questions are this:

  1. Why is the diode placed where it is? If I interpret things correctly, it means that the lowest Vbe would be the same as the diode's forward drop and that there would be a current flow from ground through the resistor R1 into the negative voltage RS-232 pin. Would it not make more sense to place the diode between the RS-232 input and R1, or between R1 and the transistor Q1, so as to block any current flow into the pin?

  2. The schematic says to use a 1N4148 high-speed diode, which I have used. Is there any disadvantage to using a 1N4001 instead of a 1N4148? 9600bps means each bit is about 100us long and the 1N4001 has a typical reverse recovery time of 2us. The 1N4148 has a typical reverse recovery time of 4ns — clearly the 1N4148 is faster at switching but does it really make a difference in this context?

Best Answer

The diode is in the best position, and is of an appropriate type.

It conducts when the input is negative, the same as the transistor base conducting when the input is positive. The 47K resistor is about 1/10 of a normal RS-232 load. One could also block the voltage, but then a -100V spike (ESD say) could break down the 1N4148 and break down the E-B junction, causing irreversible damage.

Also, a 1N4148 is an appropriate diode for this application. It's a "switching diode", low capacitance and fast reverse recovery. A 1N4001 would also likely work okay, at least at slow baud rates. The 200mA rating means that even if a very high voltage were to appear at the input the transistor is fully protected, at least up until the resistor arcs over,.