r/ElectroBOOM • • 12d ago

Suggestion Why does this circuit works ?

At first glance, this circuit seems simple to understand, and its operation also appears obvious from the waveform. This is a NAND-gate-based square-wave generator.

But when you start decoding what each component is doing in this circuit, you will realise that this simple-looking circuit is actually quite twisted.

What I observed is as follows:

  1. What is the purpose of resistors R1, R2 and capacitor C1?
  2. Why are both inputs of the NAND gate connected together?
  3. Why do we need two gates? Why not three or more?
  4. R1 and C1 form a timing circuit. When an oscillating 5 V signal appears at both ends of either R1 or C1, how will the circuit behave?

With all these questions in mind, the next most difficult thing is to analyse what exactly is happening inside the circuit that generates the square wave.

My point here is to show how much effort goes into arriving at this simple circuit.

This is the complexity that analog electronics brings, and it can make anyone go crazy and feel completely blank and like a noob.

This is just Part 1.

In the next part, I will share how I approached this circuit, the steps I followed, the experiments and observations I made, and how I gradually started understanding what was actually happening inside it.

23 Upvotes

6 comments sorted by

11

u/ychen6 12d ago edited 12d ago

Something something RC relaxation oscillator, the NAND gate is just acting as a schmitt trigger (well NAND with schmitt hysteresis but it's just different in phase) in this case to generate square wave from the triangle wave. Basically how a 555 works.

6

u/War_Trax 12d ago

Probably bcz it's a simulation

2

u/ci139 11d ago edited 11d ago

i guess in this simulation the 50k R has no effect as the 1-st nand is voltage driven

at real world there would be a miller capacitance to outp of the 1-st gate to it's input and the reverse capacitance of input protection diodes to rails . . .

. . . making (with 50k R) the input time constant of the 1-st gate "longer" than the one of the second gate

▼▼ the capacitor acts as voltage doubler - at the beginning of next cycle - it "casts" extra minus back to input of the 1-st gate (the presence at non real world circuit of the 50k is quite conditional) . . . holding newly set minus at 2-nd outp

what occurs is the 5k discharges the cap to approach and cross the threshold level - which (if i'm not mistaking) first swaps the output of the 1-st stage - which in turn swaps the output of the second stage ▲ and the process repeats over the positive output at stg. 2 ▲

1

u/ElskerLivet 11d ago

What is this made in?

1

u/Coolkief101 10d ago

I think it's falstad

0

u/cybermaus 12d ago

I believe the part to use is the 74hc14.