Schmitt NAND based LED flasher puzzling me! - Page 1
Forum section: electronics / beginners

author: 74HC04
author_rank: Contributor
timestamp: July 09, 2011, 04:54:08 pm
content: A bit of an embarrassing puzzle for me but I've built the attached circuit and it's not operating as I would expect. (Please excuse the RobinCAD!)Basically, the LED flashes but when "off", is not fully extinguished. I'm sure I could work out why this is the case but I'm tired and have a headache!The three unused gates in the '132 have their inputs tied to Vcc and filtering and bypass capacitors have been omitted from the sketch.Any ideas?Thanks

author: Zero999
author_rank: Super Contributor
timestamp: July 09, 2011, 07:46:46 pm
content: That's strange. What colour is the LED? I know some white LEDs remain dimly lit when the power is removed, due to the phosphor.

author: 74HC04
author_rank: Contributor
timestamp: July 09, 2011, 08:35:58 pm
content: Good call Hero999 - phosphor persistence would make sense. However, in this case the LED is an amber type (and a poor one at that - apparently a red die in amber resin). The LED is never fully extinguished...I must be missing something fundamental here!

author: qno
author_rank: Frequent Contributor
timestamp: July 09, 2011, 09:45:02 pm
content: Try to connect the LED and resistor to Vcc and pull it down ON.

author: Zero999
author_rank: Super Contributor
timestamp: July 10, 2011, 10:37:55 am
content: Assuming the circuit is exactly as per the schematic and the LED doesn't contain a phosphor, I don't see any logical explanation for this.

author: Psi
author_rank: Super Contributor
timestamp: July 10, 2011, 10:59:40 am
content: maybe try powering it from batteries, just to rule out a power supply issues.

author: FreeThinker
author_rank: Frequent Contributor
timestamp: July 10, 2011, 11:19:39 am
content: Yep. Just a bog standard relaxation oscillator, should work. My only thought at the moment is power supply, perhaps the Ov of the chip is floating causing a slight forward bias of the led to zero volts? Would need to do some voltage checks (ie 0v on chip to 0v on Led currant limit resistor) . Perhaps the 0v line has a high resistance on the breadboard?

author: Zero999
author_rank: Super Contributor
timestamp: July 10, 2011, 12:30:13 pm
content: The IC is CMOS and hardly uses any power so I wouldn't expect a bad 0V connection to cause this, given hardly any current flows through the 0V pin.

author: FreeThinker
author_rank: Frequent Contributor
timestamp: July 10, 2011, 01:01:02 pm
content: Quote from: Hero999 on July 10, 2011, 12:30:13 pmThis is very true. My thoughts were of a bad 0V line on the breadboard for some reason, a partial short 5v to 0v? Could just be a faulty gate as I said, needs probing and voltages taken, but my first instinct is always check voltage rails and 0v rails wrt each other as a first step. Then any further tests are from a known good source. I remember a microfilm machine I was having constant problems with at a customers site. After many hours of fault finding it turned out that the pcb 0v line was dropping about 1.5 volts across the board when in certain parts of its cycle. A wire link soldered around the trace cured a nasty problem. It was the only time I ever found this problem on this machine and never got to the bottom of why it happened, but a quick test of power rails is now my first port of call in all fault finding situations, just for my own peace of mind.

author: Jimmy
author_rank: Regular Contributor
timestamp: July 10, 2011, 11:01:28 pm
content: Looks like you need a diode in series with Im because while capacitor is discharging there is a little current flowing through the led

author: Zero999
author_rank: Super Contributor
timestamp: July 11, 2011, 04:36:02 pm
content: Quote from: Jimmy on July 10, 2011, 11:01:28 pmWhy?There shouldn't be any current flowing through the LED when the output is low. The capacitor has a 1M resistor in series with it so the peak discharge current will be 2.4uA. The resistance of the N-channel MOSFET in the CMOS output will be around 40 Ohms so the off output voltage will be around 96uV which won't light the LED.

author: Jimmy
author_rank: Regular Contributor
timestamp: July 12, 2011, 02:16:53 am
content: Quote from: Hero999 on July 11, 2011, 04:36:02 pmSorry Hero999 your correct that wont cause the led to stay illuminated however there are other forces at play try the diode and see if that changes things.

author: Zero999
author_rank: Super Contributor
timestamp: July 12, 2011, 05:17:16 pm
content: What other forces are at place? Dark forces.

author: Jimmy
author_rank: Regular Contributor
timestamp: July 13, 2011, 01:52:45 am
content: Quote from: Hero999 on July 12, 2011, 05:17:16 pmYes it is Dark forces because he wants to turn the led offmaybe the voltage present on the nand output isn't falling low enough to turn the junction in the nand gate all the way off so it could be leaking current? This is the only thing I can think of without building the circuit.

author: vk6zgo
author_rank: Super Contributor
timestamp: July 13, 2011, 04:05:40 am
content: As a rough guess,I would say that the NAND gate isn't turning off completely.It looks like Oscilloscope time!VK6ZGO

author: FreeThinker
author_rank: Frequent Contributor
timestamp: July 13, 2011, 01:08:27 pm
content: Quote from: vk6zgo on July 13, 2011, 04:05:40 amMy thoughts exactly. I suspect the 0v line. The out put looks like it is oscillating (hence the low led output). Remember cmos devices only switch between 1/3 and 2/3 of the supply rails so if the 0v is floating the output can oscillate and you will get current flow through the led. Time to break out the Probes

author: vk6zgo
author_rank: Super Contributor
timestamp: July 13, 2011, 03:01:45 pm
content: Another thought,if you don't have an Oscilloscope;Remove the connection between the 2nd input & the junction of the 1.0 Mohm resistor & 470nF cap,& return both inputs to +5volts.Does this turn off the LED completely?If not,perhaps you can't do what you want with this IC & power supply voltage.If it does,try using the Oscillator output to switch one of the other gates,& put the LED on the output of that one.VK6ZGOPS: Edited because it was a bit confusing--I originally used the term "gates" for two different things

author: jahonen
author_rank: Super Contributor
timestamp: July 13, 2011, 03:37:34 pm
content: Slightly off-topic: Unconnected power supply pins can create bizarre effects sometimes. As CMOS inherent current consumption is extremely small, the chip can be powered via ESD diodes by incoming logic signals. One of my colleagues found out in his previous work that one logic chip in a product was not powered, but the product has been in production for quite a bit of time. The fault hadn't shown up even with extensive testing they did. Only when in rare occasion all input signals went to low, then the chip powered off and product failed. They were all quite surprised when they discovered that the chip was only powered by the input signalsRegards,Janne

author: FreeThinker
author_rank: Frequent Contributor
timestamp: July 13, 2011, 03:47:20 pm
content: Quote from: jahonen on July 13, 2011, 03:37:34 pmYep got the T Shirt! Cmos (Causesmayhem /opensupplies) Is nearly as bad as Ttl (Trusttoluck) when supplies are flakey or not properly decoupled.

author: Zero999
author_rank: Super Contributor
timestamp: July 13, 2011, 04:35:47 pm
content: The odd thing is, it's a Schmitt NAND which should not behave like this. I could understand how this could happen with a normal NAND as it's possible to bias it into the linear region.

author: vk6zgo
author_rank: Super Contributor
timestamp: July 14, 2011, 02:20:57 am
content: I had a bunch of 4066s getting quite warm because I hadn't turned off the unused control inputs.Just taking the control inputs to 0 volts didn't turn the unused sections off.I had -6v on the board for another reason,so I returned them to that.That did it!Not sure if it is just the Philips ones I used that do this,as 4066s are widely used,& are supposed to be single supply devices.VK6ZGO

author: 74HC04
author_rank: Contributor
timestamp: July 16, 2011, 03:31:11 pm
content: I've worked it out and the answer is more than a little embarrasing.Firstly though, many thanks to all for the detailed replies. This has become an interesting thread and attracted more interest than I'd expected. Sorry for the late follow-up by the way - I've been up to my eyeballs in house move preparations.Basically I should hand back my EE card right now!!! The reason the LED wasn't fully extinguishing is due to a stupid error in my scrappy breadboarding. In my stupidity, I'd managed to connect the capacitor terminal that should have been on the 0V net to the junction of the LED cathode and 220R resistor instead!!!Now the design is corrected, all is behaving as expected. I have also increased the current limiting resistor from 220R to stay a bit further from the devices absolute max source/sink current! D'oh!With the aforementioned node swinging from approx 0V to approx 3V, I think the dimming effect makes sense. Will think it through some more in due course.Many thanks once again,Robin

author: Zero999
author_rank: Super Contributor
timestamp: July 16, 2011, 04:44:01 pm
content: Thanks for coming back and being honest that you made a mistake.

author: 74HC04
author_rank: Contributor
timestamp: July 16, 2011, 04:55:00 pm
content: QuoteWell we all make mistakes! I just wish there was more honesty in the world sometimes.

author: ivan747
author_rank: Super Contributor
timestamp: July 18, 2011, 04:51:29 am
content: Quote from: jahonen on July 13, 2011, 03:37:34 pmWait what the... This happened to me with a USB powered USB to UART converter powered by USB! The Tx line was connected to a PIC and 13mA was enough to power an LED. SO weird. It only supplied something like 3 volts so the PIC went into brown-out reset. The LED wasted so much power that it dropped the voltage down to 3V, not enough for the 5V-in-mind design. It happens because of the internal resistance of the converter's MOSFETs and the ESD protection diode's internal resistance. And I realize this a year after making the prototype.As a reminder to myself, I will not use breakout boards for PCB's, and I will take advantage of the Reset pin on the converter chip. Thanks for pointing this out.