Reference electrode for cathodic protection measurements, comprising: - a conductor disposed in an electrolyte contained in a container, and - an electric cable connected to the conductor and suitable for being connected to a measuring station in order to measure a potential (Et) of a structure to be protected, characterized in that it comprises - a control unit embedded in the reference electrode, and - a plurality of sensors embedded in the reference electrode and electrically connected to said control unit; wherein said plurality of sensors comprises: - at least one temperature sensor (S1, S2) to measure at least one temperature (T1, T2) of the reference electrode, and - at least one diagnostic sensor (S3, S4) to detect a status value of the reference electrode; wherein said control unit comprises a memory to store a calibration offset value (Of), measurements performed by the sensors, threshold ranges T, HT) for diagnostics and technical data of the reference electrode; and said control unit is configured in such a way: - to process said temperature (T1, T2) measured by said at least one temperature sensor, in order to calculate a thermal drift value (Dt) and to correct said potential (Et) measured by the reference electrode with said thermal drift value (Dt) and with said calibration offset value (Of) stored in the memory, and - to compare the status value detected by said at least one diagnostic sensor with said threshold range stored in the memory and to generate an alarm signal when the status value is out of the threshold range. - a conductor disposed in an electrolyte contained in a container, and - an electric cable connected to the conductor and suitable for being connected to a measuring station in order to measure a potential (Et) of a structure to be protected, - a control unit embedded in the reference electrode, and - a plurality of sensors embedded in the reference electrode and electrically connected to said control unit; - at least one temperature sensor (S1, S2) to measure at least one temperature (T1, T2) of the reference electrode, and - at least one diagnostic sensor (S3, S4) to detect a status value of the reference electrode; wherein said control unit comprises a memory to store a calibration offset value (Of), measurements performed by the sensors, threshold ranges T, HT) for diagnostics and technical data of the reference electrode; and said control unit is configured in such a way: - to process said temperature (T1, T2) measured by said at least one temperature sensor, in order to calculate a thermal drift value (Dt) and to correct said potential (Et) measured by the reference electrode with said thermal drift value (Dt) and with said calibration offset value (Of) stored in the memory, and - to compare the status value detected by said at least one diagnostic sensor with said threshold range stored in the memory and to generate an alarm signal when the status value is out of the threshold range. wherein said control unit comprises a memory to store a calibration offset value (Of), measurements performed by the sensors, threshold ranges T, HT) for diagnostics and technical data of the reference electrode; and said control unit is configured in such a way: - to process said temperature (T1, T2) measured by said at least one temperature sensor, in order to calculate a thermal drift value (Dt) and to correct said potential (Et) measured by the reference electrode with said thermal drift value (Dt) and with said calibration offset value (Of) stored in the memory, and - to compare the status value detected by said at least one diagnostic sensor with said threshold range stored in the memory and to generate an alarm signal when the status value is out of the threshold range. - to process said temperature (T1, T2) measured by said at least one temperature sensor, in order to calculate a thermal drift value (Dt) and to correct said potential (Et) measured by the reference electrode with said thermal drift value (Dt) and with said calibration offset value (Of) stored in the memory, and - to compare the status value detected by said at least one diagnostic sensor with said threshold range stored in the memory and to generate an alarm signal when the status value is out of the threshold range.