Looking for an inexpensive button that can withstand hits from a baseball bat

At work, we're decomissioning a pile of servers. However, they are all virtual, so we can't celebrate office-space style.

However, I was thinking - if I could hook up something that acted like a button to a keyboard, so it registered as the enter key, I could script the destruction of the effigy server with the launching of commands to destory the real one.

So, what can I use as a button here that will take a good 30ish whacks or so before breaking? Would a piezo sensor glued to a metal plate work? Would I need extra circuitry? Or is there a place I can find a cheapish, large button that I could hook up?

I can handle the soldering, but otherwise, my EE knowledge is fairly weak, so please consider added simplicity over absolute minimum price. Budget for this is probably around the $20 mark. • vibration sensor (piezo or otherwise) on something hittable would probably be your best bet – crasic Jul 23 '13 at 23:28 • How would I be able to read it from a keyboard? Just hook it up, hit hard enough, and it should register? Or do I need a circuit to convert the strike event to a on/off? – Ryan Gooler Jul 23 '13 at 23:36 • Look up anti-vandal button. You can buy some of them for$20 or so. – Nick Alexeev Jul 23 '13 at 23:42
• I've yet to see any online that are large enough to hit with a bat, though. The goal is for the bat strike to trigger an action. Anti-vandal stuff is usually designed to ignore input from blunt objects. – Ryan Gooler Jul 24 '13 at 3:33

Two pieces of metal separated by small slices of foam rubber at the corners make a cheap and simple heavy-duty pressure switch. Attach wires to the metal and you're good to go. Copper flashing from the hardware store would work, but might not last long enough.

The next problem is how to get the data into the PC. There are any number of ways to do this, but the simplest is by connecting the switch to the data control lines on a PC serial port. By reading the state of the flow control lines you can determine whether the switch is on or off. Don't have a serial port? A USB to serial converter will take care of that.

This link has an example of how to connect the switch and read it.

Why does it need to be a button? If your intention is to mock the destruction of a server, why not destroy a real one, and detect that destruction? It shouldn't be too hard to find some old hardware that deserves destruction anyway, so you can get rid of some trash and destroy your virtual servers with one bat.

This could be accomplished any number of ways. You could simply set up a real computer, and script it to ping the VM host periodically. When you stop getting pings, consider it destroyed.

For a lower level approach, you could solder wires to the opposite sides of the case. As long as the case is intact, it will look like a closed switch. When it has been smacked sufficiently, the case will come apart and then it will look like an open switch.

• Interesting idea, but I'd be worried about someone getting hurt, or starting a fire or something. Spinning fans + bat + crowd of people isn't really a recipe for safety. – Ryan Gooler Jul 24 '13 at 3:09

I'm posting this as an answer rather than a comment because of length. However, my knowledge of these components is limited, so this may not be a budget-friendly or easy solution.

Rather than finding a robust, durable button, my suggestion is to look for a load cell, force plate, accelerometer or dynamometer — a sensor which is designed to measure impact and force.

A load cell is a transducer which you can mount behind or between tough materials so you can measure large forces. Also a sensor attached to a durable material will provide a larger (and probably more creative) target than a button. Most load cells are very expensive, so unfortunately I don't know if you can find one for your specified budget of ~\$20.

There are accelerometer-based devices which people interested in martial arts, boxing, etc. can attach to a punching bag, and use the data to measure how hard they hit. One search for such devices led me to flexible force sensors.

Assuming you can find a suitable device, however, you can get a lot more benefit out of it than a button. If you read the data from the sensor as your friends and you smack the hell out of it, you could use the data to determine the amount of "virtual damage" you to do the server. You might even hold a sort of contest to see who can do the most damage (cumulative force). Plus, you'll probably learn something in the process!