Digital Pot problems

Discussion in 'General Electronics Chat' started by ahillelt, Jun 7, 2013.

  1. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    I scoured through the forums but could not find a good answer. I'll first explain what I am trying to accomplish, and then what I currently have.

    I have a need to vary the voltage that is output from a 3.7v Lithium-Ion battery. Most uses are either 6v,9v or 12v (2.1mm dc plug).

    I am using an old LM2577 circuit I previously built, the voltage output was adjusted using a 10K Ohm Variable Resistor. I removed the variable resistor and was looking to use a digital potentiometer instead that was controlled using an Arduino. The potentiometer I have is a mcp41010. However, I have two problems:

    1) Current in the LM2577 circuit is too high (16mA)
    2) Voltage in the LM2577 where the variable resistor was is too high (43V when open).

    The first problem I can fix using a current limiting resistor, but I am clueless on how to address the second problem.

    I was looking at conceding on using a digital pot and instead use some simple transistor circuit instead to feed the correct voltage into the wiper input of the where the original variable resistor was. I was even looking at using a LM317t variable resistor, but I have no means of using the adjust pin (I have no OP AMPs available - plus I feel all that circuitry is unnecessary to just replace a simple variable resistor)

    Does anyone have any suggestions for this? Thanks for any help received!
     
  2. w2aew

    Member

    Jan 3, 2012
    219
    64
    A schematic will help us help you. Otherwise, we're just guessing at your problem.
     
  3. circuitfella11

    Member

    May 10, 2013
    56
    5
    i am also looking forward on your schematic since you replaced previous arduino to digi potentiometer.. maybe the previous arduino you are using prevents the two problems you are having..
     
  4. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    Thanks for the responses so far. Attached is how I had the digital pot originally wired to the arduino (reset pin is properly setup as is the 16Mhz external crystal and 22pf capacitors).

    Attached is the schematic I followed for the LM2577, it works great with a standard 10K (mechanical pot). The digital pot if just replacing it won't work. I have the three remaining pins on the digital pot setup to be exactly like the hardware pot (RP1).

    I believe it because of the following two reasons:

    1) Current is too high (can use current limiting resistor for that) I measured the current in the LM2577 circuit as 16mA, and am using a 4.7K Ohm resistor that keeps current from going over 1mA.

    2) The voltage is not only greater than what I am feeding the digital pot, it's more than what the digital pot can handle spec wise. When I measure the voltage in the lm2577 circuit across the point where the potentiometer was (I removed the hardware one), it's 43V.

    The second issue is what has me stumped. I have a LM317T as well as some Darlington Transistors (TIP120) and a few NPN and PNP's lying around, but I cannot figure out how to make it work.

    Also, thanks for taking the time to look at this!
     
    Last edited: Jun 9, 2013
  5. dougy83

    Member

    May 11, 2011
    11
    4
    What do you mean, the LM2577 current is too high? The input current should be between 7.5mA and 25mA http://www.ti.com/lit/ds/symlink/lm1577.pdf

    Regarding the second point, what's to stop you putting the pot in the place of R2 and putting a fixed value resistor in the place of RP1? It will never have more than 1.2V across it then.
     
    ahillelt likes this.
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    You need to use LM2577-ADJ, which has a reference voltage of 1.23V.
    You need a digital pot wth low temperature coefficient, so that the resistance is stable as temperature changes.
    You need to connect the pot between pin 2 and ground, so that the voltage across it does not exceed Vcc. You might need to add a resistor in series with the pot, in order to take advantage of the fukk range of the pot.
    Be aware that, when using the pot as a rheostat, the absolute resistance will vary from one unit to the next, due to the tolerance spec.
     
    ahillelt likes this.
  7. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    The digital pot doesn't accept current that high, Wiper Current for example is 1mA max.

    In regards to changing RP1 with a fixed value transistor and r2 with a variable; this won't adjust what the output voltage range will be?
     
  8. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    I was thinking that, if necessary, eventually on the output I would have a voltage divider circuit setup that is linked into one of the other arduino pins. Use the arduino to read the output voltage and adjust for inconsistencies of the pot, and other components.
     
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    The current through R2 will just be 1.23V/R2.
    Tell us what the range of output voltage needs to be (min to max), and we can design the R1/R2 voltage divider for you.
     
  10. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    Min would be 3.3v, but I do not think the Lm2577 allows you to go below the input voltage (3.7-4.2V from Li-ion).

    Max is 18V.

    I charged up the battery pack that supplies the power, and when I measure across the B (gnd) and A (+) connectors of where the 10K pot used to be it's 50V.

    When I put a 4.7K resistor from A to wiper it reads 19.96V, if I setup a voltage divider across A, B, and the wiper. It doesn't seem to work, whatever the resistor is from A to wiper that is what sets the voltage, the second resistor doesn't seem to matter. I can also connect B to Wiper, and then just run it as a rheostat (what Ron H suggested), it acts the same way, whatever the resistor is from A to wiper, is what sets the voltage. I can't seem to get a voltage divider to function properly.
     
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Just as a test:
    What happens if you make
    R1=30k
    R2=10k?
    You should get about 5V.
     
  12. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    At 30K for R1, R2 doesn't really have any affect on output.

    I moved the variable resistor (eventually digipot) to be R2 in the voltage divider, this resistor is a 10K ohm variable resistor. One of the pins wasn't grounded properly causing reading errors. I put two 2.2K Ohm resistors in parallel (1.1K) as R1 in the circuit (one got too hot when the LM2577T was putting out a high voltage), and am currently just testing the circuit by using a mechanical variable resistor and have it setup as a rheostat. I get min 5.7V, max 34.4V. The sensitivity is okay, but my problem is that there is a 30mA current across R2. The digital pot can only handle 1mA, not sure if anyone has recommendations here. Everyone has been very helpful so far!
     
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Something is wrong with your circuit.
    Are you sure your part is LM2577-ADJ? They also make -12 and -15 parts.
    The voltage on pin 2 should be 1.23V, independent of the values of R1 and R2, as long as they are reasonable values, and are properly connected.
     
    ahillelt likes this.
  14. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    It is odd, but it is a LM2577-ADJ. I just switched it out for another LM2577, and now with 30K on R1 and 10K on R2 I get 4.94V. So the LM2577 I was using must of been damaged from before. It currently works with the variable resistor, now just need to see if I can integrate the digi pot with it functioning properly. Hope to try that shortly, thanks for your help so far!
     
  15. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    Ok, here are nominal values to give you 3.3V to 18V:
    R1=19.25k
    R2=1.412k + 10k rheostat

    The caveats are this:
    1. The output will not go below the input voltage (minus the drop of the Schottky diode).
    2. The values may have to be modified to make up for component tolerances.
    3. Rheostat must have low temperature coefficient (same for the other resistors).
     
  16. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    I just realized that I fried all three MCP's I had from earlier testing (I guess high currents and high voltages don't work) - they basically have stopped responding to commands. I am going to grab a few more soon, and will post results soon. Appreciate all the help so far!
     
  17. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    I was able to get some new digital pots. Unfortunately these are the 100K version of the previous 10K pots.

    Oddly enough I noticed some other issues. When wiring up a voltage divider using just resistors, it only works if I stay within the 10K ohm range for resistors. Once I go above 10Kohm on either R1 or R2 the system doesn't work.

    For example, if I use 5K for R1 and 5K for R2 I get ~24.8V out from 50 V in (makes sense). If I use 20K for R1 and 20K for R2 I get 50V out (nothing changed).

    I wonder if there is a better way to use PWM to create a voltage step-up circuit, as the LM2577-ADJ is consistently giving me issues.
     
  18. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    656
    No, that doesn't make sense, but I don't know what the output voltage would be, because LM2577-ADJ has Vref=1.23V. With R1=R2, the output voltage would be 2*Vref=2.46v, except this is a step-up device, and the minimum input voltage is about 3.5V. Are you sure you don't have an LM2577-12?
    I told you this in post #15:
    If you truly have a -ADJ part, then the ideal values are:
    R1=192.5k
    R2=14.12k + 100k rheostat

    The same caveats as quoted will still apply.

    You can't expect the -ADJ part to work with R1=R2.
    Ideally, Vout=1.23V*(R1+R2)/R2
     
  19. ahillelt

    Thread Starter New Member

    Jun 2, 2013
    10
    0
    Thanks, i'll give it a shot and will let you know if it works. It's an ADJ I may rebuild the circuit completely from scratch and re-test all the parts (including the inductor). Thanks for the input so far!
     
Loading...