Analytical estimates of the pull-in voltage in MEMS and NEMS