Tool provided with at least one active element, comprising a safety device coupled electrically, via a first interface, to the active element, the safety device further comprising a detector (24, 26, 28) arranged so as to: - periodically measure, at the first interface, a value (M2; MF2) that is a function of an electrical capacitance and of the contact of the active element with a foreign body; - comparing the measured value (M2; MF2) to a reference value (REF+S1; REFF+S1) specific to an event; - delivering, on a second interface, a safety signal (SSEC) comprising information relative to said event, when the deviation between the measured value (M2; MF2) and the reference value (REF; REFF) is above a threshold, said tool being characterized in that the detector (24, 26, 28) comprises: - a control device; - a signal generator, comprising a capacitor having a first capacitance (Cs), coupled to the first interface, the signal generator being configured so as to produce a sequence comprising at least one pulse generated by: - making a current flow in the capacitor so as to charge the active element to a first potential (Vcc); - then, by discharging the active element to the reference potential (Gnd); - a measurement device, capable of measuring a voltage at the terminals of the capacitor; the control device being configured so as to: - drive the signal generator so as to produce a number N of repetitions of the sequence until the voltage measured at the terminals of the capacitor is above or equal to a predetermined voltage; - compare the number N of repetitions to the reference value (REF; REFF) specific to the event; - when the absolute value of the difference between the number N of repetitions and the reference value (REF; REFF) is above the threshold, deliver, on the second interface, the safety signal (SSEC) comprising information relative to said event. - periodically measure, at the first interface, a value (M2; MF2) that is a function of an electrical capacitance and of the contact of the active element with a foreign body; - comparing the measured value (M2; MF2) to a reference value (REF+S1; REFF+S1) specific to an event; - delivering, on a second interface, a safety signal (SSEC) comprising information relative to said event, when the deviation between the measured value (M2; MF2) and the reference value (REF; REFF) is above a threshold, said tool being characterized in that the detector (24, 26, 28) comprises: - a control device; - a signal generator, comprising a capacitor having a first capacitance (Cs), coupled to the first interface, the signal generator being configured so as to produce a sequence comprising at least one pulse generated by: - making a current flow in the capacitor so as to charge the active element to a first potential (Vcc); - then, by discharging the active element to the reference potential (Gnd); - making a current flow in the capacitor so as to charge the active element to a first potential (Vcc); - then, by discharging the active element to the reference potential (Gnd); - a measurement device, capable of measuring a voltage at the terminals of the capacitor; - drive the signal generator so as to produce a number N of repetitions of the sequence until the voltage measured at the terminals of the capacitor is above or equal to a predetermined voltage; - compare the number N of repetitions to the reference value (REF; REFF) specific to the event; - when the absolute value of the difference between the number N of repetitions and the reference value (REF; REFF) is above the threshold, deliver, on the second interface, the safety signal (SSEC) comprising information relative to said event.