el cheapo logic gate based oscillator - Page 1
Forum section: electronics / projects

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 06:56:48 pm
content: I have a lot of NAND gates and I thought I would use them in some unique ways. So here is my attempt at building an inexpensive oscillator from those devices.Here is the schematic. It if fairly typical of a pierce oscillator (or a relaxation oscillator, with the resistor replaced by an inductor), with maybe the exception of the resistor on the gate's input - it is to isolate the lc tank from the clamping diodes on the inputs so oscillation can sustain.I put the probe on the tank's output, just befor the resistor.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:01:51 pm
content: I tried three chips: ahc132 by TI, 74hc132 by OnSemi, and 74HC00 by NXP (of unknown origin). The HC00 topped out at about 11-12Mhz. AHC132 and HC132 went all the way to 35Mhz and AHC132 went to 60+Mhz - lots of noise and the oscillation is not terribly stable at that point.The shots shown below are taken with AHC132 unless otherwise noted.Edit: under the same condition, the HC132 oscillated at a slightly lower frequency than the AHC132, suggesting higher pin capacitance.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:06:13 pm
content: Some random coil, oscillating at 13+Mhz.

author: edavid
author_rank: Super Contributor
timestamp: December 24, 2014, 07:06:56 pm
content: Why don't you edit your first post instead of dribbling out the information in multiple posts?Are you spamming the Recent Posts list?

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:08:58 pm
content: Coil2, at 3Mhz.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:10:52 pm
content: 3rd coil, at a few hundred Khz.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:12:13 pm
content: 4th coil, 300Khz.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:15:44 pm
content: The 5th coil is really a straight wire -> the red alligator clips + wire connecting them (10 inches?), oscillating at 30Mhz.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:18:58 pm
content: You will notice that there is a red led on the lower left corner of the setup. The led is reverse biased, with the bias controlled by a pot. It acts like a variactor: depending on the center frequencies but I can get up to a few hundred Khz of variation from 0 - 5v bias on the led.With this, it is entirely possible to implement a VFO using all digital devices.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:22:17 pm
content: the setup is not ideal for the experiment, with its large parasitic. But it does show that it is doable.Potential uses?1) signal generator: I am using one side of the devices (two NAND gates). You can construct another oscillator (for example, AF oscillator) using the other half and modulate the RF signal -> using one of the NAND pins.2) a dip meter?3) digitally controlled VFO?...

author: SeanB
author_rank: Super Contributor
timestamp: December 24, 2014, 07:36:48 pm
content: You can also modulate it by varying the supply voltage, to make a rather crude FM transmitter. If you use another part of the package to make another you will also see some interaction between them, from coupling through the die. If you use 2 you can use the other gates to mix the outputs and then get a rather good random signal source, though it will have a lot of runt pulses as well mixed in.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:45:15 pm
content: Got the motorolla going at 40Mhz - the inductor is a 2-in wire. Vpp is very low, at 500mv.The supply has to be decoupled using a led - shown here with the TI AHC132.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:46:43 pm
content: Would be interesting to see how high one can go with this. I have seen some spec for those single gate unbuffered NOT devices. With their smd footprint, I assume you can get pretty high up there. Whether there is sufficient gain at high frequencies it is another story.

author: dannyf
author_rank: Super Contributor
timestamp: December 24, 2014, 07:50:37 pm
content: Not sure how you would a FM transmitter by modulating the supply voltage -> I have built AM transmitters out of (active) crystal oscillators.I guess if you module the voltage on the variactor / LED, you do get FM transmission but narrow-band only as the frequency range is quite limited. I guess if you manage to run it in the broadcasting band, you can get more out of it. But legality at that point is fuzzy.

author: SeanB
author_rank: Super Contributor
timestamp: December 24, 2014, 07:55:58 pm
content: IIRC you can get a 4007 to around 50MHz, but only with a 15V rail and with a small amplitude output. The single chip packages in ALS should get past the 100MHz mark, though it likely will only drive a very low capacitance load ( not a scope probe unless it is sub 1pF) then. You might need to use another as a buffer, though the signal out will most likely not look anything like a nice square digital signal. LVDS differential drivers should get past 400MHz though for some, as they are designed for high speed.Modulating the supply will change both frequency and amplitude, and it is a toss up as to which will be greater. the crystal will do AM because it has a very high Q and does not change frequency much with drive, but the LC will vary a lot, as gate capacitance makes a change.Try it using a signal generator with an output offset capacity, and drive it using 1V on a supply of 5V. then see if you can see FM on the output on the scope, or use a spectrum analyser.

author: mikerj
author_rank: Super Contributor
timestamp: December 24, 2014, 08:41:41 pm
content: Quote from: edavid on December 24, 2014, 07:06:56 pmIt's not worth making comments in dannys project threads. He just ploughs on making a new post every few minutes rather then editing the first post, and simply ignores any other contributions, especially those with awkward questions

author: paulie
author_rank: Frequent Contributor
timestamp: December 24, 2014, 10:51:16 pm
content: Quote from: edavid on December 24, 2014, 07:06:56 pmDannyf is in competition with Legacy for most threads activity in a single day. His particular approach is to bump his own threads as often as possible usually resulting in about 98% Dannyf, 2% "other". Checkout Ghetto STM. Too bad the content isn't on a par with Legacy.BYW note that a transistor is "el cheapo-er", more stable, and much higher freq (10-15ghz)

author: tggzzz
author_rank: Super Contributor
timestamp: December 25, 2014, 12:54:49 am
content: Quote from: edavid on December 24, 2014, 07:06:56 pmSo, 12 dannyf posts in under an hour. It would have been much better to wait an hour and then make a single post. Seems like dannyf's come across the concept, regrettably too common in professional publications, of "The Least Publishible Unit".In some usenet groups there are one or two people (e.g "aminer" and "skybuck flying") that have this habit of "posting diarrhoea". They tend to be ignored as near-crackpots, tolerated largely for their amusement value - and ignored otherwise. It would be a shame if dannyf went that way.

author: ovnr
author_rank: Frequent Contributor
timestamp: December 25, 2014, 12:59:34 am
content: Quote from: tggzzz on December 25, 2014, 12:54:49 amI think we can fairly firmly conclude that he's gone that way and then some.

author: miguelvp
author_rank: Super Contributor
timestamp: December 25, 2014, 01:07:58 am
content: I do enjoy his posts, it doesn't bother me a bit.At least he has projects to share

author: Zero999
author_rank: Super Contributor
timestamp: December 25, 2014, 12:52:03 pm
content: It's an interesting project. I wonder how much better it would be if it were put on a PCB, rather than a bread board?If anyone has a problem with this, just press the report to moderator button, otherwise shut the fuck up.

author: paulie
author_rank: Frequent Contributor
timestamp: December 25, 2014, 12:55:39 pm
content: Hmmmm... looks like somebody woke up to find coal in his sock.Quote from: miguelvp on December 25, 2014, 01:07:58 amMuch as I hate to admit it I agree. In fact Dannyf is one of my favorite personalities here (twisted as it may be... lol). I do feel obligated to give him a hard time though considering how he treated me first day here. Payback is a biatch.Uh... Oh... Kids are up. Time for PRESENTS !!!!!!Happy holiday everybody.

author: dannyf
author_rank: Super Contributor
timestamp: December 25, 2014, 04:09:07 pm
content: I started to experiment dividing up the frequencies from the el cheapo oscillator.I first used HC4040 - CD74HC4040 from TI specifically. It worked out well and provided a continuous range of /2 output.This would be a really need solution if you use a variable condensor so you can cover a wide frequency range continuously, among the /2 output pins on the 4040.Of course, it can be easily tuned via inductance as well.

author: dannyf
author_rank: Super Contributor
timestamp: December 25, 2014, 04:15:01 pm
content: Then I realized that I can combined the two together, using HC4060 - which has a built-in oscillator + dividers.So here is what I tried:The chip on the left is the good old el cheapo osciillator - not used here.The chip on the right is a lowly HCF4060, by ST. Its pin 10 and 11 are configured as an oscillator, aka el cheapo style.The isolation resistor can range from 1k to 100k, with 100k working at the lower end and 1k / 10 k working up to 1Mhz. Above that there isn't enough gain to sustain oscillation.The probe is on the lc tank's output.

author: dannyf
author_rank: Super Contributor
timestamp: December 25, 2014, 04:17:48 pm
content: The oscillator running at 1Mhz, and the digital output on pin 7 (I think).

author: dannyf
author_rank: Super Contributor
timestamp: December 25, 2014, 04:19:07 pm
content: With just the 2.2mh inductor, the oscillator runs at 600Khz.

author: dannyf
author_rank: Super Contributor
timestamp: December 25, 2014, 04:21:02 pm
content: Vs. the oscillator + HC4040 solution, the HC4060 solution is simpler and more compact.However, HC4060 runs slow and there are holes in its divider output. So if you are looking for continuous band of output, HC4060 isn't for you.