Author Topic: Linear lab power supply  (Read 98448 times)

0 Members and 3 Guests are viewing this topic.

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #275 on: January 06, 2019, 12:15:26 pm »
I have changed Q1's emitter resistor from 100 Ohms to 47 Ohms. Atached are the results. Transient response remains the same. I also checked all the conections and component values. They seem fine. Note that I am using BD135 in place of BD137. BD135 has a maximum beta of 250, while BD137 and BD139 have 160 as per the datasheet. That may have an influence.
    Juan
« Last Edit: January 06, 2019, 12:19:21 pm by JuanGg »
 

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #276 on: January 06, 2019, 12:25:46 pm »
Quote
The left over op-amp is inconvenient. If it's used for the CC buffer, there will be more offset uncertainty. It could be used for the voltage reference to separate 2  RC filters so that the same value R and C can be used for both stages.
The current measurement op-amp would have to be connected as a inverting amplifier because of the negative going shunt voltage.
The CC op-amp already has a 10MΩ resistor connected to the inverting input to make sure it regulates to zero. You will need to add a settable amount of offset to the CC reference in software.
You can do the same sort of thing with the current measurement op-amp so that it has a small positive offset when the shunt current is zero.
Then hope they don't drift much.

Edit: Just realized that the spare op-amp would be buffering the high level CC reference signal and the offset would have little affect. I think.

I'll do some reading on inverting amplifiers. EDIT: Read the corresponding pages on Learning the Art of Electronics. Seems straightforward enough.
I can easily add offset in software. I could even program a calibration procedure that I can run when I need to, checking voltages and currents with my DMM and have the micro figure out the offsets.

I also have three options for the ADCs, I could use either the 5 V as the reference voltage, enable the 1.1 V internal reference or provide an external reference. 5 V will not be as stable as the 1.1 V reference, and offsets would matter more I suppose.
   Juan
« Last Edit: January 06, 2019, 01:10:46 pm by JuanGg »
 

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #277 on: January 06, 2019, 01:05:17 pm »
Attached is what I understand that is to be used:
I have changed the four parallel shunt resistors from 0.1 to 1 Ohm to get the 250 mOhm shunt. Same footprint, can be changed later on.
I have set the gain at 8.2:  0.25 Ohm * 0.5 A = 0.125 V max drop on the shunt. If we want to amplify it to a maximimum of 1.1 V (using the internal reference of the micro), we need a gain of 1.1 V/0.125 V = 8.8, using E12 values for the resistors, 1 M and 8.2 M leaves a gain of 8.2.
So we would get a max reading with 1.1/8.2 = 0.134 V across the shunt, that is 0.134 V/0.25 Ohm = 536 mA.

Don't know if input impedance would be right.
Please correct me if I'm wrong.
    Juan
« Last Edit: January 06, 2019, 01:11:30 pm by JuanGg »
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #278 on: January 06, 2019, 01:14:07 pm »
I have changed Q1's emitter resistor from 100 Ohms to 47 Ohms. Atached are the results. Transient response remains the same. I also checked all the conections and component values. They seem fine. Note that I am using BD135 in place of BD137. BD135 has a maximum beta of 250, while BD137 and BD139 have 160 as per the datasheet. That may have an influence.
    Juan
That bit of nonliterary makes it difficult to calculate the gm. Try stepping from a higher initial current like 0.2A to 0.6A.
If the voltage step is still present in the load transient test, there has to be something wrong. while applying the 0A to 0.5A step load, scope the output voltage with only that one probe ground connected. Leave the other probe ground leads disconnected.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #279 on: January 06, 2019, 01:20:02 pm »
Attached is what I understand that is to be used:
I have changed the four parallel shunt resistors from 0.1 to 1 Ohm to get the 250 mOhm shunt. Same footprint, can be changed later on.
I have set the gain at 8.2:  0.25 Ohm * 0.5 A = 0.125 V max drop on the shunt. If we want to amplify it to a maximimum of 1.1 V (using the internal reference of the micro), we need a gain of 1.1 V/0.125 V = 8.8, using E12 values for the resistors, 1 M and 8.2 M leaves a gain of 8.2.
So we would get a max reading with 1.1/8.2 = 0.134 V across the shunt, that is 0.134 V/0.25 Ohm = 536 mA.

Don't know if input impedance would be right.
Please correct me if I'm wrong.
    Juan
R15 can be very low without causing loading problems. A value of around 1K will be practical.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #280 on: January 06, 2019, 01:26:02 pm »
Attached is what I understand that is to be used:
I have changed the four parallel shunt resistors from 0.1 to 1 Ohm to get the 250 mOhm shunt. Same footprint, can be changed later on.
I have set the gain at 8.2:  0.25 Ohm * 0.5 A = 0.125 V max drop on the shunt. If we want to amplify it to a maximimum of 1.1 V (using the internal reference of the micro), we need a gain of 1.1 V/0.125 V = 8.8, using E12 values for the resistors, 1 M and 8.2 M leaves a gain of 8.2.
So we would get a max reading with 1.1/8.2 = 0.134 V across the shunt, that is 0.134 V/0.25 Ohm = 536 mA.

Don't know if input impedance would be right.
Please correct me if I'm wrong.
    Juan
A divider from rail can be used to apply a small offset to the non-inverting input
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #281 on: January 06, 2019, 01:42:39 pm »
Quote
R15 can be very low without causing loading problems. A value of around 1K will be practical.
 
I'll make it 1 K and 8.2 K then.
Quote
A divider from rail can be used to apply a small offset to the non-inverting input
Alright. I'll add a pot so it can be adjusted.
     Juan

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #282 on: January 06, 2019, 08:31:44 pm »
Quote
R15 can be very low without causing loading problems. A value of around 1K will be practical.
 
I'll make it 1 K and 8.2 K then.
Quote
A divider from rail can be used to apply a small offset to the non-inverting input
Alright. I'll add a pot so it can be adjusted.
     Juan
You could have a fixed resistor between the non-inverting input and ground and make provision for the other resistor and fit it only if necessary.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #283 on: January 06, 2019, 09:00:41 pm »
Quote
You could have a fixed resistor between the non-inverting input and ground and make provision for the other resistor and fit it only if necessary.
 
Wouldn't a resistor to ground just keep the non-inverting input at ground, without any offset?
    Juan

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #284 on: January 06, 2019, 09:18:54 pm »
Quote
You could have a fixed resistor between the non-inverting input and ground and make provision for the other resistor and fit it only if necessary.
 
Wouldn't a resistor to ground just keep the non-inverting input at ground, without any offset?
    Juan
Yes, there will be a 50% chance that the op-amp's own offset will cause a small positive voltage at the output.
If the op-amp's own offset happens to be reversed, the output will tend to stay at zero volts even when there is some voltage across the shunt. This offset can be as high as 2mV.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #285 on: January 06, 2019, 09:47:42 pm »
The other optional resistor goes from the non-inverting input to rail. It needs to be a value that applies about 2mV to the non-inverting input if necessary.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #286 on: January 06, 2019, 11:45:16 pm »
Got it. Thanks.
    Juan

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #287 on: January 07, 2019, 09:16:31 pm »
I was making more measurements and double-checking and I realized there was a ground loop on my setup. The electronic load's current measuring output (an RCA connector, outputs a voltage) was connected to the oscilloscope, ground included. This resulted in a drop through the wires and current going through the scope's ground. This explains the voltage step in transient measurements.
I have only connected the center pin, so current measurements are not accurate, but the rest is. That makes all previous measurements useless. Trap for young players  :)

Attached are the new ones.
Transconductance test, from 0 to about 0.6 A (couldn't do from 0.1A, function generator constraints). Note the 20 mV/div on the blue trace (Q2's base). By the way, how do you calculate gm?

Transient tests turned out way better than before, with 40 uS recovery time. Note the 10mV/div.

     Juan

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #288 on: January 07, 2019, 10:05:23 pm »
Ill have a closer look later, looking better though.
The gm is the ratio of output current to input voltage  using units of amps and volts .
Because of the rather crude design there is expected nonlinearity at low currents which makes the gm difficult to calculate there.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #289 on: January 07, 2019, 10:59:18 pm »
I should have mentioned that it's the change in current to change in input voltage that's used to calculate gm.
The gm still looks low. It's not a real problem, just curious as to why. The TIP35C's arrived today. Ill  do more testing.
It looks like the transient test is only showing the current off side. The current switching slew rate looks slow.
You might not have any control over that.
I drive a large MOSFET directly with my function generator via a buffer amplifier although this is not totally necessary.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #290 on: January 08, 2019, 01:34:46 am »
The ST TIP35C's from Utsource have current gain of all close to 100 @ 1 amp.
My ST BD137's have current gain of about 500. This likely explains why I measure a higher gm.
It is 25 when tested with a 0.1A to 0.6A ramp. I used a resistor to create the 0.1A load.
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #291 on: January 09, 2019, 02:29:09 am »
To see how the gm affects load transient response, I reduced it to 5 by increasing R4 to 220Ω.
For the 0.5A test, the voltage dip increased from 120mV to 200mV and the recovery time stayed within 20µs.
A gm of over 15 is adequate.
I can tweak the compensation to reduce the recovery response to 50mV and 2µs. I'd rather leave it on the sluggish side to be safe.
My Agilent U8002A dips by 75mv and has 30µs recovery time, but it has a larger output capacitor.

HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #292 on: January 09, 2019, 03:05:39 pm »
 I can try to do transient measurements using a MOSFET and some resistors, instead of using the electronic load, which may be too slow. I can order more transistors and try them out. I'll also try a couple things more and finish off the PCB.
P.D I am back to being a full-time student, so I can't spend much time on this, mainly only on the weekends.
    Juan

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #293 on: January 09, 2019, 04:59:04 pm »
I can try to do transient measurements using a MOSFET and some resistors, instead of using the electronic load, which may be too slow. I can order more transistors and try them out. I'll also try a couple things more and finish off the PCB.
P.D I am back to being a full-time student, so I can't spend much time on this, mainly only on the weekends.
    Juan
Don't bother with getting more transistors. You could just measure the current gain of the ones you have.
You might have mentioned that the CV reference range is 0V to 1.1V? the spare op-amp could be used to amplify it.
The reference range for the CC side can be compensated for by changing one resistor, the 470K,
 
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #294 on: January 09, 2019, 07:02:42 pm »
Quote
Don't bother with getting more transistors. You could just measure the current gain of the ones you have.
You might have mentioned that the CV reference range is 0V to 1.1V? the spare op-amp could be used to amplify it.
The reference range for the CC side can be compensated for by changing one resistor, the 470K, 
Ok I'll measure that too.
PWM goes from 0-5V, so CC and CV references go from 0 to 5 V.
ADC reference is 1.1  V.
    Juan

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #295 on: January 13, 2019, 10:42:53 pm »
I have measured some of my BD135 with my cheap DMM's transistor tester. They all have a gain of about 170 at room temperature.
I have also done the transient test using a resistor load switched by a MOSFET driven from the function generator. Results attached, current ON and current OFF responses are superimposed, so they fit on the same screenshot. Output voltage was set to 5 V to reduce power disipation on the poor little resistors. Modifying output voltage didn't noticeably change the response. Current is either 0 or 0.5 A, at 50 Hz.

I have also done some experimenting with the current measuring circuit, while it does work, it has some offset that affects low current measurements. I'll do some more testing on that.

I also have to do some work on PWM filtering. PWM frequency will be about 2 kHz and from 0 to 5 V. I have tried a two-stage low-pass filter with no noticeable ripple on the output with about a 500 K load. I'll have to do some work on this.
    Juan

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #296 on: January 14, 2019, 01:33:56 am »
I have measured some of my BD135 with my cheap DMM's transistor tester. They all have a gain of about 170 at room temperature.
I have also done the transient test using a resistor load switched by a MOSFET driven from the function generator. Results attached, current ON and current OFF responses are superimposed, so they fit on the same screenshot. Output voltage was set to 5 V to reduce power disipation on the poor little resistors. Modifying output voltage didn't noticeably change the response. Current is either 0 or 0.5 A, at 50 Hz.

I have also done some experimenting with the current measuring circuit, while it does work, it has some offset that affects low current measurements. I'll do some more testing on that.

I also have to do some work on PWM filtering. PWM frequency will be about 2 kHz and from 0 to 5 V. I have tried a two-stage low-pass filter with no noticeable ripple on the output with about a 500 K load. I'll have to do some work on this.
    Juan
Those results are much the same as mine and good to see that the design has little overshoot when unloaded.
The offset is expected and can be compensated for so long as it makes the op-amp want to go positive because it can't go negative.
Some op-amps  need a pull down resistor to help the output go down to the correct voltage to keep the loop closed and in control.
« Last Edit: January 14, 2019, 03:18:13 am by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #297 on: January 15, 2019, 05:15:19 pm »
Quote
Those results are much the same as mine and good to see that the design has little overshoot when unloaded.
The offset is expected and can be compensated for so long as it makes the op-amp want to go positive because it can't go negative.
Some op-amps need a pull down resistor to help the output go down to the correct voltage to keep the loop closed and in control. 

I'll try adding offset and putting in a pull-down resistor. I'll also reduce the gain of the current sense amplifier so I have a bit more room to play with.

I was wondering if PWM from 0 to 5 V would be precise enough to give a consistent output, given that the Arduino and displays are powered from the same 5 V rail. I'll try to route the PCB so drop on the traces is minimum.

Also, to check if the supply is in CV or CC mode, a simple voltage divider on the output of the CC op-amp and going to an analog in would do right? EDIT: You proposed that on an earlier post.

    Juan
« Last Edit: January 15, 2019, 08:48:47 pm by JuanGg »
 

Offline JuanGgTopic starter

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Linear lab power supply
« Reply #298 on: January 15, 2019, 09:06:50 pm »
This is how the PCB is doing. I have changed the SOIC footprints to DIP so it's easier to test different op-amps or whatever. I also added the current amplifier right next to the shunt and the voltage divider that monitors the CV CC modes. I have moved things around a bit and added two 5 V current paths, one for a connector to the displays and another one just for the arduino itself. PWM filtering is still pending.
    Juan

Offline xavier60

  • Super Contributor
  • ***
  • Posts: 2959
  • Country: au
Re: Linear lab power supply
« Reply #299 on: January 15, 2019, 09:12:53 pm »
My other bench supply project uses filtered 32Khz PWM from a PIC16F1938 powered from a TL431 controlled regulator.
I didn't worry about load variations because I used an LCD character display.
A simple solution for your project would be to use a TL431 controlled regulator and sense the 5V rail voltage at the VDD pin of the micro-controller.
« Last Edit: January 16, 2019, 02:58:20 am by xavier60 »
HP 54645A dso, Fluke 87V dmm,  Agilent U8002A psu,  FY6600 function gen,  Brymen BM857S, HAKKO FM-204, New! HAKKO FX-971.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf