Replace potentiometer with arduino

Hello,

i want to replace a 0-10V potentiometer and control the value with my Arduino Mega. The potentiometer controls the speed of a fan, but there is a device which is conntected to the fan and the potentiometer is connected to the control device. So there shouldn't be any load at the potentiometer. I've read that it is maybe possible with a op-amp. But i don't know how build my circuit. Can anyone help me?

Edit: Maybe a digital potentiometer is good as well. If i measured correct, the potentiometer goes from 50 kOhm - 1 mOhm.

Cheers

Is the pot just supplying a low current voltage to the control device?
You can take a PWM output, run it thru a lowpass filter, feed the control device with a level from 0 to 5V.
These levels were created by increasing the PWM value by 25, so 0-25-50-75-100-125-150-175-200-225-250-0
and using a 10K/4.7uF low pass filter which makes for a pretty low cutoff frequency.
The 10K resistor also means not much drive capability.
http://sim.okawa-denshi.jp/en/CRlowkeisan.htm

The current coming from the control device is about 10V. If i feed the control device with 0 to 5V i only get to 50% fan speed. I need 1 (off) to 9V (full speed).

Got a 10V supply?
Buffer the arduino output with an open collector NPN transistor, with 1K pullup on collector, and collector to RC lowpass filter for DC level.

Sorry, but i don't understand what you are saying. I'm a novice. I'm able to connect a reed switch or LEDs to my Arduino. I never heard of lowpass filters before. Can you point me to a tutorial where i can see an example?

10V comes from the control device. I have two wires from the control device that are connected to the potentiometer. If i turn the potentiometer to the lowest position the current drops to about 1V. If i turn it to the highest position its 10V.

Just watched this video: Digital Potentiometer Tutorial Arduino MCP4131 DAC Raspberry Pi - YouTube
This guy is using MCP4131 to control 0-5V with arduino. But i need 10V. Will connecting the two wires from the control device (10V) to P0B and P0A work?

Ok i read about your suggestions. I found someone driving a 12V LED strip wit his arduino (Driving and LED strip from an Arduino with a transistor. - YouTube). So i think this is maybe what i need and matches your transistor suggestion.

I created a circuit based on his work. Is this what you meant? The lowpass filter is missing, so i guess the voltage will jump around and i dont know if the control device is able to handle it. I will add it somehow when this part is ok.

Edit: Is TIP120 ok?

fancontrol.png