A switching or driving device of coil type for solenoid valves, comprising: - a body or a casing; - a solenoid; - a yoke; - a power supply and control circuit; wherein the power supply and control circuit of a coil or of a solenoid is configured for receiving in input alternating or direct current with variable voltage and possibly also frequency, said supply and control circuit comprising: - a multi-voltage rectifier circuit that can be supplied with alternating or direct input current; - a driver comprising: - a direct current power driver, adapted to be connected to the coil or to the solenoid to be supplied; - a PWM controller of the output circuit; - a current control circuit; wherein the rectifier circuit supplies the power driver, wherein said power driver drives the PWM controller of the output circuit that is adapted to provide a power supply current to the coil or to the solenoid and wherein the driver is connected to the current control circuit and is driven in feedback thereby, wherein the body or casing encloses at least said solenoid and said power supply and control circuit, wherein the components of the supply and control circuit are mounted on a printed circuit, wherein said circuit is fixed to said yoke or to the solenoid and wherein the printed circuit comprises connectors for connecting the circuit to an input power supply, said connectors comprising at least a portion that projects beyond the casing, whereby the solenoid comprises a winding wound around a support tube whose inner cavity can house a mobile control element, wherein the yoke comprises a metal strip bent in the shape of a C with a central core extending from which are two transverse wings provided with respective holes aligned with the cavity of the support tube and wherein the power supply and control circuit is fixed to the core, interposed between the yoke and the solenoid, or directly to the support tube of the solenoid on the opposite side with respect to said core. - a body or a casing; - a solenoid; - a yoke; - a power supply and control circuit; wherein the power supply and control circuit of a coil or of a solenoid is configured for receiving in input alternating or direct current with variable voltage and possibly also frequency, said supply and control circuit comprising: - a multi-voltage rectifier circuit that can be supplied with alternating or direct input current; - a driver comprising: - a direct current power driver, adapted to be connected to the coil or to the solenoid to be supplied; - a PWM controller of the output circuit; - a current control circuit; - a multi-voltage rectifier circuit that can be supplied with alternating or direct input current; - a driver comprising: - a direct current power driver, adapted to be connected to the coil or to the solenoid to be supplied; - a PWM controller of the output circuit; - a direct current power driver, adapted to be connected to the coil or to the solenoid to be supplied; - a PWM controller of the output circuit; - a current control circuit; wherein the rectifier circuit supplies the power driver, wherein said power driver drives the PWM controller of the output circuit that is adapted to provide a power supply current to the coil or to the solenoid and wherein the driver is connected to the current control circuit and is driven in feedback thereby, wherein the body or casing encloses at least said solenoid and said power supply and control circuit, wherein the components of the supply and control circuit are mounted on a printed circuit, wherein said circuit is fixed to said yoke or to the solenoid and wherein the printed circuit comprises connectors for connecting the circuit to an input power supply, said connectors comprising at least a portion that projects beyond the casing, whereby the solenoid comprises a winding wound around a support tube whose inner cavity can house a mobile control element, wherein the yoke comprises a metal strip bent in the shape of a C with a central core extending from which are two transverse wings provided with respective holes aligned with the cavity of the support tube and wherein the power supply and control circuit is fixed to the core, interposed between the yoke and the solenoid, or directly to the support tube of the solenoid on the opposite side with respect to said core.