2
\$\begingroup\$

I have designed a product (small spectrometer) using FT234XD usb-to-uart bridge and it connects to any mobile phone via USB cable (90mA maximum current). My device acts as USB slave and can connect to any mobile phone which supports OTG. However, we are facing one problem. We are selling our product with lenovo tablet and user won't be able to disconnect the device and charge the tablet regularly.

I came across several links stating that most of the usb hardware in mobile phones and tablets have a mode in which mobile/tablet can act as USB master and still charge itself at the same time. So, we have tried several resistors across ID pin and ground of the usb connector but tablet either charge only or it detects the device.

Finally, I am considering one FT311D chips which may work for us but I am not sure if it will be possible with it. Can anyone help me with this problem? Should we try other things with existing hardware (FT234XD) or try this new FT311D chip?

EDIT:

My Tablet is Lenovo Tab 3 Essential Tablet. I am planning to try FT312D. Good news is that my team ran few software tests and get to know Tab software supports Android usb accessory mode. In this mode, FT312D will be the host and I think I can charge the tab and communicate with it. I think It will work because tab will be in slave mode and can charge itself while communicating with my device and only thing required support of accessory mode in software. Am I correct?

EDIT 2

My device has PIC24E 16-Bit microcontroller. There is no USB Protocol specific firmware in PIC24EP. PIC24EP just communicates with mobile application using string based commands. PIC sends commands over UART and FT234XD converts them to USB. Commands received from Android application is converted to commands over UART and is returned to PIC. So, I think changing USB part of my device doesn't require any change in firmware of my primary microcontroller.

\$\endgroup\$

marked as duplicate by Chris Stratton, Sparky256, Dave Tweed Jan 10 '18 at 20:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • \$\begingroup\$ The possibility of charging while functioning as a USB host is entirely dependent on implementation details of the tablet you are connecting to. Absent those details, this falls under the category of usage-of-consumer-products topics which do not qualify as Engineering questions fitting the mission of this site. External host solutions (aka Android "Accessory Mode") might be an option, but only very specific questions fully supported by engineering details would be on topic here. \$\endgroup\$ – Chris Stratton Jan 7 '18 at 18:11
  • 1
    \$\begingroup\$ My question is regarding FT311D chip from FTDI. So it is not duplicate. \$\endgroup\$ – abhiarora Jan 7 '18 at 18:29
  • \$\begingroup\$ Then you need to remove the first 3/4 of your post, which is only relevant if the tablet is being the host, and is a duplicate of that link. And then you must ask a specific technical question - saying that you are interested in using a chip is not a technical question. \$\endgroup\$ – Chris Stratton Jan 7 '18 at 18:39
  • \$\begingroup\$ Sounds like your shopping for an opinion, as that is all we can give you. Lacking details we cannot say for sure that the FT311D will do the job. I have seen large laptops/desktops do what you say, but they are master host by design, with enough software to do odd things. \$\endgroup\$ – Sparky256 Jan 8 '18 at 4:27
3
\$\begingroup\$

The mode you are looking for is called "Accessory Charging" mode, introduced in USB OTG, and enhanced in Type-C connector as DRP, "Dual-Role-Power" mode.

If the connector is of micro-USB/mini-USB type, the ID pin should be grounded with 100-125k resistor, which indicates "accessory charger mode". Then, if supported by tablet, the tablet will act as host, but will accept VBUS charging (instead of being a source, as normal USB hosts do). People sell cable gender-changers ("OTG charging cable") to perform this function. Again, it works if the accessory charging mode is supported by tablet/phone, and if the Y-cable is done right, which is not always the case.

If the connector is of Type-C, then things are more complicated. A special combination of pull up/down resistors on two CC wires should put the port into a "sinking host" mode, see Table 4-13 for "power role behavioral mode summary". The power role swap can be implemented at Type-C state machine level, or as a part of Power Delivery protocol. See Section 4.5 of Type-C Specifications, for several available modes for PR (Power Role) swap function.

The FT311 is a "host" chip, and is not suitable for devices. And the problem might be on tablet side, as Chris mentioned, not on device side.

\$\endgroup\$
  • \$\begingroup\$ I have tried 120K resistor but tablet is charging only. Will FT311 solve my problem? \$\endgroup\$ – abhiarora Jan 9 '18 at 16:06
  • \$\begingroup\$ Apparently your tablet doesn't understand "accessory charger" mode. If you turn you product into USB host (which will likely to be a challenge, software-wise), the tablet will likely work as slave device and maybe charge itself, but you will need to provide proper charging signature if you want normal charge. Sony has proprietary charger signature, and I don't know if it is compatible with USB data/sync mode. And you will need to re-write all your applications, from host-centric to device-centric. \$\endgroup\$ – Ale..chenski Jan 9 '18 at 18:15
  • \$\begingroup\$ Have you checked FT312D? It has all USB protocol implemented in their IC. \$\endgroup\$ – abhiarora Jan 9 '18 at 19:28
  • \$\begingroup\$ @abhiarora, I repeat: currently you have designed "USB slave device", as you said. The FT311/312 chips are USB hosts. "This is the complete reverse of conventional interconnect" as their white paper says, ftdichip.com/Support/Documents/White_Papers/… The USB serial interface engine is just a low-level transaction protocol, but all link and application layer needs to be "reversed" \$\endgroup\$ – Ale..chenski Jan 9 '18 at 20:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.