I'm currently having a strange issue with what I think is a 'floating' signal.

The setup: I have a bank of inputs (which are connected to a resistor and LED acting as a pull-down) connected to inputs and outputs of a D-type flip flop IC (SN74ALS374AN). The fact I'm using all 8 shouldn't matter as the issue occurs on any one in isolation. They are connected to input and output as I will only have enable or clock on at any given time, and never both (for a bidirectional bus). The datasheet of the chip says it is suitable for this.

The problem: See the image attached. When I disconnect wire A from the flip flop IC (connection B) and read the voltage between A and ground, I get 0v or 5v depending on whether the switch is on. However when I connect A to B (the goal being to feed this logic 1 or 0 signal to the IC), suddenly the voltage reads as 1.5v (which I believe to be a floating value).

Can anyone explain this behavior? Am I doing something wrong?

A few things to note: - It doesn't matter if I disconnect Q and D on the IC - If I connect to Q only, then the logic low is retained, so the problem is really just the D (or input) of the flip flop - The datasheet for the IC doesn't seem to shed any light on this

Any suggestions would be very much appreciated. If I haven't explained anything properly or you need me to test anything else then please let me know.

Many thanks, Matt

A is 0 when B is disconnected, and 'floats' when B is connected

  • 2
    \$\begingroup\$ I think if you inspect the datasheet for your '374 you'll find that it sources a little bit of current from its inputs. This means that an LED in your pull-down won't work as a decent pull-down since it will cause a significant voltage drop - as you're seeing. \$\endgroup\$ – brhans Feb 16 '16 at 16:03
  • \$\begingroup\$ I do not understand your objective with "disconnecting A and connecting to B". What are you hoping to achieve with this? I would say the correct way of feeding the first ouput to second input is to connect A's Q to B's D, and not A's Q and D and B's Q and D at the same time. You say the datasheet is suitable? From what I see its outputs are 3-state, i would guess the measured "floating" voltage derives from that. \$\endgroup\$ – Vicente Cunha Feb 16 '16 at 16:04
  • \$\begingroup\$ @VicenteCunha I believe OP's mention of "disconnecting A from B" was meant to relay information regarding what troubleshooting steps they have already tried. By my reading, they were stating that they measured 0V/5V off/on voltages on the trace when not connected to the IC, but are getting 1.5V/5V off/on voltages after connecting to the input pins of the IC. \$\endgroup\$ – Robherc KV5ROB Feb 16 '16 at 16:26
  • \$\begingroup\$ That is a truly bizarre connection to the '374. I'm assuming it isn't real, and it would be nice if you show what you're really doing. \$\endgroup\$ – WhatRoughBeast Feb 16 '16 at 18:21
  • \$\begingroup\$ RobhercKV5ROB That is correct, I was going through the steps I had taken to debug it. And @WhatRoughBeast What is it that you are doubting? \$\endgroup\$ – Matthew Shaile Feb 16 '16 at 19:49

In general, a digital input must either be high or low at all times. If "BUS" is just a hierarchical symbol to reduce the number of wires shown, then what you are really giving as input is:

  • Switch closed = input to HIGH (good)
  • Switch open = input to 220R, to LED, to ground (bad)

This is bad because the LED will drop some voltage, likely 1.8v or so. So the input pin is not seeing anything near what it expects for a low signal.

Often, this "indeterministic state" between low and high can even be damaging to the IC, as it turns on multiple parts of the IC internally which essentially short it out. So this condition must be avoided.

The latter (open switch) is problematic because the registered low input signal level (\$\text{V}_{\text{IL}}\$) of the 74ALS374AN is a maximum of 0.8v, and the 220R and LED are likely presenting it with 2.0v.

@KV5ROB's solution may work. If it were mine, I'd find some other way to light the LED's (look into buffers or inverters) and replace them with 10k resistors.

|improve this answer|||||
  • \$\begingroup\$ Hey, Thanks for taking the time to respond. As in my comment to KV5ROB, I tried swapping the LED + resistor for a 10k and I got similar results (1.49v), but swapping it for a 220r and no resistor drops it down to 0.23v. Any idea why this is happening? Also I am being a bit lazy having the LEDs here, and I will research buffers as a potential solution for that, thanks! \$\endgroup\$ – Matthew Shaile Feb 16 '16 at 19:52
  • \$\begingroup\$ Welcome. @Peter Bennett's comment is spot-on (+1 for that) - replace the 220 and 10k with a 2k and it should work due to the reasons he states. \$\endgroup\$ – rdtsc Feb 16 '16 at 19:59
  • \$\begingroup\$ Should I use an even lower value since 2k is still giving me close to 1v in contrast to 220r which is giving me 0.23? \$\endgroup\$ – Matthew Shaile Feb 16 '16 at 20:06
  • \$\begingroup\$ 2k-1k should work. Looking at the schematic, pins 2 and 3 are tied together, then ran through the bus to the first switch. Looking more closely at the datasheet linked above, pin 2 is the 1Q output. So if this is correct, you may have connected an output pin to an input switch. \$\endgroup\$ – rdtsc Feb 16 '16 at 20:18
  • \$\begingroup\$ Yeah that's correct. I am purposely connecting all the inputs and outputs of the flip flop to the switch / LEDs. Since the output is in a high impedance state when it is not enabled, it won't affect the operation of the inputs, however when I want to view output I turn off all the switches then enable outputs. This way the LEDs serve as a display for the inputs, and also a display of the outputs. As you can tell, a lot of this circuit is about my laziness in wanting to reuse the 8 inputs and outputs and the same bus line for all :) Also, I tried the above and it works! Thanks so much \$\endgroup\$ – Matthew Shaile Feb 16 '16 at 20:47

As brhans mentioned in comments, I believe your IC is 'leaking current' to your input/output lines, with the 1.5V you're seeing being the forward-bias voltage of your diodes.

To fix thks, try connecting a pull-down resistor in parallel to each LED (size according to anticipated leakage current), giving that current a path to ground.

Something like this:
enter image description here
(resize the 10K resistors as appropriate to your leakage current & acceptable 'low' voltage).

|improve this answer|||||
  • 1
    \$\begingroup\$ According to the 74ALS374 datasheet, an input can source up to 0.2 mA when low (below 0.4 volts), so the pull-down resistor must be less than 2K to guarantee a Low input. \$\endgroup\$ – Peter Bennett Feb 16 '16 at 16:49
  • \$\begingroup\$ Thank you so much for your responses. So I did a bit more fiddling based on what you said and I've come up with some odd results. First of all, a quick correction, it turns out the resistor I was using for the LED was 1k, not 220. However, I attempted to swap the LED and resistor for a resistor only. My results were odd. Below are the values I tried and the voltages at A in the diagram: 1k + LED: 1.7v (the original problem) 1k: 0.47v 1.2k: 0.47v 1.5k: 0.63v 10k: 1.49v 220r: 0.23v So it seems swapping the 1k + LED for a 220r on it's own (or in parallel) will solve the issue. Any ideas why? \$\endgroup\$ – Matthew Shaile Feb 16 '16 at 19:46
  • \$\begingroup\$ @MatthewShaile This is because of the current that's coming from your IC causing a voltage drop across your resistor. With the LED+1K resistor, you were probably getting ~1.4V from the LED's 'knee voltage,' then another ~0.3V drop across the resistor. If you use a 220 resistor parallel to the LED, you may well need to lower the resistance of the series resistor in order to get the LED to light well without problematic heating of the resistor (~500 ohms might end up being your best balance for <=0.4V 'low' input after leakage currents). \$\endgroup\$ – Robherc KV5ROB Feb 16 '16 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.