USB cable burned

Hi everyone,

I have designed a PCB based on Arduino MEGA 2560 and RAMPS, with some differents:

  • It works at 24V with drivers drv2580
  • The communication is based on FTDI driver and an USB connection.
  • There is a comparator which selects the 5V from USB or power supply, based on a PNP transistor. The 5V is obtained from 24 V using this DC-DC converter: OKI-78SR-5/1.5-W36H-C.
  • The 5V pin from USB has a fuse of 500mA, whereas the two pins of 24V have a fuse of 5A.
  • The case of the USB connector is connected to ground through a ferrite core.
  • There is an unique GND plane both USB and power source.

Recently I had a problem in my machine where the USB heats up and is burnt and the computer crashes, when it has been connected to the PCB and the 24V power supply turns on.

After this problem, I made the next analysis:

  • The origin of the USB cable heat is due to the GND pin is absorbing too much current for some reason and this also causes that the computer crashes.

  • The origin of this high current can be a short circuit, and the current comes from power source, not from USB connection, because it has a 500mA fuse and this component is still working perfectly. The 5A fuses are also working, therefore, this short drifts the current through the USB GND and not to power source GND.

  • When I connect the PCB with the computer, the connection works correctly. Also when PCB with the power source. This suggests that the problem could be the 5V source selector, but as it is working correctly for both cases, I do not believe this is my problem. The source selector is similar to Arduino MEGA 2560 has integrated.

I have reviewed the machine design, but at first it not seems something is causing this problem.

I keep waiting some help of you, I really appreciate it.

Thank you very much. Best regards, Antonio.

Without the real schematics it's hard to say.

You can start by testing is the current flow is over the 5V of the USB or the GND. If it's GND then you might have a ground loop. Or a disconnected GND loop is for example the 24V power supply is also earth referenced and the GND wire between the board and the 24V power supply is missing. Then it tries to sink all the current of the 24V supply through the USB to mains earth to the GND of the 24V supply...

But like I said, speculations...

It’s not clear if you are using the standard ramps setup or not.

Here is the reference: wiki/RAMPS_1.4

When using a 24V supply, there are some gotchas… one being that you need to remove the diode on the Ramps board that feeds the (normally) 12V supply from the power brick to the mega board from the Ramps board. Sending 24Volts to the mega that way is problematic.

Here is how mine is wired.

I added a 12V stepdown regulator ($8 from amazon) so the Mega and my motors gets 12V still but my heated bed gets 24V.

Please explain better how you have yours setup.

Hi everyone,

a lot of thanks for your very quick reply. To clarify, my PCB is as an all-in-one Arduino Mega 2560 and RAMPS, but with the components carefully selected for working at 24V. I think my problem is not at component level, but at design level.

Here it is attached the schematics of the power source and the FTDI-USB connection. I have reviewed the possibility of the ground loop, and the USB and power source ground are at the same plane. Connections seems to be ok. Furthermore, I thought that this can be the problem, and I tested to connect the power source without the ground terminals and the USB connection, and I have noticed that the USB connection with the computer works correctly (I could communicate with it), but 24V leds did not shine. I think this is due to the power source generates a difference of voltage of 24V, so without the ground, it can not reference well the 24V, which is float.

I continue searching the answer :frowning:

Thanks again,
Antonio

Quick look at the schematic:

I always get the shivers when people don't draw ground down / pointed down. Makes it harder to read.

It's plain annoying the symbol for a ferrite bead is the same as a fuse :S

You talk about 24V. All I see is 12V...

You talk about a PNP, all I see is a MOSFET. And it almost looks like a N-channel...

And then the resistors to switch it. I don't think that's strict enough. And even if it is (and we don't know because my crystal ball does not reveal which transistor you used) it still leaves 3V at the gate when 12V is applied....

I always get the shivers when people don't draw ground down / pointed down. Makes it harder to read.

You are not alone.


Sorry, but your drawing did not serve well to enlighten me. I only saw 12V... and I did not see the full system integration...

Also... why am I seeing an FTDI device?


There is nothing that needs to be carefully selected for 24 volts on the RAMPS board. There are no Mega's that I know of that enjoy having 24 volts fed to them unless you found a way to add a heatsink to the 5V regulator.

I asked if you removed D1 from the ramps board.

From the ramps documentation:

D1 should only be installed if the 5A rail is powered by 12V. It can be omitted and the Arduino will be powered from USB. You will want D1 installed if you add components to print without a PC. To reiterate, D1 MUST be omitted if you are powering the 5A rail by more than 12V, or the power is not absolutely clean, otherwise you may damage your ramps.

So by carefully selected, I assume you mean that you removed D1 on the Ramps board if you are supplying BOTH rails with 24V.

Hi everyone,

I have to ask apologies about the notation error of the schematic:

  • 12V is actually 24V, I change the main voltage reference.
  • Although the draw is a NPN MOSFET, its schematic configuration and its footprint is a PNP.

Considering 24V, the voltage in the gate is 6V, therefore:

  • If 24V power supply is working, the voltage in the gate is 6V and the VD = V(USB) = 5V, therefore, the MOSFET is turned off, and the digital 5V supply comes from DC converter.

  • If 24V power supply is turned off, the voltage in the gate is 0V and in the drenator is 5V, therefore the MOSFET is turned on and the digital 5V supply comes from USB connector.

Regarding to the FTDI device, it is used for the communication between the computer and the microcontroller.

Thank you very much for your answers. I think we are near from the correct answer.

Best regards, Antonio

Maybe the problem is with the PSU and computer grounds? I think maybe there is a voltage potential between both grounds and it generates a high current through the USB cable. However, I have measured the voltage potential and it seems zero. I have to say, this problem is not happening in Spain, but in other prototypes sent to Portugal and Scotland, where just connect the USB and power source, the cable has been burnt and the computer crashes.

Mm, yeay, the MOSFET thing is the same in the Uno only that drives it via a comperator. Bit weird but should work I'll say. But not in the way you said. The voltage on the drain controls nothing... It the Vgs that controls the mosfet. But it still needs to be a logic mosfet so which did you use?

Biggest thing is, the fuse in the USB line is still fine. So that kind of clears the USB 5V line. So that leaves the GND line and that brings me to grounding loops again. And like I said, if the V- of the power supply is connected to mains earth but has no good connection to the board all the current is going through the USB GND.

So how do you test it? Do you use a desktop or a laptop? And are the desktop en power supplies grounded?

And I think we need the whole schematic with part numbers and correct voltages etc. And the kind of power supply you use. Btw, why do you have two 24V power supplies?

Hi Septillion,

thank you very much for your answer. As you say, I also think main problem is, just when the power source is turned on and the computer is plugged in the USB connector, the current flows directly from the power source to the computer (via GND or via EARTH?).

However, I did a test where I connect the USB and only the 24V terminals from power source (not the neutral), and the current does not flow from power source, and nothing strange happens. And viceversa. That suggests to me that if there is a bad connection of the power source, at first it should not create high currents which destroy components.

For testing it, I have used a laptop, both with and without AC connection. The power supply is a chinese PSU 24v 360W 20€. The two terminals are in a system similar to 3D printers, where one of them works with the motor and the other with heaters.

Best regards, Antonio.

Hi,
Have you tried running with the computer and your machine from the same outlet, that is the same earth.
Have you checked your earth and power outlets?

Tom… :slight_smile:

ajmoreno: For testing it, I have used a laptop,

That can be a mayor clue! Not all laptop supplies are connected to mains earth on the secondary even if they have a plug with mains earth. I have two types of Dell supplies here for my laptop, both with a mains earth plug (schuko). One has the secondary connected to mains earth, the other does not! As of course, laptop power supplies without a mains earth connection (like a euro plug) are also not mains earth connected.

So if your supply isn't mains earth connected that might explain why it works when you test it but blows when others test it with a desktop (= mains earth connected) or another (mains earth connected) laptop.

Yes, I think that make sense. So summerizing, probably my problem resides that grounds from computer and from power source are different. This is a very good result, because it explains mostly my problem. Thank you guys.

However, in order to solve this issue, I need to understand where it comes from, and then modify my design to avoid that the problem will be repeated again.

Analyzing my circuit from this perspective, I had:

  • 24V Power source: has 3 inputs: Line, neutral and ground (earth), and six outputs (3 V+ and 3 V-, which are 24VDC and 0VDC, respectfully). I have opened the power source and I have seen that the ground is connected, through capacitors, to the 0VDC outputs and to the two outputs of a transformer which inputs are line and neutral (I think this is used to reduce voltage from 230V in the input). Also ground is connected to the chasis of the power source.

  • PCB circuit: from power source, it has four inputs, two of 24V and two of 0V. From USB, it has 5V and 0V, and the computer ground is connected to 0V through a ferrite.

My questions are then:

  • How I can introduce a ground line into the PCB? is it mandatory? what is the best way, using capacitors between the 0V line and the ground line?

  • What considerations should I have for avoiding this voltage potential between the power source, the pcb and the computer, when I use the laptop connected to the electrical net and running with the battery?

  • Maybe the ferrite of the USB case is causing the problem that the ground of the computer is different to the ground of the power source?

  • Can the power source improve how it grounds the signals?

  • Other best practices / advices?

Again thank you very much.

Antonio.

Let's start with saying I don't see a fault as long as everything is connected correct. There is a hard connection between GND of the circuit and the V- of the supply so the route via the USB cable should be higher impedance for the 24V. And one thing we didn't consider, PCB layout. If the PCB track from motor out to power supply terminal is crap you have problems as well.

ajmoreno: However, in order to solve this issue, I need to understand where it comes from, and then modify my design to avoid that the problem will be repeated again.

Agreed. But without all the info we still can't really help you. So full schematic, PCB layout, part number (also from the PSU) etc.

ajmoreno: - 24V Power source: has 3 inputs: Line, neutral and ground (earth), and six outputs (3 V+ and 3 V-, which are 24VDC and 0VDC, respectfully).

Okay, that took me a full minute... I kept on thinking how a 3V- and a 3V+ connection form 24V... But 3x a 24V+ and 3x a 24V- connection, got it! Are it indeed 3 seperate outputs of are all V- and V+ terminals grouped together?

ajmoreno: I have opened the power source and I have seen that the ground is connected, through capacitors, to the 0VDC outputs

You mean mains earth (confusing to call that ground in this case) is only connected via capacitors to the V- terminals?

ajmoreno: and to the two outputs of a transformer which inputs are line and neutral (I think this is used to reduce voltage from 230V in the input).

You mean a capacitor between Line (L) and mains earth (PE for short) and a capacitor between Neutral (N) and PE?

Is it a real "old school" transforer or a switch mode? (Aka, type number...)

ajmoreno: Also ground is connected to the chasis of the power source.

I may hope it is :D That's the least they can do with PE, shield the device. But sure the V- terminals aren't also connected to the chassis? Have seen that before...

ajmoreno: - PCB circuit: from power source, it has four inputs, two of 24V and two of 0V. From USB, it has 5V and 0V, and the computer ground is connected to 0V through a ferrite.

The PC ground is also hard connected to the 0V wire. And in desktops (and some but not all laptops) GND as a hard connection to PE.

There is a hard connection between GND of the circuit and the V- of the supply so the route via the USB cable should be higher impedance for the 24V

I have arrived to this conclusion too (although I have no proofs because here the system works correctly). My theory is that the connection with the ferrite between my 0V and USB (computer) earth is creating a difference of voltage between both earths (power supply and computer), which should be at same potential. Therefore, 0V in the computer is different from PCB and that causes a high load of current through the computer, USB cable burns and computer crashes.

Are it indeed 3 separate outputs of are all V- and V+ terminals grouped together?

Yes, 3x24V are in the same track, also 3x V-.

You mean mains earth (confusing to call that ground in this case) is only connected via capacitors to the V- terminals?

Yes, concretely I think ceramics capacitors of nF. What do you suggest is the best way to communicate signals line (in my case, V-) and earth?

I have found an interesting discussion in this thread about how earthing the USB shield, with a lot of possibilities but none of them the best: http://forum.allaboutcircuits.com/threads/usb-device-cable-shield-connection-grounding-it-or-not.58811/

You mean a capacitor between Line (L) and mains earth (PE for short) and a capacitor between Neutral (N) and PE?

Is it a real "old school" transforer or a switch mode? (Aka, type number...)

Yes, in the output of an "old school transformer".

I may hope it is :D That's the least they can do with PE, shield the device. But sure the V- terminals aren't also connected to the chassis? Have seen that before...

V- are connected to mains earth through capacitor, and mains earth is connected to the chassis. However, V- is not directly connected to the chassis, can be a problem?

I really appreciate your help, specially to septillion.