Electronic – Why does the Tx pin of an USB to TTL adapter provide current

atmegaftdimicrocontrolleruart

I'm currently making a little electronic board on my own. On it, a microcontroller: an ATmega328p running with 5V. To communicate with a computer, I've planned to use an XBee, but for now I'm using simply an adapter TTL <-> USB based on an FTDI FT232RL chip (here).

The problem is, no matter if the power is plugged to my board or not, as soon as I plug this serial adapter to it, a little LED used to display whether my own board is alimented or not lights. After verification, the TX pin of the adapter is guilty: from it flow almost 11 mA.

The problem doesn't seem to come from my home-made electric board, since with an arduino, the same issue occurs. Moreover, the programmer (an USBasp clone) heats a bit, and I have the feeling my serial adapter is responsible…

How can I fix this ? Is this normal ? Couldn't it damage my microcontroller ?

Best Answer

The USB<->TTL_serial adapter is being powered from USB.
One of its main jobs is to drive the TX signal line to whatever state is appropriate for whatever communication is taking place.
If there's no comms happening, the default state for a TTL UART TX line is high (so 3.3V or 5V or whatever the device's supply is).
As a result, you're feeding this 'high' into your other circuit (ATmega, adruino, whatever).
So now what does this other circuit do with this 'high'?
Well most microcontrollery things (and many others too) will have some sort of diode arrangement between their I/O pins and their supply lines - either deliberately as ESD protection, or simply as an unavoidable result of the manufacturing process - something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

So as you can see, if your USB<->TTL_Serial adapter is trying to do its job and apply a 'high' to the micro's I/O pin, due to the micro's internal diodes it will end up trying to supply power to the whole circuit. Some adapters may be more or less tolerant of this state of affairs than others...