The other answers work if you don't mind the high voltage drop in the 1 Mohm resistor. But if your device sometimes draws higher current before going to sleep mode, you can use a transimpedance amplifier to provide constant supply voltage to the load. <!-- Begin schematic: In order to preserve an editable schematic, please don't edit this section directly. Click the "edit" link below the image in the preview instead. --> ![schematic](https://i.sstatic.net/2fqkchRM.png) <!-- End schematic --> The opamps should be supplied with a voltage higher than the desired output voltage, for example +15V. OA1 should be selected to have high enough max output current to meet the demands of the load. OA1 is connected as a transimpedance amplifier, and its output will be **V<sub>OA1</sub> = V<sub>REF</sub> + R1 × I<sub>LOAD</sub>**. C1 acts as a low pass filter to improve stability and reduce noise. Zener D2 is optional, but it allows the load voltage to stay in regulation even if the measurement range is exceeded. Pay attention to its leakage current, which would affect accuracy. OA2 subtracts **V<sub>REF</sub>** from **V<sub>OA1</sub>** and provides 1 mV per nA output.