Connecting input pin to output pin

Hi All,

In the documentation, it said that when a pin is configured to be an input pin, the pin will have high impedance as if it is connected in series to a mega ohm resistor. Can I connect an input pin to an output pin on an Arduino UNO without a current limiting resistor?

Yes.

Its impedance is far far higher than that - to all practical purposes it is an infinite resistance in parallel with a few pF.

At 175C the resistance drops to perhaps 100M ohms, but normally CMOS inputs are in the 10^10 to 10^12 ohm region - the moisture and contamination on the boards will leak more! This is why an unconnected input is referred to as "floating" - the potential on it depends on the ions in the air, tiny leakage currents on contaminated surfaces, static charges around it and capacitive coupling from nearby signals...

Yes, you can connect them directly. However, you shouldn't connect them directly. You should always, for safety's sake, include a small resistance (say 100? or so). That prevents a high current being drawn from one pin if it is set as an output and driven high, and the other pin for whatever reason should get set as an output and driven low.

I know you may not intentionally do that, but unexpected things do happen, and a 100? resistor is cheaper than a new microcontroller.

1 Like

Thanks a lot for the information. I got it. :)

There is no need to do this anyway you can always read in software the state of an output pin. Besides this your code set the output state so you can always keep track of that with a variable.

Grumpy_Mike:
There is no need to do this anyway you can always read in software the state of an output pin.

…unless you are using it as a PWM output pin.

ma_hty: Hi All,

In the documentation, it said that when a pin is configured to be an input pin, the pin will have high impedance as if it is connected in series to a mega ohm resistor. Can I connect an input pin to an output pin on an Arduino UNO without a current limiting resistor?

Yes - AS LONG AS you can insure that one of the pins will remain an input. Connecting an output to an output (or an input pin that is changed to an output) creates "bus contention" where the pins fight each other as to what logic level it should be. This will decrease the life of the AVR chip, make it get hot and/or burn it out.

CrossRoads: Yes.

But be careful that the pin on the other chip never becomes an output pin with the opposite state. 5V out on one pin and 0V out on the other = dead pins.

(Maybe you could put in a resistor, just in case...)

fungus:

CrossRoads: Yes.

But be careful that the pin on the other chip never becomes an output pin with the opposite state. 5V out on one pin and 0V out on the other = dead pins.

(Maybe you could put in a resistor, just in case...)

Sure, just make the two digital pin connections via a series 1K ohm resistor and there is no software brain fart that can cause any hardware damage.

Lefty

Grumpy_Mike: There is no need to do this anyway you can always read in software the state of an output pin. Besides this your code set the output state so you can always keep track of that with a variable.

I'm trying to make a communication between two Arduino boards. That's why I connect input pins to output pins. Though it is not a watertight option, it is handy without the current limiting resistors. I definitely will put some resistors in between to safeguard current when everything finalized.

Ah, its between two different parts. Should have mentioned that initially.
So Rx to Tx, Tx to Rx, that is connecting input to output.

CrossRoads: Ah, its between two different parts. Should have mentioned that initially. So Rx to Tx, Tx to Rx, that is connecting input to output.

The program of the first Arduino is not written by me, and the serial port of the first Arduino already had its role which I don't want to touch. The part that I'm working on is the buttons on it (nine of them as a whole). Basically, I'm doing all these for fun and for learning what can and can't be done. Just in case you might be curious, I have a 3D printer driven by an Arduino board which has a LCD panel on it, I captured the LCD output with another Arduino board, replaced the buttons with my output pins, and resembled everything remotely on an Android phone via Bluetooth serial. All that had been done, and works nicely. I'm now double checking for any potential flaws. (for fun, cheers :P)