Here is a Arduino Shield as a Protel project with a PWM to voltage to current circuit.
It can be used to source a programable current or sink a programable current.
The circuit is included as an LTSpice circuit also.
This actually started as a base Protel project for making shields but I had to put an example circuit.
arduino_protel.zip (131 KB)