We propose a novel way of mechanical perturbation of photonic crystal cavities for on-chip applications. We utilize the equivalence of the 2D photonic crystals with perfect electric conductor (PEC) boundary conditions to the infinite height 3D counterparts for rod type photonic crystals. Designed structures are sandwiched with PEC boundaries above and below and the perturbation of the cavity structures is demonstrated by changing the height of PEC boundary. Once a defect filled with air is introduced, the metallic boundary conditions is disturbed and the effective mode permittivity changes leading to a tuned optical properties of the structures. Devices utilizing this perturbation are designed for telecom wavelengths and PEC boundaries are replaced by gold plates during implementation. For 10 nm gold plate displacement, two different cavity structures showed a 21.5 nm and 26 nm shift in the resonant wavelength. Optical modulation with a 1.3 MHz maximum modulation frequency with a maximum power consumption of 36.81 nW and impact sensing with 20 mu s response time (much faster compared to the commercially available ones) are shown to be possible.