Signal reflections in electronic circuits
lcamtuf.substack.com
lcamtuf.substack.com
It was slow data, like 10mhz or something. We were safely under the 1/10 wavelength rule with the old, softer corners. With the new sharp corners we were over the 1/10 wavelength rule and the circuit was ringing so hard it would cause nearby chips to latch up. We added some termination resistors and it was fixed.
Also note that this kind of thing can be hard to diagnose, because when you put the scope probes on, some of the ringing energy goes into the scope and it tends to improve the situation as long as the probe is there.
When you're in the thick of it trying to debug, these absolutely make you want to scream. But once you figure it out and have a minute to catch your breath, they are oh so satisfying that you did figure it out.
There are properties like resistance, effective capacitance, impedance and reactance that would not intuitively be associated with a pure conductor, but neglecting little things like this can contribute to behavior that might raise its ugly head in unforseen ways if you are not aware.
What about back-emf in the antique world of vacuum tube audio working at hundreds of volts where you are driving what's known to be a very reactive but low-impedance load?
As the signal from the amp into the voice coil displaces the speaker cone from its resting position, the spring action of the cone surround works to return the cone to the non-energized point. Constantly, this has always happened.
But with tubes the impedance and voltage are so high that a major step-down audio output transformer was used to isolate the high voltage from the speakers as well as properly match the impedance.
No audio transformer is needed for solid state amplifiers since the transistors work at relatively safe voltages and impedance is not a big issue.
Either way as the speakers spring back, their voice coil moving on its own across the magnetic field, it generates a pulse of electricity from the speaker itself that appears at the output of the amplifier but did not actually come from the amp.
At high power and especially with square-wave type distortion often seen in musical instrument amps, this back-emf from the speakers can be stepped up to over 1000V on its reversed way back to the tubes through the "step-down" output transformer. When the tubes are only rated for a few hundred volts this is not ideal, and if the tube does not suffer internally, it can still cause a spark to jump between two adjacent pins on the tube socket. Once this happens both the tube and the socket can be ruined due to conductive carbon formation within the bakelite tube base and/or tube socket.
This may be an extreme example, but wires are not perfect conductors and circuit boards are even less perfect as insulators.
The software equivalent is so-called "load-bearing printf"s, where for example `printf("broken_var: %i\n",broken_var);` causes broken_var to not get optimized out and so start working correctly. But in hardware that happens even when you (effectively) inspect broken_var in a attached debugger, because the closest thing you have to a debugger (eg, oscilloscope) effectively just is a load-bearing printf.
Of course, as things are with the black arts of RF engineering, there are possible situations where that same probe would make things worse, or appear inductive.
I only figured this out after building and tearing down my prototype and reassembling each of the modular bits, verifying they worked, and then noticing it didn't work after integration until I removed the LEDs. I have since learned I also could have used a buffer driver or LED driver, alkthough that adds more complexity to my simple prototype.
(in case you're wondering, yes, I know you're supposed to use a current limiting resistor, but I've also observed that my 5mm LEDs work just fine when given regulated 5V, they end up dropping 4.6V and consuming 40mA, which is about double the current they are rated for.)
At times I have run them much lower, to the point where the light is just barely visible. If I set my power supply to cap out at 2.6V instead of 3, the current reading is 0.000, which I think must be below 1mA, and it's still quite visible.
(i'm not an ee expert so I frequently make thinkos related to voltage and current, but I think I've mostly got LEDs down).
So, if the load is not equal to the source (or vice versa, does not matter), by conservation of energy, we have some "leftover"... in signals, this leftover is going to travel back from whence it came, causing (possibly) attenuation or amplification depending on timing, which some might call distortion.
It can be tricky to keep this in mind when you are working with complex circuits, and it gets more difficult as speeds increase and signal sizes go down.
I wonder if the exhaust could by dynamic i.e change length depending on the RPMs
https://www.researchgate.net/publication/322390752_Continuou...
The stock pipe was tuned to a specific RPM, allowing the reflected exhaust pulse to return to the cylinder just as the port was closing and “slam the door” on the fresh air/fuel charge.
With variable water injection, you could have more than one optimal RPM.
(All this is from memory as I read the ads in Splash magazine.)
electric/electronic circuits operate in the real world. mechanical example is what you're after.
https://www.youtube.com/channel/UCV0t1y4h_6-2SqEpXBXgwFQ
A lot of what you wrote reminded me of what he is working on - the trumpet sim is not entirely accurate yet but watching those reflections bounce and forth like you describe is very interesting.
Trumpet Video: https://www.youtube.com/watch?v=rGNUHigqUBM&t=87s
> but you can of course design a circuit that will adjust voltage to keep current constant
So there's two designs and they're different in important ways. But first: the common part of _both_ designs is that the transistor is working as a "controlled resistor". The question is where you place this special resistor. The other commonality is that "negative-feedback" can configure this transistor to reach the appropriate resistance very easily.
So with the common stuff out of the way: we have two designs. "Series Regulator" and "Shunt Regulators" (traditionally voltage-regulators, but they could be current in practice. I'll discuss as if they're current regulators).
1. Series Regulator -- The transistor is treated as an adjustable resistor "in series" with the rest of the circuit. This "pinches down" the voltage/current to the level deemed acceptable to the engineer. Ex: If "downstream", you sense a 100-Ohm load and you have a target-current of 10mA, and your source voltage is 5V, you set the transistor so that its equivalent to 400-Ohms (total a 500-ohm system, so 10mA goes through).
But if the downstream circuit changes (a button was pressed and a motor is now being driven), and the downstream circuit now looks like a 10-Ohm load, to keep the constant 10mA current your Series-Regulator will automatically set the transistor to act like a 490-Ohm resistor (keeping the 500-ohm system, so 10mA remains constant).
2. Shunt Regulator -- The transistor is treated as an adjustable resistor "in parallel" with the rest of the circuit. This "diverts" excess energy to ground, causing the rest of the circuit to effectively function within its specifications. Ex: If "downstream", you sense a 100-Ohm load and you have a target-current of 10mA and your source current is 50mA, you set the transistor so that it is equivalent to 25-Ohms. This shunts 40mA to ground, and the remaining 10mA goes to the 100-Ohm load.
But if the downstream circuit changes (a button was pressed and a motor is now driven), and the downstream circuit now looks like a 10-Ohm load... to keep the constant 10mA current your Shunt-regulator will automatically set the transistor to act like a 2.5-Ohm load. This shunts 40mA to ground and the remaining 10mA goes to the 100-Ohm load.
-----------
Traditionally, series and shunt regulators sense voltage (not current), but its not very difficult to turn a voltage-regulator into a current-regulator instead.
Series regulators are your typical 7905 or whatever. They are more efficient (as you can tell by their obvious operation) and simpler to use.
Shunt regulators are traditionally Zener Diodes, or other circuits that are based "like" a Zener Diode. They can generate constant voltage offsets reliably (ex: if you have a 9V line from a series regulator, and you need a 7V reference, you can use a shunt-regulator to very accurately create -2V).
--------------
As you can see, its all "pulling tricks".
Of course, the switching regulator (Ex: MC34063. Don't use, this is an old chip lol. But maybe TI's Simple Switcher series, or similar), truly "push" current thanks to an externally supplied inductor... and as a result lead to far superior efficiency specs.
Another "pushing" trick is a charge-pump. You can turn on capacitors in such a way that they double the voltage. That's the thing about "pushing", you need an ability to increase voltage until the "downstream" circuit acts the way you like.
Inductors (and capacitors, to a lesser extent) _can_ push. But its dangerous and somewhat difficult to design well. (Fortunately, we have pre-made modules like TI's Simple Switcher or Microchip's MCP1640, etc. etc. that do the job for us automatically... as well as pre-made power supplies).
Except for inductors. See: Tesla coils.
If you forget a snubbing diode on a large motor (which is very inductive), you'll likely see some fires on your PCB. Inductors (and inductive loads) will push current even if the other side doesn't want it (ex: even if the other side is a 10 Gig-ohm resistance, the current will continue and possibly spike the voltage to millions-of-volts and shoot lightning out to allow the inductor to keep pushing the current)
I've been getting into microwave circuit design this year for work. One "fun" thing I've learned is that even at low gigahertz frequencies, if you want to make accurate impedance measurements with a network analyzer you have to adjust for signal propagation delays with picosecond precision. On the boards I've made, every millimeter of transmission line is about 5.56 picoseconds of delay, which is about 10 degrees of phase shift at 5 gigahertz.
Parasitic inductance and capacitance also makes those nice, simple terminating resistors look at lot less simple, but that's another story...
I myself have a knock-off that goes to about 1 Ghz and was even cheaper, and it was quite instructive in helping me get a feel for reflections, etc... and came in handy installing some SMD capacitors in the right places on a 100 Watt UHF amplifier for the 440 Mhz band. A few mm of movement made all the difference in the world in terms of matching.
https://www.youtube.com/live/ySuUZEjARPY
The mindblowing thing to internalize is that you don’t route energy as electrons through copper traces (they move incredibly slow) but merely use the copper to guide a bunch of waves traveling outside of them, where they are up to all kinds of shenanigans like coupling, reflecting etc.
The magnetic field is so strong you can't have any digital electronics within meters of the NMR- but you can put some impedance matching analog network along with a couple potentiometers and 7-segment displays so a human brain and hands (which are much less affected by magnetism) can reduce radio reflections.
RF (and all AC) still seems like spooky magic to me, fortunately I don't deal with signals above 100khz.
[1]https://www.amazon.com/High-Speed-Digital-Design-Handbook/dp...
The article then calculated how many bits must be in-flight on the board to achieve the higher data rate given the bus width and the distance :-)
https://electronics.stackexchange.com/questions/59208/transm...
This one is OK too:
https://electronics.stackexchange.com/questions/150222/why-i...
The Art of Electronics 3rd Ed has a great explanation of series and parallel circuit terminations that I also highly recommend for understanding this, I think in chapter 15.
The whole thing is useful, but those who are just interested in impedance and reflections can skip to chapters 4 and 5.
Apart from shielding and carefully modeling your board (especially the ground plane, supply and any connections that carry a significant fraction of inbound power) you will always end up testing for compliance and that's the gold standard. I think simulation is very useful and can cut down on the number of physical test runs significantly but I've yet to see a design that did exactly what was predicted. Wiring, what happens just outside of the board enclosure, environmental factors, it all adds up. I see simulation as a way to be more efficient, not as a silver bullet to be able to guarantee certification is a one-shot, but possibly others have better experience.
There are a couple of very simple tricks to test for EMI sensitivity (a handful of coins, an old fashioned piezo based stove lighter and the oldest cell phone you can get in close proximity to the board), as well as a simple field strength meter. Between those you can probably identify and eliminate the worst and after that it's trial run time at the certification authorities if you are making a device that is to be used in a regulated market.
Especially the piezo lighter is interesting, I've had circuits that required substantial redesign just to get them to the point that they would not lock up hard.
What's interesting about this stuff is how un-intuitive some of it is. Note that this field is continuously in development and that new tools and techniques are brought to market all the time. Look the other way for a few years and you feel like a dinosaur.
It might. For example, Lukas Henkel is designing an open source laptop and heavily relying on simulation for that. In the post ([1]), he provides visualization of antenna performance for different placements inside the laptop case.
I quote, in case, if LinkedIn wants people to log in to view the post:
>I want to optimize the antenna positioning in my laptop design using open-source tools.
>The shown simulation is a 3D electromagnetic field simulation performed with the open-source tool Elmer FEM. The aluminum laptop case will have a large impact on the antenna gain and directionality. For correctly iterating on a good antenna positioning, it is necessary to integrate the complex 3D geometry of the laptop case into the simulation.
>I´m currently exploring three possible locations for the antenna. There may also be one option to make the laptop case itself as a part of a cavity antenna.
>The tools used for the shown simulation are all free and open source:
>Mesh generation: Salome_Meca
>Solver: Elmer FEM
>Visualization: Paraview
1. https://www.linkedin.com/posts/lukas-henkel-ovt_opensource-d...
I wish, as a practicing EE, that it was easier to transmit the knowledge in a faster way than doing it for a long time. Unfortunately, nobody seems to have figured out how to teach it.
It bums me out a little bit. I really love what I do, and I think it's magic too. I wish I could share that with more people.
Sadly, but justifiably, this means that they go get paying jobs.
Depends on the MOSFET. Most discrete MOSFETs have pretty hefty capacitance at their gate, looking like a short to high-frequency inputs.
> The simplest remedy may be adding a “sink” resistor on the receiving end, connected to the signal’s return path. This is usually paired with a series resistor on the driving side, both to limit peak current and to at least roughly match the specific impedance of the trace.
The simplest remedy would be to use series resistor matched to the trace impedance to prevent the reflection bouncing multiple times, probe at the gate and only add parallel termination resistor if it is actually needed. Because then you need to work around the voltage drop.
When driving some kind of power MOSFET you want it to switch as fast as possible because of the power loss in the linear region.
Here’s one of the classic lectures on wave propagation and reflections, where it looks at similarities in wave behaviour across mechanical, electrical, acoustic and optical systems.
AT&T Similarities of Wave Behaviour (1959): https://youtu.be/DovunOxlY1k
This might be needlessly pedantic, but you've got this a bit wrong from a philosophical standpoint. Wires don't end up looking like transmission lines, they always ARE transmission lines. At low frequencies, transmission lines end up looking like the idealized cartoon wires that we use in circuit analysis.
Think of it as a wave, and then watch this video https://youtu.be/DovunOxlY1k. Then you will have a strong mental model.
God that's so annoying to hear in your apartment at night. I wish building developers wouldn't be so stingy and install more insulation or a water ahmmer damper.
Best way to describe reflection of signals in a wire I've ever seen. It's not accurate in the sense that the source does not push energy down the wire, but still a good way to see it. Maybe I'll finally remember if you get a positive or negative reflection when the termination resistor is too low or too high.
[1] https://web.archive.org/web/20160507110751/http://www.csd.uw...
[1] Other vendors made them...I just always had a Fluke
This is only an issue for people who are crossing into the realm where the "parasitics" they were taught to ignore have become proper components of their circuits.
This is why my only use of the word was in quotes. I'm not disagreeing. RF people, where these effects are non-negligible/primary, embrace this topological reality completely, with their tooling. What you're saying isn't new, it is known. The only people calling it "parasitics" are coming from the simplified models, where these effects were negligible or mitigated by some rule-of-thumb to make them negligible.
There has been work on what you're saying for many decades, as can be seen in the tooling. The AI aspect of it has been attempted through the decades, without success, yet. But, this is a very active area of research.