In the present work we propose the use of a refractometric technique based on the determination of the critical angle for the development of a relative humidity sensor and, in the same application scope, a primary vacuum gauge. The proposed technique takes advantage of the phase difference acquired by the parallel and perpendicular components of a, linearly polarized, light beam undergoing internal reflection, to produce an easily detectable intensity minimum in the reflected profile corresponding to the position of the critical angle.We develop a study about the main theoretical aspects involved in the total internal reflection phenomenon, where we perform some simulations aiming to evaluate the variations of the critical angle angular position from changes on the refractive index. The basic set up used in the experiments consist of a HeNe tunable laser, a polarizer, a semi-cylindrical prism with known refractive index made of flint glass type, a analyzer, a linear CCD and a computer, where the information collected by de CCD were treated by means of a data acquisition program developed on the LabVIEW TM platform. The used program allows the point-by-point monitoring of the changes of the profile reflected from the prism base, in other words, one can monitor all the evolution dynamics of the refractive index of the analyzed sample in real time. To confirm the effectiveness of the technique, we perform measurements of changes of the refractive index of gaseous samples as function of the relative humidity and the pressure. The system has shown enough sensitivity to track changes of the order of in units of the index of refraction.