My PC is connected to a MAX232 through a USB-to-serial cable. When everything is powered, there are no issues. However, when I turn off the power, the MAX232's \$V_{cc}\$ has a voltage of -0.5 V (presumably from the -9V input). This scares me because I have several other ICs connected to the same \$V_{cc}\$ rail, and most of them have an absolute minimum supply voltage of -0.3 V in their datasheets.

I'll split this up into several related questions:

  • What is this effect (\$V_{cc}\$ getting powered through an input) called?
  • Is there any information on this in the datasheet that I'm missing?
  • Am I going to damage the rest of my circuit with my current setup?
  • If I want to fix this issue, should I put a diode/resistor between my 5 V rail and the MAX232's \$V_{cc}\$ pin, or is there a better solution?

First off if there is any opportunity to eliminate the USB-to-RS232 cable then do so. This would also allow you to get rid of the MAX232 as well. Instead use an FTDI type USB-to-TTL_Serial cable. You can get these for 5V targets as the TTL-232-5V cable or for 3.3V targets as the TTL-232R-3V3 from http://www.mouser.com. It only takes a simple 1x6 header to connect to your target.

One term used to describe power getting into rails from inputs that are attached to a powered device is "leakage". Unintentional current feeding into powered down electronics through input protection diodes.

Leakage of the type being described can indeed be problematic. The negative bias you are seeing is particularly disturbing. Here are some things that can result from this...

  1. A voltage rail being powered from input leakage can start to turn on circuits inside the powered off chips. This can cause conflict with an external flash programmer which expects the chip pins to appear as 'off'.
  2. Input leakage can find paths through PNPN junction stacks inside an unpowered chip. Even a very small bias can cause the junction stack to act as an SCR and latch into an ON state. Later when the chip is powered up this latch can be maintained and override some normal logic path inside the device leading to faulty behavior until all power is removed from the circuit for a while.
  3. Sometimes the leakage that results from PNPN junction latchup can cause an unintentional forward bias across a power junction on the chip that is normally intended to be reversed biased. When the chip is powered up this can cause excess current to flow in the chip from its VDD to the VSS or GND leading to catastrophic circuit failure.

The best solution for input leakage problems is to isolate the powered inputs from your circuit so that in the powered down situation there are no current paths. This can take several forms including the use of open collector or open drain buffers with pull-up resistors to the powered down side of the circuit. There are also buffer ICs that can be used (look at parts in the 74CBTLVxxx family).

Sometimes a easy out fix for leakage is to put a resistor to GND on the affected voltage rail. This can shunt the current from the input protection diodes to GND and keep the voltage level low enough that it reduces chance for latchup in the affected chips.

In your case putting a diode in the voltage rail of the MAX232 may not be the best idea. This would reduce the operating VCC of a chip that wants to have a healthy rail - particularly because it wants to voltage double and voltage invert that rail. It would be far better to identify the signal lines from the powered up PC that are sitting at a negative level and find a way to prevent them from sinking current out of the MAX232 chip.

You may want to consider looking at some of the newer RS232 level translator chips. There may very well be some that are specifically designed to prevent the problem that you are seeing. Such chip may be TI's MAX3223. When I've used that I never noticed leakage problems into the circuit from a live RS232 connection - but then again I have not specifically characterized its operation either.

  • \$\begingroup\$ Thanks for the very detailed answer - your list of consequences confirms all the IC destruction goodness I was worried about. What magnitude of resistor would I be looking at to shunt VCC to GND? \$\endgroup\$ – Greg d'Eon Feb 17 '15 at 15:24
  • 1
    \$\begingroup\$ I do not recommend the resistor as the correct solution. But if you have your heart set on the easy out idea then you select the resistor value that reduces the leakage voltage to say less than 0.1V. A resistor decade box or resistor wheel are very handy for finding the resistor value that does the job. If you find the resistor value very small you will quickly understand one reason this idea is not the best. During normal operation your power supply has to keep full voltage rail across this resistor. At 100 ohms with 5V that would be an extra 50mA on your supply. \$\endgroup\$ – Michael Karas Feb 17 '15 at 15:32
  • 1
    \$\begingroup\$ I tried the easy out idea with some larger resistors and had was no luck, and I don't really want to put that much extra load on my supply. My heart is now unset. I'll roll the other ideas around in my head for a while. \$\endgroup\$ – Greg d'Eon Feb 17 '15 at 15:37
  • 3
    \$\begingroup\$ Yeah. USB-to-TTL cables are the best. I use them almost exclusively now and completely eliminate the double RS232 level translators. If serial to my device MCU is necessary I build the product with a USB connector instead of the huge DB-9 connector and then just plunk down the FTDI USB to TTL converter chip right into my circuit. \$\endgroup\$ – Michael Karas Feb 17 '15 at 15:37
  • 1
    \$\begingroup\$ I'm going to accept this answer. My hacked-together solution is a relay powered directly from the 5V rail - when the power is on, the serial port is connected, and when it's off, the relay separates them. No -9V reaching my MAX232, no -0.5V on my rail. Woo! \$\endgroup\$ – Greg d'Eon Feb 17 '15 at 20:26

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.