1
\$\begingroup\$

I'm trying to wire up my first device using an FTDI USB to Serial converter. FTDI recommends not mixing bus and self powered designs. But they also mention that it's possible in the documentation. My current design will be mostly self powered but will connect to a PC for data dumps and charging (200mA). It will be powered from a single cell LiPo and has some protection circuitry to prevent over discharging.

What I suspect might be a problem is USB suspend mode, which states that if no data is transferred for a set period the USB device should reduce power. Since most of my design operates from 3V, I want the FT230X to interface from this level as well. VBAT is guaranteed to always be 3.3V - 4.2V. Below is what I have so far, the idea was that configuring CBUS3 as a keep_awake that would prevent it from going to sleep (as I understand it), this would cause it to always be active though, even when self powered:

enter image description here

So my question is this, how do I implemented a bus and self powered device that can drain 200mA from the host for charging even when no data is being transferred?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ By working on the proven through experience knowledge that usb power management is mostly an honor system, for the host and peripheral. 90% of hosts provide power without any current limiting at all. And while there isn't any data being sent by the ftdi, there is still usb communication every keepalive polling period. So KISS, don't over engineer. \$\endgroup\$
    – Passerby
    Commented May 6, 2014 at 14:29
  • \$\begingroup\$ @s3c You plan to operate your device with Vcc=3.3V. What did you make of the datasheets guideline that "If VCC is 3V3 then 3V3OUT must also be driven with 3V3 input" (page 9). I don't see that you drive 3V3OUT. \$\endgroup\$
    – Daniel K.
    Commented Jun 14, 2021 at 15:01

1 Answer 1

2
\$\begingroup\$

First you should try to understand USB Suspend. It isn't quite so much "when no data is being transferred", but "when the data lines are idle for an extended period of time". In my experience, the bus only suspends when the PC is suspended. Otherwise, there's almost always some traffic flowing on the bus (e.g. Start of Frame markers etc). Now, there are other types of suspend, but they are generally optional.

So, like Passerby said, you really don't have to worry about not going into suspend mode. There's always 5V on VBus when the computer is suspended - otherwise, remote wake up would not be possible - and most host controllers don't really enforce the Suspend current restrictions. If they did enforce the current restrictions, someone's not-quite-good-enough device might work on one host controller but not another, and the consumer is likely to blame the computer/host controller for not working with a bad device, rather than blaming the manufacturer of the bad device.

With that out of the way, the next step you will probably need is something like an auto-switching power mux. TI has an excellent selection of muxes that will automatically switch between two voltages sources, depending on which are available. The keyword here is that you don't want self powered or bus powered, you want dual power. In a dual-power role, these muxes will prefer self power, and only switch over to bus power when there is no self power, and they are able to indicate to the MCU which power source is in use right now. I haven't used any but I think some are also designed to work with batteries.

http://www.ti.com/lsds/ti/power-management/power-multiplexer-mux-products.page

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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