Home automation often involves interfacing with contact closure type switches. Some examples include: alarm magnetic reed door/window switches, water float level switches, push button switches, etc.

Some input hardware can be directly wired to these switches, such that the INPUT pin/terminal goes directly to one switch wire while the other switch wire is connected to +5V. This hardware, like the INSTEON I/O-Linc, has an internal circuit so that is can specifically be used for contact closure type circuits.

However, some TTL based input hardware will have a “floating input” problem when the switch is open. In such an open state the INPUT pin on the hardware will be connected to nothing and the TTL circuitry will bounce between showing ON and OFF. You'll know this is a problem because there will be a continuous stream of changes logged inside Indigo when the switch is in the open state.

The solution in this case is to use a pull-up resistor (RadioShack will have the 10K resistor needed) so that the INPUT pin is never left in a floating, or unconnected, state:

When the closure switch is in the open state, the INPUT pin is pulled up to +5V through the 10K resistor. When the closure switch is in the closed state, INPUT will be forced to GND (+0V). Note the 10K resistor is needed so that there isn't an unloaded (no resistance) short between +5V and GND when the switch is closed. By using a 10K resistor, only a tiny amount of current will flow from +5V to GND when the switch is closed.

Note the above circuit will have INPUT pulled to +5V when the circuit is open, and INPUT will be GND when the circuit is closed. If this is the opposite of what you want, then you can use a pull-down resistor circuit instead:

pullup_resistor.txt · Last modified: 2019/01/26 00:10 (external edit)

© Perceptive Automation, LLC. · Privacy