Interfacing MCP41HVX1 with PIC16F

Thread Starter

vishweshgm

Joined Oct 27, 2021
16
Hello,

I am trying to replace a potentiometer in my project with MCP41HVX1 so that I can control the output voltage of LM317 regulator.
My current LM317 circuit is as below:
I use 2pins of J2 POT (between ground and wiper) to vary the voltage output of LM317 regulator. When POT has 0Ω, Regulator output will be almost 0 and voltage increases as I turn the pot gradually.

1646229452930.png

I found MCP41HVX1 does very similar function. So I have designed an external uC circuit PCB as below, and I need your help to validate certain points. (Note in diagram: J11 pin2 connects to J3 ground of above image)
1646229485767.png

Doubt 1 :

Datasheet says default wiper position is MidValue. So when I powerOn, resistance will not be 0 between PA0 and PW0. This is not OK, as I need Regulator output to be 0 at start. Even a spike can cause harm. Is there anyway I can ensure it is 0 at start?



Doubt 2 :

Datasheet says minimum voltage given V+ pin of digitalPOT, must be >=VL. But what is the need of V+ supply? All I need is PA0, PW0, PB0. If it has to be available, Can I provide VL ro V+ also?
The circuit in the image may not work properly as I have shorted PA0 and V+. But when I powerOn, PA0 and V+ will have 0 Voltage which is not sufficient for V+.

1646229519831.png

I have attached Datsheet of MCP41HV51
 

Attachments

spitsnsparkin

Joined Jun 19, 2011
29
Hi vishweshgm,
About Doubt 1:
The data sheet claims that the wiper will be set to mid scale IF the analog POR sets before the digital logic. On the other hand, the wiper will be set to the volatile wiper position if the digital logic sets before the analog. Therefore, you have to ensure that the digital logic is initialized first, the volatile wiper set to the minimum, and the allow the analog POR to set. This may be accomplished by adding a relay between “D20_Positive” and the LM317 which is controlled my the mcu. Another option would require you to add a pull-down resistor to the SHDN’ pin and change your rheostat terminals to P0W and P0B. This keep the resistance at a minimum, until the logic is initialized and the mcu drives the SHDN’ high.

About Doubt 2:
The digital potentiometer requires the use of the analog power rails to drive the analog switches that make up the 256 taps. Therefore, you will have to pass the two rheostat connections as well as D20_Positive and GND.

Other Notes:
From my understanding, the LM317 maintains 1.25v between the OUT and ADJ pins. Therefore, the lowest output voltage is 1.25V (not anything near zero). Likewise, the current that passes through R7 will also pass through R6. Even if R10 is set to zero, the minimum out voltage will be around 1.82V.
In the data sheet, the wiper resistance is given as 75 ohms typical up to a maximum of 170 ohms. This can add up to +1.42V to the output. Likewise, the tolerance of the resistance of the potentiometer is +/-20%. If you were to create more than one power supply, selecting the same tap for both may result in different resistances and therefore different output voltages from the regulators. You may wish to employ the potentiometer as that (a potentiometer) and follow its wiper output with an opamp voltage follower (with a transistor on it’s output) that drives the ADJ pin. This would keep the output ratio metric and reduce the effects of the various resistor tolerances of the digital potentiometer.
Good luck on your project.
Spitsnsparkin
 

Thread Starter

vishweshgm

Joined Oct 27, 2021
16
Hi,
Thanks a lot for the hints.
Therefore, you will have to pass the two rheostat connections as well as D20_Positive and GND.
Great..! I am going to take your word for it and connect D20_Positive to V+Pin. D20_Positive will have value somewhere between 12-13V.

Therefore, the lowest output voltage is 1.25V (not anything near zero).
Yes. I realized it. I think it should be ok as the original design had the analog pot which pretty-much did the same thing.

You may wish to employ the potentiometer as that (a potentiometer) and follow its wiper output with an opamp voltage follower (with a transistor on it’s output) that drives the ADJ pin. This would keep the output ratio metric and reduce the effects of the various resistor tolerances of the digital potentiometer.
Thanks for the suggestion. I have several projects lined-up for which customers asking digital way of control. I can plan and use this method once I get a first hands-on MCP41HV51.
 

Ian0

Joined Aug 7, 2020
9,803
I don't think it will work without a buffer - the current required on the adj pin is too much for the digital pot.
If you drive the adj pin with an op-amp, then the LM317 will output 1.23V more than the adj pin, and the adj pin current is easily obtainable with an op-amp.
If the op-amp has a negative supply of <1.25V, then you can take adj below zero which takes the LM317 output down to zero.
The LM317 does have a minimum output current to keep it in regulation, which is usually achieved by the divider network on the adj pin.
 

Ian0

Joined Aug 7, 2020
9,803
Would a moderator please explain why AAC's website has added a link to Digikey's website whenever I mentioned LM317?
(but it only happens if I view this post on my iPad)
 
Top