 In this video I'm going to be doing a complete walk through of a two-position switch with a capacitor. We've got your two-position switch, we've got position A and position B here. We've got a resistor here and a resistor here. We've got a source voltage here. So we're going to walk through what happens when we go to position A and then we'll walk through what happens in position B. But first just to get the math behind us, let's assign it some values. I'm just going to give this guy here this current limiting resistor 500 ohms of resistance. This guy here this discharge resistor I'm going to give 1.5 kilo ohms. The capacitor we're going to give 100 microfarads and we'll just give this battery. It's a big battery, 240 volts. Now in position A this acts just like a charging capacitor. It's got one path to go, it goes that way back up to there, which means that this capacitor is on the charge and on the rise. So I'm not going to go through the math of this one because I've done another video on this. But what ends up happening is this guy fully charges up to 240 volts. And then when that happens current stops flowing and this guy just sits there with 240 volts on it. Then when we open this switch this guy still maintains 240 volts because it has no place for the electrons to go. Which is why we have position B because in position B what will happen is we'll allow it to discharge through this 1.5 kilo ohm resistor. So here we are in position B and if we look at this now we see that this resistor here is connected directly with this and we are not using this part of the circuit anymore. This battery is not being used because it's not connected. We have an open here. So let's just keep in mind that we had this capacitor here was charged up fully to 240 volts. So what's going to end up happening is this capacitor here is going to act like a battery that is going to discharge and drain very, very quickly. So basically let's get rid of all this stuff because that's just going to kind of confuse us and I'm going to make just one circuit. So here's our one little circuit. Super easy to deal with now. If you take a look at it we've got 240 volts on this guy right here. We've got a 1.5 kilo ohm resistor right here. It's just a basic circuit, very, very, very basic circuit with one resistor. And one source, one source, one resistor. Now in order to figure out some things, which we're going to get to in a second, let's look at the formulas that we're going to use. Like I've done in most of my videos, I've given you a little formula cheat sheet. So let's move on to that. So here's the formulas we're going to use. Just like we saw when voltage was on the rise across the capacitor, tau is equal to r times c that still holds true with this. So tau is equal to r times c. The only difference is that we are using the resistor, the 1.5 kilo ohm resistor, not the 500 ohm resistor. So our tau changes. We end up with tau equaling r times c, and then it's 5 times tau to equal full time to discharge. Then we get to our voltage at the capacitor. It's actually easier than before where we use 1 minus e to the negative x, negative x being your time constant, or your tau. This time we're not using 1 minus because it's the inverse, we're seeing it drop. So it's e to the negative x times b source equals to b at the capacitor, or the voltage at the capacitor. And then for our voltage of the resistor, because it's just a simple circuit where the capacitor is your source voltage and the resistor is the only resistance in the circuit, your voltage at the capacitor is equal to your voltage of the resistor. So as it drops across the resistor, sorry, it drops across the capacitor, it's the same drop across the resistor. It becomes very, very easy. Now keep talking about it being inverse. Let's just take a quick peek as I draw this up, just make sure I got the right pin here. So when we have voltage on the rise across the capacitor, it looked like that. So we had it going like that. Now what we're going to have happen now, let me just get this erased. If I can get my eraser here, there we go, get that erased here. As we have the voltage on the drop, it's going to be the exact inverse of that. So let's get that drawn there. It starts here and then it drops and it goes down to nothing. So it's the actual opposite of it. So let's start seeing what happens when we plug these numbers into the little circuit that we've got going. So first off, let's figure out what our tau is. So all we have to do is go 1.5 kilo ohms times 100 microfarads. That's 100 times 10 to the negative 6th. And that gives us our tau, which works out to be 150 milliseconds. Then to figure out our time to discharge, all we have to do is take this number and multiply it by 5. So that'll tell us how long it takes to totally discharge the capacitor, which works out to be 750 milliseconds. So that's pretty easy. Then all we've got left to figure out here is the voltage at the capacitor. And I said for this example, let's do it at the third tau. So all we have to do with this is we're going to use this formula. E to the negative 3, we're going to multiply that by 240 volts. So if we do that, that'll give us our voltage at the capacitor at the third tau. So let's see what that works out to be. Now that works out to be 11.95 volts right there. Now one second, I'm just going to cross something out here. This 240 volts is no longer there. Because what's happened is it's now discharging. So what actually is there is the 11.95 volts. And it continues to drop. So now the only thing left to figure out is what is our voltage at the resistor at the third tau. The voltage at the resistor is super easy. Because all we have to do is remember that this voltage here at the capacitor is a source. This is a resistor in the circuit. So whatever the voltage is here, the voltage has to be the same there. So if I have 11.95 volts on this guy, I have to have 11.95 volts on the resistor. And that completes the whole circuit. So you just have to remember, the biggest thing to remember is that you are dealing with a different resistor. So your tau, this tau, and your time to discharge is going to be different than it was when it was charging. And that's that. That's the walkthrough on a two-position selector switch with two resistors, one being a current limiting resistor, and one being a discharge resistor.