What I am trying to achieve is detect from MCU, whenever FTDI(FT232R) chip is connected to USB(not enumerated, just powered up from USB).

enter image description here enter image description here

  • When ONLY USB is connected, MCU will get his power supply from +5V bus and will detect on (B) pin that USB is connected.

  • When ONLY VR will supply power to circuit, then MCU again will get power from +5V bus, but FTDI will ONLY get VCCIO. On middle of voltage divider R10/R11 I expect there will be 0 and MCU will not detect USB connection on (B).

The question is - would it work the way I described or I missed something? My concern is it ok to hook up only VCCIO to FTDI? Would it damage or lead to unknown behavior?


I have slightly modified circuit, so VCC is connected to VCCIO.

enter image description here


enter image description here

Would this do the job?

  • 2
    \$\begingroup\$ Link to data sheet would have distracted me from my core task and persuaded me to look at FTDI data :-). But instead I'm off outside to do some sun related measurements. Encouraging me, and others, with data sheet links, is a good idea [tm]. \$\endgroup\$ – Russell McMahon Feb 12 '13 at 1:46

Your original system was uncertain as the data sheet does not provide enough information. I'd guesstimate that it would probably work but this is not ceryain.

Your second method, with FTDI Vcc and VccIO both being operated from +5V has more chance of success. A possible issue is that the =%V line will now be one Schottky diode drop below Vbus but U4 is connected directly to D+ and D-. I do not know what level D+ and D- reach when at their maximum positive value but if they reach VBUS then the IC has SLIGHT voltage above Vcc applied to pins 15 & 16. I would expect that this would probably not cause problems as the IC is intended to operate "robustly" in an interface environment where "such things happen" but it may be worth keeping in mind if strange things happen subsequently. This may be covered in the data sheet - an exercise for the student :-).

Stop Press: I just checked data sheet - the two USB data interface lines are nominal 3.3V level signals so the above is a non issue. I'll leave it here as it covers something which can occur in this sort of situation so is instructional.

  • \$\begingroup\$ I just checked with FTDI and they said FT232 should be fully powered, which means first attempt is definitely not going to work. The Schottky diodes have max 0.3V voltage drop @ 1A. \$\endgroup\$ – Pablo Feb 13 '13 at 10:49
  • \$\begingroup\$ This schematics in real life PCB appears to be reliable in detecting USB connection. \$\endgroup\$ – Pablo Mar 1 '13 at 16:51

The FTDI datasheet has a number of examples of supply configurations. You should look closely at them for ideas. Most reasonable configurations are listed there. Your configuration may work, but I'd be very very careful testing it.

What precisely you're trying to do, I don't fully understand. It seems that you want to power the FTDI only through USB. This is fine, but as you've noted in the comment you should not power VCCIO without VCC. This is the case with most chips, usually. The solution depends on what exactly you're trying to optimise for.

If the consumption of the FTDI when USB isn't around is a problem, then you would want to turn it off. However, turning off the FTDI when it's hooked to the uC lines directly is not a great idea. I have done this, but it requires ensuring that the uC pins are configured as input and tristated with no pull up. You can have the FTDI turned off and the uC on more safely by using a level translating buffer like the SN74LVC1T45. A resistor between +5USB and ground, in your case provided by the resistor network on reset, will disable the buffer when the USB is disconnected. I have done this also, and it works like a charm. Detecting this (your pin B) is going to slightly more complicated, though.

The resistor network on reset is a good way to go, and to be honest, is probably your best bet if consumption is not your demon. This would be a self powered configuration, and would power your FTDI using the uC supply. The reset resistor divider still uses +5USB, but nothing else does. In the absence of a USB connection, the device is held in reset and consumes very low power. This is really enough for most applications. It makes detection of the USB power also possible using your reset resistor divider as you included in your schematic, which is safe. Since everything is powered up. You should avoid plugging in USB when the uC is turned off, though, or atleast ensure the series resistor is high enough to avoid powering the uC through your USB detection line.


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.