Below you can see the circuit we’re currently talking about.
The resistor and capacitor on the left of the inverter make up an RC delay element:
But how does the current flow in this circuit?
If you try to follow the current flow you might end up scratching your head.
The inverter actually has connections to plus and minus. To simplify, these are usually hidden in circuit diagrams. You just need to know that they’re there.
This means it’s not as easy as “what goes in, must come out” since the current can flow into and out from the plus and minus connections too.
The easiest way to think about current flow when you have logic gates is to assume no current flows into the input. And you can think of the output as either connected directly to plus (if it’s 1) or minus (if it’s 0).
This means we can look at the left and the right side of the inverter individually.
Current flow on the right side
The right side of the inverter is simple:
If the inverter outputs a 1, currents flows down from the inverter output, through the resistor and LED, down to minus.
If the inverter output is 0, no current flows on the right side.
Current flow on the left side
The left side of the inverter takes some more concentration.
But remember our rule:
Current always flows from a higher to a lower voltage – if there is a path for the current to take.
When you flip the switch from 0 to 1, the left side of the switch is connected to plus. The capacitor is currently discharged, so it has 0 volts across it. Which means there is a path from plus through the resistor and capacitor, down to minus – therefore current will flow.
When the capacitor is fully charged, it doesn’t allow any more current to flow through it. So the current flow stops.
“Fully charged” means the voltage across it has reached the voltage it is being charged with.
When you flip the switch back again from 1 to 0, do you see where the current flows?
Yes – it looks like it’s flowing backwards..!
But, as you now realize, current simply flows from higher voltage to lower voltage. If voltages change – and they often do – the current redirects from the new ‘high’ to the new ‘low’.
So you now have a positive voltage on the capacitor. The switch is connected to 0 volts. And there is a path from the capacitor, through the resistor and down to minus through the switch. So current will flow here.
The current flows until the capacitor is fully discharged (i.e. no more voltage across the capacitor) making it the same voltage (ie zero) as the minus of the battery.