I need a current sink that I can control from a micro-controller. Should handle 5V up to 4mA or so in at least 256 steps (more is better). I'm looking for a design, not so much a complete product, due to cost.
UPDATE #1: Here is a working circuit using a BJT, I tried a MOSFET (2N7000) but it did not work as expected. Seems the control over the range is a bit limited. I'm going to wire up a DAC and plot the in / out values.
Update #2: I've hooked up the circuit (100% like in the simulation) and I can get a range of between 0.7mA to 4.7mA. Not exactly according to the plan, but seems to be getting there. How can I lower the "low" range? The OP07 had a very low offset.