Author Topic: Understanding RC circuit  (Read 1172 times)

0 Members and 1 Guest are viewing this topic.

Offline markuszTopic starter

  • Contributor
  • Posts: 18
  • Country: ca
Understanding RC circuit
« on: February 14, 2022, 02:51:40 am »
In one of his videos, Ben Eater used an RC circuit to trigger a 680ns for a falling edge. It's about 13:45 (full circuit built around 15:00) in .

I drafted the circuit in falstad:



I have a few questions regarding the circuit:

Q1: Is my drawing good? (Comparing to 15:00 in video)

Q2: I don't understand why he calls the 10K resistor a discharging resistor. When the switch is flipped on, I think two things are happening:
    a) capacitor loses voltage immediately because it behaves like a wire at the beginning, but in T=RC=680ns about 66% of 5V is going to be charged on it (this 680ns will serve as the holding time for a LOW WE pin after the falling edge to latch data), and after 680ns it is charged to the point to be recognized as a HIGH, not LOW anymore.

    b) The 10K resistor directs current from 5V source to ground as it is now connected to ground through the switch.

    So the problem is I don't really see the capacitor "discharging" when the switch is flipped on. What I understand about "discharging capacitor" is one that serves as a temporary power source when the resistor gets disconnected from the main source, which is not the case. Why do we need the 10K resistor anyway? If we remove it, looks like the capacitor keeps the same behavior. I think I probably misunderstood something.

Q3: This is a pretty clever way to use capacitor to generate a short period of "holding time" a chip needs to accomplish something (in this case to latch data). Is there any better way to accomplish this WITHOUT involving a MCU?

Thanks in advance~~
« Last Edit: February 14, 2022, 03:12:09 am by markusz »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9933
  • Country: us
Re: Understanding RC circuit
« Reply #1 on: February 14, 2022, 03:41:50 am »

I have a few questions regarding the circuit:

Q1: Is my drawing good? (Comparing to 15:00 in video)

Yes

Quote

Q2: I don't understand why he calls the 10K resistor a discharging resistor. When the switch is flipped on, I think two things are happening:
    a) capacitor loses voltage immediately because it behaves like a wire at the beginning, but in T=RC=680ns about 66% of 5V is going to be charged on it (this 680ns will serve as the holding time for a LOW WE pin after the falling edge to latch data), and after 680ns it is charged to the point to be recognized as a HIGH, not LOW anymore.

    b) The 10K resistor directs current from 5V source to ground as it is now connected to ground through the switch.

    So the problem is I don't really see the capacitor "discharging" when the switch is flipped on. What I understand about "discharging capacitor" is one that serves as a temporary power source when the resistor gets disconnected from the main source, which is not the case. Why do we need the 10K resistor anyway? If we remove it, looks like the capacitor keeps the same behavior. I think I probably misunderstood something.

When the button is pressed, the output goes low and the capacitor takes on charge.  When the button is released, there is still charge on the capacitor and no way to dissipate it without the 10k resistor.  We can't discharge to ground, that would only add more charge but we somehow have to get the capacitor back to an empty state.  The 10k resistor does this.  Eventually, both sides of the capacitor have the same voltage and there is no net charge on the capacitor.

Quote
Q3: This is a pretty clever way to use capacitor to generate a short period of "holding time" a chip needs to accomplish something (in this case to latch data). Is there any better way to accomplish this WITHOUT involving a MCU?

Probably something with a one-shot (74ls123) or 555 timer.

When I was playing with the project, I built a chip programmer using an Arduino Nano and a couple of 74LS595 shift registers.  I serially shifted the address lines because the Nano didn't have enough pins.  Worked well!
« Last Edit: February 14, 2022, 03:44:51 am by rstofer »
 
The following users thanked this post: markusz

Offline markuszTopic starter

  • Contributor
  • Posts: 18
  • Country: ca
Re: Understanding RC circuit
« Reply #2 on: February 14, 2022, 01:48:57 pm »
Thanks! I'm trying to make sense of it. Not sure why, the RC mathematics is easy but whenever I look at real circuits they become a mystery to me.

Here is the screenshot of the circuit with point A and B labelled:


Quote
When the button is pressed, the output goes low and the capacitor takes on charge. 

I think I get this one. When the switch is on, point A has Voltage 0 because it's grounded, and initially the capacitor works as a wire to take on charge. Very shortly it charges up to close to 5V and the current through the 680 ohm is close to 0A. So in digital sense what we get is a rising edge of about 680ns (capacitor charged to around 2/3 of 5V to be digital 1).

Quote
When the button is released, there is still charge on the capacitor and no way to dissipate it without the 10k resistor.  We can't discharge to ground, that would only add more charge but we somehow have to get the capacitor back to an empty state.  The 10k resistor does this.  Eventually, both sides of the capacitor have the same voltage and there is no net charge on the capacitor.

This is the part that confuses me. In the simulator, when I flip open the switch, the scopes look like this:
- Top: Capacitor Voltage
- Middle: 10K ohm current
- Bottom: 680 ohm current


My question is: Is the discharging circuit B-R(680)-R(10K)-A? Sorry this is probably stupid but I always get confused when there are two power sources in the circuit. I know the 5V DC is not discharging because it doesn't have a loop while the capacitor has one, but somehow I get confused when two are in the same circuit (because I'd calculate the voltage at A and B and try to compare that with the +5V, and since they are not equal to +5V I'd think maybe there is some current going through them from the 5V source).
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9933
  • Country: us
Re: Understanding RC circuit
« Reply #3 on: February 14, 2022, 03:27:10 pm »
The capacitor can't count resistors.  So, draw an equivalent circuit with one capacitor and one 10k + 680 ohm (10.68k) resistor.  Now calculate the discharge.
 
The following users thanked this post: markusz


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf