Would this USB detection circuit work as expected

ftdiusb

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?

UPDATE:

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

enter image description here

or

enter image description here

Would this do the job?

Best Answer

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.