> Il 28/06/2022 11:23, Stef ha scritto:
>> On 2022-06-27 pozz wrote in comp.arch.embedded:
>>>
>>> Anyway in my case the power cord of my PC is connected to a UPS and the
>>> AC/DC that powers the board is connected to earth connection of the grid.
>>>
>>> Working with two wires power cords is risky and I learned that in the past.
>>>
>>> However this isn't the case now, both PC and board have a good 3-wires
>>> power connection, but there's a 20Vac voltage between the grounds.
>>
>> With both grounded, there cannot be a 20VAC voltage between the grounds.
>> (unless there is an extreme amount of current ofcourse, but that will
>> not be the case)
>
> The PSU of desktop PC and AC/DC of board are connected to the earth
> conductor, i.e. I'm using 3-wires power cord.
>
> But their separate GND aren't connected.
>
>
>> Your PC is a standard desktop?
>
> Yes.
>
>
>> Then the 0V is connected to the earth
>> connection of the power plug. This is not the case if you have a laptop.
>> The supply will have an earth connection, but the DC output is floating.
>
> No, it's a desktop PC, not a laptop.
> I don't know why I have 20Vac between GND of J-Link and board.
> Maybe the problem is in the UPS that has some failure.
Measure voltage between PC case and earth. If that is not zero check the
UPS and the power cables.
>> Your AC/DC probably has a similar construction as a laptop supply: Earth
>> connection on the power plug and a floating DC output.
>
> Yes, but I connect GND (0V of DC output) to earth.
If your PC is connected to earth as well, you should measure 0V between
them. If not there is something wrong.
--
Stef
Original thought is like original sin: both happened before you were born
to people you could not have possibly met.
-- Fran Lebowitz, "Social Studies"
Reply by pozz●June 28, 20222022-06-28
Il 28/06/2022 11:23, Stef ha scritto:
> On 2022-06-27 pozz wrote in comp.arch.embedded:
>>
>> Anyway in my case the power cord of my PC is connected to a UPS and the
>> AC/DC that powers the board is connected to earth connection of the grid.
>>
>> Working with two wires power cords is risky and I learned that in the past.
>>
>> However this isn't the case now, both PC and board have a good 3-wires
>> power connection, but there's a 20Vac voltage between the grounds.
>
> With both grounded, there cannot be a 20VAC voltage between the grounds.
> (unless there is an extreme amount of current ofcourse, but that will
> not be the case)
The PSU of desktop PC and AC/DC of board are connected to the earth
conductor, i.e. I'm using 3-wires power cord.
But their separate GND aren't connected.
> Your PC is a standard desktop?
Yes.
> Then the 0V is connected to the earth
> connection of the power plug. This is not the case if you have a laptop.
> The supply will have an earth connection, but the DC output is floating.
No, it's a desktop PC, not a laptop.
I don't know why I have 20Vac between GND of J-Link and board.
Maybe the problem is in the UPS that has some failure.
> Your AC/DC probably has a similar construction as a laptop supply: Earth
> connection on the power plug and a floating DC output.
Yes, but I connect GND (0V of DC output) to earth.
> That there still is a measurable voltage is because of capacitive
> coupling in the AC/DC between AC input and DC output (assuming PC is
> really grounded). The voltage you measure depends on the impedance of
> that coupling and the impedance of your meter.
>
> Just measured 0V to earth on a few supplies here with a volt meter with
> input impedance of > 10 MOhm / < 100 pF:
>
> Recent 150W lab supply: 15 mVAC
> Old analog 2x40W supply: CH1: 15VAC, CH2: 5 VAC
> Recent 10W switching wall wart: 90VAC
>
> Tried to measure short circuit currents as well, but that was not very
> reliable as I don't have an AC uA meter here. Currents are too small.
>
> As the current is very low, this should give no problems. There could be
> a small surge if you just happen to connect at the peak of that AC
> voltage. But the capacitance behind that should be very low, otherwise
> the voltage/current measurements should be different. (Haven't drawn out
> the resulting schematic and the consequences though).
>
> So you could do a current measurement between the grounds. I would
> expect less than 0.1 mA AC there.
>
> But with an isolated supply there also is a chance of static (DC)
> buildup. Depending an the capacity to earth this could give and ESD
> discharge on connection.
>
> So all this may not be your problem, but connecting an additional earth
> between PC and your supply will not hurt anyway. And it has the (small)
> possibility of solvng your problem.
Reply by Stef●June 28, 20222022-06-28
On 2022-06-27 pozz wrote in comp.arch.embedded:
>
> Anyway in my case the power cord of my PC is connected to a UPS and the
> AC/DC that powers the board is connected to earth connection of the grid.
>
> Working with two wires power cords is risky and I learned that in the past.
>
> However this isn't the case now, both PC and board have a good 3-wires
> power connection, but there's a 20Vac voltage between the grounds.
With both grounded, there cannot be a 20VAC voltage between the grounds.
(unless there is an extreme amount of current ofcourse, but that will
not be the case)
Your PC is a standard desktop? Then the 0V is connected to the earth
connection of the power plug. This is not the case if you have a laptop.
The supply will have an earth connection, but the DC output is floating.
Your AC/DC probably has a similar construction as a laptop supply: Earth
connection on the power plug and a floating DC output.
That there still is a measurable voltage is because of capacitive
coupling in the AC/DC between AC input and DC output (assuming PC is
really grounded). The voltage you measure depends on the impedance of
that coupling and the impedance of your meter.
Just measured 0V to earth on a few supplies here with a volt meter with
input impedance of > 10 MOhm / < 100 pF:
Recent 150W lab supply: 15 mVAC
Old analog 2x40W supply: CH1: 15VAC, CH2: 5 VAC
Recent 10W switching wall wart: 90VAC
Tried to measure short circuit currents as well, but that was not very
reliable as I don't have an AC uA meter here. Currents are too small.
As the current is very low, this should give no problems. There could be
a small surge if you just happen to connect at the peak of that AC
voltage. But the capacitance behind that should be very low, otherwise
the voltage/current measurements should be different. (Haven't drawn out
the resulting schematic and the consequences though).
So you could do a current measurement between the grounds. I would
expect less than 0.1 mA AC there.
But with an isolated supply there also is a chance of static (DC)
buildup. Depending an the capacity to earth this could give and ESD
discharge on connection.
So all this may not be your problem, but connecting an additional earth
between PC and your supply will not hurt anyway. And it has the (small)
possibility of solvng your problem.
--
Stef
TODAY IS INTERNATIONAL CAPSLOCK DAY!
Reply by pozz●June 27, 20222022-06-27
Il 27/06/2022 17:11, Reinhardt Behm ha scritto:
> On Mon, 27 Jun 2022 10:07:37 +0200, pozz wrote:
>
>> Il 26/06/2022 16:25, Reinhardt Behm ha scritto:
>>> On Fri, 24 Jun 2022 16:25:55 +0200, pozz wrote:
>>>
>>>
>>>>> Of course you could always have had damage from ground loops, spikes
>>>>> when plugging the debugger in and out (if power is on),
>>>>> short-circuits when trying to use an oscilloscope probe with clumsy
>>>>> fingers, etc. If you have access to an X-Ray machine, you might be
>>>>> able to get some idea about what happened.
>>>>
>>>> I admit I don't have professional workbench with anti-static writ
>>>> strap band and so on, but I worked for many years without these kind
>>>> of problems. It's strange I encountered so many problems concentrated
>>>> in a few weeks.
>>>>
>>>> I will understand the problem of ground loops.
>>>
>>> Take the exact setup and before plugging the debugger measure the
>>> voltage between the CPU board ground and the debugger ground with a
>>> multi meter in AC mode. My guess is that you have stray AC (mains)
>>> voltage on either side (by Y-caps in a PSU or just capacitive coupling
>>> over the transformer to the DC side GND). These stray voltages often
>>> reach 50% of AC voltage, in you case probably 60V-AC. When you plug the
>>> connector they might easily kill a CPU port.
>>
>> I made the measure you suggested and I found around 20Vac between
>> debugger GND and board GND *before* plugging them.
>>
>> After adding a good wire connection between PC metallic case (near a
>> mounting screw) and board GND, the Vac measured goes near to zero.
>>
>> Could it be this the cause of issues I observed? I will continue with
>> this connection and see.
>>
>> Thank you for your suggestions.
>
> It could not only be, it will be. Imagine you plug the connector, GND is
> not contacted first, then the CPU pin sees 20V-AC. That means +20V*sqrt(2)
> relative to CPU-GND and -20V*sqrt(2). That is far out of spec. It will
> kill the pin.
> I had something similar. A colleague had used a 2 wire extension cord for
> a soldering station, so no earth connection. I did not know this and
> killed the reset input of my controller. When I found out this I
> understood why we had several cases of non-functioning boards. The two
> wire extension cord was 2$ cheaper than a 3 wire cored. the cost of this
> "saving" was several 100$.
Anyway in my case the power cord of my PC is connected to a UPS and the
AC/DC that powers the board is connected to earth connection of the grid.
Working with two wires power cords is risky and I learned that in the past.
However this isn't the case now, both PC and board have a good 3-wires
power connection, but there's a 20Vac voltage between the grounds.
Reply by Reinhardt Behm●June 27, 20222022-06-27
On Mon, 27 Jun 2022 10:07:37 +0200, pozz wrote:
> Il 26/06/2022 16:25, Reinhardt Behm ha scritto:
>> On Fri, 24 Jun 2022 16:25:55 +0200, pozz wrote:
>>
>>
>>>> Of course you could always have had damage from ground loops, spikes
>>>> when plugging the debugger in and out (if power is on),
>>>> short-circuits when trying to use an oscilloscope probe with clumsy
>>>> fingers, etc. If you have access to an X-Ray machine, you might be
>>>> able to get some idea about what happened.
>>>
>>> I admit I don't have professional workbench with anti-static writ
>>> strap band and so on, but I worked for many years without these kind
>>> of problems. It's strange I encountered so many problems concentrated
>>> in a few weeks.
>>>
>>> I will understand the problem of ground loops.
>>
>> Take the exact setup and before plugging the debugger measure the
>> voltage between the CPU board ground and the debugger ground with a
>> multi meter in AC mode. My guess is that you have stray AC (mains)
>> voltage on either side (by Y-caps in a PSU or just capacitive coupling
>> over the transformer to the DC side GND). These stray voltages often
>> reach 50% of AC voltage, in you case probably 60V-AC. When you plug the
>> connector they might easily kill a CPU port.
>
> I made the measure you suggested and I found around 20Vac between
> debugger GND and board GND *before* plugging them.
>
> After adding a good wire connection between PC metallic case (near a
> mounting screw) and board GND, the Vac measured goes near to zero.
>
> Could it be this the cause of issues I observed? I will continue with
> this connection and see.
>
> Thank you for your suggestions.
It could not only be, it will be. Imagine you plug the connector, GND is
not contacted first, then the CPU pin sees 20V-AC. That means +20V*sqrt(2)
relative to CPU-GND and -20V*sqrt(2). That is far out of spec. It will
kill the pin.
I had something similar. A colleague had used a 2 wire extension cord for
a soldering station, so no earth connection. I did not know this and
killed the reset input of my controller. When I found out this I
understood why we had several cases of non-functioning boards. The two
wire extension cord was 2$ cheaper than a 3 wire cored. the cost of this
"saving" was several 100$.
--
Reinhardt
Reply by pozz●June 27, 20222022-06-27
Il 26/06/2022 16:25, Reinhardt Behm ha scritto:
> On Fri, 24 Jun 2022 16:25:55 +0200, pozz wrote:
>
>
>>> Of course you could always have had damage from ground loops, spikes
>>> when plugging the debugger in and out (if power is on), short-circuits
>>> when trying to use an oscilloscope probe with clumsy fingers, etc. If
>>> you have access to an X-Ray machine, you might be able to get some idea
>>> about what happened.
>>
>> I admit I don't have professional workbench with anti-static writ strap
>> band and so on, but I worked for many years without these kind of
>> problems. It's strange I encountered so many problems concentrated in a
>> few weeks.
>>
>> I will understand the problem of ground loops.
>
> Take the exact setup and before plugging the debugger measure the voltage
> between the CPU board ground and the debugger ground with a multi meter
> in AC mode. My guess is that you have stray AC (mains) voltage on either
> side (by Y-caps in a PSU or just capacitive coupling over the transformer
> to the DC side GND). These stray voltages often reach 50% of AC voltage,
> in you case probably 60V-AC. When you plug the connector they might
> easily kill a CPU port.
I made the measure you suggested and I found around 20Vac between
debugger GND and board GND *before* plugging them.
After adding a good wire connection between PC metallic case (near a
mounting screw) and board GND, the Vac measured goes near to zero.
Could it be this the cause of issues I observed? I will continue with
this connection and see.
Thank you for your suggestions.
Reply by David Brown●June 27, 20222022-06-27
On 27/06/2022 09:06, pozz wrote:
> Il 24/06/2022 20:29, Stef ha scritto:
>> On 2022-06-24 pozz wrote in comp.arch.embedded:
>>> Il 24/06/2022 14:15, David Brown ha scritto:
>>>
>>>> Of course you could always have had damage from ground loops, spikes
>>>> when plugging the debugger in and out (if power is on), short-circuits
>>>> when trying to use an oscilloscope probe with clumsy fingers, etc. If
>>>> you have access to an X-Ray machine, you might be able to get some idea
>>>> about what happened.
>>>
>>> I admit I don't have professional workbench with anti-static writ strap
>>> band and so on, but I worked for many years without these kind of
>>> problems. It's strange I encountered so many problems concentrated in a
>>> few weeks.
>>>
>>> I will understand the problem of ground loops.
>>
>> Anti-static measures will not help for any of the problems David
>> describes. But they will prevent damage from ESD. Which could also be a
>> source for your problem.
>>
>> Has the weather been very dry in those problem weeks? Or did you change
>> your floor or did you get new shoes?
>
> Very dry? On the contrary, now and here we have humid air at least
> respect other periods of the year.
>
Humid is good. In electronics production facilities, air humidifiers
are common as humid air lets any static buildups drain away safely. (Of
course, there is always a limit - you don't want condensation on your
boards!)
> No change in floor or shoes.
>
Reply by David Brown●June 27, 20222022-06-27
On 27/06/2022 08:54, pozz wrote:
> Il 24/06/2022 18:26, David Brown ha scritto:
>> On 24/06/2022 16:42, dalai lamah wrote:
>>> Un bel giorno pozz digitò:
>>>
>>>>> Or maybe some ground loops, for example if you have connected the
>>>>> J-Link
>>>>> probe to a desktop PC (or in general a PC not isolated from mains)
>>>>> and your
>>>>> boards are somewhat connected to mains or earth ground too.
>>>>
>>>> Yes, I use a desktop PC connected to mains and the boards are supplied
>>>> from an AC/DC connected to mains too.
>>>>
>>>> Is this a problematic scenario?
>>>
>>> Normally it shouldn't be, but it also depends on what the board does.
>>> If it
>>> contains some power stages running at high frequency, it is quite common
>>> (especially if the EMI filtering is subpar) that switching currents can
>>> pass through the AC/DC power supply and create problems.
>>>
>>> If this keeps happening, try using a laptop isolated from mains and
>>> see if
>>> it helps.
>>>
>>
>> Another trick is to make sure you have a separate ground connection
>> between the board and the PC before attaching the JTAG. A wire from
>> the board ground to the PC's case is usually fine.
>>
>
> Sorry I don't follow very well these arguments.
>
> You say to have a separate ground connection between the board and the
> PC, but you suggest to connect a wire between them. It seems
> contradictory to me.
No, the wire is the connection.
The point is to stop any brief surges passing through the debugger and
USB system. When boards get connected or unconnected to supplies and
other equipment, there can sometimes be slight differences in the ground
potential. This can lead to a current pulse, which is sometimes large
due to capacitances, and this in turn can lead to voltage pulses. If
there is a nice, clean path for the current to follow along a direct
connecting wire, that's where the current will go, and the debugger and
USB is spared the pulses.
>
> What do you mean with board ground? GND, the reference voltage for 3.3V
> of the MCU?
Yes, generally.
> Usually I work on boards with only one low-voltage power
> supply input (12Vdc, plus and minus) that is down-scaled to 3.3V by a
> DC/DC switching regulator. There isn't an *earth* connection on the
> board. Mounting holes are connected to GND, but most of the time, the
> board is not mounted on my bench.
>
These mounting holes are often a good point to connect such a ground
wire - just as the mounting screws on the case of the PC are typically a
good point on the PC side.
Ideally, the power supply enters a board at one point, and you have a
star connection from there to any zero volt references (so that noise
from ground for high power switching does not disturb the
microcontroller, or high frequency noise on the microcontroller ground
does not disturb sensitive analogue parts, etc.). And ideally, this
ground connection to the PC also comes from that star. In practice, for
simpler boards a single ground reference plane is usually all you need,
and all you need here is for your ground connection wire to have a good
low impedance connection. A croc clip wire clipped to the mounting
holes or screws is fine.
(I am referring to local ground, or zero volt reference - not "true
ground" or "earth". You only need an earth connection if you have high
voltages and safety concerns.)
Reply by pozz●June 27, 20222022-06-27
Il 24/06/2022 20:29, Stef ha scritto:
> On 2022-06-24 pozz wrote in comp.arch.embedded:
>> Il 24/06/2022 14:15, David Brown ha scritto:
>>
>>> Of course you could always have had damage from ground loops, spikes
>>> when plugging the debugger in and out (if power is on), short-circuits
>>> when trying to use an oscilloscope probe with clumsy fingers, etc. If
>>> you have access to an X-Ray machine, you might be able to get some idea
>>> about what happened.
>>
>> I admit I don't have professional workbench with anti-static writ strap
>> band and so on, but I worked for many years without these kind of
>> problems. It's strange I encountered so many problems concentrated in a
>> few weeks.
>>
>> I will understand the problem of ground loops.
>
> Anti-static measures will not help for any of the problems David
> describes. But they will prevent damage from ESD. Which could also be a
> source for your problem.
>
> Has the weather been very dry in those problem weeks? Or did you change
> your floor or did you get new shoes?
Very dry? On the contrary, now and here we have humid air at least
respect other periods of the year.
No change in floor or shoes.
Reply by pozz●June 27, 20222022-06-27
Il 24/06/2022 18:26, David Brown ha scritto:
> On 24/06/2022 16:42, dalai lamah wrote:
>> Un bel giorno pozz digitò:
>>
>>>> Or maybe some ground loops, for example if you have connected the
>>>> J-Link
>>>> probe to a desktop PC (or in general a PC not isolated from mains)
>>>> and your
>>>> boards are somewhat connected to mains or earth ground too.
>>>
>>> Yes, I use a desktop PC connected to mains and the boards are supplied
>>> from an AC/DC connected to mains too.
>>>
>>> Is this a problematic scenario?
>>
>> Normally it shouldn't be, but it also depends on what the board does.
>> If it
>> contains some power stages running at high frequency, it is quite common
>> (especially if the EMI filtering is subpar) that switching currents can
>> pass through the AC/DC power supply and create problems.
>>
>> If this keeps happening, try using a laptop isolated from mains and
>> see if
>> it helps.
>>
>
> Another trick is to make sure you have a separate ground connection
> between the board and the PC before attaching the JTAG. A wire from the
> board ground to the PC's case is usually fine.
>
Sorry I don't follow very well these arguments.
You say to have a separate ground connection between the board and the
PC, but you suggest to connect a wire between them. It seems
contradictory to me.
What do you mean with board ground? GND, the reference voltage for 3.3V
of the MCU? Usually I work on boards with only one low-voltage power
supply input (12Vdc, plus and minus) that is down-scaled to 3.3V by a
DC/DC switching regulator. There isn't an *earth* connection on the
board. Mounting holes are connected to GND, but most of the time, the
board is not mounted on my bench.