A microelectromechanical (MEMS) apparatus has a base and a flap with a portion
coupled to the base so that the flap may move out of the plane of the base between
first and second position. The base may have a cavity with largely vertical sidewalls
that contact a portion of the flap when the flap is in the second position Electrodes
may be placed on the vertical sidewalls and electrically isolated from the base
to provide electrostatic clamping of the flap to the sidewall. The base may be
made from a substrate portion of a silicon-on-insulator (SOI) wafer and the flap
defined from a device layer of the SOI wafer. The flap may be connected to the
base by one or more flexures such as torsional beams. An array of one or more of
such structures may be used to form an optical switch.