A refrigerator, comprising: a main body; a door (125, 135) coupled to the main body; an ice maker installed in the main body or the door; a storage container configured to receive and store the ice cubes made by the ice maker; and a sensing apparatus configured to sense an ice level in the storage container, the sensing apparatus comprising: an optical element configured for sending and receiving a signal; at least one alignment device that aligns and secures the electronic optical element in a preset direction; a case provided with an accommodation space in which the optical element and the at least one alignment device are received, and having one side open; a cover disposed at the open side of the case; and a temperature regulator configured to increase a temperature of the optical element, wherein the optical element comprises a transmitting module for sending a signal and a receiving module for receiving a signal, wherein each of the transmitting module and the receiving module is positioned in a separate case, wherein the cover is provided with a transparent window configured to enable a signal from the transmitting module to be sent through the transparent window and a signal to be received by the receiving module through the transparent window, wherein the sensing apparatus further comprises a sealing member that is disposed between the case and the cover so as to prevent external moisture from entering into the accommodation space through a space between the case and the cover, wherein the temperature regulator is positioned adjacent to the cover so as to prevent frosting on the optical element and the cover. a main body; a door (125, 135) coupled to the main body; an ice maker installed in the main body or the door; a storage container configured to receive and store the ice cubes made by the ice maker; and a sensing apparatus configured to sense an ice level in the storage container, the sensing apparatus comprising: an optical element configured for sending and receiving a signal; at least one alignment device that aligns and secures the electronic optical element in a preset direction; a case provided with an accommodation space in which the optical element and the at least one alignment device are received, and having one side open; a cover disposed at the open side of the case; and a temperature regulator configured to increase a temperature of the optical element, an optical element configured for sending and receiving a signal; at least one alignment device that aligns and secures the electronic optical element in a preset direction; a case provided with an accommodation space in which the optical element and the at least one alignment device are received, and having one side open; a cover disposed at the open side of the case; and a temperature regulator configured to increase a temperature of the optical element, wherein the optical element comprises a transmitting module for sending a signal and a receiving module for receiving a signal, wherein each of the transmitting module and the receiving module is positioned in a separate case, wherein the cover is provided with a transparent window configured to enable a signal from the transmitting module to be sent through the transparent window and a signal to be received by the receiving module through the transparent window, wherein the sensing apparatus further comprises a sealing member that is disposed between the case and the cover so as to prevent external moisture from entering into the accommodation space through a space between the case and the cover, wherein the temperature regulator is positioned adjacent to the cover so as to prevent frosting on the optical element and the cover.