Partly drilling through substrate until a controlled depth