Realizing sinusoidally time varying resistance by digital potentiometer

Thread Starter

shivashankar_p

Joined Nov 10, 2015
37
I need to implement a time-varying resistor for one of my studies. The Resistance must be of the form R=R0+Rm*sin(W*t), with R0-Rm>0. I am planning to implement this with a digital potentiometer (controlling it with a sinusoidal signal). I haven't tried this yet, and I am wondering whether this is a right way to implement this.
 

crutschow

Joined Mar 14, 2008
29,505
I am planning to implement this with a digital potentiometer (controlling it with a sinusoidal signal).
What resistive resolution do you need?
Obviously the sinusoidal signal would need to be in binary format to control the digital potentiometer.
How will you generate this digital signal?
 

Irving

Joined Jan 30, 2016
2,546
I need to implement a time-varying resistor for one of my studies. The Resistance must be of the form R=R0+Rm*sin(W*t), with R0-Rm>0. I am planning to implement this with a digital potentiometer (controlling it with a sinusoidal signal). I haven't tried this yet, and I am wondering whether this is a right way to implement this.
Is this a physical resistance or a theoretical one for use in a simulation?
 

Ian0

Joined Aug 7, 2020
4,863
How would that generate a sinewave change in the resistance value?
I should have mentioned it needs a dual pot.
One pot plus the comparator make a delta-sigma modulator. The other pot gives the variable resistance.
It requires the type of digital pot with a clock and up/down input.
238866F2-199B-46B8-8581-65771B218768.jpeg
 

Thread Starter

shivashankar_p

Joined Nov 10, 2015
37
What resistive resolution do you need?
Obviously the sinusoidal signal would need to be in binary format to control the digital potentiometer.
How will you generate this digital signal?
Thanks for the reply.
I am still not sure of the exact specifications. Mostly, I may choose a 5K POT with 256 steps for a maximum resolution.
I am thinking of using a Arduino for the digital sinusoidal signal.
 

Thread Starter

shivashankar_p

Joined Nov 10, 2015
37
I should have mentioned it needs a dual pot.
One pot plus the comparator make a delta-sigma modulator. The other pot gives the variable resistance.
It requires the type of digital pot with a clock and up/down input.
View attachment 256510
Thanks for the suggestion.

I am thinking of using an Arduino and a MCP41 POT. What do you think about that? It seems to be a simple and straightforward compared to UP/DOWN.
 

Irving

Joined Jan 30, 2016
2,546
Arduino + MCP41 etc. seems a reasonable approach within its limitations. Can you give more info regarding purpose of the 'resistor'? Also likely current & voltage levels?
 

crutschow

Joined Mar 14, 2008
29,505
To generate the digital sinewave, you could put a look-up table with 128 bytes of amplitude for a 0-90° sine into EEPROM storage (90/128 degree steps).
You can then use those to generate a 256 step DAC output of a 360° sinewave.
 

Ian0

Joined Aug 7, 2020
4,863
To generate the digital sinewave, you could put a look-up table with 128 bytes of amplitude for a 0-90° sine into EEPROM storage (90/128 degree steps).
You can then use those to generate a 256 step DAC output of a 360° sinewave.
A few years ago, I would have written the code to reverse the first 128 steps for the second 128, then negate the first 256 for the second 256, and it would save be 384 bytes of memory. How much is 384 bytes of memory these days?
Now I think nothing of using a 4096 step look-up table with 16-bit coefficients.
 

crutschow

Joined Mar 14, 2008
29,505
Now I think nothing of using a 4096 step look-up table with 16-bit coefficients.
I'm naturally conservative in using a micro's resources, but using a full look-up table is likely not a problem for most micro's today.
But since the TS it proposing using an 8-bit digital pot I see no reason to store more than one byte per step for 512 bytes total.
 
Top