Hi All,
I am very new to the Arduino and electronics in general, but have learned a great deal already. I have run into a problem with my first large scale project, and after delving through the code, it seems that my problem is physical.
It appears that my Arduino is randomly receiving inputs into my input pins from something as simple as me grabbing a wire. I believe the pins are reacting to extremely small fluctuations, or simply noise from other input pins. Is there a standard way to combat this (whether in code or something physical to consider)?
Arduino Pin Noise
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Arduino Pin Noise
breadboards are noisy
poorly grounded systems are noisy
sticking your hands that are excellent 60hz conductors into your circuits will make them noisy
poorly grounded systems are noisy
sticking your hands that are excellent 60hz conductors into your circuits will make them noisy
-
- Posts: 41
- Joined: Fri Jan 30, 2009 7:03 pm
Re: Arduino Pin Noise
Ladyada's right. The pins even carry small amounts of voltage if they're being read, as you can see if you build the Arduino Oscilloscope.
- jackal858
- Posts: 5
- Joined: Sat Jan 10, 2009 4:56 am
Re: Arduino Pin Noise
Hmmm... I understand.
I'm getting noise between inputs also though. Basically, I am trying to build a Simon game with four momentary buttons, and sometimes when I push one, it will trigger another input as well. I've tried changing the inputs to various pins without success. I've just about given up on the project as I can't seem to resolve the random inputs (which kills the game obviously).
Any suggestions? Somehow ground the breadboard? Limit jumper length? Etc.?
I'm getting noise between inputs also though. Basically, I am trying to build a Simon game with four momentary buttons, and sometimes when I push one, it will trigger another input as well. I've tried changing the inputs to various pins without success. I've just about given up on the project as I can't seem to resolve the random inputs (which kills the game obviously).
Any suggestions? Somehow ground the breadboard? Limit jumper length? Etc.?
-
- Posts: 1645
- Joined: Sat Nov 10, 2007 12:59 am
Re: Arduino Pin Noise
you got pull ups, (or pull downs), on those inputs? sounds like they're floating.
- jackal858
- Posts: 5
- Joined: Sat Jan 10, 2009 4:56 am
Re: Arduino Pin Noise
mtbf0 - I have resistors in line with the buttons which are connected to the input pins.
-
- Posts: 189
- Joined: Mon Apr 03, 2006 6:25 pm
Re: Arduino Pin Noise
Not sure exactly what you mean by this - if you really do have the resistors "in line" with the button, that will not be acting as a pull up/down resistor, and you will still get a floating pin. Or I might be reading you wrong.jackal858 wrote:I have resistors in line with the buttons
Do you have this?
Code: Select all
GND (or +5V) ----> Button -----> resistor ------> input pin
Code: Select all
GND ------> Button --------> resistor --------> input pin
|
|
+5V ---> resistor --|
When you push the button, there is still the connection to +5V through the resistor, and the pin is also connected to GND with less resistance. Therefore the input pin is "closer" to GND, and that is the signal it sees.
If you don't have the resistor, when the button is open, the pin doesn't "see" either GND or +5V more than the other, so it "floats" between the two. If a pin next to it gets a clear +5V or GND, the input pin can be influenced and read the same (what you might be seeing)
Ladyada's tutorial on this is here:
http://www.ladyada.net/learn/arduino/lesson5.html
If this is what you mean you already have, my apologies.
Please be positive and constructive with your questions and comments.