A new mesh selection strategy with stiffness detection for explicit Runge-Kutta methods