a method to create piezoresistive sensing elements and electrostatic actuator elements on trench sidewalls is disclosed . p - type doped regions are formed in the upper surface of an n - type substrate . a trench is formed in the substrate intersecting with the doped regions and defining a portion of the substrate which is movable in the plane of the substrate relative to the rest of the substrate . then diffusion of p - type dopant into the trench side - walls creates piezoresistive elements and electrode elements for electrostatic actuation . owing to the intersection of two doped regions , there are good electrical paths between the electrical elements on the trench side - walls and the previously p - type doped portions on the wafer surface . the trench intersects with insulating elements , so that insulating elements mutually insulate adjacent electrical elements . p - n junctions between the electrical elements and the substrate insulate the electrical elements from the substrate .