A method and device for sensing the distance between a first object and a second object so as to activate or facilitate predetermined actions when the distance has attained a certain value. A person (1) (first object) holds a handle (2) of a power tool, the handle being connected to a function generator (6) for a signal in turn connected to a unit (7) for encoding or modulating the signal. A capacitance (C1) exists between the hand of a person (1) and the handle (2). A capacitance (C2) exists between the person (1) and the active portion (4) (second object) of the tool connected to a demodulator or tone decoder (8) in turn connected to a control unit (9) incorporating the control circuitry. The control unit (9) controls the security system (10) in turn controlling the protective measures such as braking or power cut-off (11). The control unit (9) also controls an alarm and self-testing circuitry (11a).