Electronic device (1, 1a, 1b, 1c, 1d, 1e) comprising: - a substrate provided with at least one passing opening, - a MEMS device with function of differential sensor provided with a first and a second surface (9, 10) and comprising at least one portion sensitive to chemical and/or physical variations of fluids present in correspondence with a first and second opposed active surface (11a, 11b) thereof, said first surface of said MEMS device leaving said first active surface exposed and said second surface being provided with a further opening which exposes said second active opposed surface, the electronic device (1, 1d, 1e), said first surface of said MEMS device facing said substrate and being spaced therefrom by a determined distance, said sensitive portion being aligned to said passing opening of said substrate, and - a protective package (14, 14a, 14b), which incorporates at least partially said MEMS device and said substrate so as to leave said first and second opposed active surfaces (11a, 11b) exposed respectively through said passing opening of said substrate and said further opening of said second surface, characterized in that it further comprises a barrier element (15, 15a, 15b) which surrounds said sensitive portion for realising a protection structure for said MEMS differential sensor device, so that said first active surface of said sensitive portion is free, said barrier element being an irregular area (15a, 15b) formed on the upper surface of the substrate or on said first surface of the MEMS differential sensor device and comprising trenches which completely surround said sensitive portion and form preferred paths for the resin during the formation steps of the protective package, said protective package being realised through moulding. - a substrate provided with at least one passing opening, - a MEMS device with function of differential sensor provided with a first and a second surface (9, 10) and comprising at least one portion sensitive to chemical and/or physical variations of fluids present in correspondence with a first and second opposed active surface (11a, 11b) thereof, said first surface of said MEMS device leaving said first active surface exposed and said second surface being provided with a further opening which exposes said second active opposed surface, the electronic device (1, 1d, 1e), said first surface of said MEMS device facing said substrate and being spaced therefrom by a determined distance, said sensitive portion being aligned to said passing opening of said substrate, and - a protective package (14, 14a, 14b), which incorporates at least partially said MEMS device and said substrate so as to leave said first and second opposed active surfaces (11a, 11b) exposed respectively through said passing opening of said substrate and said further opening of said second surface, characterized in that it further comprises a barrier element (15, 15a, 15b) which surrounds said sensitive portion for realising a protection structure for said MEMS differential sensor device, so that said first active surface of said sensitive portion is free, said barrier element being an irregular area (15a, 15b) formed on the upper surface of the substrate or on said first surface of the MEMS differential sensor device and comprising trenches which completely surround said sensitive portion and form preferred paths for the resin during the formation steps of the protective package, said protective package being realised through moulding.