Go Down

Topic: Why are all of these buttons acting like they are the same? (Read 1 time) previous topic - next topic

retrolefty

#10
Nov 04, 2012, 02:18 am Last Edit: Nov 04, 2012, 02:20 am by retrolefty Reason: 1

Ok, I didn't think about it that way. So really this is as much a floating input issue as it is a button debouncing problem, because the bounce is returning down to the power board causing noise. That makes a lot more sense now. I'll add resistors to the gate pins on each of my buttons and hopefully that will get it to work.


Cool, let us now how it works out. I don't quite understand your use of the name 'gate pins' for a switch contact pin, but that's not important as there are many things I don't understand in this world.  ;)
Again the pull-down resistors should wire from the microcontroller's input pins side of the switches and ground.

Lefty

centizen

By gate pin I just meant the pin that is not connected to power.

So I implemented this solution with 10k resistors and I'm still having the same problem. To try to isolate the problem I made a breadboard circuit using similar buttons in the manner you described. Here is a picture of it.



Anyways, the issue is still happening. I will press a button that is not connected to the line that I am reading and get a HIGH. Using the digitalReadSerial example function I read pin 3 and can get HIGH's from most, if not all of the buttons. I am not sure why this is happening but I don't think it is a floating input error unless I've put my resistors on the wrong side.

Anyways, thanks for the help so far. Hopefully we can figure this out

Michael

PeterH


So I implemented this solution with 10k resistors and I'm still having the same problem. To try to isolate the problem I made a breadboard circuit using similar buttons in the manner you described. Here is a picture of it.


It's hard to be sure from the picture, but it looks to me as if you have the resistors wired in series in the line between the switch and the Arduino input. That is not the correct way to wire up pull-up (or pull-down) resistors.
I only provide help via the forum - please do not contact me for private consultancy.

retrolefty

#13
Nov 05, 2012, 02:21 am Last Edit: Nov 05, 2012, 02:33 am by retrolefty Reason: 1
Yes you have improperly followed my instructions (trice times!). The resistors need to wire from the input pins of the controller to ground, not is series with the switch contacts as you have built. Here is a linked document that will possible better explain the problem and solution to your dilemma. The fourth drawing down in the doc is how you need to wire your resistors.  http://www.seattlerobotics.org/encoder/mar97/basics.html

Lefty



centizen


Yes you have improperly followed my instructions (trice times!).


Yeah; great. Thanks. Sorry if my small brain had a hard time comprehending.


It's hard to be sure from the picture, but it looks to me as if you have the resistors wired in series in the line between the switch and the Arduino input. That is not the correct way to wire up pull-up (or pull-down) resistors.


Thanks, I'll rewire and try tomorrow.

Go Up