Arduino I/O Pins Unstable

Discussion in 'Embedded Systems and Microcontrollers' started by hudoeng, Nov 27, 2014.

  1. hudoeng

    Thread Starter New Member

    Nov 27, 2014
    4
    0
    I'm working on an Arduino Uno project that requires 6 digital I/O pins. I've been experiencing problem with false "HIGH" readings during testing. I've narrowed down the problem to the digital I/O pins being unstable.

    The pins will read as "HIGH" when touched by hand or when near other electronic components (ie. the jumper wires on my prototyping breadboard).

    Now, it will not be handled during it's actual application but it will be in the same enclosure as a 9V battery and I'm uneasy about the false readings.

    Has anyone ever experience this issue with an Arduino board? If so, what steps did you take to work around it?
     
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,392
    497
    You are not making sense.
     
  3. hudoeng

    Thread Starter New Member

    Nov 27, 2014
    4
    0
    What's confusing about the post? The Arduino pins that I've programmed as digital inputs are detecting input when the Arduino board is touched by hand or when the pins are near current carrying wires on my prototyping board. No digital "HIGH" input at these pins should be present at that time. It seems like some type of interference.
     
  4. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,809
    834
    To what are these pins connected? If they are floating, then the behavior you describe is not unexpected. They must be connected to either a high or low signal at all times. In a simple example, a pin connected to a SPST switch connected to ground must also be connected to a pull up resistor.
     
  5. Jeremy Adair

    New Member

    Nov 27, 2014
    5
    0
    If this is happening on input pins with open switches or transistors you need to look up pull up resistor. The arduino has internal pull up resistors that you can an enable in code read this.https://learn.sparkfun.com/tutorials/pull-up-resistors
     
  6. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,361
    What you are experiencing is normal behaviour. No digital input pin should be left floating with no termination.
     
  7. Jeremy Adair

    New Member

    Nov 27, 2014
    5
    0
    Now pull up resistors are confusing at first. You may think all of the voltage will drop on the 10k pull up so how will it make the input pin high? Keep in mind that the input has a very high input resistance(impedance). So what you have is a series circuit of 5v ---10kohm---1Mohm---0v. 90% of the voltage drops on the internal input impedance not the 10k resistor. You can also use a pull down resistor to reverse the logic at the input (the input will give you a 0 instead of 1 or vice versa but the pull up will be positive logic)
     
    Last edited: Nov 27, 2014
  8. hudoeng

    Thread Starter New Member

    Nov 27, 2014
    4
    0
    I should have been more specific. Pushbuttons are connected to the digital input pins (these are definitely wired correctly), and when pressed the input pin should detect a high voltage. I have the pushbuttons wired with a pull-down resistor but I did not pull down the input pin. I see where the issue is now. Thank you for the insight everyone.
     
  9. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Often a pullup resistor is used, and the pushbutton would short that to ground.
    Some controllers have internal pullup resistors.
     
  10. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Please show your schematic.
     
  11. hudoeng

    Thread Starter New Member

    Nov 27, 2014
    4
    0
    I see why pull-up resistors are preferred as I was re-drawing the circuit. The schematic is crude and I don't think it's necessary to upload at the moment. Sorry. The floating voltage of the Arduino pins was definitely the issue. Thanks again for the help
     
Loading...