Announcement

Collapse
No announcement yet.

Current Flow in RC Low Pass Filter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Current Flow in RC Low Pass Filter

    Hi!

    I have been looking into RC Low Pass filters a wee bit more than I possibly should. whilst I'm ok with the math to get to the cutoff frequency, and build up an RC filter that performs as I need it to, I am somewhat confused as to how the current flows in a filter.

    I simulated the filter as per the attached image.

    As Vin increases, current flows through the resistor and the capacitor. As the voltage increases, more current is pushed into the capacitor and the voltage across the capacitor increases. As long as Vin > Vc, the capacitor will continue to charge. At some point, Vin < Vc, and the capacitor will discharge. This will produce a negative current, which has no where to go but back into the source - this appears to be correct according to my simulation. This is what I am not quite grasping - Vin is still positive and trying to push current into the circuit, but the higher voltage capacitor is pushing current back into the source - is this correct? what are the real world implications of this?

    i have looked into this for a few days, read all my text books, but I have yet to find any great discussion on this - most texts jump straight to the equations. I have discussed this with a few people but have yet to find a good answer. Hoping someone can clear my misunderstanding!

    To be clear, I get how a filter works, and why it works. The math makes sense - the response over a full cycle; but this detail is messing with me for some reason.

    Attached Files

  • #2
    The current flowing through R1 is linear compared to the voltage difference between V1 (Vin) and Vcap.
    V1 may be positive, but when the voltage across the capacitor is higher, it will drive the current through the R1 into V1.
    Perhaps your 'problem' is that you were told that when voltage is positive, the current is too. That assumption is only true in single source and (static) DC.

    Comment


    • #3
      hi qdrives thanks for the reply -

      The current flowing through R1 is linear compared to the voltage difference between V1 (Vin) and Vcap. - yep, get this; though when you say "linear" i assume you mean "in phase"? as a resistor will not introduce a phase difference the current through a resistive load will always be in phase with that voltage drop. And you can see this in the simulation; in the top of trace, the blue is Vin; the Orange is Vout (Vcap) and the brown is Vin - Vout. Vcap is delayed relative to Vin due to the charging nature of the capacitor which is in turn due to the current flow and is influenced by the value of the resistance. If we lower either R1 or C2, we will get a faster rise time and at some point Vcap will just about mirror Vin. Vin - Vout is the voltage across the R1 (and of course Vout - Vin would be the same waveform reflected about the x axis). Thus when Vcap = Vin, (Vin - Vout) = 0. In the lower traces, blue is current through R1, and orange is the current through the load R4. So we can see that I(R1) is in phase with Vin-Vout, and that I(R4) is in phase with Vout.

      V1 may be positive, but when the voltage across the capacitor is higher, it will drive the current through the R1 into V1. - yep. intuitively this is what I thought, and this is confirmed by the simulation. This is where my question comes in, and it might be more a question on how voltage sources work. if we think about charge flow here - the source is pushing charge through R1, and onto the top plate of C2, this then pushes charge out from the bottom plate back to the source - thus we see current flowing. As Vin increases, we push more charge, the charges accumulate further on the capacitors plates, the rate at which the charges are being pushed into the capacitor increases to some max value and then slows down, but as the voltage across the capacitor is still less than Vin, it will continue to accumulate charges. Somewhere around 6.4mS, the charges stored on the capacitor produces a voltage that matches Vin. We now have the maximum amount of charge stored on the top plate, and maximum deficit of charge on the bottom plate, meaning the electric field is at it's maximum. Once Vin drops below Vcap, we then have charges that need to go somewhere.

      If we consider the charge carriers as electrons, the top plate contains a lot of electrons, it's going to want to lose those electrons to return to neutral, and the bottom plate will have a deficit of electrons, so it will want to consume electrons to return to being electrically neutral. Thus, when the capacitor discharges, it will be forcing carrier charges (electrons) into the source, which is actively trying to push electrons into the system. At the bottom plate, the capacitor will be pulling electrons from the source. This is what i am not yet coming to grips with.

      if you consider a classic RC circuit powered from a battery with a switch. When you throw the switch, the capacitor charges to Vin over 4-5 Time Constants, and sits there; if you open the switch, the capacitor will happily sit there charged. If you add a load, it will discharge through the load. excess electrons from one plate will flow through the load and into the other plate to fill the neutralise the net positive charge the other plate had accumulated during charging. This make complete sense. In this circuit, if you pulled the resistor out exactly when Vin = Vcap, I suspect you would see the same effect, the capacitor would discharge through the load. But that's not what happens here. This also then leads to the question, we have a voltage Vout across a load R4, and so we have a current flowing (which we see in the orange lower trace) - i.e.: we have charges flowing;

      During the window ~6.4mS -> ~8mS; Vin is positive, Vcap is positive, Vcap > Vin, I(R1) is negative and I(R4) is positive. Considering the node joining R1, C2 and R4 - current enters this node from the capacitor, and leaves towards R1, and R4. For this window of time my conclusions then is that the discharge current from C2 provides the current through the load R4; Again, this is fine. As for the source, I guess it depends on what the source is as to what would happen? for example, an alkaline battery probably would not like this situation (and to be clear, an alkaline battery would be impossible in this situation as we are talking about an AC source) however imagine we create the AC source by a rotating coil generator. the coil rotating in a magnetic field induces an AC EMF, now in this case, as it spins instead of pushing current out, its receiving current - what implications does this have? I guess we have the same question, if we had a transformer as the source - there is an induced EMF is the secondary that is trying to push current, but it's sinking current instead.. Consider an audio amplifier, or an op-amp.. how would they handle such a situation?

      The genesis of this question is actually this portion of the MIxed Signal HW Design with Kicad Course Click image for larger version

Name:	mixed signal RC filter.png
Views:	72
Size:	441.7 KB
ID:	19738
      the purpose of the RC filter formed by R100 and C102 on the input to U100 (3v3 LDO regulator) is to filter out noise from the buck converter U101, and I guess any noise from the USB source VBUS. Considering the node directly before R100; we have 5v from VBUS + noise which will appear as ripple on the power rail. But in the window we are looking at - what are the implications here? we will be pushing a negative current *somewhere* in the circuit, either down to U101 or back towards the USB port?

      Perhaps your 'problem' is that you were told that when voltage is positive, the current is too. That assumption is only true in single source and (static) DC. Hrmm... I want to be fair to any of my teachers in the past and say, no; i've come across this; im familiar with leading and lagging currents etc; And to be fair, I'm comfortable with the math to derive the formula's, work with phasors etc; but I have just never, until now stopped to consider what is happening at the charge level, and what the real world implications of that might be.

      cheers!
      Last edited by SockThief; 05-02-2022, 03:32 AM.

      Comment


      • #4
        A very theoretical approach to something I think is much simpler.
        Perhaps it starts with the name "voltage source". However, the voltage source in the simulation is just as easily a sink as a source. It just make the output voltage to the level it should (AC sine in this case).If that means that it has to sink current to do so, it will.

        Comment


        • #5
          Hey qdrives - sorry for the late reply, we got some illness at home and my attention has been taken elsewhere! In the meantime this was what I came up with; see what you think

          - as is always the case with voltage, it's the difference in potential between two points that matters; if there is a potential difference, there will be an electric field and thus current (opposite the direction of electric field of course).

          - an electron doesn't care what else is around, all it knows is "there is an electric field, i'd better move!", and since Vcap > Vin, there will be a potential difference and the source just has to suck it up and deal with it!

          - if we remove the load from the circuit (for example we could be feeding an (ideal) op-amp), then there is only one way for the current to go, back through R1 an into the source. Anything else is impossible

          1. let's consider an AC power source from a coil rotating in a magnetic field with slip rings

          - the rotating ring generates an EMF proportional to the number of turns, the magnetic field strength and the speed of rotation.

          - the generated EMF will exist across the coil, when connected to a load a current will be produced which is proportional to the circuit impedance as a function of time. The current that flows is only due to the fact that there is a potential difference across the coils and thus a field is generated in the wire that causes current to flow.

          - when Vcap > Vin, that current reverses due to the reversed potential difference, the fact that Vin is positive is actually irrelevant. the relative voltage is lower than Vcap.. the fact that Vin is positive just means the relative potential difference is smaller.

          - being a simple coil of wire, the reversed current will just cause electrons to flow from the capacitor through the resistor, through the coil and into other side of the capacitor resulting in, over a few time constants, the capacitor returning to electrically neutral on both plates. this would be consistent with KCL


          - if we add a load, then we have have two loops for the capacitor to discharge through, back through R1 as above but also through the load. The discharge current will flow proportionally to the impedance of each loop. But I(R1) + I(R4) = I(cap) during the discharge part of the cycle. And the result is the same. And indeed if I look at the absolute value of the currents, I(cap) = I(R1) + I(R4)

          2. I looked at when the input is a square wave, i.e.: this circuit
          Click image for larger version

Name:	fedevel_forum_1.png
Views:	58
Size:	36.4 KB
ID:	19835
          for this we get waveforms as below (the current being I(R5) - and we clearly see the negative current spike when the 555 switches off; again, this has no where to go but back through the output pin

          Click image for larger version

Name:	fedevel_forum_2.png
Views:	59
Size:	41.9 KB
ID:	19836
          looking at the circuit internals for a 555,

          Click image for larger version

Name:	fedevel_forum_3.png
Views:	59
Size:	64.2 KB
ID:	19837

          we can see that when the output is 0v, any reverse current will be passed through to circuit ground harmlessly.


          assuming I am right in my analysis (which I think I am! and feel free to correct me if i'm not) - my intuition was right all along. And you do need to consider what you are connecting capacitors to, they will generate negative currents and you have to deal with that. And in fact, this is exactly the same with inductors - we are used to putting flyback diodes in to snub the reverse voltage generated with the electric field collapses!
          Attached Files

          Comment


          • #6
            From the amount of theoretic detail you are able to write, it amazes me that you had that question (or I misunderstood the question).

            "...you do need to consider what you are connecting capacitors to, they will generate negative currents and you have to deal with that." - well, in my opinion it is not so much the negative current.
            1) Connecting capacitors, especially ceramic ones, can cause high peak currents.
            2) If you only have a high side drive, the current (charge) has nowhere to go, so the square wave in your 555 example would almost be flat with a single rise and leakage (or load) to lower it.
            Both of these issues have caused products to fail and requiring redesign.

            "an electron doesn't care what else is around, all it knows is "there is an electric field, i'd better move!", and since Vcap > Vin, there will be a potential difference and the source just has to suck it up and deal with it!" - perhaps this video https://www.youtube.com/watch?v=Lp_b8gQpxW8 and the many others on this topic can make you question even more.

            Comment


            • #7
              hej qdrives - thanks so much for your insights; i have spent the weekend considering everything you have said, and to be honest I am very much enjoying this conversation. I have a follow up but I am taking a bit of time to make sure I have everything clear in my mind.

              Thanks, talk to you soon!

              Comment

              Working...
              X