Troubleshooting NAND Gate Oscillator - Page 1
Forum section: electronics / beginners

author: Legion
author_rank: Frequent Contributor
timestamp: March 13, 2014, 05:47:21 pm
content: I built this circuit from an electronics project book:R1 100kR2 10MR3 470kR4 2.2MC1 1uFC2 1uFD1 4148 Signal diodeLED 5mm redIC1 4011 Quad NAND gatePB Normally openWhen the switch is closed, the LED should blink at ~1Hz for 8 seconds before turning off. The behavior I get is different. When I close the push button the LED comes on for 8 seconds and shuts off. No flashing occurs. The book suggests the problem may be in the two RC components of the circuit causing the LED to blink so fast it appears solid. I followed their troubleshooting tips but all my resistances and voltages match the expected values. I also checked the 4011 to make sure it's working. All NAND gates work as expected.There are two differences between their circuit and mine. They use a signal diode. I don't have a signal diode so I substituted a 1N4001. In a previous circuit this substitution had been fine, but maybe it causes problems in this circuit? From the data sheets it looks like the only difference is how fast the signal diode reacts vs the 1N4001.The other difference is capacitor C2. The schematic shows it as non-polarized, but the only 1uF caps I have are polarized electrolytics. This could be the problem, but I'll have to get a different cap type to verify. I tried putting in the electrolytic in both directions. If the cathode goes to pins 8 and 9, the LED lights, but doesn't blink. If the anode goes to pins 8 and 9 the LED never comes on.I created an excel file that shows the 4011 IC's pin states when the push button is open and while it's held closed:https://dl.dropboxusercontent.com/u/91808950/NAND%20Oscillator.xlsxSuggestions?

author: uwezi
author_rank: Unknown
timestamp: March 13, 2014, 06:50:32 pm
content: Without building this circuit and substituting for the diode it is a bit hard to say, but a possible similarity to another recent thread comes to mind.The 1N400x diodes are rectifier diodes, meaning they are designed to carry large currents (>1 A) in forward direction. In the main application of these diodes a certain reverse current can be tolerated. According to the datasheet fromVishaythe reverse current can be up to 5 µA.For the 1N4148 under similar conditions the reverse current is below 20 nA - 250-times lower.Resistor R2 is a 10 Mohm resistor, the maximum current through this resistor is 9V/10Mohm = 0.9 µA - if there is a 5 µA leakage current through the diode it will mess up the whole function of the RC timer.

author: PA0PBZ
author_rank: Super Contributor
timestamp: March 13, 2014, 08:07:38 pm
content: I think the way it should work is as follows:when you press the button pin 12+13 go low, so pin 11 goes high charging C1 trough the diode. When you release the button R2 discharges C1 in a rate so that the LED continues to blink for about 8 seconds.When you say that the LED stays on, do you mean it stays on even when you release the switch?Because when you don't release the switch (it should be a push button really) C1 will never discharge and the LED will stay on or continue to blink.For C2: you can 'fake' a non-polarized cap by putting 2 of the double value in series, with the plus or minus connected to each other. The changing behaviour when you reverse C2 is a good indication that something is going wrong there. you could try some 100N or bigger non-polarized caps in parallel also.If it was excessive leakage in the diode the LED would stay on for less than 8 seconds after you release the switch, so I doubt that is the problem here.

author: Legion
author_rank: Frequent Contributor
timestamp: March 13, 2014, 08:30:18 pm
content: Quote from: PA0PBZ on March 13, 2014, 08:07:38 pmI'm using a push button that only stays closed while depressed. If I take my thumb off, it opens. The LED comes on when the PBNO is pushed and stays on for about 8 seconds after releasing the button. But it doesn't flash at 1Hz, it just stays on for 8 seconds and then shuts off.

author: PA0PBZ
author_rank: Super Contributor
timestamp: March 13, 2014, 08:33:59 pm
content: Quote from: Legion on March 13, 2014, 08:30:18 pmOk, that's clear. So the 1Hz oscillator is not running at all it seems, try the C2 options I mentioned.

author: Legion
author_rank: Frequent Contributor
timestamp: March 13, 2014, 08:36:16 pm
content: I added an excel file to the original post with the measured pin states with the push button open and closed.

author: Legion
author_rank: Frequent Contributor
timestamp: March 13, 2014, 09:36:33 pm
content: Quote from: PA0PBZ on March 13, 2014, 08:33:59 pmI replaced C2 with two 2.2uF electrolytics in series. The negative lead of the first cap connected to the positive lead of the second cap. I get a different behavior now. When the push button is momentarily depressed and then released the LED comes on for a couple seconds, goes out for a couple seconds, briefly comes back on and then turns off for good. The last illumination of the LED is noticeable shorter in duration than the initial.

author: PA0PBZ
author_rank: Super Contributor
timestamp: March 13, 2014, 09:39:36 pm
content: No, you should connect either the negative leads or the positive leads together, but even better get some non-polarized caps and put them in parallel.

author: Legion
author_rank: Frequent Contributor
timestamp: March 13, 2014, 09:50:04 pm
content: Quote from: PA0PBZ on March 13, 2014, 09:39:36 pmConnecting the 2.2uF in series, anode to anode didn't make a difference. LED goes on, off, briefly on, off.That said, I think it's definitely a polarization issue. I found a 100nF (0.1uF) ceramic cap and it works. The LED blinks on and off 13 times. It's faster than it would be with a 1uF, but that's ok. I ordered some non polarized film caps in the single digit uF range from Digikey.

author: PA0PBZ
author_rank: Super Contributor
timestamp: March 13, 2014, 09:59:34 pm
content: Quote from: Legion on March 13, 2014, 09:50:04 pmIt looks like your polarized caps are not that good, maybe a high leakage or something. Glad you made it work!

author: Legion
author_rank: Frequent Contributor
timestamp: March 13, 2014, 10:05:39 pm
content: Quote from: PA0PBZ on March 13, 2014, 09:59:34 pmMy caps are definitely cheap. I bought one of those packs off ebay with 1000 caps spread across 36 different values. Since I'm only using them to learn with I figured high quality wasn't a big priority.Thanks for your help!