A device to exploit the energy of a fluid flowing through a piping, without producing pollution and even in the absence of heads and/or penstocks including, for instance, a drinkable water aqueduct or an oil pipeline. Such device comprises a stub (1), interposed between two sections (3, 4) of a piping and free to rotate with respect to them, and a cylindrical counter-rotor (8). The latter is driven into rotation by said stub (1) which transforms the energy of the fluid because means (2) stand on its inner surface to interact with the fluid stream and drive it into rotation. The speed of rotation of the stub (1) and of the counter-rotor can be advantageously varied by way of pulleys, belts, and an automatic variator/change gear/turn reverser assisted by a specially designed software so as to control the interaction of said means (2) with the fluid and to optimize the generation of mechanic and electric energy.