Reference ON/OFF voltage from microcontroller Raspberry Pi
You could do something like this: 







simulate this circuit &ndash; Schematic created using CircuitLab

The ADR510 has an output voltage of 1.0V +/- 0.35% at room temperature. 

The left circuit will supply up to about 0.9mA with source resistance &lt; 0.3\$\Omega\$ when on, but when it is off it will only be approximately zero (depending on the GPIO low output voltage) and will have a source resistance of 2.2K, so if if any current flows into or out of it, the voltage can be far from zero. 

The right hand circuit actively clamps the output to ground when GPIO is low. The source of M1 should be connected to analog ground near U2. Choose the MOSFETs to operate reliably from 3.3V Vgs and for M1 to have low enough Rds(on) with 3.3V applied to meet your needs. It's not hard to do better than the 0.3 ohms. 



With dual P-N MOSFET array: 







simulate this circuit