Wobbly value pushbutton

hi there

I have a pushbutton and a poti connected to rs323 via arduino
problem is the value from the pushbutton is very unstable, espacially when the button is not pushed,

i hooked the button to the arduino via exactly this scheme (see attachment)

can anybody give me a clue of a solution for this problem
thnx a lot

art

button_schem.png (26.4 kB)

HI artv

In danish it is called “prel” perhaps also in English.

you could solve it in the analogue domain or get some expensive “prel free” buttons.

or you could do it in software by making sure the button has been high for some time before considering it high. this could be done in the arduino or in vvvv. I have attached a little patch example of how you could do it in vvvv.

sune

HI artv

In danish it is called “prel” perhaps also in English.

you could solve it in the analogue domain or get some expensive “prel free” buttons.

or you could do it in software by making sure the button has been high for some time before considering it high. this could be done in the arduino or in vvvv. I have attached a little patch example of how you could do it in vvvv.

sune

noisy_button.v4p (10.1 kB)

you could also apply a low pass filter to the input. Just calculate the aproximate frequency you want to avoid and choose the components from that.

thats a new word for me: prel!
thanx for your patch, it works now, have a bit of delay but thats no problem

great big thank you!

gr
art

I think the analogue way with the low pass filter will give you less delay

hi artvt,
what amount of resistance does your resistor have? i once got told on the arduino forums that very high impedance pull-down resistors might introduce noise. didn’t have any trouble with 100kOhm, though.
if that’s not the issue, have you looked into the ‘de-bounce’ tutorial on the arduino site? they have a solution for wobbly buttons.