1
\$\begingroup\$

I need some help about my current project. I am trying to do a voltage source which can be controlled remotely (0 - 20 V). I am using LM317T for this project. I examined the LM317T datasheet and designed a circuit for a 10k potentiometer.

enter image description here

After setting up the circuit, I tried the circuit with the analog 10k potentiometer and the results were fine. (I get 1.25 V to 19.5 V). After that I have tried to control X9C103 with Arduino UNO and again the results were fine. Here the codes.

#include <FastX9CXXX.h>
#define X9_CS_PIN 3
#define X9_UD_PIN 4
#define X9_INC_PIN 5

FastX9C103 Potentiometer;
String readString = "";


void setup() {
  Serial.begin(9600);
  Serial.println();
  Serial.println(F("ESOGU Uzaktan Laboratuvar"));
  Serial.print(F("Digital Potentiometer Application..."));
  randomSeed(analogRead(0));
  //Potentiometer.Begin();
  Potentiometer.Setup(X9_CS_PIN, X9_UD_PIN, X9_INC_PIN);
  Serial.println(F(" Completed."));

 }

void loop() {
  //Potentiometer.JumpToStep(random(100));
  Serial.print(F("Potentiometer (%): "));
  Serial.print(Potentiometer.GetStep(), DEC);
  Serial.println();
  delay(1000);    // wait for a second

     if (Serial.available() > 0) {
       readString="";
       while (Serial.available()) { // gelen komutu alıyoruz
       char c = (char)Serial.read();
       readString += c;
     }
     Potentiometer.JumpToStep(readString.toInt());
     }
 }

But after implementing digital potentiometer to my circuit. I didn't get the results that I want. I got 1.5 V to 7 V. The circuit is working perfectly fine with analog 10k potentiometer but not with 10k digital potentiometer. Thank you for your answers.

\$\endgroup\$
8
  • 3
    \$\begingroup\$ You need to show your schematic for the digital control version. You should add in a link for the digital pot datasheet you are using too. To get 20 V out of the LM317 your digital pot would have to be able to withstand 20 - 1.25 = 18. 75 V on the ADJ pin. Can it? \$\endgroup\$
    – Transistor
    May 15, 2021 at 14:48
  • \$\begingroup\$ To understand my previous comment better, measure the voltage on the LM317 ADJ pin with your analog pot at maximum R. \$\endgroup\$
    – Transistor
    May 15, 2021 at 15:16
  • \$\begingroup\$ How much current does your output need to support? \$\endgroup\$
    – Reinderien
    May 15, 2021 at 17:11
  • \$\begingroup\$ And what is your input voltage? \$\endgroup\$
    – Reinderien
    May 15, 2021 at 17:12
  • \$\begingroup\$ And how important is it that the minimum output voltage get right down to 0? Many adjustable regulators have a minimum above one volt. \$\endgroup\$
    – Reinderien
    May 15, 2021 at 17:16

2 Answers 2

3
\$\begingroup\$

Maximum voltage on the digital pot resistive elements is +5V, as specified in the X9C103 datasheet.

There are other digital pots which can deal with higher voltages, but also keep in mind the minimum load current on the LM317, which may be too much for a digital pot if you try to use the resistive divider for that purpose.

Edit:

One way to do something similar to what you are asking for is this:

enter image description here

The LM358 amplifies the voltage from the digital pot by a factor of 5. The output voltage is thus \$\alpha \cdot 25V + 1.25V\$ where \$0 \le\alpha\le 1 \$ is the digital pot setting. The minimum setting will be somewhere around 2V.

R4/U4/Q1/R1 form a simple 10mA (roughly) constant current sink to provide minimum load on the regulator down to about 2V out.

You may want to adjust the values to get exactly what you are looking for. In this case a pot setting of 0.35 yields an op-amp output of 8.75V and therefore an output voltage of 10V. The digital pot is being used as a voltage divider rather than a rheostat, which is what it does best.

Note a slightly subtle difference between the two circuits. In the case of using a digital pot directly with the LM317 the bandgap reference within the LM317 is what determines the output voltage (modulo the resistor ratios etc.), however in the above circuit, most of the output voltage is contributed by the 5V, so it would be important to have that relatively stable and accurate (and perhaps use a separate reference or regulator). You could use a TL431 and a couple of resistors, for example.

\$\endgroup\$
4
  • \$\begingroup\$ Thank you for your answer. You mean that X9C103 won't suit for my design and I should try with another digital pot? It basically a voltage divider with changing resistor values for changing the output voltage but when digital pot involves it kind of get messy. \$\endgroup\$ May 15, 2021 at 18:05
  • \$\begingroup\$ Yes, that is correct. The X9C103 is suitable for output voltages as high as 6.25V only, since the ADJ terminal is Vout - 1.25V. In practice you'd probably want to stay a bit lower than that. \$\endgroup\$ May 15, 2021 at 18:07
  • \$\begingroup\$ I understand, thank you for your precious answer. Is there anyway to solve this problem with X9C103 like adding output a off-set or something like that or is it just impossible with X9C103 ? \$\endgroup\$ May 15, 2021 at 18:27
  • \$\begingroup\$ See above edit. It's possible but a bit more complex, and with some caveats. \$\endgroup\$ May 15, 2021 at 19:05
0
\$\begingroup\$

If you can insert an inverting open collector , you can modulate the current in feedback resistor changed to 220 Ohm or so then it may function better with a minimum load current at low V.

Also I would reduce the Vadj cap greatly as this suppresses step load feedback response, to about a 10kHz LPF.

On the other hand, I don’t know how your random(100) works with the same seed or not, so I would change the Vadj RC time constant to 10ms and reduce the delay to 50ms and then do 2k or more cycles, if it is a s/w bug.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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