Electronic potentiometer

Hi, I bought a pwm regulator 6-90V for dc motors ,leds and etc but I need to tweak it a bit in order to do the work I need it for. Here is an image of the regulator PWM The problem in my project is that DC source is not constant so even with potentiometer output is not constant neither.I need constant DC output but the source is a synchronous generator with permament magnets so depending on shafts rpm voltage fluctuates and it needs to be stabilized.My question is: Can I build electronic potentiometer instead of the analog one, connect it to Arduino and dynamically control voltage according to the input? I saw a few IC's that can perform such task for instance AD5171, MCP41100, MCP4131. I forgot to tell you that I have a voltage divider at the output and I can measure the voltage so I will know how much do I have to reduce the output voltage if it needs to.Unfortunately I dont have a schematic of the pwm regulator....but I dont need to change anything except the potentiometer so I don't think it is needed.

Digital potentiometers are what you are looking for.

lg, couka

The problem in my project is that DC source is not constant so even with potentiometer output is not constant neither.I need constant DC output but the source is a synchronous generator with permament magnets so depending on shafts rpm voltage fluctuates and it needs to be stabilized.

I've recently read in the forum about a dude that took his bicycle dynamo and a supercap to power an Arduino using the onboard voltage regulator of the Arduino.

Alternately, you could use a DC-DC buck converter to deal with the input variations and put the supercap on the 3.3V or 5V output of the converter.

Ray