# Why does the voltage across a shunt spike then settle?

I'm using a 50 Ohm shunt to measure a current of about 50mA driven by a voltage of 110v 60Hz AC as a zero-crossing square-wave (with a step at the zero-crossing).

Using my oscilloscope I can see that the voltage from the supply (an inverter designed for the US caravan market) is a pretty good modified square wave but the voltage across the shunt, at the start of each cycle, rises to a sharp peak about twice the stable value to which it then falls for the rest of the positive cycle. The same overshoot happens with the negative cycle, but to a high negative peak which then falls to a stable negative value for the rest of the negative cycle.

There are similar peaks, positive and negative, when the supply returns to zero at the end of each half cycle.

This seems to be an effect of the shunt alone, since it's an extremely simple circuit and the voltage (1) across the supply shows no such peaks, but why does it happen and how can I get rid of it?

If I disconnect the load, and there's therefore no current flowing through the circuit, I still get peaks (though just one +ve and one -ve per cycle) across the shunt (ie V2) (but not across the supply - V1).

I hope that clarifies.

circuit

Voltage waveform 2 - across 50 Ohm shunt

Voltage waveform 1 - across the supply

Voltage waveform 2 - across the shunt with load disconnected

• What is the load? Hit the edit link. Apr 18 '20 at 10:21
• Show the circuit and a picture of the waveform on your scope. Apr 18 '20 at 10:21
• So the 120VAC source is a square wave? Is the load capacitive? Is there a full bridge diode rectifier in the load? Apr 18 '20 at 13:32
• Here's the circuit and waveforms. Apr 19 '20 at 16:11
• Is the variable resistance your actual load or an representation of something else? Apr 19 '20 at 17:02

it's sound like one of the 2 things:

2. Gibbs phenomena - due to the low bandwidth of the oscilloscope.

it will be helpful if you can share a picture of the signal on the scope and a picture of your probing method.

• Bad probing? Can you explain? It's probably not Gibbs phenomena since the oscilloscope has a bandwidth of 60MHz - and the spike is much too sharp. Apr 19 '20 at 17:56
• if you measure the voltage across the resistor using prob's long lead with the alligator as a ground you probably introducing a big parasitic inductance to the measurement system. As a result, an oscillating voltage can be seen due to di/dt. Apr 20 '20 at 20:23
• That makes sense. Thanks. Apr 23 '20 at 12:27

It's not clear what exactly are you doing and trying to accomplish.
You really need to provide more details, and definitely a schematic, maybe a photo, screenshot of the scope signal and the purpose of your circuit if it's not clear from the schematic.
My guess is that you are driving a 110V AC load a square wave inverter, but I could be wrong because you have left plenty for us to imagine.

It seem that what you have is a "leading edge spike".
Such spike is usually easily solved with an RC integrator.

simulate this circuit – Schematic created using CircuitLab
You can experiment with the capacitor values from 1nF to 100nF, start from the lowest value and change up until the spike is gone.

EDIT: Now that you have provided images and details, it is more clear what is happening, and it is due to square wave supply as I suspected, or modified square wave, to be more precise.
The spikes are happening on, and are caused by, the rising and falling edges of the voltage supply. It is really not a mystery why this is happening, as those edges represent extremely fast transitions and are bound to cause spikes even at very low inductances such as that of a straight piece of wire. Another source of the spike could be due to the electro-chemical contact reaction between the probes and the soil, where a sudden change in voltage or current can't be conducted fast enough through such "galvanic cell" (but I could be wrong).
The spikes happening when the load is disconnected (no current) are most likely due to the wires acting as antennas for those very fast transients. Disconnecting the top lead next to the generator and then scoping across the shunt should verify this.

The wire inductance problem can be reduced by using twisted wire pair instead of just regular wires. Basically, treat the problem as if you are working with radio frequencies running through the wires.
The spikes across the shunt and the probe may be solved or reduced by placing 1nF to 100nF capacitors across them (one across the probe, another one across the shunt); start with 1nF and gradually move up until the problem is eliminated or significantly reduced.
Another solution would be to change your source voltage into a sine wave by using an LC low-pass filter (set around 60Hz) or an LC resonant circuit across the supply (set to 60Hz). This would get rid of your sharp transitions which cause the spikes.

• OK - but what causes the spike? Apr 19 '20 at 18:00
• Interesting. Thanks. So it's due to electromagnetic induction due to the rate of the change of current? The spikes occur even when I disconnect the load (the ground electrodes) and simply measure the voltage across the supply and across the shunt - so they can't be due to electrochemistry of the contact (although that is a fascinating subject in itself - and formed part of my PhD research). So I don't quite understand how I'm getting these spikes in voltage across the shunt, due to induction, when (almost) no current flows through the circuit since the load is disconnected. I'll think on! Apr 20 '20 at 10:14
• Thanks for the suggested solution. I'll play with the capacitors - but I have to keep the "square" wave since I need the sharp transitions. Apr 20 '20 at 10:18
• The spikes would occur when there is no current only due to the electric (electromagnetic) field generated on the voltage edges because any wires connected to a high frequency (or high rate of change) voltage would act as antennas. Try disconnecting the top lead right next to the generator, and I think that you will not see those spikes any more. Apr 20 '20 at 10:19
• Very high frequencies and very fast transients don't limit themselves to the wires they're connected to. Apr 20 '20 at 10:20