Shop OBEX P1 Docs P2 Docs Learn Events
FTDI USB in automotive environment... Loses connection randomly — Parallax Forums

FTDI USB in automotive environment... Loses connection randomly

eagletalontimeagletalontim Posts: 1,399
edited 2013-12-10 12:27 in Propeller 1
I have encountered a strange issue with my Self powered (Running from on board power supply) FTDI setup. I have the Prop talking to a VB program and sending Live data from the circuit to the PC. This all works great except for the random disconnect I get, usually when I am "hammering" on my car. It does not affect anything else, and the circuit continues to run, but the USB connection gets lost completely for some reason. The PC does not even recognize the USB is connected. I have to manually unplug the port and plug it back in to get it to pick up again. I have the circuit wired exactly like the Prop Plug and am using short traces to pretty much everything. Not as short as the Prop plug due to the chip size, but less than 1/2" for the SDA and SCL and less than 3/8" for everything else. I may be able to squeeze them a little closer if needed, but if this is not my issue, I need to figure it out quickly. (I have a deadline on this project now.... New Years day). Maybe I don't have enough power filtering or something? The power filtering is the same as the FTDI RS232R Self Powered Schematic which is located here : http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232R.pdf on page 24

Any ideas on how to fix this? Is self powered in an automotive environment not ideal? Should the FTDI chip be powered by the PC instead?

Comments

  • LawsonLawson Posts: 870
    edited 2013-12-09 23:27
    I've had problems similar to this when one of by PCB's had a noisy power supply. Never did find the exact cause, but I think it was noise screwing up the USB side. The two solutions that helped were pullups on the lines to the FTDI chip, and using a shielded USB cable. (and fixing the noisy supply) It's also a good idea to connect the shell of the usb connector firmly to the PCB ground plane.

    Marty
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-12-09 23:32
    Lawson wrote:
    It's also a good idea to connect the shell of the usb connector firmly to the PCB ground plane.
    No, it's not!!! The shell is connected to the shield, and the shield must be connected at ONLY one end -- the PC end. NEVER ground a shield at both ends; otherwise, you will have ground currents running through the shield, which negates its effectiveness.

    -Phil
  • eagletalontimeagletalontim Posts: 1,399
    edited 2013-12-10 04:29
    The shield is not connected to the ground plane on the circuit side. I also don't have pull-up resistors on the data / clk lines. Is there a recommended pull-up value? 10K? Like I said before, the program continues to work on the Prop, but the USB becomes completely unrecognized by the PC and I have to physically reconnect it. It is almost like the FTDI is reset, but does not fully boot up?
  • T ChapT Chap Posts: 4,223
    edited 2013-12-10 06:14
    Can you post any pics of the setup, schematics? In cases like this, even a simple scope like the Propscope makes looking at noise rather easy, as well as immediately looking at results from adding caps, pullup/down resistors etc.
  • LawsonLawson Posts: 870
    edited 2013-12-10 11:18
    No, it's not!!! The shell is connected to the shield, and the shield must be connected at ONLY one end -- the PC end. NEVER ground a shield at both ends; otherwise, you will have ground currents running through the shield, which negates its effectiveness.

    -Phil

    Phill: this depends on the details of how the circuit and PC are grounded. If he's programming via a battery powered laptop, there is no chance for ground current. In that case, avoiding any offset between circuit ground and PC ground is desirable. For me, this design rule came from one of my pcbs where I placed a ferrite bead between the USB connector shell and ground plane. I had connection and programming problems until I replaced the ferrite bead with a shorting wire. I've also observed that grounding everything everywhere is the best practice when dealing with periodic impulsive noise. (i.e. on my optical bench at work that has a 3.5Kv in ~15nS switch banging away 8,000 times a second.)

    Marty
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-12-10 12:27
    Marty,

    Sorry, but I disagree. The USB cable has a ground return wire, so you don't need to connect the shield at both ends for conductivity. The shield needs to be a static shield, i.e. without currents running through it. If you connect it at both ends, you will have ground return currents running through it shared with the ground return wire, which is bad. Granted, a coax shield is connected at both ends, but shielded cable is not coax.

    Anyway, this is a lesson I've learned the hard way in a factory installation of an RS422 network. I had connected the shield at both ends and kept getting controller resets. Once I disconnected one end, everything worked fine.

    -Phil
Sign In or Register to comment.