Driving the adjust pin of an LM350 from PWM, now from DAC and Op-Amp - Page 1
Forum section: electronics / beginners

author: pstimpel
author_rank: Contributor
timestamp: September 12, 2020, 04:23:57 pm
content: I want to drive the adjust pin of a voltage regulator by a microcontroller. So put together a classic circuit using an LM350, providing 2-30V from a 36V supply, up to 3A. A OCP is there as well. Voltage output and OCP are adjusted using potentiometers. Works as expected.Now I want to drive both controls by a microcontroller. Lets focus on voltage control for now. So I set up an arduino, and create 5V PWM. I am driving an optocoupler by this (I fried one Arduino during my bradboard games, so I want to make sure not to miss another one), and the output is still kind of PWM. From that I driveA.) a BC337, to provide those almost 30V to the adjust pin of the LM350. Works as expected with one exception. BC337 is connected between 36V+ and the adjust pinA.) a IRFZ44, to provide those almost 30V to the adjust pin of the LM350. Works as expected with one exception. IRFZ55 is connected between 36V+ and the adjust pinThe exception is: I cannot utilize the full PWM range. Much more the provided voltage to the adjust pin is about zero until the PWM reaches a duty cycle > 50 %. From that, the voltage jumps up to 30V, when the PWM duty cycle is about 80%.So my question is: how can I utilize a less narrow range of my duty cycle? I am a beginner, so if you could use phrases I could put on a seach engine to learn more, appreciated.Regards,Peter

author: ledtester
author_rank: Super Contributor
timestamp: September 12, 2020, 04:47:39 pm
content: Posting a schematic of your setup would help.Have a look at this article:https://www.edn.com/control-an-lm317t-with-a-pwm-signal/Using an op-amp can scale and translate your input signal, i.e. Vout = A*Vin + B, so it might help make the most of your dynamic range.

author: Vovk_Z
author_rank: Super Contributor
timestamp: September 12, 2020, 04:49:05 pm
content: Are you sure you have to use PWM for this?

author: ledtester
author_rank: Super Contributor
timestamp: September 12, 2020, 05:00:21 pm
content: In this 9-year old video, Mr. EEVBlog himself goes over such control of the adjust pin and ultimately recommends using an LT3080:https://youtu.be/CIGjActDeoM

author: pstimpel
author_rank: Contributor
timestamp: September 12, 2020, 05:02:12 pm
content: Quote from: ledtester on September 12, 2020, 04:47:39 pmMy power circuit was stolen from this post:https://www.electronicsforu.com/electronics-projects/adjustable-voltage-current-power-supplyI a was connecting the pwm to the mosfets gate, connected drain and source to 35V and the adjust pin of the LM350, but removed VR2/VR3 from the circuit.I am not familiar in depth with op-amps. However, you learn something new every day. Why does the op-amp in the schematic have 7 pins, mine have 5, only? Would this work without that null adjustment pin as well? Sorry for dumb questions, but op- amps ... witchcraft

author: pstimpel
author_rank: Contributor
timestamp: September 12, 2020, 05:03:51 pm
content: Quote from: Vovk_Z on September 12, 2020, 04:49:05 pmI dont have to, it just sounded easy. I could use a DAC es well, bu need to create a signal between 0 and 30 Volts from such a 3.3 or 5V microcontroller

author: pstimpel
author_rank: Contributor
timestamp: September 12, 2020, 05:05:02 pm
content: Quote from: ledtester on September 12, 2020, 05:00:21 pmI know this video series very well. But Dave, sadly, never finished it.

author: ledtester
author_rank: Super Contributor
timestamp: September 12, 2020, 08:01:45 pm
content: Quote from: pstimpel on September 12, 2020, 05:02:12 pmMost op-amps do not have the null-adjustment pins. They are used to "null any small DC offsets at the output for DC amplifiers" according tothis page.Since the op-amp in this would be used as a DC amplifier it would be good to have this capability. As the EDN article states:QuoteAn op-amp is a standard way to convert a 0 to 5V signal into a 0 to 30V signal.

author: Zero999
author_rank: Super Contributor
timestamp: September 12, 2020, 08:56:18 pm
content: Quote from: pstimpel on September 12, 2020, 04:23:57 pmIf you PWM the adjust pin, you'll just get PWM on the output of the LM350, when I'm sure you want a steady voltage.You need to filter the PWM, to DC, before applying it to the adjust pin.

author: pstimpel
author_rank: Contributor
timestamp: September 12, 2020, 09:25:59 pm
content: Quote from: ledtester on September 12, 2020, 08:01:45 pmThat article mentions the LM741, which has specs -+18V. I am right when I drive it by +36V vs ground to amplify 0-5V to 0-30V?

author: ledtester
author_rank: Super Contributor
timestamp: September 12, 2020, 10:33:35 pm
content: Quote from: pstimpel on September 12, 2020, 09:25:59 pmBasically that's right.There is a LM741 with a +/- 22V range - check the TI datasheet:https://www.ti.com/product/LM741Also -- every op-amp has a "common-mode input voltage range" -- the voltage range the inputs should always be in. I can't find what it is for the LM741, but usually the inputs should not get too close to the power supply rails. Moreover, the output of the opamp may not be able to reach the top and bottom rails. That's the reason why they advertise "rail-to-rail" op-amps.So, for instance, you may need a negative supply in order for the op-amp to output 0 volts. The negative supply usually doesn't have to provide a lot of current -- just a few mA may be sufficient.Thus, your op amp may be powered by V- = -2V and V+ = 34V. With those power rails it might be able to output 0V to 32V -- just as a for instance.I would first try with a smaller voltage range. I'm sure there's plenty of technical issues to solve just getting to work on a 0-12V range.

author: Zero999
author_rank: Super Contributor
timestamp: September 13, 2020, 09:21:01 am
content: Quote from: pstimpel on September 12, 2020, 09:25:59 pmUse the MC34071 instead, which can work up to 44V and down to 0V.https://www.onsemi.com/pub/Collateral/MC34071-D.PDF

author: pstimpel
author_rank: Contributor
timestamp: September 13, 2020, 01:20:45 pm
content: Ok, so I playd a little with an LM675 I had laying around. Result of the circuit isWhen feeding 30V instead the 36V from the schematic0-1V from DAC: Output is around 28 Volts1-5V from DAC: Output raises from around 3.6V up to 28V, quite linear.Beside the zero adjustment that was mentioned earlier (I cannot play with those right now since I have no matching Op-Amp yet), what effect causes this 28V output between 0 and 1V from DAC?

author: eblc1388
author_rank: Frequent Contributor
timestamp: September 13, 2020, 02:16:14 pm
content: Quote from: pstimpel on September 13, 2020, 01:20:45 pmBy giving a voltage of 0~1V to the opamp input, you have exceeded the input common mode voltage range of the opamp. Looking at the datasheet, the lowest possible input voltage you can connect to the opamp input is 3V more than its negative power supply voltage. Since you have connected the VEE pin to ground, therefore the lowest voltage that you can input into the opamp is +3V. Connecting any voltage lower than 3V would risk the opamp to output the full output voltage(28V) at its output, as you have just found out.The proper solution is to provide a negative supply voltage of three volts or more to Vee. Or else you can offset the DAC voltage to start at more than 3V.

author: ledtester
author_rank: Super Contributor
timestamp: September 13, 2020, 02:24:36 pm
content: Quote from: pstimpel on September 13, 2020, 01:20:45 pmYou'll need a negative rail to get 0V output from the op-amp.Have a look at the datasheet and look for "Common Mode Input Range" (page 2).With a supply of +/- 25V the typical input range is +/- 22V. That means the inputs shouldn't get within 3V of the supply rails. You'll need a negative rail of like -5V in order for the op-amp to operate correctly with an input of 0V.The phenomenon is called "output voltage phase-revesral":https://www.analog.com/media/en/training-seminars/tutorials/MT-036.pdf

author: pstimpel
author_rank: Contributor
timestamp: September 13, 2020, 02:27:07 pm
content: Quote from: eblc1388 on September 13, 2020, 02:16:14 pmOK, the pieces come together, thank you. How would one create this negative -3V? I do not need it anywhere else in my circuit as far as I can tell.

author: pstimpel
author_rank: Contributor
timestamp: September 13, 2020, 02:37:51 pm
content: Is this what solves this issue, putting a voltage divider in here? Forgive me if this is a dumb idea, just try to learn something.

author: ledtester
author_rank: Super Contributor
timestamp: September 13, 2020, 03:13:48 pm
content: There are charge pump chips such as the icl7660:https://components101.com/ics/icl7660-charge-pump-dc-dc-converter-icIt produces -Vin from Vin, so perhaps use a 5V linear regulator in front of it to get your -5V.For now you can just use batteries to produce your -3V.

author: Zero999
author_rank: Super Contributor
timestamp: September 13, 2020, 05:50:48 pm
content: Quote from: pstimpel on September 13, 2020, 01:20:45 pmThe LM675 is capable of driving quite high currents. Is it your intention to use it instead of the LM350?As mentioned above, it will need a negative supply, to work down to 0V.

author: pstimpel
author_rank: Contributor
timestamp: September 13, 2020, 06:10:17 pm
content: Quote from: Zero999 on September 13, 2020, 05:50:48 pmNo

author: Zero999
author_rank: Super Contributor
timestamp: September 13, 2020, 06:16:48 pm
content: Quote from: pstimpel on September 13, 2020, 06:10:17 pmWhy not? The LM675 can directly output 3A. It makes no sense to use it to drive the ADJ pin of the LM350, which only requires 100µA maximum.

author: pstimpel
author_rank: Contributor
timestamp: September 13, 2020, 06:32:22 pm
content: Quote from: Zero999 on September 13, 2020, 06:16:48 pmMy circuit around the 350 is ready and working, and the lm675 came only into play because it was laying around from another project. It was not my goal to use this op-amp to be part of this project here. However, thanks for pointing out the possibility to use it as regulator, appreciate your input.