PWREN soft start and USB wall adapters for FTDI FT232RL - Page 1
Forum section: electronics / projects

author: rollinguphill
author_rank: Newbie
timestamp: March 23, 2014, 07:27:51 pm
content: Hi all,I've been working on a project that uses a FTDI FT232RL USB -> UART IC to handle communications between my microcontroller and a PC via a USB cable. I'd like to keep my device bus powered under USB specifications, and the FTDI datasheets go into some detail on what is required to do this.FTDI suggests powering the device using a "soft-start" circuit, in which the FTDI chip is powered directly from the USB connector, and enables power to the rest of the device via the PWREN pin turning on a P-Type transistor:http://www.ftdichip.com/Support/Documents/AppNotes/AN_146_USB_Hardware_Design_Guidelines_for_FTDI_ICs.pdfThis works fine, but by design the microcontroller and the rest of the circuit are only powered when it is plugged into a computer with the FTDI driver installed, and it isn't in suspend or sleep mode. This presents a problem when trying to power the device using a USB wall adapter. The FTDI chip is powered, but it doesn't wake up the rest of the device.Is there any way to keep the PWREN functionality (allowing the computer to put the device in sleep or suspend mode and switching off power to the rest of the circuit), while still allowing the device to be powered by a USB wall adapter?I want to do it this way so that I can have an "offline" mode when the device isn't plugged into a computer, and can run some static code instead of receiving commands via USB. One option would be having a switch between "offline" and USB-controlled, which both pulls PWREN low and tells the microcontroller to run the static "offline" code, but I'm wondering if there is a more elegant solution.Thanks,Brian

author: gxti
author_rank: Frequent Contributor
timestamp: March 23, 2014, 09:29:07 pm
content: Some of their newer parts (FT230X) have support for detecting chargers but I don't know how good it is. The idea there is you would enable the switch if either condition is met. I suspect it will have compatibility issues if your goal is to work with any charger as it seems there are as many 'standards' for the negotiation as there are manufacturers.

author: rollinguphill
author_rank: Newbie
timestamp: March 24, 2014, 12:04:55 am
content: Thanks for the input gxti! I went ahead and ordered a breakout board for the FT230X (fromhttps://jim.sh/ftx/) to give it a shot. I have a few AC->USB adapters I'll try out to see if it happens to work off the shelf. If not, maybe I'll just need to give up the sleep/suspend functionality, and pull 5v directly from the connector.Thanks,Brian

author: rollinguphill
author_rank: Newbie
timestamp: March 24, 2014, 03:00:10 am
content: After a little more reading on the FT230X, looks like I found what you were talking about. With the newer series, there is a separate CBUS configuration option called BCD#. I think BCD stands for "battery charging _____", as the FTDI application notes are mainly geared towards enabling a battery charging circuit. With that said though, I think it will do exactly what I need.BCD# gets pulled low whenever the FTDI chip detects it is plugged into a "dedicated USB charger", which in battery charging circuits is usually used to allow for charging at higher currents than allowed by a normal USB host.In my case, I'll still want to run it with the same amperage, but if I hook the BCD line to the same p-type transistor I'm using for switched power, the rest of the device will be powered when:1. Plugged into an enumerated USB host2. Plugged into a "dedicated wall charger"This approach still allows for sleep/suspend to work normally (BCD is floating when the device is plugged into an enumerated host, so it won't pull down during sleep or suspend).Still not sure how the FTDI chip detects if it is plugged into a dedicated charger (the link to that in the appendix is dead), but I'm hopeful.Thanks again! I'll report back once I can test out some chargers, hopefully this could be useful for someone in the future.

author: Gallymimus
author_rank: Regular Contributor
timestamp: March 24, 2014, 04:38:57 am
content: the 230XS and 231XS are good parts. We use them a lot. They are more modern and cost effective that the 232 series chips