# Nand gate - Simple Tone Generator Question

Discussion in 'General Electronics Chat' started by raghavanunm, Mar 21, 2012.

1. ### raghavanunm Thread Starter Member

Mar 21, 2007
14
0
Hi Guys,
I have a question about Simple Tone generator that is described in the Radioshack Electronics Learning Lab ( I have attached the PDF File for the specific project).

Under the heading/subtitle " How the Circuit Works" the author is talking about "....C1 is discharged by the output of Gate 2"....Does it mean that :

a) The C1 discharges through the transformer ? If so, how is that possible if the output from Gate 2 is High....wouldn't the currents ( current from gate & Discharge from capacitor ) "mix" ?

b) Basically what is the path of the capacitor C1's discharge ( i understand the charging path)

File size:
85.7 KB
Views:
57
2. ### panic mode Senior Member

Oct 10, 2011
1,328
305
cmos gates have push-pull output (they can both sink and source several mA of current).
inverters (or in this case pair of gates acting as inverters) are ommonly used to build all kind of things, including oscillator. main characteristic of inverter is that output is opposite state of input.
when pins 1,2 are low, pin 3 is high. 5,6 are connected to 3 (high as well) and pin 4 is low.
only pins 3 and 4 are low impedance, all other things are relatively high impedance. this means that in this state (3 is high, 4 is low) C1 will get charged through R1.
by "charged" i mean lower terminal of C1 will get increasingly positive.
eventually this potential increase will trigger first gate (pins 1,2) which will see this as logic one.
immediately, it will switch it's output (pin 3) to opposite state - this time that s low state (logic zero). this change will cascade through next gate and output pin4 will become high.
recall that most of the things in circuit are considered relatively high impedance so can be neglected. outputs (pin 3 and pin 4) are relatively low impedance and since pin4 is high, while pin 3 is low, capacitor C1 will now discharge through R1 (lower side of C1 will bew less and less positive) and eventually start charging the other way around (side connected to pin4 will gradually become more positive).
eventually voltage across C1 is sufficient to trigger first gate to change state and cycle repeats. period of oscillation is longer if R1 C1 values are larger (longer period means lower frequency).
regardless if C1 is charging or discharging, path is pin4, C1, R1, pin3.

3. ### raghavanunm Thread Starter Member

Mar 21, 2007
14
0
My follow up question is why is transformer used...isn't the eventual output DC?....

4. ### Audioguru New Member

Dec 20, 2007
9,411
896
The Cmos IC has fairly low output current of about 5mA maximum. If the 8 ohm speaker is connected to the output then the highest voltage will be only 5mA x 8 ohms= 40mV which is much too low for the oscillator to work.

There is no spec for the transformer but it is probably 1k ohms to 8 ohms. Then with the 1k load the output high of the driving gate is 5mA x 1k= 5V which is high enough for the oscillator to work.

5. ### #12 Expert

Nov 30, 2010
16,703
7,339
The eventual output is a tone, and that is not DC.
All the output voltage is more positive than ground, but it is not DC.
You could put a capacitor in series with the primary of the transformer to block DC and this circuit would still work.

6. ### raghavanunm Thread Starter Member

Mar 21, 2007
14
0
How does output voltage affect the oscillator's function ?....Isn't the oscillator's function solely determined by the capacitor charging/discharging ?

7. ### #12 Expert

Nov 30, 2010
16,703
7,339
Shorting pin 4 to ground with an 8 ohm speaker will stop the oscillator because the voltage through C1 will never get high enough for pins 1&2 to recognize "high".

8. ### raghavanunm Thread Starter Member

Mar 21, 2007
14
0
The voltage thru C1 is charged from Pin 3...why would pin 4 come into action when C1 is being charged ?

9. ### Audioguru New Member

Dec 20, 2007
9,411
896
Pin 4 connects to the timing capacitor. If the voltage of pin 4 is shorted then the oscillator does not work.

10. ### raghavanunm Thread Starter Member

Mar 21, 2007
14
0
Slightly different question, why does the capacitor not discharge thru the primary coil of the transformer..since the primary is possibly 1K ohm...(as someone in the earlier post mentioned that the capacitor discharges thru the resistor R1. (100 K ) ?

Nov 30, 2010
16,703
7,339
I give up.

12. ### Audioguru New Member

Dec 20, 2007
9,411
896
A capacitor has TWO wires. Both are needed for charging and discharging.
Pin 4 of the IC switches strongly high or low (and pulls the high impedance winding of the transformer high ands low) to allow the capacitor to charge or discharge from/to the 100k resistor.

13. ### raghavanunm Thread Starter Member

Mar 21, 2007
14
0
Thank you so much for your patienence...i've got an another question...so is the current flowing thru the primary of the transformer from the output of gate 2 (pin 4) ? ...(and never from the capacitor ?)

14. ### Audioguru New Member

Dec 20, 2007
9,411
896
Since you do not have a clue (you know NOTHING!!) about electronics then you are very difficult to talk to. Maybe there is an elecronics teacher here (who teaches little kids) who will help.
The transformer does not provide a power source, instead the output of the gate is the power source. It must use its small amount of current to charge and discharge the capacitor plus drive the transformer.

15. ### panic mode Senior Member

Oct 10, 2011
1,328
305
i can see how someone inexperienced can be confused by impedance matching etc. there may be one simple way to clear the picture:

note that 4011 is quad nand gate. unused gates need to be connected too (tie inputs to gnd), never leave them floating. in this case better way is to use remaining gates as buffer or driver of the load (speaker/transformer). this way output of oscillator is practically not loaded and it would work regardless of impedance of the output, in other words it would still run even if speaker is connected directly - without transformer. but to get optimum output (louder tone from speaker), impedance of load need to be matched. this is exactly what transformer does.

does this help?

File size:
5.7 KB
Views:
27