Problems with using potential dividers to scale 220V AC mains to 0 to 5V
You most likely want to completely avoid designing a device that is directly coupled to the AC mains. There is the inherent safety issue to be considered but there are others as well.


Making a product that is not isolated makes some challenges in device packaging to make sure than no user accessible controls or interface points will be exposed to mains voltages.
Since you are making a measurement device there is all likelihood that you will want to attach another device via a cable that has GND return lines in it. Without isolation you will expose the device on the end of the cable to the mains connection in your device. 
During development when you are trying to download, test and debug software in your MCU any USB or JTAG pods that connected to an non isolated circuit will expose the mains hazard to the supporting development computer. 


Overall best recommendation - Do not use a direct coupled to mains type design.