For a demo model i want to control a analogue fuel gauge with a PWM signal. I want it to move slowly up and down and repeat.
Normally the gauge is connected to a sender, which is simply a variable resistor between 0 and 190 Ohm (EU, US is 240 -10 ohm). R2 is the sender, which is not present in my case and will be replaced by some electronics. R1 is mounted inside the gauge and the needle of the gauge is practically a voltmeter which measures the voltage over R1.
0 Ohm is empty, 190 ohm is full.

So my goal is to create a variable resistance between 0 and 190 Ohm controlled by a PWM signal.
A mosfet does sort of work, except that it is not accurate enough to make the resistance between the Drain and Source move between 0 and 190 ohm.As soon as the fet becomes active or inactive it jumps up or down.
How can i create a good variable resistance, controlled by a PWM signal, without to much hassle? I know there are some digital potmeters like this, but that will require a lot of more work.
https://www.microchip.com/en-us/product/mcp41010#document-table
Normally the gauge is connected to a sender, which is simply a variable resistor between 0 and 190 Ohm (EU, US is 240 -10 ohm). R2 is the sender, which is not present in my case and will be replaced by some electronics. R1 is mounted inside the gauge and the needle of the gauge is practically a voltmeter which measures the voltage over R1.
0 Ohm is empty, 190 ohm is full.

So my goal is to create a variable resistance between 0 and 190 Ohm controlled by a PWM signal.
A mosfet does sort of work, except that it is not accurate enough to make the resistance between the Drain and Source move between 0 and 190 ohm.As soon as the fet becomes active or inactive it jumps up or down.
How can i create a good variable resistance, controlled by a PWM signal, without to much hassle? I know there are some digital potmeters like this, but that will require a lot of more work.
https://www.microchip.com/en-us/product/mcp41010#document-table