an automatic tilt angle compensator , which comprises a sealed container for sealing at least two types of liquids to form a free interface , a light projecting system arranged to project a light beam through the free interface , an entry window for allowing the light beam to enter , reflecting means for reflecting the light beam after passing through the free interface , and an exit window for irradiating the light beam from said sealed container , wherein said entry window , said reflecting means and said exit window are always in contact with said liquid , and when the system is laid down by 90 degrees , the free interface is rotated by 90 degrees , and the light beam passing through the free interface is irradiated through the exit window in the same manner as before the rotation by 90 degrees .