A gyrocompass is similar to a gyroscope. It is a non-magnetic compass that finds true north by using an (electrically powered) fast-spinning wheel and friction forces in order to exploit the rotation of the Earth. [Source: Wikipedia]
The first self north adjusting gyrocompass was invented in 1906. [Source: Wikipedia]
A ship's gyrocompass typically drives one or more repeaters in which the compass card position is controlled by a servo motor.
Large magnetic compasses will typically be found in a ship's binnacle, however smaller ones may be mounted in a wooden box.