I have found current mirrors like the basic one below often very useful.
However, recently I needed a circuit where I sink current from a ground node to the negative supply. The current level ( the impedance) needs to be controlled. The challenge is that I need to control this current with a positive control voltage. I was able to solve it with a op-amp and p-channel in typical current sink type of circuit like the conceptual circuit shown below.
The circuit was changed to accommodate the negative supply.
So the circuit below shows a positive supply variant of what I used.
However, I am curious to see if there is a discrete solution, using MOSFET and BJT's, similar to a current mirror kind of solution. To summarize:
Available: positive and negative supply (+-10V)
Control voltage is positive, output of MCU.
Restriction : not allowed to use digital pots and op-amps.
Current range: 100uA to a few mA
Accuracy not important, I am more interested in the concept.