NAND Gate Oscillator using CD4011

Discussion in 'General Electronics Chat' started by smartyram, Aug 5, 2010.

  1. smartyram

    smartyram Thread Starter New Member

    Joined:
    Aug 5, 2010
    Messages:
    17
    I am trying to create a 1 Hertz oscillator using NAND gates.

    I have created the following (image attached) NAND gate oscillator using 2 gates. Looking at the chart in the image we can notice that the input to the first NAND gate IC1a peaks at around 17v. The circuit supply voltage is 12v. When I run this simulation in Yenka the first NAND gate IC1a blows up as the input is 17-12 = 5v above the supply voltage. As the per the IC ratings in the data sheet the input pin voltage cannot be more than +/-0.5V of supply voltage.

    What is wrong in this circuit?:confused:

    Attached Files:

  2. beenthere

    beenthere Retired Moderator

    Joined:
    Apr 20, 2004
    Messages:
    15,815
    Location:
    Missouri, USA (GMT -6)
    smartyram likes this.
  3. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    Your oscillator has both inputs of the gates shorted together. If only one input is used and the spare input is connected to the positive supply voltage then the output will be more symmetrical.
    I don't know why your oscillator has a switch at its output that shorts the output to ground.

    Your SIM program doesn't know that the input of Cmos gates have input protection diodes that limit the input voltage to plus and minus 0.7V of the supply voltage. The 4.75M resistor limits the current in the input protection diodes.
    smartyram likes this.
  4. smartyram

    smartyram Thread Starter New Member

    Joined:
    Aug 5, 2010
    Messages:
    17
    Hi Audioguru,

    I changed the circuit as per your suggestion. I got rid of the switch that shorts the output to ground, was using it as a reset. I still notice the output in the simulator is same. Any thoughts?

    I read about input protection http://www.fairchildsemi.com/an/AN/AN-248.pdf. So that means the additional ~5v at the input should not destroy my CD4011 NAND gate right?

    Thanks
    Ram

    Attached Files:

  5. smartyram

    smartyram Thread Starter New Member

    Joined:
    Aug 5, 2010
    Messages:
    17
    Hi beenthere,

    I have made a new circuit. Would appreciate any feedback from you? The wave is not exactly square in shape. Is it good enough to run a binary counter?

    Thank you
    Ram

    Attached Files:

    Last edited: Aug 6, 2010
  6. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    Your simulation software is wrong because it shows the input going 4V higher than the positive supply and 4V below ground.
    The diodes at the input protection of Cmos gates clamps the input voltage to 0.7V higher than the positive supply and 0.7V less than ground, especially since the oscillator has a very high value resistor (4.7M) feeding the input.

    Your simulation sofware is also wrong when it shows the very slow switching ramps (0.05 seconds) produced. The datasheets of Cmos gates shows that they switch their output in only 50ns (0.0000005 seconds).

    Why do you use a very high value resistor (1M) feeding the oscillator to the counter's clock input? The resistor is not needed if the ICs use the same power supply voltage.
  7. Jony130

    Jony130 Senior Member

    Joined:
    Feb 17, 2009
    Messages:
    2,643
    Location:
    Poland/Wroclaw
    Maybe it will be simpler to use 4060.
    You get oscillator and counter in one.
    And for 1Hz in Q14 you need CT=22nF and Rt=1.2K.
    Or try 4541
    smartyram likes this.
  8. smartyram

    smartyram Thread Starter New Member

    Joined:
    Aug 5, 2010
    Messages:
    17
    I need a 12 stage counter and cannot use 4060 as it is 14 stage. As for using 4541 I think it will be an overkill for my circuit. I am using this oscillator to drive a clock pulse to a bigger circuit. I have few spare NAND gates in my bigger circuit and decided to use them for generating the clock pulse.
  9. smartyram

    smartyram Thread Starter New Member

    Joined:
    Aug 5, 2010
    Messages:
    17
    You maybe right, Yenka the simulation software I am using may not be up to snuff. I guess i will have to try the thing out on a breadboard and see if it works or it blows up the CD4011.

    I put in the 1M resistor between the oscillator and the counter to isolate the oscillator from the load (the counter). I saw this technique somewhere in a circuit. You think the resistor is a waste?
  10. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    Your Yenka sim software doesn't know if it is coming or going.

    A CD4011 will not blow up unless you connect the power supply backwards.

    The 1M resistor between the oscillator and counter is not required and might stop the circuit from working because it will combine with stray capacitance between wires and cause the square-wave from the oscillator to be a triangle-wave at the clock input of the counter.
  11. sage.radachowsky

    sage.radachowsky Member

    Joined:
    May 11, 2010
    Messages:
    241
    Location:
    Boston
    The input of both the Fairchild and ST 4040 says input current is max 1 microAmp. Note also that the supply voltage is max 7V.

    If the supply voltages of the two chips is the same, then I think that the 1M resistor is useless, because the output of the NAND gates is buffered -- it is low impedance output that can handle at least 1 mA of output current, and should switch quickly from low to high, without much time in between.

    However, if you are using a 12V supply to the 4093 and 7V supply to the 4040, then there may be a reason for the 1M resistor. It may decouple the connection so that the clamping of the input of the 4040 will prevent damage to it. In this case, you could use a lower resistor value, like 100K, for more reliable transmission. The clamping diode in the 4040 would still work fine and the input would be a better impedance. However, this is not a good circuit design. One should not plan on sending inputs outside of the absolute maximum range, and relying on clamping diodes -- at least in my opinion. The 4040 does not clearly document clamping diodes, although it states that the inputs have "protection circuitry" which I assume are clamping diodes.

    Hope this helps.
  12. Audioguru

    Audioguru New Member

    Joined:
    Dec 20, 2007
    Messages:
    9,411
    Location:
    Ontario, Canada
    All CD4040 ICs have a max supply of 18V and some (Texas Instruments) have a max supply of 20V.

    The absolute max supply for a high speed 74HC4040 is 7V and they recommed a max of 6V.

    Attached Files:

  13. smartyram

    smartyram Thread Starter New Member

    Joined:
    Aug 5, 2010
    Messages:
    17
    I am using CD4040 so voltage is not an issue here. I was trying to put a high impedance to the output of the gate to prevent any loading of the gate. I guess it is not required.
Similar Threads
Forum Title Date
General Electronics Chat 7410 and 7400 nand gate question Nov 29, 2013
General Electronics Chat Using a NAND gate; What's my mistake Jul 19, 2013
General Electronics Chat AND, NAND n OR, NOR gates Dec 15, 2012
General Electronics Chat NAND Gate Oscillator Nov 12, 2012
General Electronics Chat Transistor NAND Gate does not work correctly Jun 29, 2012

Share This Page