| FORUM

FEDEVEL
Platform forum

PC does not recognize the USB serial port after some days

A_neves , 08-22-2019, 05:50 AM
Hi everyone,

I developed a board that uses a FT2232D DUAL USB TO SERIAL UART to communicate with a Ubuntu PC.
The thing is, after some days, for example 1 or 2 weeks, the PC can not recognize the USB Serial Converter. To solve this I need to shutdown all the system for 5 seconds and power on again.
It is not easy to make debug, because this problem can take 2 days or 2 week to show up.
I am thinking if the problem could be about my PCB design. I am using 115200 Baudrate.
Could someone have a look on my schematic and layout?

Thank you!
robertferanec , 08-23-2019, 06:21 AM
If you need to turn off board and wait some time to discharge everything, the problem (or one of the problems) what you may have on the board is improper board initialization (e.g. reset, power sequencing, not working crystals, etc ...)

Notice, they have 4.7k pull up and 10k pull down on reset# signal. In your schematic, you only use 10k pull up - this could be one of the problems you are experiencing (your reset will stay high for some time until board is discharged).

PS: USB layout is also not ideal, but that would probably cause "only" connecting/disconnecting the device and not freezing it. USB signals are differential pair signals and ideally you would like to be routed them together, without stubs + they should follow 90OHM diff pair impedance (or keep them as short as possible if you use 2 layer PCB)
A_neves , 08-23-2019, 07:17 AM
Hi Robert,

Thanks for your answer.
Yes, after this problems I notice that my schematic it is different.
But the stranger thing is why the FTDI stays working some days, and for some reason fails? Could it be some floating on VCC at 10k pull up resistor?
I made that layout because I do not use reset pin on FTDI.
This system it is mounted on top of one fridge. I notice that the PC display blinks every time that the fridge motor starts, to cool-down the temperature.
I do not know if the power supply at my PCB adapter have some problem because of ​fridge motor current needs.

Thank you!
robertferanec , 08-26-2019, 07:50 AM
But the stranger thing is why the FTDI stays working some days, and for some reason fails?
- so, you are using the board everything is running fine and then suddenly after days of weeks it crashes or freezes or reboot (what exactly is happening)?

This is why I said "or one of the problems". The resistor may only solve the waiting problem (when you need to wait 5 seconds and then switch it on again). Crashing / Freezing / Rebooting is caused by different problems in design and these may be for example layout issue, EMC problem, crosstalk problem, power problem (noise, decoupling, filtering, ....), .... that is very hard to say.

PS: Fridge is the worse - it can generate pulses on Main and these pulses can cause interruption of devices (same is happening on my monitor - black out every time our freezer switch on/off). Still if your board would be well designed, it should survive the pulses - easy to test, move your board to different room (if possible) and you will see. But I suspect, the problem may be somewhere else - e.g. I would maybe try to filter the input power (maybe use and inductor or / and capacitor filter, possibly ferrite on usb cable, etc)

PS: Also I have seen many problems when grounds were connected through different mains (e.g. if you PC and your other device are connected in different main plugs, but these problems are usually much more visible, not just once a while).
A_neves , 08-26-2019, 08:41 AM
Originally posted by robertferanec
- so, you are using the board everything is running fine and then suddenly after days of weeks it crashes or freezes or reboot (what exactly is happening)?
Crashes, because the PC can not mount the Serial COM, but can see that there is anything at USB line, but can not mount.

I have 3 more systems like this, but only on at one that problem appears. I replaced my board, PC, USB cable, Power adapter and I am having the same problem.

The fridge is a really big problem. I measured the AC line and every time the motor Switch on/off changes the VPP to a lower value.
I am using a ferrite on USB cable, but I am getting the same problem.

I made a test. If I switch off my board, with all big capacitors and capacitors of power adapter, my board remains, near 2 seconds, working. But If I power on my board again with a delay near this 2 seconds after switch off, my PC can not recognize the USB Serial Converter.
I am using Net-ties to connect grounds, because I have another circuit to control 12V solenoids. But I soldered a jumper o have a better connection between grounds and the problem remains.

​Thank you Robert!
robertferanec , 08-26-2019, 09:04 AM
Crashes, because the PC can not mount the Serial COM, but can see that there is anything at USB line, but can not mount.
- so your board is occasionally disconnecting from your PC and does not connect back (stays like unrecognized device)?

If I switch off my board, with all big capacitors and capacitors of power adapter, my board remains, near 2 seconds, working. But If I power on my board again with a delay near this 2 seconds after switch off, my PC can not recognize the USB Serial Converter.
- this looks like the reset problem what can be fixed by the additional resistor (or possibly also + a discharge diode). Simply probe your reset signal and check what happens when you switch off the board. I suspect, the reset signal will not go into 0 so if you re-connect the power quickly, it will not reset the chip.
A_neves , 08-26-2019, 09:27 AM
Originally posted by robertferanec
- so your board is occasionally disconnecting from your PC and does not connect back (stays like unrecognized device)?
Yes Robert, this is what is happening.

​
Originally posted by robertferanec
this looks like the reset problem what can be fixed by the additional resistor (or possibly also + a discharge diode). Simply probe your reset signal and check what happens when you switch off the board. I suspect, the reset signal will not go into 0 so if you re-connect the power quickly, it will not reset the chip.
I tried using a wire jumper to force FTDI reset and the PC gets a USB disconnection. But after I release this jumper, the PC see something in USB line but still can not recognize the FTDI Serial converter.
A_neves , 08-27-2019, 08:52 AM
Originally posted by robertferanec

- this looks like the reset problem what can be fixed by the additional resistor (or possibly also + a discharge diode).
Robert, are you talking about using discharge diode on reset pin, or on +5V Vcc output?

Thank you!
robertferanec , 08-28-2019, 04:48 AM
discharge diode on reset pin, or on +5V Vcc output?
- reset pin. Have a look how we are doing it on 28pins: https://www.28pins.com/wp-content/up...matic-Page.pdf

"your board is occasionally disconnecting from your PC and does not connect back (stays like unrecognized device)" - Yes Robert, this is what is happening.
- this can be anything. As I described above "Crashing / Freezing / Rebooting is caused by different problems in design and these may be for example layout issue, EMC problem, crosstalk problem, power problem (noise, decoupling, filtering, ....), long / bad cable .... that is very hard to say."

I tried using a wire jumper to force FTDI reset and the PC gets a USB disconnection. But after I release this jumper, the PC see something in USB line but still can not recognize the FTDI Serial converter.
- interesting. After proper reset I would expect the device come up properly. I would probably try their original development board if that works properly.
A_neves , 08-28-2019, 05:14 AM
Originally posted by robertferanec
- reset pin. Have a look how we are doing it on 28pins: https://www.28pins.com/wp-content/up...matic-Page.pdf
Ok, I will have a look.


Originally posted by robertferanec
- this can be anything. As I described above "Crashing / Freezing / Rebooting is caused by different problems in design and these may be for example layout issue, EMC problem, crosstalk problem, power problem (noise, decoupling, filtering, ....), long / bad cable .... that is very hard to say."
I am using a USB cable with 1.5 m. This cable is next to 230VAC power supply and 5 USB Cameras. The only thing that stops working is my PCB.
I made some changes to produce a new test PCB. I add a few 0 ohm resistors to test.
I will try to power the FTDI from USB connector, test the reset conection from FTDI design guide. Also I am trying to have the FTDI more close to USB connector

Originally posted by robertferanec
- interesting. After proper reset I would expect the device come up properly. I would probably try their original development board if that works properly.
I have a breakout board with another FTDI model. I will make some tests to see if I am losing the connection too.

Could you have a look on my new design?

Thank you Robert!
Paul van Avesaath , 08-28-2019, 05:23 AM
' I have 3 more systems like this, but only on at one that problem appears. I replaced my board, PC, USB cable, Power adapter and I am having the same problem. ''

did you swap your FTDI board? it looks to me that that pcb might just have some issues.. i don know if it is easy to replace, but if 3 other system do not show this issue.. i would suspect the board itself..

also you can add a line filter in your power connection for the fridge.. that can reduce the noise on your ac. those transients can be pretty anoying on components.. some times adding a ferride coil on you power connections can be enough to stabalize this power.. but i dont know how bad it is..
A_neves , 08-28-2019, 05:34 AM
Originally posted by Paul van Avesaath
''
did you swap your FTDI board? it looks to me that that pcb might just have some issues.. i don know if it is easy to replace, but if 3 other system do not show this issue.. i would suspect the board itself..
Yes Paul, I did. I am getting the same problem with another "copy" of my board.

Originally posted by Paul van Avesaath
''
also you can add a line filter in your power connection for the fridge.. that can reduce the noise on your ac. those transients can be pretty anoying on components.. some times adding a ferride coil on you power connections can be enough to stabalize this power.. but i dont know how bad it is..
I am using a ferrite on FTDI VCC. Or are you talking about ferrite coil on Power cable?

Thank you Paul!
Paul van Avesaath , 08-28-2019, 05:46 AM
i mean putting a choke coil on your power and or data cable.


also is there any mayor difference in location of your board then with the other setups? is the board that is going wrong working correctly on other locations?
A_neves , 08-28-2019, 06:51 AM
Originally posted by Paul van Avesaath

also is there any mayor difference in location of your board then with the other setups? is the board that is going wrong working correctly on other locations?
The difference is a plastic hood that covers all the system. The only heat source is the PC power supply.
Yes, if move the board to another locations works with no problem. But there are more space between board and other peripherals like PC and AC supply.
robertferanec , 08-28-2019, 07:23 AM
If any of your same boards close to the fridge is crashing, then the design is too sensitive ... or the fridge is too noisy. Play with filtering as @Paul van Avesaath suggested (and as I suggested e.g. add LC filter after the USB connector). You may need to figure out if problem is caused by noise on power (filter the power) or noise on data (e.g. try very short cable) or by something else.
A_neves , 08-28-2019, 07:54 AM
Originally posted by robertferanec
Play with filtering as @Paul van Avesaath suggested (and as I suggested e.g. add LC filter after the USB connector).
At this moment I do not use the +V_USB to supply FTDI. Do you have an example of LC filter on USB data?

Originally posted by robertferanec
You may need to figure out if problem is caused by noise on power (filter the power) or noise on data (e.g. try very short cable) or by something else.
Ok, I am gonna test a short cable with ferrite and see if I am getting the problem again.

Thank you Robert!
robertferanec , 08-28-2019, 08:03 AM
At this moment I do not use the +V_USB to supply FTDI.
- ah, that is not visible from the schematic. So how do you power it up - separate adapter? Is it a switching power adapter or with transformer? That is important.

PS: there is no LC filter on USB data
A_neves , 08-28-2019, 08:15 AM
Originally posted by robertferanec
- ah, that is not visible from the schematic. So how do you power it up - separate adapter? Is it a switching power adapter or with transformer? That is important.
I did not solder the fuse on +VUSB.
I am using a DC/DC (PTH08T261W) to convert 12VDC from transformer to 5VDC.
I am also controlling a 12VDC solenoid. This is the schematic of this connections


Originally posted by robertferanec
PS: there is no LC filter on USB data
Do you think this could be a good example?



robertferanec , 08-29-2019, 04:51 AM
I would try to solve the reset problem first - that may improve situation (even if there is "bad event", once the reset is fixed, your board should recover and connect back - should not stay stuck). Then I would focus on filtering - maybe trying to find the path how noise is coming into the board.

PS: Problem could be also with the USB on PC (or in the board which is connected to your board).
PSS: Measure all the voltages - from reset through power on the chip pins of your board. Be sure all the values are within tolerance (as defined in datasheets).
A_neves , 08-29-2019, 07:34 AM
Ok Robert, I will do that.

Another doubt that I have, do you think that the ferrite connected between D+, D- ESD varistors and GND could give me some problems?
On your 28 pins project You do not have that component, but on arduino uno schematic they put the ferrite on there.

Thank you!
Paul van Avesaath , 08-29-2019, 07:52 AM
why would you add esd varistors? i would go with tvs diodes in this case.. also no bead to gnd..
A_neves , 08-29-2019, 08:20 AM
Originally posted by Paul van Avesaath
why would you add esd varistors? i would go with tvs diodes in this case.. also no bead to gnd..
I want to have ESD protection on my circuit. So I based on arduino schematic.
I also read that varistors are more flexible, because can support more discharge voltage and do not have working voltage rate. The cons is the price.
Is this information wrong?

Thank you!
Paul van Avesaath , 08-29-2019, 11:50 PM
no not wrong, but the diode is like an industry standard.. but i have never seen a bead in series like this.. I would suggest to replace that with a 0 Ohm resistor . but maybe someone else can figure out a reason why it should be in there..
A_neves , 08-30-2019, 04:42 AM
Originally posted by Paul van Avesaath
no not wrong, but the diode is like an industry standard.. but i have never seen a bead in series like this.. I would suggest to replace that with a 0 Ohm resistor . but maybe someone else can figure out a reason why it should be in there..
Ok, I will test with 0 ohm resistor.
Yes, it is strange. I based on arduino uno schematics because it is a very used board.
But I want to know why @robertferanec did not use ferrite on 28 pins project like arduino uno. He should have a good reason.
robertferanec , 09-01-2019, 11:42 AM
"do you think that the ferrite connected between D+, D- ESD varistors and GND could give me some problems"
- once we have connected ferrite between analogue and digital ground and it caused a lot of problems. ESD was not discharging through the ferrite, but through the chip instead (and ESD always damaged the chip). I am not saying it would be the same in this case, but I normally do not see ferrite on ESD protection.

I normally use what is in the reference schematic and I assume they tested the boards (some boards use varistors, some use ESD diodes). However, as @Paul van Avesaath is saying, in most cases I go for ESD diodes (or special chips with ESD diodes which specifically say they can protect the interface I need)
A_neves , 09-03-2019, 07:27 AM
@robertferanec I saw this post: https://electronics.stackexchange.co...ut/15143#15143
Since I do your Learn Altium Essentials, I use a plane for GND and VCC and use vias to connect decoupling capacitors to have strong connections to the planes.
But this post says that this practice could bring EMI problems.
What do you think about what he says? Could this be a source of noise that makes my FTDI stop working properly?

​Thank you!
robertferanec , 09-03-2019, 09:01 AM
What exactly you are worried about? Please, could you be more specific?

PS: Placement and routing of the decoupling capacitors on the pictures from stackexchange question could be better. Also, the tracks are long and VIAs are not placed in best positions.

PSS: Maybe your layout is not perfect (I could immediately see it based on USB tracks), but it is hard to tell from the pictures what could be done better. However, from screenshots of your layout, I believe you are using at least 4 layers and one is solid GND - that could help a lot. And yes, bad layout can cause freezing and crashing and resetting - but it's not only about layout, but also about schematic (e.g. correct filtering), it can be about enclosure, grounding, other devices and cables connected to your board - it may be about the whole system what you have connected together.
A_neves , 09-03-2019, 10:04 AM
Originally posted by robertferanec
What exactly you are worried about? Please, could you be more specific?
Something like this picture. When we place a via on +Vcc and GND.


Originally posted by robertferanec
PSS: Maybe your layout is not perfect (I could immediately see it based on USB tracks), but it is hard to tell from the pictures what could be done better. However, from screenshots of your layout, I believe you are using at least 4 layers and one is solid GND - that could help a lot. And yes, bad layout can cause freezing and crashing and resetting - but it's not only about layout, but also about schematic (e.g. correct filtering), it can be about enclosure, grounding, other devices and cables connected to your board - it may be about the whole system what you have connected together.
Yes, I am using 4 layers. I am using Kicad to design the board. I can send you an email with the project if you could have a look more precisely.

Thank you Robert!
anovickis , 09-03-2019, 12:25 PM
Every commercial USB to serial dongle I've ever used on any computer has this problem. It requires an occasional reset by power cycle

However, I'm pretty sure the problem is actually partially in the windows usb stack

for example when I get a device in a state it's not being enumerated - I can usually load a VMWARE VM instance and connect the device to that, release, and then it's OK
but not always!








robertferanec , 09-05-2019, 09:03 AM
"Something like this picture. When we place a via on +Vcc and GND."
- I don't think that will cause problems in your design.
A_neves , 09-05-2019, 09:14 AM
Originally posted by robertferanec
- I don't think that will cause problems in your design.
To me, an all plane to current supply seems to be the best solution. I think that on this way we make a strong connection. But on that post, seems to be the opposite.
​But @robertferanec, do you think that place vias next to +VCC and GND decoupling capacitors is the best way to connect them?
I am testing my board with 2 ferrite core on USB cable and 2 on my AC / DC External Plug In Adaptor 12V and seems to be ok now.

Thank you!
robertferanec , 09-08-2019, 09:52 AM
do you think that place vias next to +VCC and GND decoupling capacitors is the best way to connect them?
- in very high density designs, I place VIAs where the space is and everything is working ok. Of course there are better and worse ways to place VIAs to connect decoupling capacitors, but I do not think in your board as you have it on the picture you need to worry about that.

I am testing my board with 2 ferrite core on USB cable and 2 on my AC / DC External Plug In Adaptor 12V and seems to be ok now.
- That is a great news!
A_neves , 09-18-2019, 09:00 AM
@robertferanec I am testing a new design of PCB. At this moment the system never lost the connection even without the ferrite coil on USB cable and power adapter.
Do you think that the new design could make all the difference?

Thank you!
robertferanec , 09-18-2019, 11:40 AM
Yes, good layout makes big difference in reliability. But keep testing.
PS: I see, that you improved USB layout.
A_neves , 09-19-2019, 04:56 AM
@robertferanec yes, I am testing. But the problem is I need to produce very soon 30 PCBs and I do not know until when I should test to assume the problem was solved.

Thank You!
A_neves , 11-15-2019, 02:57 AM
@robertferanec the problem shows up again.
I am working with solenoids to open a door. To activate the solenoids I am using a mosfet with a flyback diode to protect my circuit.
I am using a 230AC to 12DC power supply to supply my circuit. Could be some noise on my power that change my GND reference?

Thank You!
ypkdani , 11-15-2019, 03:09 AM
Hello,

why did you put varistors for protect the USB? For usb you need to use ESD diodes because they have capacitance of 10-50pF instead 100-1000pF. Could be that components that degrade the signals?
A_neves , 11-15-2019, 05:42 AM
Hello @ypkdani ,

At the beginning I used varistors because I followed arduino uno schematic.
Now I am using TVS diodes (PGB1010603NRHF) and a 47pF capacitors on D+ and D-.
I thought that the problem was solved. But yesterday, my office had a building works and the lights start to blink for a while. The air conditioner also stopped, started, stopped and started for a few seconds.
This make my circuit have this failure, even with an UPS on AC to 12VDC power adapter and the PC.

So I am thinking that the problem could be on my supply.
I am also using ferrites cores on USB cable and my AC to 12VDC power supply.

Thank you!
robertferanec , 11-15-2019, 12:23 PM
230V is not may area, but if you are turning it on / off that can generate peaks which could disturb some circuits. I forgot, is your circuit powered through a real transformer (galvanic separated) or is it powered through a switching power supply (which is not galvanic separated from main power). That could maybe help a little bit - at least I would try it. Also, is it in metal box, are you using EARTH / CHASSIS ground, etc .... all this can have influence.
A_neves , 11-16-2019, 07:40 AM
@robertferanec this is the power adapter that I am using:


On my 12VDC input connector, I am using a mosfet PNP to not allow inverce polaraty voltage.
After that, I am using some capacitors to have sure that when I activate my 12VDC solenoid through a mosfet, I do not have a voltage drop.
Next point after this capacitors is 12VDC to supply solenoids and 12VDC to supply DC/DC to 5VDC that supply the digital circuit (microcontroller, FT2232D and sensors).
I am also using 2 long cables that supply a 5VDC sensor and a uart cable. This cables are shielded and cross wired and have 330 cm.
Could this also give also a problem?

Thank you!
robertferanec , 11-16-2019, 07:45 AM
this is the power adapter that I am using:
http://www.farnell.com/datasheets/25...YaAuUiEALw_wcB
Try to measure if GND on the power output is connected with EARTH pin of the input. I guess, it is. Maybe what you could try is find a real transformer power supply (no direct connection between input / output). I have seen some cases when that helped.
A_neves , 11-16-2019, 08:27 AM
Try to measure if GND on the power output is connected with EARTH pin of the input.
Should not have this connection between EARTH and GND? Could you talk a little more why is this a problem?
How can I have sure that there is no connection between them when searching on farnell or digikey?

I am realy woried about that, because the PC and cameras on the PC stil working with no any problem, only on my board.

Thank you!
robertferanec , 11-18-2019, 08:48 AM
Should not have this connection between EARTH and GND? Could you talk a little more why is this a problem?
- in some cases using transformer helps (separating your circuit galavanically from main power helps) because it prevents flowing currents and transferring noises through grounds between your device and Mains. Basically, this is what happen:

This is very simple explanation (doesn't include situations when you need to ground enclosure):


Option 1)
o--------- SWITCHING POWER SUPPLY ---------o Your circuit connected to MAIN ground
230V
o-------------------------------------------------------------o Your circuit connected to MAIN ground


Option 2)
o--------- TRANSFORMER ---------o Your circuit separated from MAIN
230V
o--------- TRANSFORMER ---------o Your circuit separated from MAIN

How can I have sure that there is no connection between them when searching on farnell or digikey?
- I am not sure, they should probably say that (also, they are usually bigger than switching power supplies for same rating)

But it is only something what I would test, I am not sure if that will solve the problem.




A_neves , 11-27-2019, 05:44 AM
Hello all,

I made some tests. The GND output of my 230 VAC to 12VDC Power Supply it is not connected to EARTH pin of the input.
I am using nettie to connect all the GNDs (GND of my AC/DC power supply and GND of digital circuit). When I measuring it, I find out that there is some noise and I think that when there other machines on AC line induces fluctuations on my GNDs.
How could I filter the output of my AC/DC power supply properly and limit the current to prevent a peak when a solenoid is activated?

I am also thinking to use optocouplers on my 2 UART lines and supply the FT2232D from VUSB to use independent supply sources.
What kind of optocouplers could I use?

Thank you!
robertferanec , 11-28-2019, 02:37 AM
The GND output of my 230 VAC to 12VDC Power Supply it is not connected to EARTH pin of the input.
Hmm, interesting. All this kind of power supplies usually have it connected together.

I do not know how to help more.
A_neves , 11-28-2019, 02:48 AM
@robertferanec do you think that using optocouplers on UART line to isolate the FT2232D circuit could be a good solution?

I think that I am not properly filter the noise coming from my GST60A12-P1J power suply.
robertferanec , 12-02-2019, 02:02 AM
It is very hard to answer your question without seeing and measuring your whole system. Also, as I said, 230V topic is not my area, so I am not sure what exactly the problem is and what could solve it. But I would probably try a different adapter - a transformer adapter.
Use our interactive Discord forum to reply or ask new questions.
Discord invite
Discord forum link (after invitation)

Didn't find what you were looking for?