Author Topic: Digital to Resistance Converter, is it a thing? How to design one?  (Read 3411 times)

0 Members and 1 Guest are viewing this topic.

Offline ellipseTopic starter

  • Newbie
  • Posts: 1
  • Country: it
We all know DAC for converting from digits to volts; is there a circuit for converting from digits to ohms?
I mean, let's say the microcontroller says "1523 ohms" and the circuit magically bahaves like a 1523 resistor to whaterver connects to it (well, within reason  ;) )

I need it to replace some old resistive sensors that are no longer manufactured.
Being a digital guy, the idea is to use an up-to-date sensor, reading it with a microcontroller, using a look-up table, and emulating the matching resistance of the old sensor so that it can be used as a replacement in old equipment.

I know there are current mirrors and virtual capacitors circuits made out of op amps, so I expect that voltage-to-resistance circuits can be possible, but I wasn't lucky googling it, nor can I help for myself.
Old sensors range is from 600 ohm to 2 or 20 kiloohm, they are connected to equipment whose input stages are powered from 5 volts max and currents below 1 mA.

Any circuit, hint, pointers?
 

Online ch_scr

  • Frequent Contributor
  • **
  • Posts: 934
  • Country: de
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #1 on: November 09, 2023, 11:10:47 am »
What you want is called a "digital potentiometer"  ;)
 
The following users thanked this post: Alex Eisenhut, Dan123456, ellipse

Offline harerod

  • Frequent Contributor
  • **
  • Posts: 533
  • Country: de
  • ee - digital & analog
    • My services:
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #2 on: November 09, 2023, 05:55:23 pm »
Digital Potentiometers for low resolution - or you could have a look at "multiplying DAC's"...
 
The following users thanked this post: ellipse

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11460
  • Country: us
  • Retired, now restoring antique test equipment
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #3 on: November 09, 2023, 09:36:22 pm »
The literal meaning of "potentiometer" is a voltage divider, such as a three-terminal variable resistor, while a "rheostat" is a two-terminal variable resistor.
Most "digital pots" are potentiometers, used to control a voltage or voltage gain.
One way to make a digitally-controlled resistor is to use a binary sequence of resistors inserted/removed from the circuit by relays or analog-switch ICs.
The tricky bit is at low resistance, to compensate for the relay/switch resistances.
Decade resistance boxes work this way, where each manual switch switches four resistors in a BCD decade (1-2-4-8 or 1-2-4-4).
 
The following users thanked this post: ellipse

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 3005
  • Country: au
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #4 on: November 09, 2023, 10:57:25 pm »
Old sensors range is from 600 ohm to 2 or 20 kiloohm, they are connected to equipment whose input stages are powered from 5 volts max and currents below 1 mA.

You need to measure the part in circuit.
Likely are simple resistor feed (eg 2.5K in host gives 50% ADC with 2.5K sensor value), or a 1mA current source, which gives 2.5V with 2.5k, 1.0V with 1k etc 

Digital pots may do the job, but they need to be accurate and low drift, and those only come in a few values.
(many are ratiometric only, with poor tolerances in resistance mode)

eg perhaps 20 kΩ better one from ADI, which gives 10ohm steps, is enough ?
AD5272 1024-Position, 1% Resistor Tolerance Error, Single Channel I2C Interface and 50-TP Memory Digital Rheostat  20 kΩ, 50 kΩ, 100 kΩ nominal resistance


Or you can use a MCU with a DAC, and provide a voltage that the host is fooled into thinking is derived via a resistance.
That only works if the host is known and consistent.

 
The following users thanked this post: ellipse

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 3026
  • Country: gb
  • Recovering Electrical Engineer
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #5 on: November 10, 2023, 01:24:13 pm »
Synthesise a resistance?
Check this out: www.edn.com/multiplying-dac-makes-programmable-resistor
edn circuit ideas are always worth a read (unless your brain has been corrupted by arduino's).
 
The following users thanked this post: ellipse

Online tooki

  • Super Contributor
  • ***
  • Posts: 15121
  • Country: ch
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #6 on: November 10, 2023, 02:31:53 pm »
Synthesise a resistance?
Check this out: www.edn.com/multiplying-dac-makes-programmable-resistor
edn circuit ideas are always worth a read (unless your brain has been corrupted by arduino's).
You could have provided that very interesting link without the judgmental snipe. Arduino is simply MCU programming using C, with a nicely set up toolchain that lowers the barrier to entry. It’s not that different from the HAL libraries the MCU manufacturers themselves produce.
 

Offline coppercone2

  • Super Contributor
  • ***
  • Posts: 13717
  • Country: us
  • √Y√... 📎
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #7 on: November 10, 2023, 02:38:14 pm »
a jfet
 
The following users thanked this post: tooki, ellipse

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 2543
  • Country: is
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #8 on: November 10, 2023, 02:51:13 pm »
Many styles of DAC's are simply R2R ladders. What you don't get is isolation from the binary input side to the R2R output side in the event you were wanting to digitally program a 'plate resistor' for a vacuum tube with perhaps 250vdc on the high side of your resistor. You would in some cases need a 'digital isolator' in a package which are available to go between your DAC inputs and your perhaps ground referenced computer which will be driving the DAC inputs through the isolator. Then the R2R DAC along with its now required isolated power supply could safely be referenced to any reasonable voltage perhaps that voltage even being A.C.! We do a similar circuit which controls individual cell charge balance on a high voltage multi-cell battery stack by providing a leakage resistance across the fully charged cells while waiting for the lesser charged cells to 'catch up' during the charging event. We even do sort of the same thing in reverse allowing us to read the voltage of the individual cells through ADC's and isolators. Complicated, yes, but it works!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 
The following users thanked this post: ellipse

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2389
  • Country: ca
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #9 on: November 10, 2023, 03:09:05 pm »
The literal meaning of "potentiometer" is a voltage divider, such as a three-terminal variable resistor, while a "rheostat" is a two-terminal variable resistor.
Most "digital pots" are potentiometers, used to control a voltage or voltage gain.
One way to make a digitally-controlled resistor is to use a binary sequence of resistors inserted/removed from the circuit by relays or analog-switch ICs.
The tricky bit is at low resistance, to compensate for the relay/switch resistances.
Decade resistance boxes work this way, where each manual switch switches four resistors in a BCD decade (1-2-4-8 or 1-2-4-4).
The digital pots I have worked with will literally connect the wiper to any point on a resistive string using an array of CMOS switches. It acts like a pot. If you choose to only use the wiper and one end terminal, then it is a variable resistor or rheostat. One of the limitations is that the voltage at all three terminals must remain within the power supply rails, and that might be just 0 to 5 V. Another limitation is resolution, you will rarely find more than 8 bits resolution due to the number of resistors and CMOS switches involved; 2^N are needed, unlike a DAC where only N are needed. An example of a device I've used is the Microchip MCP41XXX (MCP41050). The datasheet specifies both modes of operation: pot and rheostat.

Other solutions to digitally controlled variable resistance are a relay-switched resistor bank, or a servo motor controlled pot. Sometimes a dual or multi gang pot is used, with one of the gangs used as the servo motor controller feedback. The latter is one of the only ways to provide an isolated, continuous, glitch-free variable resistance.
 
The following users thanked this post: ellipse

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11460
  • Country: us
  • Retired, now restoring antique test equipment
Re: Digital to Resistance Converter, is it a thing? How to design one?
« Reply #10 on: November 10, 2023, 04:52:09 pm »
Looking at the datasheet for the MCP41050:  it does, indeed, have rheostat and potentiometer modes.
Look carefully at the rheostat mode specs to see if it fits your application (looking at 10 k\$\Omega\$ version with 5 V power):
The nominal resistance is 10 k\$\Omega\$ +/- 20%.  This range needs to be calibrated out for the user, but cancels out in potentiometer mode.
The tempco for rheostat is typ 800 ppm/K, which cancels out for potentiometer mode to typ 1 ppm/K.
The linearity (compared to a straight line through the actual endpoints) is good:  +/- 1 LSB.
The "wiper" resistance (minimum rheostat resistance) is max 100\$\Omega\$..
The voltage limits on the two ends of the rheostat from the Vss pin are -0.6 V to +6 V (with 5 V power).
The rated current through the rheostat resistance is +/- 1 mA.
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/11195c.pdf
 
The following users thanked this post: ellipse


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf