FTDI does not shutdown after power off

Thread Starter

fsonnichsen

Joined Jun 6, 2013
47
I have an FT232R on a 3.3V board shared with a PIC microcontroller and a MAX3232 to handle the RS232 function for the latter.
Since I don't have 5V on the board I use the USB/5V from the associated laptop to power the FT232R as in their datasheet.

All this works fine. Except---when I power down the 3.3V board/PIC/UART, the PIC remains in a sort of 2V "half state".
The FT232R is, or course, still connected to the 5V supply of the laptop. This 5V is confined only to the power pins of the FT232R and in no way ported, directly, to the board.
Subsequent investigation shows that the FT232R continues to send 16ms "wake up" pulses to the MAX3232. This is in turn carried to the PIC resulting in incomplete shutdown.

Apparently there is no 'DISABLE" or equivalent for the FT232R. Its #RESET and PWRDN pins are not for that purpose. Obviously I can complicate things, use a coveted PIC pin to control the FT232R, add FET circuits to disconnect the comms pins, and add source code to the PIC--all for lack of a DISABLE function.

But my question is-
1) Does anyone have a similar experience
2) Is there some work around I missed? Programming the FT232R (yuk!)---or some better part for this?

I thought this was a simple task!
thanks all
Fritz
 

Papabravo

Joined Feb 24, 2006
16,118
Words are seriously deficient when it comes to describing a circuit. How do you expect us to help you with phrases like "the PIC remains in a sort of 2V "half state". the meaning of which is, to be charitable, less than precise. A schematic is required for us to have even a snowball's chance in Hades to help you.

EDIT: Yes I have had numerous spooky occurrences in a career that last half a century.
 

Thread Starter

fsonnichsen

Joined Jun 6, 2013
47
Think about an oscilloscope and you would know what I mean- The pins on the 3,3V PIC land at around 2V--but they waiver a bit. You see this a lot with indeterminate states. I think if you have seen the stated problem before it would not merit a schematic but I will include one for you.

thanks
fs
 

Attachments

Thread Starter

fsonnichsen

Joined Jun 6, 2013
47
I just talked to FTDI on this and did some checking in the lab--apparently the 5V power rail of their chip IS carried thru to the outbound links going to the MAX3232. They attribute this to leakage current and concur that I need to make additional contrivances to block it--apparently they do not have their own internal shutdown. So-short of finding another chip I have to add some additional baggage to an already crowded board.
fs
 

Papabravo

Joined Feb 24, 2006
16,118
Think about an oscilloscope and you would know what I mean- The pins on the 3,3V PIC land at around 2V--but they waiver a bit. You see this a lot with indeterminate states. I think if you have seen the stated problem before it would not merit a schematic but I will include one for you.

thanks
fs
On this forum a .jpg file is almost as useless as a screen door on a submarine since all of the necessary details are too small to resolve and there is no zoom capability.
Where is the +5V for the FTDI chip coming from? Is it coming from the RS-232 chip?
 

Thread Starter

fsonnichsen

Joined Jun 6, 2013
47
Yes-which is why I didn't include it originally . I know its quite a problem in this trade and appreciate your patience-- Are you set up for KiCAD?
The FT323R connects to the USB bus with 4 links (GND, 2 comms and a 5V carry-over from the USB device being converted. I think this applies to USB2 and 3 as well. At any rate. This is how USB can provide nominal power to connected devices--but the way the vendor designed the Chip it can power itself with 5V as well, relieving the user, often at 3.3--of that responsibility.
This would be great if the FT232R was isolated from the 5V to the forward side to the MAX3232-but it is not and I was a bit surprised.
I have a few work arounds for this--none too complex- but it is a board change- I had certainly hoped the vendor would have addressed it internal to their chip. They did not. The vendor is the original-"Future Technology Devices Inc". I respect their support and have had little trouble with their ICs. Nonetheless there are some newer vendors out there and was wondering if they addressed this situation.
I probably don't need to get into the problems of a partially "up" state with a processor but this one connects to a short pulse system and if the pulse is "up" too long, a costly LED array gets burned.

Here is the FT232 doc which pretty well describes the 5V routing---but don't get into the weeds looking at this-your help was appreciated-
Fritz

https://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232R.pdf
 

BobaMosfet

Joined Jul 1, 2009
1,773
@fsonnichsen - I've used the FT232RL, and have not had this problem. I copied your image and blew it up with a photoeditor so I could see it. I'm not sure you have it wired correctly (I think one ground-pin is not wired, etc). I wired it in the self-powered configuration, for my uses. However, I'm wondering if you shouldn't be bus-powering it as shown from the data sheet:

1612286736554.png

Here's what I did-

1612288338466.png
 
Last edited:

LesJones

Joined Jan 8, 2017
3,173
This is what I think is happening. The static state of the TX data from the FT232RL chip is a logic high so it will be sitting at +3.3 volts or +5 volts depending on the configuration of the FT232RL. The inputs on the PIC have two protection diodes on each input. One of them has the anode connected to the input and the cathode connected to the + supply pin. The other has the cathode connected to the input pin and the anode connected to the ground pin. The purpose of these diodes is to clamp any input signal so it can't go more negative than about -0.6 volts and more positive than about 0.6 more than the positive supply. I think what is happening is the TX signal (Being at a logic high level.) is powering the PIC via the protection diode whose anode is connected to the input of the pic. I think the solution will be to configure the PIC input pin with weak pull up and connect a diode between the TX pin on the FT232RL and the PIC input with the cathode towards the PIC so that the TX signal can only pull the input towards ground. I suggest using a Schottky diode as it has a lower forward voltage drop. this is because this idea will mean the logic low level seen by the PIC is is one diode forward voltage drop above ground.

Les.
 

Thread Starter

fsonnichsen

Joined Jun 6, 2013
47
Thanks Bob and Les.
Bob--there are a couple things that you mention that I am missing but one relates to the datasheet. Can you tell me the source of your sheet? The one I included above is, I believe, the most current one from the "original" vendor. I note the chapters are off "by 1". But more important-
> you are apparently able to power the FT232R using the on-board supply. My supply is ~3.3V. I note on your diagram it shows 3.3V (as does the pinout matrix) and this is at the "Bleeding Edge" for the device. BUT--in my diagram, very much like yours--it shows 4V. Perhaps the vendor thought better of it later and added the 0.7V as a safety margin. I want to be cautions about trying to power from the 3.3V supply.
> The 1st diagram you supply--more like mine-indeed has a FET switch--but I am pretty sure this is to control power TO the other device from PWREN#. This allows the latter to enter a sort of USB sleep state and wake when comms resume. I don't think PWREN# relates to powering the actual chip. So my FET would have to cut the 5V short before Vcc.
> Can you tell me which ground# I am missing (give the chip physical type as the pinouts vary)? I double checked and I think I am OK here.

Les-your post makes a lot of sense and I think is basically the description of how the PIC is becoming falsely powered. I am trying to decide if I can cobble up a test (Parts are so darned small these days!). If I get there I will let you know.

This all seems to relate back to -- in my opinion remiss--condition where the vendor does not provide a simple "disable" option. It think they are trying to keep things "up" so the system can wake when the USB client wakes--but they forget there are times when we deliberately shut it down!

Thanks again all
Fritz
 

BobaMosfet

Joined Jul 1, 2009
1,773
@fsonnichsen I'm using the original datasheet from FTDI for the FT232RL. You may be using a newer one. I've attached the one I have. I was thinking your pin 18 was not grounded, but I see it now. Can you enlarge your image and post a screenshot for folks? I've increased it to 200% below to help others:
1612305870034.png
 

Attachments

LesJones

Joined Jan 8, 2017
3,173
When I wrote post #8 I remembered that I had this problem some time ago but could not remember the details. Later I remembered. It was when I was writing code to read data from a BMP280 using a PIC12F1840 an send it in the form of ASCII text over a radio link. The board was connected to a PICKT3 for programming and to a PC via a FT232RL. (Rather than via the radio link.) I even found the board and found that I had used a diode (A 1N4148) as I suggested. I do not think it is reasonable to expect the manufacturer to include the option you require.

Les.
 

Thread Starter

fsonnichsen

Joined Jun 6, 2013
47
Sure Bob-here is the enlargement of the IC pins.
Sending CAD drafts is quite a problem these days. I use KiCAD now and it handles most of my nominal needs and is free to other users. I had Altium for a short bit at another company but can't afford it here (around $7000 plus yearly). Years ago we had Orcad. I guess the high end software includes the simulators that help a lot
cheers
fritz
 

Attachments

Thread Starter

fsonnichsen

Joined Jun 6, 2013
47
Les-curious why shutdown would not be a standard feature? When I shut down a board I assume it is quiesced insofar as possible and would think the vendor would consider that to be a default.
In my case the PIC is connected to a transistor/FET setup-this is a pulse generator that drives a 2nd board to an LED array that must stay lit for under a few hundred microseconds for its own safety. In the present state it stops "on" with obvious problems. I can easily fix that but for starters I had assumed my driving circuit quiesced to zero volts when powered down. Whoops! You get a "glitch" in there.
I just converted to serial for now but will examine the FTDI per your suggestion when I get a chance. FTDIs are nice when they work and for "in the lab" there are fewer serial ports every day.

cheers and thanks
Fritz
 

LesJones

Joined Jan 8, 2017
3,173
My understanding of your problem is that you are NOT shutting down the power to the FT232RL. You are removing the power supply to your PIC but the FT232RL is still powered from the unibus so it is still providing an output signal on it's TX line which when no data is being sent from the PC is in a logic high state. It has no way of knowing that you have removed power from something further down the line. If you want the FT232RL to be powered down use a double pole switch. one pole interrupting the power to the from the USB to the FT232RL and the other pole switching the power to the PIC. When I had the problem I just put it down to my lack of foresight in the circuit design. I worked out what the cause of the problem was and came up with a solution. There are probably a few other ways to solve the problem once you have worked out the cause of the problem. I thought the diode and setting an extra bit in the WPU register for the port was an easy solution.

Les.
 
Last edited:

BobaMosfet

Joined Jul 1, 2009
1,773
Sure Bob-here is the enlargement of the IC pins.
Sending CAD drafts is quite a problem these days. I use KiCAD now and it handles most of my nominal needs and is free to other users. I had Altium for a short bit at another company but can't afford it here (around $7000 plus yearly). Years ago we had Orcad. I guess the high end software includes the simulators that help a lot
cheers
fritz
If you want the best schematic/pcb tool available today (IMHO)- and there is a free version, it's DIPTrace. it is _fantastic_ and the company is extremely responsive and helpful. I ended up purchasing the commercial version, because I also recognize that they deserve paid for their effort. Upgrades are far, far less past the free-upgrade period. Hundreds, not thousands- and you are not required to upgrade. Seriously, if it does what you need, no reason to upgrade. If you later choose to upgrade, it's still going to be hundreds, not thousands.

If you can output gerber, do so.
 

BobaMosfet

Joined Jul 1, 2009
1,773
@fsonnichsen - I think you're not understanding how to use the RESET# pin. If you want to shut the FT232RL down, you hold the RESET# pin low. Per the datasheet (self-powered config- which is how you are using it by powering it yourself instead of from USB):

1612362985642.png
 

Thread Starter

fsonnichsen

Joined Jun 6, 2013
47
Bob
Regarding CADs---four score and many jobs ago I had Altium and if you are designing cell phones it is the way to go. But it is extremely expensive-had a large learning curve which I have forgotten!-
I work in small labs of about 5 people and electronics is not our product or full time job--so we say No to Altium. I had been using ExpressPCB which goes a long way in one-off lab devices but no GERBERs etc. So I looked over some surveys and the best I could glean was that the top runners were: Altium, KiCAD, Eagle and Orcad. But this is uncertain given the statistics.
I used Eagle for a while but it wasn't all that facile and Autodesk bought them out. So I went to KiCAD. They are free but the support is really good. They are kept running by a bunch of guys at CERN so the branding is right. I am waiting on release 6 which supposedly cures a lot of inconvenient issues. If it does I will just stick with it because I can give copies of KiCAD to anyone in 1 or more labs which is what I need. If I am still not satisfied then I would certainly look at products like the one you use. Thanks for the tip.
 

Thread Starter

fsonnichsen

Joined Jun 6, 2013
47
Les-you have clearly defined the problem. And yes-I was heading for a switch-but a lot of baggage-I like your diode solution better and need to take a closer look when I have time. I wonder if this whole thing is unique to my case? Seems like it is not much talked about. You guys were great to address it
thanks
fritz
 
Top