Author Topic: Variable digital resistor  (Read 1497 times)

0 Members and 1 Guest are viewing this topic.

Offline BradFernandezTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Variable digital resistor
« on: June 11, 2019, 07:18:21 pm »
Hello everybody,
   I have run into an issue that I have been unable to figure out on my own with only the internet as my partner. So I thought I would give the EEVBLOG forum a try. I would like to simulate a PT100 RTD output. Which for us comes down to basically needing to be able to control a resistance via a micro-controller from zero to 100ohm. So far I have tried a physical pot to verify I could control a pt100 amplifier in the way I thought it worked. And that did work well. Next I tried an optoisolator which also worked fairly well. Gave me good control and a decent resolution. But they are not very consistent from sensor to sensor. So not exactly ideal for outputting an accurate temp from device to device without a lot of calibration. Next i'm thinking of using a quad digital 1k potentiometer in a 4 way parallel configuration. That only gets me down to 250 ohms of adjustment in 256 steps. This would probably work decently well but still doesn't give me the best resolution. I have read about a resistor network and digital switches\relays possibly working but I'm not sure what combination would work for this. Any other ideas how I can solve this are very welcome. Any input would be greatly appreciated. Please let me know if I am even logically close to being correct about how i'm approaching this. Thanks everyone! Brad
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 15155
  • Country: de
Re: Variable digital resistor
« Reply #1 on: June 11, 2019, 08:50:38 pm »
Iin most cases the PT100 simulation does not have to go down very far. It takes very low temperature to go below 50 ohms.
Similar the upper limit is more like 400 Ohms (some 1200 C).

There are several possible was to realize this. One way is doing it similar to the old style resistor decades. So using FETs or low resistance analog switches to combine resistors. The classical way is adding resistors in series to get a linear response - so switch resistance can add up. With a µC one could also accept a more parallel configuration with a nonlinear curve. This can use higher value resistors and switches. The fine part could also use a digital pot.

The other option is using some amplifier to control the current, depending on voltage. Here the DAC part can work at higher impedance and the resistance scaling is usually from a single resistor as a reference. This system is generally more complicated and tends to need more power. This system can be easier when used with only a single polarity DC.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4705
  • Country: au
  • Question Everything... Except This Statement
Re: Variable digital resistor
« Reply #2 on: June 11, 2019, 09:03:40 pm »
You can do this with a DAC with an external Vref that can go to 0V, dac sets the current on a constant current load, and vref is fed with a divided down constant current load voltage,

I'll dig up the schematic in the afternoon, pretty much you set the dac, and you get a resistance with a few KHz of bandwidth.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4705
  • Country: au
  • Question Everything... Except This Statement
Re: Variable digital resistor
« Reply #3 on: June 12, 2019, 10:42:22 am »
Here you go, If I remeber correctly this was set up for ~5 - 1200 Ohms for up to 33V feed,

It was intended to be a Constant Current / Constant Resistance Circuit, but your fine to keep it in constant resistance by selecting external Vref, switching to internal makes it constant current.

The 1M resistor is just for graceful shutdown, in the original purpose I wanted to switch off the DAC's when not needed, and the latch resistor was as a footprint for manually programming there ID's during setup,
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20360
  • Country: gb
  • 0999
Re: Variable digital resistor
« Reply #4 on: June 12, 2019, 03:58:44 pm »
Next i'm thinking of using a quad digital 1k potentiometer in a 4 way parallel configuration. That only gets me down to 250 ohms of adjustment in 256 steps. This would probably work decently well but still doesn't give me the best resolution.
Add an op-amp with a transistor and the resistance from your digital potentiometer can be scaled down.

See the thread linked below.
https://www.eevblog.com/forum/projects/ptc-resistance-output-from-0-10v-analog-input/msg2452959/#msg2452959
 

Offline BradFernandezTopic starter

  • Newbie
  • Posts: 2
  • Country: us
Re: Variable digital resistor
« Reply #5 on: June 12, 2019, 04:55:50 pm »
I have been testing a voltage divider with a 3.3V 12 bit DAC and a 100ohm x 33ohm voltage divider. I can get the range I need 0-100C (actually a lot larger then I need from -171 to 165) with around .2C change per 1 count of change on the DAC output. Is there any downside to using the DAC and voltage divider?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 15155
  • Country: de
Re: Variable digital resistor
« Reply #6 on: June 12, 2019, 08:54:53 pm »
DAC and voltage dividers still gives a voltage source with a more or less fixed output resistance. So the reading of an instrument connected depends a lot on how the instrument actually measures the resistance.

The simple current sink circuit is also working good only for one polarity. It may work a little below zero, but not very much. Also offsets can become a problem is the test current gets very low.
 

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 2473
  • Country: br
    • CADT Homepage
Re: Variable digital resistor
« Reply #7 on: June 12, 2019, 09:23:26 pm »
If the PT100 measurement gets done at high bandwidth in order to reduce self heating, you may better use something like a binary resistor box, e.g. 200R, 400R, 800R, 1K6, 3K2 .. all parallel with MilliOhm MOSFET switches to Gnd. It can be a small thing and tuning the resistors to 10 bit or 12 bit accuracy for a prototype should not pose a problem.

Regards, Dieter
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf