Go Down

Topic: Arduino Uno board potentially outputting noise (Read 65 times) previous topic - next topic



I currently am using an Arduino Uno Genuine board and running a code for testing. When running, without anything attached to my board, it is outputting values and I am unsure of how it is outputting values with no input values.

The serialprint.ln lines are what are outputting values, and I am unsure of why it is outputting values when no input is going on.

I believe that it may be noise values but how much range does noise have values for?

Attached, is my code.


When nothing is connected to a pin set to INPUT mode, the pin is floating. This means it can be in any state and that state can change from any small electromagnetic interference. This is why we attach a resistor to input pins so that they are pulled to a known state. The Arduino Uno even has internal pull-up resistors you can turn on via pinMode(pin, INPUT_PULLUP).

More information:
External pull-down resistor: https://www.arduino.cc/en/Tutorial/Button
Internal pull-up resistor: https://www.arduino.cc/en/Tutorial/InputPullupSerial


Indeed - a conductor (wire, trace, or the pin itself) connected to a high impedance (input) pin will pick up random noise - if the conductor is shaped and sized precisely, it's called an antenna. Otherwise, it's called a floating pin, and they're a bad thing.

Good design (per Atmel datasheets) calls for setting all unused pins INPUT_PULLUP (or using an external pullup or pulldown) - this reduces power consumption by a tiny bit (though I have pretty much never seen anyone in Arduino land do this).
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up