EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: pstimpel on September 12, 2020, 04:23:57 pm
-
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 drive
A.) 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 pin
A.) 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 pin
The 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
-
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/ (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.
-
Are you sure you have to use PWM for this?
-
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
-
Posting a schematic of your setup would help.
My power circuit was stolen from this post: https://www.electronicsforu.com/electronics-projects/adjustable-voltage-current-power-supply (https://www.electronicsforu.com/electronics-projects/adjustable-voltage-current-power-supply)
I 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
-
Are you sure you have to use PWM for this?
I 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
-
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
I know this video series very well. But Dave, sadly, never finished it.
-
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
Most 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 to this page (https://www.electronics-notes.com/articles/analogue_circuits/operational-amplifier-op-amp/offset-null.php).
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:
You must be able to remove offset voltages from the op amp. Use an op amp, such as a National Semiconductor LM741, with null adjustment.
An op-amp is a standard way to convert a 0 to 5V signal into a 0 to 30V signal.
-
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 drive
A.) 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 pin
A.) 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 pin
The 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
If 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.
-
An op-amp is a standard way to convert a 0 to 5V signal into a 0 to 30V signal.
That 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?
-
An op-amp is a standard way to convert a 0 to 5V signal into a 0 to 30V signal.
That 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?
Basically that's right.
There is a LM741 with a +/- 22V range - check the TI datasheet: https://www.ti.com/product/LM741 (https://www.ti.com/product/LM741)
Also -- 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.
-
An op-amp is a standard way to convert a 0 to 5V signal into a 0 to 30V signal.
That 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?
Use the MC34071 instead, which can work up to 44V and down to 0V.
https://www.onsemi.com/pub/Collateral/MC34071-D.PDF (https://www.onsemi.com/pub/Collateral/MC34071-D.PDF)
-
Ok, so I playd a little with an LM675 I had laying around. Result of the circuit is
When feeding 30V instead the 36V from the schematic
0-1V from DAC: Output is around 28 Volts
1-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?
-
what effect causes this 28V output between 0 and 1V from DAC?
By 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.
-
Ok, so I playd a little with an LM675 I had laying around. Result of the circuit is
When feeding 30V instead the 36V from the schematic
0-1V from DAC: Output is around 28 Volts
1-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?
You'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 (https://www.analog.com/media/en/training-seminars/tutorials/MT-036.pdf)
-
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.
OK, 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.
-
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.
-
There are charge pump chips such as the icl7660:
https://components101.com/ics/icl7660-charge-pump-dc-dc-converter-ic
It 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.
-
Ok, so I playd a little with an LM675 I had laying around. Result of the circuit is
When feeding 30V instead the 36V from the schematic
0-1V from DAC: Output is around 28 Volts
1-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?
The 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.
-
The LM675 is capable of driving quite high currents. Is it your intention to use it instead of the LM350?
No
-
The LM675 is capable of driving quite high currents. Is it your intention to use it instead of the LM350?
No
Why 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.
-
Why 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.
My 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.