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.
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.