Understanding Hanging Pins and Their Potential

  • Thread starter Thread starter raybuzz
  • Start date Start date
  • Tags Tags
    Potential
Click For Summary

Discussion Overview

The discussion revolves around the behavior of hanging pins in digital circuits, particularly in relation to microcontrollers, CMOS inputs, and JFET amplifiers. Participants explore the implications of leaving inputs floating, the effects of static charge and electromagnetic interference, and the design considerations necessary to mitigate these issues.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes their experience with a microcontroller where a hanging pin was initially assumed to be logic 0 but functioned as logic 1.
  • Another participant emphasizes the importance of terminating unused CMOS inputs to prevent floating states that can lead to parasitic currents and noise.
  • Concerns are raised about how a floating pin can float to mid-rail voltage due to external influences, with examples of static charge and nearby electromagnetic fields affecting circuit behavior.
  • Some participants question whether the phenomenon of floating inputs affects connected circuits, suggesting that low impedance connections should mitigate interference.
  • Discussion includes the role of gate resistance in JFET amplifiers and whether high source impedance could lead to similar noise issues as seen in floating digital inputs.
  • Johnson noise is mentioned as a consideration in the design of FET amplifiers, indicating that high source impedance can lead to noise problems.

Areas of Agreement / Disagreement

Participants express multiple competing views regarding the effects of floating pins and the implications for both digital and analog circuits. There is no consensus on the best practices for managing these issues, and the discussion remains unresolved.

Contextual Notes

Participants note limitations in their understanding of how floating inputs behave in different circuit configurations and the specific conditions under which noise issues arise. The discussion highlights the complexity of interactions between circuit design and external influences.

Who May Find This Useful

Readers interested in digital circuit design, microcontroller applications, and the behavior of JFET amplifiers may find this discussion relevant to their work or studies.

raybuzz
Messages
21
Reaction score
0
Hi everyone,
I am not getting a hang of the potential at hanging pins. Here a few stuff i did which raised this doubt:

1. In a microcontroller i wrote a program to input data to a port. The input was through switches one ended of which was grounded. Hence if switch is on then, the controller pin is grounded, else if off, it is hanging. I initially assumed that the state of hanging pin is logc 0, but it didnt work. i then assumed that the state would be logic 1 , it worked.

2. The same goes for an comparator chip, i tested.

3. Also in JFETs in our analysis of calculating the gate to source voltage(Vgs), we consider Vgs = - ( Vsource). cause the input impedance of JFET is very high and hence current through Rg( gate resistance) is 0.
Then what is the need of putting Rg , as putting Rg will result in lowering of input impedance of the JFET amplifier, as a whole? Cant we take out Rg, as Vgs remains unaffected, and hence both the large and small signal analysis.

Explanation??
 
Engineering news on Phys.org
You must always do something with CMOS inputs. It is very bad practice to leave them open, for two main reasons. First, when the input to a CMOS gate is floating, the pin can float to mid-rail, and that turns on both the input pullup and pulldown stages some, which causes a parasitic current to flow from Vdd to Vss. In a low power circuit, this parasitic current can be more than the whole rest of the cirucuit is consuming -- that's a very bad thing. Second, with the input floating, it can be influenced by small E field changes in the area, and can cause the gate to switch noisily and generally rattle around, creating noise on the PCB.

Always terminate unused CMOS inputs to Vdd or Vss, optionally through a resistor. Note that with many uCs and CPLDs and FPGAs, you can enable on-chip pullup (or pulldown) resistors, which saves you having to use an external resistor. Also, your switch input circuit should have a pullup resistor, if the switch grounds the input.
 
berkeman said:
You must always do something with CMOS inputs. It is very bad practice to leave them open, for two main reasons. First, when the input to a CMOS gate is floating, the pin can float to mid-rail, ...
... Second, with the input floating, it can be influenced by small E field changes in the area, and can cause the gate to switch noisily and generally rattle around, creating noise on the PCB.

How can the pin float to mid-rail region? Say midrail is between 2V to 3V, the circuit noise , E interference, cannot produce a voltage in the hanging pin of more than a few millivolts.
 
raybuzz said:
How can the pin float to mid-rail region? Say midrail is between 2V to 3V, the circuit noise , E interference, cannot produce a voltage in the hanging pin of more than a few millivolts.

Well, static charge in the air is one way. I've seen floating inputs change the output state, based on how close you move your hand to the PCB! That one had me going for a while, until I realized that there were some unconnected inputs on that hand-built prototype board. 50/60Hz E-field noise from nearby AC Mains circuitry is another way.
 
berkeman said:
Well, static charge in the air is one way. I've seen floating inputs change the output state, based on how close you move your hand to the PCB!
Did this really happen with digital circuits? I have experienced similar problems with analog circuits, and always thought it was because by moving hand to PCB, we are adding capacitance to it, between the circuit and Earth ground. For example moving your hand over a radio receiver, will result in an observable noise from the speakers.
 
Last edited:
raybuzz said:
Did this really happen with digital circuits? I have experienced similar problems with analog circuits, and always thought it was because by moving hand to PCB, we are adding capacitance to it, between the circuit and Earth ground. For example moving your hand over a radio receiver, will result in an observable noise from the speakers.

Yes, that example was a 74HC245 buffer circuit driving some LEDs, but I'd left 4 of the inputs floating. Waving my hand near the circuit made those 4 LEDs change ON/OFF/ON, and I could make them buzz with certain hand positions.
 
Ok. But why doesn't the same phenomenon affect circuits which are all connected, and no pin is left hanging. Say i am driving a transistor gate with a micro controller. The current sourced by the controller is low. So isn't there a good chance of static, E interfering with the digital circuitry?
 
raybuzz said:
Ok. But why doesn't the same phenomenon affect circuits which are all connected, and no pin is left hanging. Say i am driving a transistor gate with a micro controller. The current sourced by the controller is low. So isn't there a good chance of static, E interfering with the digital circuitry?

When an input is connected to a logic output, it is being driven high or low by a low impedance, typically in the few tens of Ohms. Even when an input is pulled high or low by a passive resistor, that resistance is typically in the 1k to 10k Ohm range, which is plenty to hold the input at a rail. The issue is the very high input impedance of the CMOS inputs themselves (small capacitance with a tiny leakage current) -- when they are left disconnected, even small nearby influences can change the input gate voltages.
 
During development of a product we had left the window on an EPROM uncovered because the firmware was changed routinely. Some upper address pins were accidentally left open and when the EPROM was in the dark it the whole thing would crash. When the window was exposed to light everything would work fine. Leaving pins floating in digital circuits is BAD BAD practice.
 
  • #10
berkeman said:
When an input is connected to a logic output, it is being driven high or low by a low impedance, typically in the few tens of Ohms. Even when an input is pulled high or low by a passive resistor, that resistance is typically in the 1k to 10k Ohm range, which is plenty to hold the input at a rail.
But consider a JFET amplifier , in any bias configuration. The input is applied at the gate , which has an large resistance Rg of the order of 1Mohm going to the ground (as good as an hanging pin). Though this may not be an digital circuit, won't the same static charge stuff, cause votage fluctuations? The source voltage used is in the order of millivolts.
 
  • #11
raybuzz said:
But consider a JFET amplifier , in any bias configuration. The input is applied at the gate , which has an large resistance Rg of the order of 1Mohm going to the ground (as good as an hanging pin). Though this may not be an digital circuit, won't the same static charge stuff, cause votage fluctuations? The source voltage used is in the order of millivolts.

The source voltage is not the issue -- the issue is the source impedance. If it is very high, then yes, you are going to have noise problems. Johnson noise is an important consideration in the design of FET amplifiers:

http://en.wikipedia.org/wiki/Thermal_noise
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
Replies
7
Views
4K
  • · Replies 2 ·
Replies
2
Views
17K
  • · Replies 11 ·
Replies
11
Views
17K
  • · Replies 6 ·
Replies
6
Views
7K
Replies
3
Views
5K
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 10 ·
Replies
10
Views
4K
Replies
11
Views
14K