  [abridged] The enhanced degrees of deuterium fractionation observed in
envelopes around protostars demonstrate the importance of chemistry at low
temperatures, relevant in pre- and protostellar cores. formaldehyde is an
important species in the formation of methanol and more complex molecules.
Here, we present the first study of formaldehyde deuteration on small scales
around the prototypical low-mass protostar IRAS 16293-2422 using high spatial
and spectral resolution Atacama Large Millimeter/submillimeter Array (ALMA)
observations. Numerous isotopologues of formaldehyde are detected, among them
H$_2$C$^{17}$O, and D$_2^{13}$CO for the first time in the ISM. The large range
of upper energy levels covered by the HDCO lines help constrain the excitation
temperature to 106$\pm$13 K. Using the derived column densities, formaldehyde
shows a deuterium fractionation of HDCO/H$_2$CO=6.5$\pm$1%,
D$_2$CO/HDCO=12.8$^{+3.3}_{-4.1}$%, and D$_2$CO/H$_2$CO=0.6(4)$\pm$0.1%. The
isotopic ratios derived are $^{16}$O/$^{18}$O=805, $^{18}$O/$^{17}$O=3.2 and
$^{12}$C/$^{13}$C=56. The HDCO/H$_2$CO ratio is lower than found in previous
studies, highlighting the uncertainties involved in interpreting single dish
observations of the inner warm regions. The D$_2$CO/HDCO ratio is only slightly
larger than the HDCO/H$_2$CO ratio. This is consistent with formaldehyde
forming in the ice as soon as CO has frozen onto the grains, with most of the
deuteration happening towards the end of the prestellar core phase. A
comparison with available time-dependent chemical models indicates that the
source is in the early Class 0 stage.

Astrophysics of Galaxies;Solar and Stellar Astrophysics