Resistance via digital control


Hello everybody,
I haven’t been around much due to my new position.(I am now a full time design guy. Yay!) But 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 ol Contextual electronics 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


Have you looked at the HCNR201/200 optocouplers?

They have dual matched photodiodes, so you can build a feedback circuit,


Since a potentiometer output is basically a voltage divided by the resistors, could you not simply use a DAC output to feed a voltage as required?


I’m not sure. The voltage used by the PT100 is only around .25 volts. So I don’t think a DAC will give me a usable resolution. Though I could be thinking about this wrong.


I have not. Still a beginner. Not sure how exactly I would build a feedback circuit in this case. Thank you for the reply


Thank you everybody for the replies. I am going to try and give the DAC idea a try as I alread have a particle photon bread boarded up with a adafruit max31865 to test with.


By using a resistor divider on the DAC output, you can effectively “scale” the voltage to fall within the limits you require, while keeping the resolution reasonable.


Hmm you’re absolutely right! I didn’t think about that. Ok I will breadboard this out and see what I get in the real world with my current setup. Thanks, no1089. Still open to other suggestions as well. I’ll let everyone know if I have success.


What about putting a 120 ohm resistor in parallel with the A/B terminals on the 1k digital pot?


PT100s are frequently used with current excitation and 3 or 4 wire configuration to compensate for wiring resistance, so that’s going to be a problem if the circuit you’re trying to similate a PT100 in works that way.


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?


This doesn’t represent the signal you get from a PT100…? PT100 means 100 ohm at 0 degrees C. Here, a table from wikipedia :slight_smile:

The wikipedia page also suggests a typical circuit that uses a 1mA current source, from that you read voltage using a 4-terminal setup.

I would use a DAC or PWM plus LP filter if I needed to simulate this with a micro controller. But be sure that you know what range you are trying to simulate first :wink:


Thank you for that, but I don’t need negative temperatures. So the first 100ohm will be a resistor. So I only need to control the upper 100 ohms.


If you just need this as a one-off you can buy PT100 simulators that have 0-10V, 0-20mA, RS-485 etc control input…for less than $200…with a stated accuracy class of 0.1%. Could be a time saver.


Unfortunately one off isn’t going to work in this case. Im trying to incorporate this into a sensor package that does several readings in place of a single pt100 temp sensor. (Our sensor won’t always be replacing a pt100 but this is the use case im attempting to solve. ) I am trying to incorporate this solution into an already designed micro board that controls the sensor system. So with the dac and resistor divider solution I only add a few resistor footprints and a connector footprint and connect them to an already existing DAC on the microprocessor on my board, which is a really attractive solution considering cost and board space.