NOT gates functionallity - Page 1
Forum section: electronics / projects

author: dan3460
author_rank: Frequent Contributor
timestamp: September 29, 2015, 08:01:36 pm
content: I'm starting to work with logic gates and is something that I have not been able to find a answer. There are several circuits were 2 or more NOT gates are place in parallel: why would you do that?I could not post a picture

author: tautech
author_rank: Super Contributor
timestamp: September 29, 2015, 08:08:45 pm
content: Quote from: dan3460 on September 29, 2015, 08:01:36 pmTo increase output drive capability.

author: dan3460
author_rank: Frequent Contributor
timestamp: September 29, 2015, 08:32:28 pm
content: You are not increasing the voltage, so it is the amperage what is increased?here is the picture:

author: tautech
author_rank: Super Contributor
timestamp: September 29, 2015, 08:37:35 pm
content: Quote from: dan3460 on September 29, 2015, 08:32:28 pmYes of course, check datasheets for drive capability foreachgate, but there is normally a total package capability, so ensure you stay within limits.

author: ajb
author_rank: Super Contributor
timestamp: September 29, 2015, 08:39:28 pm
content: Yes. The output of each of those gates is a pair of transistors, one pulls the output to Vcc and the other pulls the output to ground depending on the state of the output. With two such outputs paralleled, you now have two transistors driving the output in one direction or the other, and as long as they pull in the same direction you wind up with twice the driving capacity.

author: m98
author_rank: Frequent Contributor
timestamp: September 29, 2015, 10:37:44 pm
content: Show us the whole circuit. Using logic gates in parallel to increase their current sourcing capability seems a bit weird. Instead, use an op-amp or output transistors.

author: TimFox
author_rank: Super Contributor
timestamp: September 29, 2015, 10:43:22 pm
content: Wiring gate outputs in parallel works well for CMOS devices, since each output is approximately a current source during the transitions from high to low to high, and each output looks like a resistor to Vdd or Vss in the high or low state, respectively.Paralleling current sources or resistors is usually safe. Paralleling constant voltage devices (such as op amp or voltage regulator outputs) is hazardous, since the individual currents are not well defined.

author: amyk
author_rank: Super Contributor
timestamp: September 30, 2015, 12:23:31 am
content: Quote from: TimFox on September 29, 2015, 10:43:22 pmYou can also think of this as being that two MOSFETs with a particular channel width in parallel are equivalent to one big one with double the width.

author: jwm_
author_rank: Frequent Contributor
timestamp: September 30, 2015, 03:46:01 am
content: Quote from: m98 on September 29, 2015, 10:37:44 pmCMOS outputs are generally 'push-pull' rail to rail outputs and some of the logic families can source/sink 20ma. Quite nice, add some resistors for a suitable output imedance and you have a nice line driver.An op amp that only works at its rails and has no feedback would be an odd choice and a rail to rail transistor driver while not hard, is somewhat more complicated than a simple switch. Especially because that is exactly the output stage of a buffered logic chip.some examples using them this wayhttp://www.epanorama.net/circuits/tdr.htmlhttp://members.shaw.ca/swstuff/esrmeter.html

author: dom0
author_rank: Super Contributor
timestamp: September 30, 2015, 11:31:31 am
content: Quote from: m98 on September 29, 2015, 10:37:44 pmIt isn't

author: dan3460
author_rank: Frequent Contributor
timestamp: September 30, 2015, 02:01:30 pm
content: Here is part of the circuit, this is a curve tracer that i'm working on. I'm an old fart that have liked electronics all his life and until just recently had the time and the means to start playing with it. This project is basically to learn to make PCBs.I have been testing each block on a breadboard to understand what happens, here is the sitehttp://www.kerrywong.com/2013/09/02/yet-another-semiconductor-vi-curve-tracer/In this way I discovered my error when I though that a line was connected when it was not.The last part I was testing is the inset below, it supposed to provide 32.786kHz clock for the counter on the right. It looked like a very simple oscillator, when I breadboard it I got wild oscillations in the 100MHz range, I could not hear my FM station. After a couple of afternoons trying to see if I misread the schematics or a wrong connection in the breadboard, frustrated I gave up, turn off the power supply and briefly saw a square wave. I brought back the power slowly and a can get a wave when the power to the chip is about 1.3V. The crystal that I have bought from the internet for a couple of $, the only parameters that I can find are Eq. Resistance = 30Kohms, Load Cap=12pF. The max output waved that I can get, without going into uncontrolled oscillation is about 1.2V.Any ideas?

author: Paul Rose
author_rank: Regular Contributor
timestamp: September 30, 2015, 02:16:26 pm
content: >>Any ideas?It looks like a typical inverter oscillator, which should work.The scematic you posted is really tiny, so it is hard to see the part values.BUTit looks like the capacitors are labelled in uF ( microfarads ), which is way too big.For this type of circuit, the values should be in pF ( picofarads ).Seehttp://www.eleccircuit.com/wp-content/uploads/2007/08/pulse-generator-oscillator-32768khz-by-watch-crystal.jpg

author: dan3460
author_rank: Frequent Contributor
timestamp: September 30, 2015, 02:29:33 pm
content: Yes, the original schematics it looked like was 33uF. But I find out that it should be in pF range, I have been testing with 33pf up to 1.5nF. trying to see if I can feed the IC 5V to get a better output wave but no luck. regardless of the capacitance I can only feed 1.3-1.4V before it goes chaotic. Sorry for the schematics but the top resistor is 3M, the bottom is 82k and the two caps are 33pF.

author: Paul Rose
author_rank: Regular Contributor
timestamp: September 30, 2015, 05:42:52 pm
content: For troubleshooting, verify that the main inverter ( u1a ) is working ( 0v in = 5v out, etc. )Disconnect the follower inverters ( u1b, u1c ) and probe at the output of u1a. Might not look square, but look for correct frequency.Make sure to probe with 10x scope probe ( 10M input ).Go lower with the caps ( not higher ), 22pf, 10pf or even 4.7pf .Possibly higher with both resistors ( 470k to 820k for the bottom, up to 10M for the top ).

author: dan3460
author_rank: Frequent Contributor
timestamp: September 30, 2015, 06:41:41 pm
content: Thanks. i'll do that and report.

author: dan3460
author_rank: Frequent Contributor
timestamp: September 30, 2015, 07:25:36 pm
content: I have changed the resistors to the indicated, I did not have a 820K but I used a 1M, 10M for the top. I put a square wave from my function generator and the invertor works fine. I still can get a signal only with Vcc around 1.3V, any more it becomes chaotic.Just to see if my breadboard skill were ok, I made a 555 oscillator running around 32k (close to the clock) the square wave is not as clean or stable but I can get it as high as 5 V to feed to the next part of the circuit and that works.maybe I should try a different circuit using the crystal and replace the invertors.

author: tautech
author_rank: Super Contributor
timestamp: September 30, 2015, 07:34:31 pm
content: Is your PSU suppling clean DC?Are you using 0.1 uF decoupling caps on each IC?Do you have additional bulk capacitance on the breadboard supply rails?The absence of any/all of these might give unexpected results.

author: jpb
author_rank: Super Contributor
timestamp: September 30, 2015, 07:43:50 pm
content: As another example, James Miller uses NOT gates as buffers in his GPSDO I think:http://www.jrmiller.demon.co.uk/projects/ministd/frqstd0.htmit makes sense if you're already using multi-gate chips in a digital circuit.

author: free_electron
author_rank: Super Contributor
timestamp: September 30, 2015, 07:45:35 pm
content: this is a trick that is often used, but you really shouldn't do that.

author: dan3460
author_rank: Frequent Contributor
timestamp: September 30, 2015, 07:56:58 pm
content: Quote from: tautech on September 30, 2015, 07:34:31 pmThe DC supply is fairly clean. The breadboard is clean, nothing else connected. The connections that I have are the same as in the schematics, there is no decoupling caps drawn. One thing that I read somewhere is that unused inputs should be connected to the appropriate rail.

author: dom0
author_rank: Super Contributor
timestamp: September 30, 2015, 08:16:33 pm
content: Building high-Q oscillators (crystal oscillators) on a breadboard... well, maybe works, maybe doesn't

author: edavid
author_rank: Super Contributor
timestamp: September 30, 2015, 08:43:41 pm
content: What kind of IC is U1?

author: tautech
author_rank: Super Contributor
timestamp: September 30, 2015, 09:41:21 pm
content: Quote from: dan3460 on September 30, 2015, 07:56:58 pmHELL YEAH.Must do ALWAYS.

author: Zero999
author_rank: Super Contributor
timestamp: September 30, 2015, 10:22:28 pm
content: Quote from: m98 on September 29, 2015, 10:37:44 pmUsing logic gates in parallel to increase their current capability is infinitely more sensible than using an op-amp, which is designed as a linear amplifier and will perform very poorly, when used in this manner.

author: jwm_
author_rank: Frequent Contributor
timestamp: October 01, 2015, 12:47:10 am
content: Quote from: free_electron on September 30, 2015, 07:45:35 pmWhat are the issues with it?I am pretty sure I have seen it in datasheets and books, not just random circuits online.In fact, it is explicitly mentioned in this application note from fairchild (seems like a good read actually, lots of good info)https://www.fairchildsemi.com/application-notes/AN/AN-77.pdfas does this TI onehttp://www.ti.com/lit/an/scla007a/scla007a.pdfJohn

author: Zero999
author_rank: Super Contributor
timestamp: October 01, 2015, 08:39:53 am
content: Quote from: jwm_ on October 01, 2015, 12:47:10 amAt low speeds there is no problem with connecting gates in parallel. If all you want to do is flash an LED very brightly or drive a piezo transducer, then I recommend it.At higher speeds, it can create problems, as the gates will not change state at exactly the same time, which can result in glitches.

author: dan3460
author_rank: Frequent Contributor
timestamp: October 01, 2015, 12:03:31 pm
content: Quote from: edavid on September 30, 2015, 08:43:41 pmIs a 74HC04.Thanks for the all the help. I have put this aside just for a while as some times you need to let things cook and sink in. As no one mentioned anything about the crystal it self I'm assuming that there are no "working" voltages that I need to worry about and it should work with this design. I think my next step is to build this thing on a PCB and see if works.

author: TerraHertz
author_rank: Super Contributor
timestamp: October 01, 2015, 03:41:48 pm
content: Quote from: dan3460 on October 01, 2015, 12:03:31 pmThat circuit form works fine, I've used it myself. Caps on the crystal should be in pF. But using a 74HC04 isn't a good idea, they have very high gain at the threshold voltage and won't run in the linear mode that circuit wants. The oscillation you're seeing is due to the inverter's high gain and inter-pin capacitance of the breadboard.Instead use a 74HCU04. The 'U' means Unbuffered. The feedback resistor will make it run as a linear inverting amp, which is what the circuit needs. 1M feedback resistor value is fine for a 74HCU04. You should see a fairly good sine wave at that inverter's input, centered at half Vcc. Due to not very high gain, that inverter's output 'square wave' will have quite rounded corners.Also I agree with the person who said, don't use a plugin breadboard. Too much capacitance between the rows.Also with HC logic you MUST tie unused inputs to rails, otherwise the high impedance inputs can float around. And when they float around the input threshold, you'll see some mighty weird circuit behavior. That will actually change as you look at it, or wave your hands around nearby.If you do have unused inverters, use them in series after the one driving the crystal, then the last two in parallel like in your circuit. The ones in series will result in faster edges, to ensure the final paralleled two don't try fighting each other at transitions due to slightly different input thresholds.

author: edavid
author_rank: Super Contributor
timestamp: October 01, 2015, 04:37:00 pm
content: Quote from: TerraHertz on October 01, 2015, 03:41:48 pmA 4069UBE works well also.QuoteI don't think it's a problem for a 32kHz oscillator... at least I have never had a problem.

author: dan3460
author_rank: Frequent Contributor
timestamp: October 01, 2015, 04:50:11 pm
content: Thanks for that. I will make the changes on the schematics to insert the inverters instead of no connection. I will make the PCB and install the components. Will report back.

author: dan3460
author_rank: Frequent Contributor
timestamp: October 05, 2015, 12:56:26 pm
content: Well it tried several thing and at the end did not work. Taking the suggestion that it may be due of stray capacitance of the board that I was using I build a solder version on a small pcb. I did not get the wild oscillations (that disturbed my FM reception) but it did not oscillate a 32kHz, I got a square wave at around 3mHz. I looked at the original design and a picture of the build the Mr. Wong and right besides the 74CH04 is a third cap and I can read 104 on it (1000pf), so clearly the way that is shown in the schematics doesn't work.I had a LM386 laying around and I build a square wave generator at about 30kHz, that is producing a 4.5V wave that is good for the next stages of the circuit.Changes to the original circuit: scrap the NOT oscillator - put a op amp oscillator. Added the power supply with adjustable voltage regulator, bought a few 15V.-15V and 5V fixed regulator that should make the power supply much simpler.So I tested up to the staircase generator and it is working fine, was too tired to keep going. Next is to test the amp for the square wave. and the triangle oscillator and see if I can see curves on the scope.

author: edavid
author_rank: Super Contributor
timestamp: October 05, 2015, 03:37:23 pm
content: Quote from: dan3460 on October 05, 2015, 12:56:26 pmDid you switch to a 74HCU04 or 4069UB? It won't work with a 74HC04.

author: dan3460
author_rank: Frequent Contributor
timestamp: October 05, 2015, 04:03:45 pm
content: No I did not, the original schematics shows a 74HC04N which are the same ICs that I had. I didn't have any 4069UB, didn't feel like ordering some. On the picture that Mr. Wong has on his web site there is no writing on top of the chip, so it is very possible that at the end he used a different chip.My concoction is working fine, but eventually I will order a few NOT chips to test, it should be much more compact and precise.

author: edavid
author_rank: Super Contributor
timestamp: October 05, 2015, 07:44:35 pm
content: Quote from: tautech on October 05, 2015, 06:27:14 pmI think you mean 100000pF (0.1uF)...http://www.robotoid.com/appnotes/electronics-capacitor-markings.html

author: dan3460
author_rank: Frequent Contributor
timestamp: October 05, 2015, 07:48:27 pm
content: I thought, on those little disc caps, that the value of the cap was in the first 2 numbers and the third number was the multiplication factor.leave and learn!!

author: linux-works
author_rank: Super Contributor
timestamp: October 05, 2015, 09:01:00 pm
content: a 104 is a .1uF cap, in my experience.and the part about the unbuffered 74hcU04 is also right. get that part and try it. I have seen that part used a lot in spdif circuits and I've come to know it and have it on hand

author: TerraHertz
author_rank: Super Contributor
timestamp: October 06, 2015, 06:42:29 am
content: Quote from: edavid on October 01, 2015, 04:37:00 pmYou misunderstand. It's not a problem for 32KHz, but it IS a problem if the high gain * bandwidth of the inverter plus the high inter-pin capacitance makes a nice oscillator at many MHz. Then it will just ignore the crystal, and run as fast as it can.On a well laid out PCB, with short tracks and good supply decoupling, it can work OK with the 74HC04. But a 74HCU04 will still perform better.Oh and incidentally the 1K (or 1.5K?) resistor from the output of the oscillator's inverter to the crystal, is to prevent overdriving and stressing the crystal - which would make it drift, and eventually break. Also to decouple the crystal from the low impedance of the gate output, for better Q. You can find recommended values in app circuits from the crystal manufacturer.Quote from: dan3460 on October 05, 2015, 04:03:45 pmI'm curious how you came to call them "not gates"? So far as I'm aware they're much more widely known as inverters. The 'not' terminology reminds me of academic 'binary computing logic' textbooks from before there were actually computers. Sounds quaint.In all the IC data books I've ever seen, 74xx04 is called a "hex inverter".Does anyone else here call them "not gates"?

author: dan3460
author_rank: Frequent Contributor
timestamp: October 06, 2015, 02:29:28 pm
content: I'm just an old fart digging back in electronics after 40 years. When I first played with this, 40 years ago in my native country, we call it a NOT gate array. I read a few articles in the internet and it seem to me that it could be called either way. Just stuck with old ways.couple of things:- I bought the crystals in ebay for $2. don't have any markings. Just the total capacitance and internal resistance.- I did put this thing on a PCB, made sure that leads were short and lay it out as best as i could. Did not oscillate at the desired frequency. Did not get the wild oscillations and noise, but i could not make it to oscillate at the crystal frequency.- I build an oscillator with an LM386, oscillating a around 30kHz, with a nice square wave.Thanks to everyone for the help.

author: linux-works
author_rank: Super Contributor
timestamp: October 06, 2015, 02:54:43 pm
content: Quote from: TerraHertz on October 06, 2015, 06:42:29 amI also learned them as 'AND gates, OR gates and NOT gates'. the term 'inverter' is common but inverter can also mean many things; a 'not gate' is pretty clear.first learned this as a kid in the 70's and the book I was reading from was quite a bit older than that.

author: edavid
author_rank: Super Contributor
timestamp: October 06, 2015, 04:33:56 pm
content: Quote from: TerraHertz on October 06, 2015, 06:42:29 amI have built several breadboard 32KHz oscillators, and have not had any problems. I don't think it's a valid concern. I would challenge you to build a breadboard that shows these hypothetical oscillations.QuoteFor a 32kHz oscillator (tuning fork crystal), it should be at least 100K.