Foot pedal / button?

Hey guys, I was thinking of working on a project that uses a foot pedal as a button and wanted to know the feasibility of it.

So to my knowledge all I need is to have a +5, GND and Digital wire right?

So would something like this not work?

Amazon

Because it looks to me like we just have a simple POS/GND for a basic contact like switch. Would this still work somehow?

All I want to be able to do is put this switch on an Uno and detect when said switch has been pressed down.

Thanks!

It would but that's probably a latching switch, push on, push off. You'd be better off with a simple momentary action pedal like for sewing machines, machine tools etc. E.g. http://www.ebay.com/itm/SPDT-Nonslip-Plastic-Momentary-Electric-Power-Foot-Pedal-Switch-LW-/172129077200?hash=item2813b147d0:g:A8AAAOSwP~tW4bVx

Steve

slipstick: It would but that's probably a latching switch, push on, push off. You'd be better off with a simple momentary action pedal like for sewing machines, machine tools etc. E.g. http://www.ebay.com/itm/SPDT-Nonslip-Plastic-Momentary-Electric-Power-Foot-Pedal-Switch-LW-/172129077200?hash=item2813b147d0:g:A8AAAOSwP~tW4bVx

Steve

Exactly what I have on my Arduino controlled coil winder. A simple SPST foot switch. Had to bebounce the switch in software, but reading twice with a short pause of 20ms between reads.

Paul

Ah, I see. Yeah, I'd want it to be momentary.

So this would work yeah?

https://www.amazon.com/URBEST-Momentary-Industrial-Anti-skid-Surface/dp/B01LXTEQ1C/ref=sr_1_22?rps=1&ie=UTF8&qid=1494185791&sr=8-22&keywords=momentary+foot+switch&refinements=p_85%3A2470955011

The only thing I'm not sure about is that it looks as though it has 4 wires coming out of the cable. I should just be able to use the POS/GND and 1 additional wire, or not even need the other two and use it as a... INPUT_PULLUP pinMode correct?

RDaugherty: Ah, I see. Yeah, I'd want it to be momentary.

So this would work yeah?

https://www.amazon.com/URBEST-Momentary-Industrial-Anti-skid-Surface/dp/B01LXTEQ1C/ref=sr_1_22?rps=1&ie=UTF8&qid=1494185791&sr=8-22&keywords=momentary+foot+switch&refinements=p_85%3A2470955011

The only thing I'm not sure about is that it looks as though it has 4 wires coming out of the cable. I should just be able to use the POS/GND and 1 additional wire, or not even need the other two and use it as a... INPUT_PULLUP pinMode correct?

That is what you want. It is SPDT, which means there are 3 wires connected to the switch. A common wire and one wire connected to each end of the switch. That way you can press the switch to open a circuit or can press the switch to close the circuit. You probably want the latter.

The 4th wire is a safety ground for any metal parts of the switch. Your multimeter can help you decide on what wire has the connections you want.

Paul