I want to simulate the calibration of an oscilloscope test head with circuit sim - Page 1
Forum section: electronics / beginners

author: Revan
author_rank: Contributor
timestamp: June 13, 2025, 05:19:19 pm
content: But the circuit simulator fails to simulate overcompensation and undercompensation—the square wave always remains too ideal.Is there any free simulation software that can accurately simulate the calibration of an oscilloscope probe?"Unfortunately I don't have an oscilloscop yet to test it on real hardware, so I wanted to simulate the behavior.Here's my Test setup in the circuit simulator:https://www.falstad.com/circuit/circuitjs.htmlAnd as text for the Circuit Simulator.Code:$ 1 7.8125e-10 0.04924642876754098 41 5 43 5e-11g 160 368 160 416 0 0r 512 160 512 256 0 1000w 512 256 512 368 0w -32 176 -32 80 0w 512 80 512 160 0c 320 128 320 288 4 1e-10 0.001 0.001 0.1w 320 128 320 80 0w 320 288 320 368 0w 160 368 320 368 0w 512 80 624 80 0R 640 176 640 272 0 2 40000000 5 0 0 0.5w 624 80 640 80 0w 640 80 640 176 0w 160 368 -32 368 0r -32 224 -32 320 0 1000000w -32 224 -32 176 0w -32 320 -32 368 0r 64 80 208 80 0 9000000w 64 80 -32 80 0w 320 368 416 368 0w 416 368 512 368 0w 208 80 320 80 0w 320 80 416 80 0w 416 80 512 80 0368 -32 80 -80 64 0 0x 337 190 425 193 4 10 probe\scable\s100\spFc 96 128 176 128 4 1e-11 0.001 0.001 0w 176 128 208 128 0w 208 128 208 80 0w 96 128 64 128 0w 64 128 64 80 0x 78 166 241 186 4 14 compensation\scapacitor\\n\sadjust\sfrom\s5pF\sto\s20\spFx -124 270 -45 324 4 14 internal\\noscilloscope\\n1M\sOhm\\n\sresistorx 73 53 200 56 4 24 10:1\sprobe:b 32 16 -166 436 0b 48 16 446 436 0b 464 16 698 434 0x 484 54 564 57 4 24 Device:x -147 404 -7 407 4 24 Oscilloscopeo 24 1 0 4099 8 8 0 2 24 3Here's a picture of the circuit:

author: tggzzz
author_rank: Super Contributor
timestamp: June 13, 2025, 05:42:22 pm
content: Your model of the scope input is wrong; have a look at the manual or at the front panel legend.Your model of the cable is wrong; there is no 100pF capacitance. Ideally you should model it as a lossy transmission line, but that's not necessary for a quick and dirty simulation. (I doubt that simulator has a lossy transmission line model; you would have to use LTSpice or similar)For more details, see the Tektronix references athttps://entertaininghacks.wordpress.com/library-2/scope-probe-reference-material/quoteEDIT: corrected that reference.

author: Revan
author_rank: Contributor
timestamp: June 13, 2025, 06:06:19 pm
content: Quote from: tggzzz on June 13, 2025, 05:42:22 pmWell there is. In a probe, the coaxial shield cable forms a capacitance with the measurement lead. So if you want to simulate the behavior, you have to replicate it with a capacitor.See here:

author: tggzzz
author_rank: Super Contributor
timestamp: June 13, 2025, 06:22:35 pm
content: Quote from: Revan on June 13, 2025, 06:06:19 pmNo, it doesn't. And if it did, your schematic would be wrong.The cable is a transmission line.Rule of thumb: anybody who draws signal flow from right to left is not "skilled in the art", and probably doesn't have a good understanding. Yoootooob is full of such people - and LLM bots are being trained on such slop.But hey, don't read the references written by people who do have a deep understanding of what they are talking about; just continue with your misunderstandings.

author: Revan
author_rank: Contributor
timestamp: June 13, 2025, 07:02:39 pm
content: Quote from: tggzzz on June 13, 2025, 06:22:35 pmThen, if you're right, we wouldn't need to calibrate probes. A simple BNC cable to the probe tips would be sufficient.And if you're wrong, what would need to be changed in my circuit? What exactly would be wrong?QuoteHis explanation is physically correct. If you place two wires next to each other, they form a capacitance. Especially with a shielded cable. This is comparable to a plate capacitor with a very small capacitance. You'd have to provide arguments as to why that shouldn't be the case.QuoteYour link above does not lead to a book called Tektronix reference. Which book are you referring to, which page?

author: tggzzz
author_rank: Super Contributor
timestamp: June 13, 2025, 07:30:01 pm
content: Quote from: Revan on June 13, 2025, 07:02:39 pmThe references explain it better than I could.QuoteThat is part of it, the other part being the inductance of the wire. The distributed LC behaves like neither L nor C, but as a transmission line.QuoteNow thatisembarrassingMy mistake; apologies.Here's the correct reference:https://entertaininghacks.wordpress.com/library-2/scope-probe-reference-material/

author: MariuszD
author_rank: Regular Contributor
timestamp: June 13, 2025, 07:41:44 pm
content: This is a simplified approach. You can analyse it in a simulation, but real passive probe is more complicated than that.If you want to read how real probe with lossy transmission line works:"Tektronix Oscilloscope Probe Circuits Concepts"https://w140.com/tekwiki/images/6/62/062-1146-00.pdf

author: Revan
author_rank: Contributor
timestamp: June 13, 2025, 07:49:40 pm
content: Quote from: tggzzz on June 13, 2025, 07:30:01 pmFine, I will check that out.QuotePage 12 Figures 2-3 show exactly what is discussed in the video. And it matches my circuit. The only thing I forgot is another capacitor on the oscilloscope side, about 20 pF. In addition, the position of the 100 pF capacitor must only be installed in the circuit after the two resistors and capacitors connected in parallel. Otherwise there is no significant difference.Corrected version:Version 2

author: MariuszD
author_rank: Regular Contributor
timestamp: June 13, 2025, 08:21:29 pm
content: You won't see this at 40MHz, look at my simulation.

author: Revan
author_rank: Contributor
timestamp: June 13, 2025, 09:02:25 pm
content: Quote from: MariuszD on June 13, 2025, 08:21:29 pmThanks. It's working now. I changed the square wave to 3 kHz and set the capacitor to 13.5 pF to get a good square wave.Increasing or decreasing the capacitor value changes the square wave as expected.I thought the problem only occurred at very high frequencies. I was probably wrong in this case, or it's not visible in the scope view of the circuit simulator.Version 3, 3 kHz Signal

author: tggzzz
author_rank: Super Contributor
timestamp: June 13, 2025, 09:16:20 pm
content: The control you have been changing is low frequency compensation.There are other forms of annotations and mitigations visible at higher frequencies. They would be visible if your models more closely matched the physics of implementations of probes. The single most important change would be to model the ~1m cable length as a lossy transmission line.When looking at higher frequencies, the best form of stimulus is a voltage step with a linear transition/risetime. Roughly speaking bandwidth=0.35/transitionTime.

author: MariuszD
author_rank: Regular Contributor
timestamp: June 13, 2025, 09:25:31 pm
content: Quote from: Revan on June 13, 2025, 09:02:25 pmIf you have transmission line model. At very high frequencies you will see reflections.In my second simulation, there is a cable with small and large losses.

author: Manul
author_rank: Super Contributor
timestamp: June 13, 2025, 09:41:16 pm
content: In a most simple form, it's easy to compensate a resistive voltage divider. You simply add or remove capacitance to make an AC divider which has the same ratio as DC divider (resistors). You can make voltage "dividers" from any combination of resistive and reactive elements, so two capacitors in series is also a divider (for AC signals). That is simple to make and simple to simulate (MariuszD simulation). It perfectly shows how AC compensation works. If such circuit is implemented on a PCB in a structure with no significant inductances and structure size much smaller than the wavelengths involved, then it's the end of story. Unfortunately, for a scope probe, it's not the end of story, only the beginning. Scope probe and it's cable are not very small compared to wavelengths of signals it used for, so you can't model it in a trivial way.Regarding why cable is not simply a capacitor. Personally I often find it useful to think through extreme examples. So let's say I make a capacitor from two square 1 meter metal plates at distance L. The effective area is 1 million square millimeters. Ok. Now take two 1mm width and 1km length stripes (basically two thin wires) and put them at distance L. Same 1 million square millimeters at distance L, two mathematically equivalent capacitors. In reality they will act very differently. Imagine you connect 1km long capacitor to voltage source. It will not simply charge at once. Voltage edge will take time to travel till the end and thin wires have significant inductance. 1km long capacitor will act like a medium with specific "stiffness" (impedance) through which wave edge is traveling. Wave will also reflect from the other end, possibly bouncing back and forth a few times. Lots of interesting things will start happening. It's not anymore trivial. How long is too long depends on edge speed. With fast edge (sharp wavefront), these effects shows (usually in a bad way, screwing your day) even in short cables.

author: Revan
author_rank: Contributor
timestamp: June 13, 2025, 11:38:48 pm
content: Okay, because the Circuit Simulator unfortunately doesn't have an adjustable capacitor that you can easily adjust on the sidebar, like the adjustable resistor in the Circuit Simulator, I've now built in a switch that allows you to easily switch between 3 capacitor sizes.Switch position 1, with the large capacitor, is used to showovercompensation.Switch position 2 has a capacitor selected to produce thesquare wave signal as ideal as possible.Switch position 3 has a small capacitor, which showsundercompensation.Version 4 with switch

author: showman
author_rank: Contributor
timestamp: June 14, 2025, 12:16:34 am
content: Quote from: tggzzz on June 13, 2025, 06:22:35 pmRight. Now let's make the cable 0-length. Is it still a transmission line? Do you still need compensation?QuoteMaybe I misread something, but are you suggesting that w2aew does not have a good understanding of oscilloscopes, but a random tggzzz from eevblog forum which is also full of "such people" does?Also, perhaps you should also read your references, this is straight from the Tektronix Oscilloscope Probe Circuits that you referred to. Perhaps you should write them that the cable is a transmission line and their model is wrong.

author: Manul
author_rank: Super Contributor
timestamp: June 14, 2025, 01:17:50 am
content: Quote from: showman on June 14, 2025, 12:16:34 amWell, zero length is not a transmission line, but the circuit still needs compensation, because it's very unlikely that the parasitic capacitances at scope input and around 9M resistor has correct ratio by accident.Quote from: showman on June 14, 2025, 12:16:34 amSuch simplified model is valid for low frequencies / short cable, useful for educational purposes. It's not a model of your modern 100, 200, 350Mhz probe, that's the point.

author: showman
author_rank: Contributor
timestamp: June 14, 2025, 04:38:51 pm
content: Quote from: Manul on June 14, 2025, 01:17:50 amBut it is about educational purposes in this case. The goal was to not to design a 350 MHz probe, but to get the voltage divider compensation to work in a simulator, and for that this model is perfectly valid.

author: shapirus
author_rank: Super Contributor
timestamp: June 14, 2025, 06:20:14 pm
content: Quote from: tggzzz on June 13, 2025, 06:22:35 pmNot really the case in the video linked. There's a reason the circuit was drawn in that specific orientation, it makes perfect sense, as it explains it following the sequence of actions start to end, therefore illustrated in the left to right direction on paper: 1) connect the probe to the scope; 2) connect the probe to circuit under test.p.s. regardless of that, I'm pretty sure thatw2aewhas a pretty decent understanding of these things ;)

author: shapirus
author_rank: Super Contributor
timestamp: June 14, 2025, 06:27:55 pm
content: Quote from: showman on June 14, 2025, 12:16:34 amThat Tektronix circuit diagram actually shows the cable as trasmission line. I'm not exactly sure, but I think that the cylinder symbol actually means that. The KiCad symbol library has the same symbol for transmission lines too.Additionally, it's worth mentioning that ngspice supports lossy transmission lines:https://ngspice.sourceforge.io/docs/ngspice-html-manual/manual.xhtml#magicparlabel-6360I remember playing with them to simulate a scope probe with KiCad and ngspice. They worked well.

author: showman
author_rank: Contributor
timestamp: June 14, 2025, 07:51:57 pm
content: Quote from: shapirus on June 14, 2025, 06:27:55 pmYes, but at that stage in the book and the compensation analysis they consider the effect of the cable only as capacitance. Couple of pages later they get to the HF/transmission line stuff.

author: Revan
author_rank: Contributor
timestamp: June 15, 2025, 03:41:10 pm
content: Quote from: tggzzz on June 13, 2025, 06:22:35 pmBy the way, as a side note about this random YouTuber named Alan Wolke W2AEW: even David knows him.He mentions him from 7:42 in this video.