0
\$\begingroup\$

I like to create a digital potentiometer with standard value resistors and MOSFETs.

The principle is easy: I put a lot of resistors in series and parallel to each resistor I have a MOSFET which shortcuts the resistor. Then I control the MOSFETs with digital signals from an Arduino.

I tried this with 3 resistors and 3 MOSFETs and in principle it works fine.

For my project I want results from 300 Ohm to 100k Ohm with 1% tolerance for each value. With 100k Ohm this means only 1k tolerance, no problem. But for 300 Ohm this means maximum 3 Ohm tolerance!

I guess the theoretical easiest approach is to use resistors like 1, 2, 4, 8, 16, 32, ... Unfortunately most of those values are not or very difficult available.

So my idea is to use standard 1% resistors like 10, 15, 22, 33, etc. They are easily available. But if I use every E6 series value between 3Ohm and 68k Ohm I end up with 26 resistors and 26 MOSFETs and 26 digital outputs. That's a lot!

So now my question is: Did anybody have a similar problem and figured out how many of those resistors are actually necessary to archive the goal to have the outputs mentioned above. I am sure I don't need all the values. But which once can I skip. I would be able to get reasonable results by letting my PC do the work and just try all combinations. But that's not very scientific and maybe there is a better way.

My question: Which commonly available resistor values do I need to archive accurate in series results between 300 Ohm and 100k Ohm with max 1% tolerance?

Here is some more info because I guess some questions will come up in the comments.

This question is similar to the following but it's not the same.

Logarithmically-spaced resistances using switches

Electronically switched decade resistance box design

I looked at available digital potentiometer. I didn't find what I want for two reasons. Many of those digital potentiometer ICs have 20% tolerance! Best case I found 4% tolerance. Most of what I found are linear, not logarithmic. And many, maybe all, allow only very little current. I found 1mA max current. That is not enough for what I need. I need at least 5mA current (long time).

I use MOSFETs because I read they are the perfect switches. My current test was with MOSFETs which I had already which have 22 mOhm resistance when closed. Now I ordered (still cheap) MOSFETs with 3.5 mOhm resistance (STP105N3LL). Maybe there are better options to switch just a few mA. Suggestions are welcome.

If I need lots of I/O lines I will use 16 bit I/O expander like these: MCP23S17-E/SP or MCP23017-E/SP

In my case I need this for max 5V DC and the switching speed is not critical.

Any suggestions are welcome. Thanks!

Edit: My application is that that I want to emulate a NTC. In my current case it's an existing NTC which is on one end on GND and on the other end connected to an electronic device which I can't change (black box). That device uses likely a 2.2kOhm Resistor on a voltage divider and then an ADC.

But in the future I want to be able to use this to emulate other NTC independently how they are connected. I want to be able to have a device which looks on the outside like a 353 Ohm resistor or a 43k1 resistor, independent on how the outside electronic actually works. These are just example values

\$\endgroup\$
  • 1
    \$\begingroup\$ What are you going to control with this pot? Why not make a variable resistor using one FET? \$\endgroup\$ – Transistor Mar 31 at 12:25
  • 1
    \$\begingroup\$ It sounds like you're talking about a variable resistor (2-terminal device) rather than a potentiometer (3-terminal device). What's the application? \$\endgroup\$ – Dave Tweed Mar 31 at 12:56
  • \$\begingroup\$ @Transistor: Truth to be told I don't know how to do this with just one FET and Arduino digital outputs with high precision. Maybe you can direct me to some sample or the right keywords. \$\endgroup\$ – Edgar Mar 31 at 13:27
  • \$\begingroup\$ I note that you haven't answered two requests for details of your application. This will determine whether my suggestion would work in your application. It's important to read the comments carefully and try to answer them. Pop the information into your question rather than buried in the comments. \$\endgroup\$ – Transistor Mar 31 at 13:32
  • \$\begingroup\$ I just edited the question with information what I want to do. \$\endgroup\$ – Edgar Mar 31 at 13:34
2
\$\begingroup\$

If you wish to emulate a digitally variable resistance in a measuring instrument, viable scheme is to measure the voltage across the emulated device and draw a current corresponding to the desired behavior. This can be most easily accomplished with an MDAC (multiplying digital-to-analog converter). In fact, this is the normal approach used in RTD emulation calibrators.

As to your approach, you could try using a series string of very low resistance MOSFETs with resistors in parallel, in binary sequence (1/2/4/8/16/32..) perhaps driving the gates with isolators. That would work with one polarity at DC (reverse polarity only slightly) and if you used very low Rds(on) MOSFETs you might be able to cover a fairly wide range of resistances. Keep in mind that MOSFETs have a bit of leakage and low Rds(on) types tend to have more, the leakage is very temperature sensitive and large MOSFETs have a lot of capacitance which makes them far from ideal, and even useless in some situations. The Rds(on) also has a (positive) tempco, but it’s closer to linear than exponential.

\$\endgroup\$
  • \$\begingroup\$ Thanks for answering my question and the solution for my problem - two different things in this case. Until now I thought DACs have a voltage output and this is why I didn't consider them. But after a little search now I also found DACs which work as current sink. Is that what I need? Because the voltage is supplied from the black box. If the black box uses 5V on top of a voltage divider with internally 2k2 resistor and then connected to the NTC and ground I need a DAC which "reduces" the voltage. How to search such a DAC? Current Sink? Current Steering? R-2R? How are they called? Thanks! \$\endgroup\$ – Edgar Apr 1 at 4:14
  • 1
    \$\begingroup\$ Voltage output DAC + voltage-to-current converter \$\endgroup\$ – Spehro Pefhany Apr 1 at 4:33
  • \$\begingroup\$ I didn't want to bother you without some research so I spend the last couple of hours looking for a voltage-to-current converter. I found some circuits with a FET or a MOSFET and sometimes with an Op-Amp. But I saw nothing which looked like what I think I need. Maybe I just don't see it. So I ask one more time: Is there something like a voltage-to-current converter IC or which circuit do you suggest. So many options - so limited knowledge... \$\endgroup\$ – Edgar Apr 1 at 12:29
  • 1
    \$\begingroup\$ Ones like the one in this answer: electronics.stackexchange.com/questions/313170/… It's just an op-amp and some resistors and a transistor. For wide dynamic range (high resistance to low resistance equivalent) you want a low offset voltage op-amp. The sense resistor + Rds(on) sets a limit on how low you can simulate but don't make it much lower than necessary or other problems will crop up. \$\endgroup\$ – Spehro Pefhany Apr 1 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.