Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

NAND Gate problem, could it be static discharge?

Status
Not open for further replies.

Superdude_123

Newbie level 4
Joined
Apr 22, 2012
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,327
After trying to build my first NAND gate SR Flip Flop circuit using a **broken link removed** chip, I came in to weird problems last night. I basically had a small LED placed on Q' to show me if that side of the circuit worked or not, however, my problems were a bit weird. What I noticed would happen is, as I would get my hand near the circuit or any of the wires, the LED would come on or off. Could this be due to static discharge? When using a NAND gate, and it requires 5 V input, can it be plugged in directly to a 5 V source or am I missing something?
 

I would guess that you have left some inputs floating - that is, not connected to anything. Unused inputs must always be connected either directly to ground, or to +5V through a resistor (1K to 10K is good).

Unused inputs on gates that are otherwise used, for example you have a three-input gate but only need to use two inputs, should be connected to the logic level (as before) that does not change the gate's operation.

What is likely happening is that the very sensitive, floating inputs are getting a signal from your body, which itself is picking up a load of signals from mains wiring, switch-mode power supplies nearby, etc.

Oh, and did you use a current-limiting resistor in series with the LED? Otherwise neither it, nor the chip, will be happy. The chip can only handle a maximum of 10mA output, so something like a 400 ohm resistor would be good with a normal, coloured LED.
 
Last edited:

I used a 80 Ohm resistor as I was using a very small 3 mm LED. Do I have to use a current limiting resistor on the NAND Gate's Vdd pin?

And your right, I left the other inputs of the NAND gate open. But why does the other inputs effect the inputs that I was using? One good way to explain this is that I was using all the right side of the chip but only used the left side for the Vdd or Vcc (what ever was required) and nothing more.
 

When you say 'very small' are you referring merely to the physical size of the LED? That makes no difference to the current it will draw, if allowed. If it is a 'standard' LED, not a low current type, then it might have a typical voltage drop of about 2V at 20mA. That leaves 3V. 3V with 80 ohms gives 37.5mA - far too much.

The IC's power pins are connected directly to +5V and ground, as you probably have. In fact, the IC you have can be used from 3V to 15V; it doesn't have to be 5V.

If you are experiencing issues when moving your hands over the circuit, without actually touching it and then possibly disturbing the connections, then you most likely have a high impedance (floating) input, as mention before. This could be because of an unconnected input, but you are correct that it probably would not matter on a gate that you have not used.

Check you connections, and use a higher LED resistor.
 

How would you handle Debouncing with this type of NAND gate?
 

There are numerous solutions, from the quick and cheap to integrated programmmable debouncers.

I guess that you want to debounce a switch...

The simplest idea is to use a capacitor (about 10nF, depending on how badly the switch bounces but it's not critical) across the switch contacts. This will 'absorb' any quick on/off pulses by charging/discharging. This often works OK but is not ideal because it gives a slow change between states when switched, which logic gates do not like. Try it and see if it works. The solution to that problem is to use a logic gate with a Schmitt input - these can take a slow change. See this link for an explanation: http://www.all-electric.com/schematic/debounce.htm

Another way is to use an SPDT switch with another SR flipflop. I'll leave you to google that as it's not a usual solution.

Finally, there are logical ways to debounce; usually involving setting up a delay line with a series of flipflops and only allowing the output to change when the input has settled. The MC14490 chip does just that, and works very well. Other companies produce small I.C.'s for switch debouncing too.
 

That's an improved version - the added resistor prevents the switch eventually being damaged by shorting the capacitor. Not really an issue with just experimenting.

You still need a Schmitt input gate for it to be reliable.

Have a look at this thread, and try searching here and google for solutions - it's a very common issue:

https://www.edaboard.com/threads/36051/
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top