Integrated tunneling sensor for nanoelectromechanical systems