Go Down

### Topic: Tactile button maximum cable lenght? (Read 11911 times)previous topic - next topic

#### MorganS

#15
##### Apr 26, 2016, 05:19 pm
Because the Arduino inputs are very sensitive and very fast. If the line dips below 3V for a nanosecond, that could be read as low. It would be very inconsistent and difficult to find the problem.

How much energy does it take to change the voltage on a 1pF (that's 10-12) capacitor by 2V for 1ns (10-9)? I haven't worked it out but I'm sure it's really small. A good antenna might pick up that much energy from a thunderstorm on the other side of the planet.
"The problem is in the code you didn't post."

#16
##### Apr 26, 2016, 05:52 pm
I don't mean to beat a dead horse but I'm still confused.  You say it could pick up energy...  If it's picking up energy why would that cause a line that is at 5V (and held there by a pullup) to DROP by 2V?  Even for a nanosecond.

#### MorganS

#17
##### Apr 27, 2016, 05:12 am
Because the internal pullup is weak.  The antenna formed by a long wire can overpower it. A stronger pullup will require more energy to overcome. Long wire = stronger pullup.
"The problem is in the code you didn't post."

#### sterretje

#18
##### Apr 27, 2016, 05:37 amLast Edit: Apr 27, 2016, 05:38 am by sterretje
But that is kind of my point.  So it picks up some noise.  The noise could only be an impulse right?  How could it be a drain that would drag the line low?
What about a negative pulse With a pull-up, the line will be at 5V. A negative pulse will pull the line to another voltage.

Code: [Select]
`+5V ---------+  +-------             |  |             |  |             +--+            pulse`
Instead of a negative pulse, you can superimpose a sinewave or squarewave or whatever on the 5V line which better reflects noise.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.