The present invention provides a micropackaged device comprising: a substrate for securing a device; a corrosion barrier affixed to said substrate; optionally at least one feedthrough disposed in said substrate to permit at least one input and or at least one output line into said micropackaged device; and an encapsulation material layer configured to encapsulate the micropackaged device.