Adding Digital control to Dual tracking LM317 / LM337 Bench supply - Page 1
Forum section: electronics / beginners

author: N TYPE
author_rank: Regular Contributor
timestamp: July 15, 2013, 02:24:48 pm
content: I've built a Dual tracking adjustable voltage + current limiting power supply kit from altronics - its an old design which was featured in silicone chip magazine many years ago..It uses an LM317 and LM337 to achieve +/- 19V output.The kit comes with crusty single turn pots, I wanted to add 10 turns but they are expensive and are too large to physically fit the original mounting positions.I'd like to add digital control using an arduino, but Im not sure of the best way to do it.At the moment I'm talking about setting the voltage, Digitizing the current adjustment shouldn't be too much of an issue.I've attatched a part of the schematic showing how the voltage setting is achieved - I wont post the entire schematic as it may be copyrighted material - If I've removed too much please let me know.My main objective here is to learn how to design a circuit to handle the setting of the voltage, If it were just a case of feeding a dac or pwm voltage into the set pins of the regs then I think I could probably come up with something myself, however as you will see in the schematic the set pin is being driven by both positive and negative (-1.3v) voltages to allow the output of the supply to reach 0V - this is what has thrown me off.My thoughts:Digital potentiometer? Im not sure that these work between dual rail voltages? plus they only offer 8 bit resolution.. Is it possible to have say two 1k ohm digipots in series to achieve 2k ohm adjustment with double the resolution?DAC? The output will need to be amplified right? I Dont know how to get the output between -1.3V to +20V ?So Im really looking to learn the fundamentals here guys I dont want to redesign the whole circuit.Is there a simple elegant solution to my problem here?Cheers.

author: Paul Price
author_rank: Super Contributor
timestamp: July 16, 2013, 01:41:31 am
content: You must have the wrong schematic, this is + and - 15V dual-tracking supply, can't possibly get 19V out of it.Try to post the correct schematic.

author: N TYPE
author_rank: Regular Contributor
timestamp: July 16, 2013, 04:42:44 am
content: I copied the schematic directly from the silicone chip magazine, it's correct to the best of my knowledge , yes the supply does output +- 19V the mains input uses a 30V 60VA transformer with a centre tap

author: Paul Price
author_rank: Super Contributor
timestamp: July 16, 2013, 02:02:21 pm
content: Post the full schematic. You really don't think there is any DRM issue after so many years. Both the magazine it appeared in and perhaps the guy who designed this simple thing have both gone to meet their maker.The schematic clearly shows +15 and -15 supplies directly using their output voltages to set LM317 and LM337 regulator output voltages with the +- 15V supplies, no way you can the +-17V out of the op-amps needed to adj the output voltage to even try to regulate anywhere above a max +- 16.3V approx output level and it would only regulate with a very very light load, a few hundred mA at my most optimistic best guess.Something smells a little electron funny here.Fact, 30-V RMS center-tap delivers +-15V DC at rated load, then subtract 3V min(Vin-Vout)dropout voltage for the LM317 and then subtract 1V for rectification diodes voltage drop and you have a maybe it will be working +-12V dual-tracking power supply at full load is you have higher than normal AC mains line voltage and the power transformer is conservatively rated.Anyway, all you need to do is to set the desired output voltage by PWM or DAC feeding the non-inverting input of a fast slew-rate op-amp set to a gain of approx four and provide a +1.3 volt return for the gain setting resistor reference point. Insert the output of the op-amp where the pot (now removed from the circuit along with it's paralleling resistor) connects on the right side.With 12-bit PWM you can achieve 13-bit output voltage resolution with dithering and using some external 14-bit A2D feedback to reference your output setting against. Most low-cost MCU's will give you 10 to 12 bit built-in A2D and at least 10-bit PWM that can dither to achieve 11-bit resolution of output voltage setting, with theoretically infinite resolution by dithering the last PWM bit.The price you might pay for this PWM type of resolution is in response time due to the low-path filter necessary feeding the power supply output controlling op-amp added, so as to eliminate PWM pulse train ripple, but this still we be faster than your hand twirling a pot to set the output voltage. If you are adventurous and come to be clever in the arts of programming, you can also set the approximate output voltage just by a DYI inaccurate D2A, almost no cost R-2R type of D2A and then use PWM to fine tune the output voltage with infinite resolution to set the desired level. The tonic to prevent output voltage glitches here is to make sure your ladder is monotonic.You will need to have a hardware output disable circuit (a transistor switch) to prevent upon turn-on or CPU crash related maxl-output voltage voltage settings before the MCU setting the voltage takes control.

author: N TYPE
author_rank: Regular Contributor
timestamp: July 17, 2013, 11:02:22 am
content: Ahh Thanks for the response Mr. Price, that should point me in the right direction! Here is a full schematic...I'll do some testing of the supply tomorrow, I am definately getting 20v between rails on the output at no load.. but Ill try measure the voltage output with some load and also confirm the supply voltage of the op amps..Cheers

author: Paul Price
author_rank: Super Contributor
timestamp: July 17, 2013, 12:07:54 pm
content: Anyway, all you need to do is to set the desired output voltage by PWM or DAC feeding the non-inverting input of a fast slew-rate op-amp set to a gain of approx four and provide a +1.3 volt return for the gain setting resistor reference point. Insert the output of the op-amp where the pot (now removed from the circuit along with it's paralleling resistor) connects on the right side.Are you saying you get +- 20V out with voltage regulation delivering some current?Are the +- 15 supplies on the schematic not +- 15V supplies but +-18V?

author: N TYPE
author_rank: Regular Contributor
timestamp: July 17, 2013, 12:09:27 pm
content: Perfect, Exactly the response I was looking for, Thanks for that

author: kizzap
author_rank: Unknown
timestamp: July 18, 2013, 02:24:32 am
content: I've been working on my own idea for a digitally controlled power supply over the last couple of weeks, originally using a MIC29302 which didn't look too bad, and a handful of DACs and ADCs to go with it, however I abandoned that project when I realised that it would cost me over $200 just to get the parts/boards. So I headed back into the LM317 route again.Following some of Dave's designs I came up with the attached Schematic so far. Most of the important info is there, apart from the Opamp needing to be powered from a voltage rail that goes up to 1.25V under the Maximum output voltage you want, and down to a minimum -1.25 so that you can get true 0v output.The question mark next to the input pins on gate A is there because i'm not 100% certain on the orientation, so I'll have to try that out on a breadboard. I think I might need to swap them to have it work right. (and the more I look at it the more certain I become)I'm also not 100% what voltage Vref should be at, but again, that will require testing on a breadboard.The current limiting and voltage control have a number of ways that they could work. A pot, DAC, uController PWM with a filter, would all be options.If anyone wants to make a comment on the design, please feel free to.-kizzapEdit: Doing some more thinking, I'm not entirely sure about where I have the current limiting connected at the moment either, I might have to place a resistor between the output of gate A and the LM317 adjust pin, and move R4 over to there as well to create a voltage divider there.

author: Paul Price
author_rank: Super Contributor
timestamp: July 18, 2013, 02:51:19 am
content: It won't work. Problem trying to pull down the output of an op amp. It is definitely an electron faux pas.

author: Chalky
author_rank: Regular Contributor
timestamp: July 18, 2013, 03:37:46 am
content: Quote from: Paul Price on July 16, 2013, 02:02:21 pmAre you missing the smoothing cap multiplier? x1.414? Cheers.

author: kizzap
author_rank: Unknown
timestamp: July 18, 2013, 07:26:50 am
content: Quote from: Paul Price on July 18, 2013, 02:51:19 amWere you referring to me? if so in what part?Just went and started testing the circuit on a breadboard, so far I have tested just the op-amp driving the adjust pin and it is working good. Then I proceeded to blow the 317 up in some form of glory for the silicon Gods. May have had something to do with me drawing a bit of current out (whoops), or the fact that I had the pot connected between the + and - rails, and not + to GND.Back to the drawing boards to get this thing right.Sorry for Hi-jacking N TYPE-kizzap