Back to "learn electronics"...
For the next semester, I will be building sample circuits to reinforce my grandson's Circuits class. Why a budding ME has to take circuits remains unanswered, at least in my mind.
So, we all know "ELI the ICE man" but when was the last time you saw it? In theory, the voltage across the resistor in an RC circuit should lead the voltage across the capacitor by 90 degrees. It's easy enough to model this in LTspice but you need a differential measurement across the resistor. I don't know how to do that... Probably a math function taking the difference in two node voltages.
My Analog Discovery 2 knows how to do that!
Build a simple little series RC circuit (10k Ohms, 0.1 ufd, 159 Hz sine wave) with the signal coming in to the resistor and one side of the capacitor wired to ground. A low pass filter.
Set Scope Channel 1 as the voltage across the resistor (this is a differential measurement, it is not measured relative to ground) and note that the voltage and current are in phase across the resistor so even though we are measuring voltage, we can talk about the waveform as current. More on that in a moment...
Connect Scope Channel 2 across the capacitor. This is a simple measurement because one side is ground. No differential capability is required.
Now, plot the waveforms - the Orange waveform is the current (voltage across resistor) and the Blue waveform is the voltage across the capacitor.
Remember ICE man? I leads E in a C circuit. The current waveform (Orange) is exactly 90 degrees ahead of voltage waveform (Blue).
ETA: The current in the resistor is the same as the current in the capacitor so it is correct to say that the current flowing through the capacitor is 90 degrees ahead of the voltage across the capacitor. ICE - current in capacitor leads voltage.
What's the point? Well, other than it's just plain fun to see these things at work, it really gets down to how much you can learn with a simple RC circuit. I also have a Bode' Plot of frequency and phase as well as a plot of a slow square wave causing the capacitor to charge and discharge for 6 Tau (time constants). We know Tau is 1 ms (10-7 Farads times 104 Ohms gives 10-3 seconds or 1 ms). We know that the charge and discharge are exponential waveforms and in 6 time constants the output will be 99+% of the input voltage but it's just fun to see it work.
I haven't spent a lot of time with Digilent's Real Analog program but I have spent a lot of time with the Analog Discovery 2. There's a lot of theory wrapped up in a resistor and capacitor. It's one thing to read about it, another to simulate it but it gets real when it's on your breadboard. Real parts, real concepts.
There really is a lot of education in simple circuits. The problem is, we just blow by them in class and never really have the time to sit down and spend some quality time with them.