Author Topic: Schmitt NAND based LED flasher puzzling me!  (Read 9640 times)

0 Members and 1 Guest are viewing this topic.

Offline 74HC04Topic starter

  • Contributor
  • Posts: 49
  • Country: gb
  • Lifetime Electronics Nerd and full-time EE.
Schmitt NAND based LED flasher puzzling me!
« on: July 09, 2011, 04:54:08 pm »
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



« Last Edit: July 09, 2011, 05:06:41 pm by 74HC04 »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #1 on: July 09, 2011, 07:46:46 pm »
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.
 

Offline 74HC04Topic starter

  • Contributor
  • Posts: 49
  • Country: gb
  • Lifetime Electronics Nerd and full-time EE.
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #2 on: July 09, 2011, 08:35:58 pm »
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!  :o
« Last Edit: July 09, 2011, 08:38:01 pm by 74HC04 »
 

Offline qno

  • Frequent Contributor
  • **
  • Posts: 422
  • Country: nl
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #3 on: July 09, 2011, 09:45:02 pm »
Try to connect the LED and resistor to Vcc and pull it down ON.
Why spend money I don't have on things I don't need to impress people I don't like?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #4 on: July 10, 2011, 10:37:55 am »
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.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9951
  • Country: nz
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #5 on: July 10, 2011, 10:59:40 am »
maybe try powering it from batteries, just to rule out a power supply issues.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #6 on: July 10, 2011, 11:19:39 am »
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?
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #7 on: July 10, 2011, 12:30:13 pm »
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.
 

Offline FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #8 on: July 10, 2011, 01:01:02 pm »
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.
This 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. :)
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG
 

Offline Jimmy

  • Regular Contributor
  • *
  • Posts: 224
  • Country: au
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #9 on: July 10, 2011, 11:01:28 pm »
Looks like you need a diode in series with Im because while capacitor is discharging there is a little current flowing through the led 
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #10 on: July 11, 2011, 04:36:02 pm »
Looks like you need a diode in series with Im because while capacitor is discharging there is a little current flowing through the led
Why?

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.
 

Offline Jimmy

  • Regular Contributor
  • *
  • Posts: 224
  • Country: au
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #11 on: July 12, 2011, 02:16:53 am »
Looks like you need a diode in series with Im because while capacitor is discharging there is a little current flowing through the led
Why?

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.

Sorry 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.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #12 on: July 12, 2011, 05:17:16 pm »
What other forces are at place? Dark forces. ;)
 

Offline Jimmy

  • Regular Contributor
  • *
  • Posts: 224
  • Country: au
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #13 on: July 13, 2011, 01:52:45 am »
What other forces are at place? Dark forces. ;)

Yes it is Dark forces because he wants to turn the led off ;) 

maybe 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.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7589
  • Country: au
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #14 on: July 13, 2011, 04:05:40 am »
As a rough guess,I would say that the NAND gate isn't turning off completely.
It looks like Oscilloscope time! ;D

VK6ZGO
 

Offline FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #15 on: July 13, 2011, 01:08:27 pm »
As a rough guess,I would say that the NAND gate isn't turning off completely.
It looks like Oscilloscope time! ;D

VK6ZGO
My 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 :)
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7589
  • Country: au
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #16 on: July 13, 2011, 03:01:45 pm »
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.

VK6ZGO

PS: Edited because it was a bit confusing--I originally used the term "gates" for two different things :-[
« Last Edit: July 14, 2011, 02:10:55 am by vk6zgo »
 

Offline jahonen

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: fi
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #17 on: July 13, 2011, 03:37:34 pm »
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 signals :)

Regards,
Janne
 

Offline FreeThinker

  • Frequent Contributor
  • **
  • Posts: 791
  • Country: england
  • Truth through Thought
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #18 on: July 13, 2011, 03:47:20 pm »
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 signals :)

Regards,
Janne
Yep got the T Shirt! Cmos (Causes mayhem /open supplies) Is nearly as bad as Ttl (Trust to luck) when supplies are flakey or not properly decoupled.
Machines were mice and Men were lions once upon a time, but now that it's the opposite it's twice upon a time.
MOONDOG
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #19 on: July 13, 2011, 04:35:47 pm »
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.
« Last Edit: July 14, 2011, 04:18:35 pm by Hero999 »
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7589
  • Country: au
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #20 on: July 14, 2011, 02:20:57 am »
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
 

Offline 74HC04Topic starter

  • Contributor
  • Posts: 49
  • Country: gb
  • Lifetime Electronics Nerd and full-time EE.
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #21 on: July 16, 2011, 03:31:11 pm »
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
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19523
  • Country: gb
  • 0999
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #22 on: July 16, 2011, 04:44:01 pm »
Thanks for coming back and being honest that you made a mistake.
 

Offline 74HC04Topic starter

  • Contributor
  • Posts: 49
  • Country: gb
  • Lifetime Electronics Nerd and full-time EE.
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #23 on: July 16, 2011, 04:55:00 pm »
Quote
Thanks for coming back and being honest that you made a mistake.

Well we all make mistakes!  I just wish there was more honesty in the world sometimes :).
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2045
  • Country: us
Re: Schmitt NAND based LED flasher puzzling me!
« Reply #24 on: July 18, 2011, 04:51:29 am »
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 signals :)

Regards,
Janne
Wait 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf