Author Topic: LM324 Power Supply with variable voltage and current  (Read 71791 times)

0 Members and 1 Guest are viewing this topic.

Offline imo

  • Super Contributor
  • ***
  • Posts: 2771
  • Country: li
Re: LM324 Power Supply with variable voltage and current
« Reply #50 on: March 17, 2019, 10:09:02 pm »
The Fast CC response is the last thing I would test. First - see above - your PSU must work stable in a "static" operation under different voltage and current settings and loads. After that you may start with dynamic tests.

Shorting the output - doing that in simulation is easy. IN real HW it is difficult. When you do it manually or with any mechanical switch you are producing a long burst (several ms) of random spaced pulses (the contacts bounce).
« Last Edit: March 17, 2019, 10:22:44 pm by imo »
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 4478
  • Country: ca
Re: LM324 Power Supply with variable voltage and current
« Reply #51 on: March 17, 2019, 10:29:21 pm »
Um, I think the design not quite polished but close.

Where are the capacitors for filtering the op-amp's Vcc, such as across Z3 and Z2? Like 0.1uF and >100uF pairs. These are important   :palm:
The LM324 shares an internal bias circuit common to all four amplifiers, so noise on Vcc can affect all sections and make an oscillator or other problems etc.

mike_mike the scope trace pictures are hard to know where the probe was, or what was going on. What is the raw DC input voltage and op-amp rail voltages? I would first get CV mode working but building something like this is always a lot of fun learning.
« Last Edit: March 17, 2019, 10:53:29 pm by floobydust »
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2014
  • Country: au
Re: LM324 Power Supply with variable voltage and current
« Reply #52 on: March 17, 2019, 11:13:57 pm »
The 2nd schematic in Reply #12 shows suitable Base/Emitter bleeder resistors for output stage transistors.
Hioki AS100D vom, HP 54645A dso, Fluke 87V dmm, AN8008 dmm, Agilent U8002A psu,  FY6600 function gen, New! Brymen BM857S-(With Battery)
 

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #53 on: March 18, 2019, 11:32:31 am »
What is the raw DC input voltage and op-amp rail voltages? I would first get CV mode working but building something like this is always a lot of fun learning.
Input DC voltage = 29.0V with load at the output 32.4V without load at the output
Op-amp rail voltages = 28.6V with load at the output and 29.4V without load at the output
Without load, the output voltage varies from the potentiometer from 0V to 25.5V.
The output current varies from the potentiometer from 0A to about 3.3A if I first go with the potentiometer to 0A and then I go with the potentiometer to 3.3A, while the ammeter is connected to the output.
If I set the current limit to maximum, and then if I connect the ammeter it shows about 2.40A, and the led does not lit.

What else should I measure to determine were is the problem ?


Later Edit: I found that if I connect the load and after connecting the load I plug the power supply to the 230V, then the output voltage does not drop. This happens only sometimes. But if I connect the load after I plug the power supply to the 230V, then the output voltage drops from 25.5V to about 19-20V.

When the output voltage drops to 19-20V, the voltage on BC337 from the original schematic collector is about 28V.

An alternative way could be a NPN transistor turning on with more than 0.6 V over the shunt and pulling down the base of T1.

Should the attached schematic work ?
I also made a simulation... but I am not sure if the simulation is correct.
« Last Edit: March 18, 2019, 02:12:23 pm by mike_mike »
 

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #54 on: March 18, 2019, 02:36:42 pm »
I am attaching a new simulation. I see on the red line some oscillation... is that normal ?
Please have a look and tell me if it is correct ...
« Last Edit: March 18, 2019, 03:05:25 pm by mike_mike »
 

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #55 on: March 18, 2019, 04:18:10 pm »
I also made a simulation using diodes instead of transistor.
Could somebody please have a look and tell me if it is ok ?
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 9200
  • Country: de
Re: LM324 Power Supply with variable voltage and current
« Reply #56 on: March 18, 2019, 04:59:11 pm »
The Sizlaki type power stage is a little prone to oscillation.  It sometimes helps to have a resistors at the emitter of the PNP or the first NPN to reduce the inner loop gain. The choice of transistors can also be important. It is not that critical if the fast current limit oscillates, as this is only used as a kind of emergency stop and during transients.
 

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #57 on: March 18, 2019, 05:13:42 pm »
I tried with both BC547C and 2N2222A. The results are attached.
1. Wich of them is the best choice ?
2. Also, please have a look at the schematic in simulator and tell me if it is correct ?
3. The schematic and the simulation from reply #55 are correct ?
« Last Edit: March 18, 2019, 05:15:35 pm by mike_mike »
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 9200
  • Country: de
Re: LM324 Power Supply with variable voltage and current
« Reply #58 on: March 18, 2019, 05:37:40 pm »
There is very little difference between 2N2222 and BC547, it's mainly the case. The more important question would be the speed of the PNP and power transistors. I would likely help if the PNP is not too fast and the TIP3055 not too slow. If needed one could artificially slow down the PNP with a small cap from collector to base.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 4478
  • Country: ca
Re: LM324 Power Supply with variable voltage and current
« Reply #59 on: March 18, 2019, 05:55:35 pm »
I find the same thing in simulations, the pass-transistor section is prone to oscillation in 2.7.1
It is not strictly a problem with Sziklai, but is due to use of negative feedback there.

I think Ver. 2.7.4-v2 schematic (Reply #12) is better for stability than 2.7.1; after it things got fixed.
Add R4, R35, and change R22, R12 *Added 10uF output capacitor Ckl; all important changes for stability.
If you make these changes, the 2.7.1 design seems to be good aside from the spike on power-up/power-down.

I noticed the schematic is from a 725 page thread on lab power supplies at the Hungarian electronics forum Hobbi Elektronika. :o
mike_mike can make sure you have the latest version, so we don't all waste time redoing the design revisions.

edit: added output cap revision.
« Last Edit: March 18, 2019, 07:19:43 pm by floobydust »
 
The following users thanked this post: mike_mike

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #60 on: March 18, 2019, 08:15:15 pm »
Hello @floobydust.
I modified the initial schematic to the schematic 2.7.4-v2. I tested it a little bit and it seems to work.
I used 4u7 capacitor (Ckl) instead of 10uF, like it said in the schematic (only now I saw your edit).
I am waiting for further instructions and advices.

Later edit: And the E resistors for TIP3055 remained 0.47R/5W during those tests. I can modify this, but first I need to know what kind of fast CC will be used and if those 0.47R resistor will have influence on the fast CC.
« Last Edit: March 18, 2019, 09:16:11 pm by mike_mike »
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 4478
  • Country: ca
Re: LM324 Power Supply with variable voltage and current
« Reply #61 on: March 18, 2019, 09:58:12 pm »
What is most important to you in this PSU?
Low cost, simple, reliable, tough, precision... You can't have it all without adding parts... and the discussion never ends.

This Hungarian design is I think a collaboration of three designers. It is close to being really good. I would keep testing it. A few mistakes in the 2.7.4-v2 still.

For reliability, I would add a current-limiting resistor to the PNP driver transistor T2. T2 gets hit hard when output short-circuits happen. BD139 is too small. 15-22R (1W to 2W) at its collector limits transient current to <1A pk. I have not looked at fast (protective) current-limiting, I would not use it to cover up slow CC operation. The op-amp is supposed to go into CC mode after some time anyhow. Does the CC LED still not work?

It would be better if the op-amps had power from voltage regulator IC's like 78L24 and 79L05, instead of the zeners. Add some op-amp Vcc decoupling capacitors.

Translated 2.7.4-v2 to explain the hands on the schematic:
Update A;  something about voltage drops on that wiring/trace run.
Update B;  cal trimpot P3 to set max. current limit.
Update C;  Adding hi/lo switch for ammeter range.
Update D;  Adding T6, R11/2, R33, R34 to prevent output spikes when you switch power on or off.
Update E,H; For stability to stop pass-transistors and op-amps from oscillating.
Update F; For big heatsink wiring.
Update G: adding R36 for protection if pot wiper goes open-circuit; but wrong it should connect to GND like P2. Added R37 to give semi-log response to the CC potentiometer.

It looks like modern 2N3055 are fake or not as strong as the old ones, so the design eventually went to mosfets.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2014
  • Country: au
Re: LM324 Power Supply with variable voltage and current
« Reply #62 on: March 19, 2019, 02:23:21 am »
This is a simplified version of a bench supply design I'm building.
It's topology is similar except for mainly  that the output stage is current sourcing, no local feedback.
The presence of D5 greatly improves the response time of the CC loop to sudden overloads.
The actual design I'm using has added complications to further improve the CC response.
It may not work as well with a slow op-amp.
« Last Edit: March 19, 2019, 03:00:47 am by xavier60 »
Hioki AS100D vom, HP 54645A dso, Fluke 87V dmm, AN8008 dmm, Agilent U8002A psu,  FY6600 function gen, New! Brymen BM857S-(With Battery)
 

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #63 on: March 19, 2019, 06:20:52 am »
What is most important to you in this PSU?
Low cost, simple, reliable, tough, precision... You can't have it all without adding parts... and the discussion never ends.

Does the CC LED still not work?
I am satisfied with the supply as it this now if I will not find problems, but I want to add a fast current limit to protect the power transistors, if this is needed.

After removing the fast CC and making the modifications (version 2.7.4-v2), the led is working, but it lights up at the minimum current only if I have a load at the output of the power supply. The loads that I used were a 24V/60W light bulb and a 2.95A at 19.75V light bulb. The output current varies from 0 to 3.25A.

For reliability, I would add a current-limiting resistor to the PNP driver transistor T2. T2 gets hit hard when output short-circuits happen. BD139 is too small. 15-22R (1W to 2W) at its collector limits transient current to <1A pk. I have not looked at fast (protective) current-limiting, I would not use it to cover up slow CC operation. The op-amp is supposed to go into CC mode after some time anyhow.
I think I don't understood how to connect the 15-22R resistor, does it needs to be connected between the C of BD244 and the B of TIP3055 ?
The decoupling capacitor should be connected between the +Vcc (+24V) and -Vcc (-5V) of the LM324 ?
I can use L7824 and L7905, I don't have the part number with "L". But I want to stick with zeners, since the 78 accept input voltages in 33-40V range and the input voltage in my case drops below 33V when I have a load at the output.
« Last Edit: March 19, 2019, 07:21:55 am by mike_mike »
 

Offline imo

  • Super Contributor
  • ***
  • Posts: 2771
  • Country: li
Re: LM324 Power Supply with variable voltage and current
« Reply #64 on: March 19, 2019, 11:13:43 am »
Quote
I think I don't understood how to connect the 15-22R resistor, does it needs to be connected between the C of BD244 and the B of TIP3055 ?
I would put it into BD244 emitter, it limits the current and lowers the BD244 gain as well. Mind 10ohm creates a voltage drop on it with large currents.

Quote
The decoupling capacitor should be connected between the +Vcc (+24V) and -Vcc (-5V) of the LM324 ?
It should be wired as close to the LM324 package as possible, between +Vcc and -Vcc pins (pin 4 and 11, afaik). The value: 100nF/35V ceramic in parallel with an elyt 10u/35V.
 
The following users thanked this post: mike_mike

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #65 on: March 19, 2019, 12:04:15 pm »
I added the 10 ohm resistor into BD244 emitter, and the 2 capacitors as close to LM324 as I could (I found in my box only 10uF/63V - electrolytic and 100nF/50V - ceramic). I made a quick test and the power supply seems to work. The voltage drop with 2.95A load was about 0.05V. The current limit also works and the led lights up when I reduce the output current.
The fast CC is still needed ? If yes, which schematic should I use ? Note that the complicated one (with 2 transistors) did not worked for me...
 

Offline imo

  • Super Contributor
  • ***
  • Posts: 2771
  • Country: li
Re: LM324 Power Supply with variable voltage and current
« Reply #66 on: March 19, 2019, 12:37:38 pm »
You may try the classic FCC version (my first version with a single npn transistor):

https://www.eevblog.com/forum/beginners/lm324-power-supply-with-variable-voltage-and-current/msg2268063/#msg2268063

While the BD244 with 10ohm in emitter now limits the current, the single transistor version may work best, as it is placed closest to the 3055s.

Your FCC current limit has to be set a bit higher than the "slow CC" maximum limit is set, otherwise the CC will not work.
For example FCC=7A for SLOW_CC_MAX=4A.

PS: in case you ask how to set the FCC - trial and error method :)

« Last Edit: March 19, 2019, 12:53:19 pm by imo »
 
The following users thanked this post: mike_mike

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #67 on: March 19, 2019, 01:15:21 pm »
I made a simulation using BD139, but I see that there does not appear all the "lines" on the graphic like it appeared when I made the first tests. Are there any mistakes ?
Also, the collector current of BD139 is about 1.1A... is that good ? In case if the current goes over 1.5A, can I use a higher collector current transistor ?
« Last Edit: March 19, 2019, 01:38:29 pm by mike_mike »
 

Offline imo

  • Super Contributor
  • ***
  • Posts: 2771
  • Country: li
Re: LM324 Power Supply with variable voltage and current
« Reply #68 on: March 19, 2019, 02:33:16 pm »
What do you mean by "all lines in your first test".
Do you mean stepping through various 3055 emitter resistors?
Your total FCC limit is 10.6A with your above simulation.
It is a simulation only - the reality may vary by +/- 2A easily.
« Last Edit: March 19, 2019, 02:39:24 pm by imo »
 

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #69 on: March 19, 2019, 02:42:49 pm »
I meant the lines from the attached screenshot.
Also, can I use a higher collector current transistor to replace BD139 ? Sorry for asking again, but I think that I did not understood correctly...
 

Offline imo

  • Super Contributor
  • ***
  • Posts: 2771
  • Country: li
Re: LM324 Power Supply with variable voltage and current
« Reply #70 on: March 19, 2019, 02:46:52 pm »
You have to learn LTspice directives.
See below. Try to replicate.
BD139 is ok.
« Last Edit: March 19, 2019, 03:06:08 pm by imo »
 
The following users thanked this post: mike_mike

Offline imo

  • Super Contributor
  • ***
  • Posts: 2771
  • Country: li
Re: LM324 Power Supply with variable voltage and current
« Reply #71 on: March 19, 2019, 08:54:51 pm »
Here is a "PSU SHORTER" - you may test your Fast CC and SLOW CC in hardware.

The nMOSFET is (80V/60A 10mOhm) and the npn are randomly chosen from the LTspice lib. 555 is the 555 (not the cmos one) :)

The short is 1ms long, approx 20Hz repetition rate.

Blue: the current through the nmosfet, a short 50A pulse from the discharge of the output's 100uF capacitor and then 3A Slow CC

Green: the PSU_Shunt current where the first peak is the 6A Fast CC and then 3A slow CC, the idle is 160mA (16V/100ohm).
« Last Edit: March 20, 2019, 07:53:11 pm by imo »
 
The following users thanked this post: mike_mike

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #72 on: March 20, 2019, 06:26:34 am »
Probably I will built the circuit with 555... but this takes a little time to built the circuit.


edit: It is possible to drive the mosfet using an Arduino UNO board ? I worked with Arduino a few times and I think I know how to write the code.
« Last Edit: March 20, 2019, 06:36:29 am by mike_mike »
 

Offline not1xor1

  • Frequent Contributor
  • **
  • Posts: 631
  • Country: it
Re: LM324 Power Supply with variable voltage and current
« Reply #73 on: March 20, 2019, 07:11:36 am »
Quote
I think I don't understood how to connect the 15-22R resistor, does it needs to be connected between the C of BD244 and the B of TIP3055 ?
I would put it into BD244 emitter, it limits the current and lowers the BD244 gain as well. Mind 10ohm creates a voltage drop on it with large currents.

Quote
The decoupling capacitor should be connected between the +Vcc (+24V) and -Vcc (-5V) of the LM324 ?
It should be wired as close to the LM324 package as possible, between +Vcc and -Vcc pins (pin 4 and 11, afaik). The value: 100nF/35V ceramic in parallel with an elyt 10u/35V.

 :o
The capacitance of ceramic capacitors is inversely proportional to the applied voltage so 50V or more is better than just a bit above the supply voltage.
 |O OK... I had stopped at 100nF and had not realized you suggested electrolytic in parallel... in any case melius abundare quam deficiere  ;D
« Last Edit: March 20, 2019, 07:14:53 am by not1xor1 »
 

Offline mike_mike

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: ro
Re: LM324 Power Supply with variable voltage and current
« Reply #74 on: March 20, 2019, 01:52:13 pm »
I managed to build the schematic with 555 suggested by @imo at reply #71. The mosfet I used is W20NB50 and it is the most powerful that I could find.
I set the output voltage at 25.5V, and the output current at 3.2A.
The results are:
1. The Gate of the mosfet DS0483.jpg
2. With the probe on the 0.68R resistors (the crocodile clip at ground and the probe on the other end of 0.68R resistors) and the max output current set at about 3.2A: DS0477.jpg to DS0480.jpg
3. With the crocodile clip at source (S) of the mosfet and the other end of the probe at Drain (D) of the mosfet: DS0481.jpg

I tested without R23 (100 ohm) because it was low power and did not resist to the high current. Some smoke appeared from this resistor. It is good if I tested without the 100R resistor ?
While testing, the led was flashing and some hum could be heard from the power supply.

Please have a look at the results and tell me what you think.

Later Edit: I managed to find a 100R /3W resistor and I tested with this resistor in the 555 schematic. I know that there needs to be a more powerful resistor, but this is all I have.
4. With the probe on the 0.68R resistors (the crocodile clip at ground and the probe on the other end of 0.68R resistors) and the max output current set at about 3.2A: DS0485.jpg to DS0489.jpg
5. With the crocodile clip at source (S) of the mosfet and the other end of the probe at Drain (D) of the mosfet: DS0490.jpg to DS0491.jpg

« Last Edit: March 20, 2019, 02:21:46 pm by mike_mike »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf