Plugging in: why a 5 V cable can ring a board up to 7 V
When a live cable meets empty ceramic capacitors, the voltage on the board can swing above the charger's for a few millionths of a second. Atmos One's project simulated it: 5.0 V with a typical cable, 7.0 V with the least helpful one, and 27.8 V if a faulty charger sits at 20 V, against a 30 V limit. A simulation, not a measurement, and the last figure is the softest.
You plug a USB cable into a board. The charger at the other end is already on. For a few millionths of a second, the voltage on the board can be higher than anything the charger puts out. It is far too fast to see, and it is a known way for the parts at a board's input to be damaged.
[Atmos One](#/story/atmos-one), the desktop air monitor from our earlier stories, has a circuit simulation for exactly this moment. The project describes itself as designed and checked by tools, with nothing built or powered. Every voltage below is simulated.
Why it rings

Three things meet at the moment of contact.
- A charger that is already at 5 V. It does not ramp up. The full voltage is there at once.
- Capacitors that are empty. A board has ceramic capacitors right at its input. Empty, they take as much current as they can get.
- A cable in between. To a fast edge, a cable is a small coil. The model takes one metre of USB cable as about one microhenry.
A coil resists changes in current. At first it holds the current back. Then, once the current is flowing, it keeps it flowing. When the capacitors reach 5 V the current is still on its way, so it carries on and fills them past 5 V. Then the voltage falls back, overshoots downwards, and so on. A swing does the same thing when it passes the bottom at full speed.
What stops the swinging is resistance, which turns the motion into a little heat. Ceramic capacitors have almost none of their own. That is what makes them good capacitors, and it is also why they ring.
What the model contains
The project's model is a text file of 41 lines for the circuit simulator ngspice. It contains:
| Part | Value in the model | | --- | --- | | USB cable, 1 m | About 1 µH and 0.25 Ω | | Resettable fuse | 0.15 Ω, with a range of 0.06 to 0.21 Ω | | Capacitor on the USB board | 1 µF part, about 0.7 µF with 5 V across it | | Link cable to the main board, 100 mm | 80 nH and 0.03 Ω | | Current shunt | 0.05 Ω | | Capacitors on the main board | Two 10 µF parts, about 7 µF each with 5 V across them | | Protection diode | Stands off 22 V |
One detail in that table is worth knowing on its own. A ceramic capacitor loses capacitance as the voltage across it rises. The model does not use the number printed on the part. It uses what is left with 5 V across it. That choice matters again further down.
Four plug-ins

The script runs the model for four cases and writes the peaks into a table.
| Case | Peak at the main board | Peak current in the cable | | --- | --- | --- | | 5 V charger, typical cable and fuse | 5.0 V | 7 A | | 5 V charger, short thick cable, fuse at its lowest resistance | 7.0 V | 10 A | | Faulty 20 V source, typical cable and fuse | 20.0 V | 30 A | | Faulty 20 V source, short thick cable, fuse at its lowest resistance | 27.8 V | 42 A |

With a typical cable there is about half an ohm in the way, and the voltage rises to 5.0 V and stops. The second case is the script's least helpful combination: cable resistance of 0.05 Ω in place of 0.25 Ω, the fuse at 0.06 Ω, and a cable inductance of 1.5 µH in place of 1 µH. The same board then rings up to 7.0 V. Less resistance in the way gives a worse result here.
The currents look alarming and are not. Seven amps flow for a few millionths of a second. The note says the inrush is far below what trips the fuse.
The case that sets the limit

The last two rows are a fault on top of a fault: a source that has been left at 20 V, plugged live into a 5 V device through an unusually good cable. The project's note calls it a double fault and checks it anyway.
The peak is 27.8 V. The lowest absolute maximum rating on that rail is 30 V, at the input of the backlight driver. The capacitors are rated 35 V and 50 V, and the 3.3 V regulator 35 V. So in the project's table the worst case passes with 2.2 V to spare. One caveat about this row comes below.
Two more things from the note:
- What keeps the peak down is the resistance in series: the cable, the fuse and the shunt.
- The protection diode hardly conducts in any of the four cases. The note says it is there for faster and larger events.
An option that was not taken
The table in the note has a fifth row, in italics. It shows what a larger shunt resistor would buy: 0.22 Ω in place of 0.05 Ω brings the worst peak at the main board from 27.8 V down to 22.8 V.
The price is 110 mV less headroom for the backlight driver when the source is at the low end of its tolerance. The note records the option and the decision in four words: that trade was not taken. We like that the row is there. It tells the next person what the cheap fix is, and what it costs.
How the number moved
The first version of the model came three hours and 50 minutes after the project's first commit. Its worst peak was 28.9 V.
Twenty-two minutes later, a commit of review corrections changed the model in two ways. The shunt resistor was added to the circuit, and the protection diode was modelled at its least helpful. The worst peak became 27.8 V. The row about the larger shunt arrived in the same commit. Both commits name Claude Fable 5.2 as co-author.
How far to trust it
The note lists its own limits:
- The capacitor values were reduced for voltage by hand.
- The figures for the protection diode and the range of the fuse's resistance are from memory, not from datasheets that were fetched.
- The source is an ideal step. A real plug makes contact less cleanly.
We would add one more, from reading the model file. The two 20 V rows were run with the capacitance the parts have at 5 V. The file's own comments say the same parts hold about half of that, or less, at 20 V. Our reading: less capacitance means less damping, so the real peak in the 20 V case is likely to be higher than 27.8 V. That makes the 2.2 V the softest number in the table, and the 20 V test the one to do first.
It also names the measurement. In the bring-up plan, an oscilloscope goes on the 5 V test point while a live cable is plugged in, and the peak should stay below 8 V. The same test is then repeated from a 20 V bench supply with a short cable, where it should stay below 30 V. [The first power-up](#/story/the-first-power-up) walks through that plan.
What to copy
- Expect ringing wherever a live cable meets ceramic capacitors. With no resistance at all, the peak would be twice the source voltage.
- Find the lowest absolute maximum rating on your input rail, and compare it with the ringing, not with 5 V.
- Think about what else could be plugged in. A source at a higher voltage than you planned for is the case that sets the limit.
- Add loss if you need it. The usual cures are a little series resistance, a capacitor with some resistance of its own next to the ceramic ones, or a clamp diode.
- Put a test point on the input and look at the first plug-in with an oscilloscope.
A DFM check will not find this. The files can be perfect and the board can still ring. What a maker can do is fit exactly the parts you chose. When you upload a BOM on EIN, give the fuse, the shunt and the input capacitors with full part numbers, because their resistance and voltage rating are part of the design. [23 millivolts](#/story/the-23-millivolt-margin) is the same lesson for two resistors.