It'll work but there's more
Forrest Addy
>You can use a plain vanilla wall switch to start stop a compressor if you are willing to assume risk and code violations but there are serious practical snags.
The usual residential wall switch is rated for 15 Amps or so which is plain not beefy enough for a 3 HP motor. Wall switches are all single pole so you can only break one side of the 230 you propose to switch. NEC and ALL local electrical codes require that you break all energized conductors to a load simultaneously. For 230 Volt single phase that means a two pole switching device.
Addressing the 15 Amp issue your motor may be rated for 15 Amps @ 230 volts but the starting in-rush may be as high as 60 Amps for a tenth of a second or so. It's that in-rush that's the contact killer. Also when you open contacts serving an inductive load a momentary high voltage develops that you never experience when breaking a resistive load like a heater or a string of incandescent lights. This high voltage arc, though momentary, is also a contact killer.
For that reason motor controlling contacts are often several sizes beefier and the arc path may have blow-out magnets, double break contacts, chutes, or other arc mitigating features. In small motors like 3 HP you can use manual starters, motor rated switches, a molded case motor rated breakers, drum switches, and combination starters all of which are rated for motor contol by UL and other certifying bodies.
Getting back to the question, you can use a wall switch to control a compressor but use it as a pilot device: to control a motor rated contactor (essentially a relay with beefy contacts.) In a pinch you can use a specific purpose relay having contacts rated for 50 Amps or so. I suggest you find a recent copy of the WW Granger catalog. In it they have excellent tutorials on compressors and motor control and how to spec the components you need.
What are you using for motor over-current protection? That's a big issue too. A properly sized molded case breaker, overload relay etc will save your motor should it become overloaded, forced to function to ratings in a hot environment, or any of several other motor eating scenarios.
While WW Granger will give you info you can take to the bank naturally it's slanted to sell you WW Granger stuff. If you are a talented scrounger, chances are you can find what you need in the electrical junk HVAC shops inevitably collect in their take-out pile. Once you identify your needs you can go shopping.
I really doubt it but if your compressor has a starter on it, you can break the lead to the starter coil and put your wall switch (pilot device) in series with it. Most consumer grade packaged compressors require external switching and that's where you came in.
Don't forget the motor over-current protection. A residential grade circuit breaker isn't adequate. If you are lucky the makers of your residental electrical panel may offer a motor rated breaker that plugs right into the old slot. Prepare to spend 3X the price of a plain breaker.