The device has a pen shaped hand instrument (1) including an electronic control module to control a rotary collector-free electric motor (2), and a drive shaft (4) on which a removable handpiece is mounted. The instrument has a digital electronic circuit that is provided with a memory containing two sets of motor control parameters, where each motor control parameter is associated with a tool holder. The digital electronic circuit automatically selects one set of parameter from the two sets of parameters based on the tool holder type detected by an automatic detection unit. The motor control parameters are chosen from a group comprising maximum and minimum rotational speed, authorized rotation direction, maximum torque authorized in a clockwise rotation direction and in an anti-clockwise rotation direction, torque maintaining action and motor stop action when the maximum torque is attained.