Phantom Button Presses in Mazzer Espresso Grinder

I am embedding an arduino in my Mazzer Major espresso grinder to control the length of espresso bean grinding.

I have it all set up and working, but I'm getting phantom button presses. In 10 minutes of having it functioning, I had 2 phantom button presses.

Is there any way of adding hardware to the button circuit to filter out noise? I was thinking maybe a diode between ground and the resistor might help any noise coming from ground. That said, I'm not sure where the noise comes from, so I'm not sure what I can do to prevent it.

Does anyone have any tips?

Thanks!

Can you provide a schematic for the button circuit?

So you're getting button presses without actually hitting that button at all? Or is this a debounce issue?

I used a circuit like described in the link above. 10k ohms pull down resistor and a big switch.

There's more wire than I need between the arduino and the switch, I'm going to trim it, hopefully that will also help.

I'm getting button presses without hitting the button at all. The second occurrence was at least two minutes from the last real button press.

Double check your wiring and make sure that pull-down resistor is connected to gnd and the other end to the pin on the arduino that you're using for reading the state of the button.

Make sure your switch is fully opening when not being pressed. This assumes you have a multi-meter handy so that you can read Ohms. A faulty switch could cause the problems you're seeing.