You could use a classic "series capacitor" supply which uses the reactance of a capacitor as the main portion of the voltage dropping element.
i ~~= V/Xc = 230 x (2 x Pi x Freq x C) or
C ~~= i / (230 x 2 x Pi x Freq)
C per mA = 0.001 /(72256) @ 50 HZ.
Better - C = about 15 nF per mA with 230 VAC 50 Hz supply
So for 40 mA C = 40 x 15 = 600 nF = 0.6 uF
So eg a 1 uF 230 VAC X or Y rated capacitor plus the usual circuitry should work.
Above I use 230 VAC and say C ~~= as current supplied is not directly related to the RMS Voltage. The above should be close enough to start.
Note that the capacitors MUST be X or Y rated at the voltage used.
If the capacitor fails fully or partially short you will probably destroy the input circuit including the 2 x somewhat expensive HCPL-7520 amplifiers but the isolation will be maintained. Note that a capacitor based supply of this sort notionally has a "hot" side where phase/live is input and a notionally low voltage side where neutral/return is connected. However, ALWAYS assume that ALL points in such a supply are ALWAYS at full mains potential. Murphy ensures that sometimes they will be.
Another approach which is potentially slightly more accurate, lower cost and just as good long term but not quite s flexible experimentally, is to operate the microcontroller without mains isolation (so no expensive isolation amplifiers and no added errors) and the couple the digital outputs via eg opto isolators.
I am currently working on similar designs and am using the digital opto isolator approach. This has the advantages of lower cost isolation and no information losses across the isolation barrier due to signals being digital. The isolated power supply can be much lower current so the X or Y rated cap is smaller.
Worth considering is to use a PCBA from a mins to USB charger or other commercial PSU. If these are safe enough to connect to your cellphone they may be safe enough to use in your power meter live side supply* - and if they fail you still have the isolation amplifiers protecting you. You can also use such a supply to power a whole floating meter with processor and if you have optoisolated digital output you are s=till safe.
(* Pulling apart some cheap ones may make you wonder about this)
The capacitive PSU is common in many devices like LED lamps,etc..The device shall not have exposed metallic parts, because it is a shock hazard as the part have mains live voltage. As for burning the house: you need to properly fuse the input and there is no big difference between transformer and transformerless PSU regarding fire hazzard.
Best Answer
First, you should have a capacitor for both line and neutral. Otherwise, depending on the installation/country/plug orientation/..., you'll end up with a non-isolated circuit.
Then, you should use X or Y rated capacitors for this application, to ensure safe failure mode (if it fails short, you end up with a non-isolated circuit). And I think 250V is not enough. A few thousand volts would seem better to me.
Now, honestly, even with those two requirements fulfilled, I wouldn't do that for an AC supply.
However, it can be interesting when you want to isolate two low-voltage supplies: there is even an app note from maxim.