Author Topic: Trying to build a supply with pwm dac, no 0 though  (Read 1779 times)

0 Members and 1 Guest are viewing this topic.

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Trying to build a supply with pwm dac, no 0 though
« on: December 02, 2021, 10:11:36 pm »
Hello,
insipred by the uSupply I am trying to build a 0-10V supply, just for fun.
My idea is to use, in this phase, an LT3080, but to regulate voltage I want to use a pwm dac. Why? Just to experiment. don't need precision.
The schematic I'm using is in 1339970-0 (Please excuse the crudity of this model. I didn't have time to build it to scale or paint it)

So I hooked up my arb with a sqw (tried 1 to 100kHz, all worked) 5V pp (with 2.5V dc offset) and tried the output. All is good until the lower bound: once I reach 1.7V the output gets "stuck" meaning that no matter how much I reduce the pwm duty cycle (or even hooking the input to GND) the output does not get lower than 1.7V. The arb is on high impedance (not 50R) and I actually don't know what's wrong…

One other thing I notice is that sometimes when booting up the circuit, if I'm not careful and don't switch the pwm first, the output is 9V and no matter the pwm that does not change.
So I know I'm doing many things wrong, can you help me plz?

EDIT: prettied a bit the attachment
« Last Edit: December 04, 2021, 10:21:42 am by Moriambar »
 

Offline drdm

  • Contributor
  • Posts: 31
  • Country: bg
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #1 on: December 03, 2021, 01:28:45 pm »
Check the voltage on the SET pin.
I don't think your amp is rail-to-rail, so even if you apply 0% PWM at the input, the output of the amp may not reach 0V.
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #2 on: December 03, 2021, 01:42:30 pm »
Check the voltage on the SET pin.
I don't think your amp is rail-to-rail, so even if you apply 0% PWM at the input, the output of the amp may not reach 0V.
Ok I'll try later, but I used a 358 just as Dave uses on his uSupply schematic (although he uses a real dac for the set pin).
it should go down to 0 iirc, perhaps not going to the upper rail but I think it should go down to 0.
I'll check for good measure though, maybe there's something there
thanks
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: ca
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #3 on: December 03, 2021, 07:43:51 pm »
Like drdm said, the LM358's output won't go all the way to ground. It'll get close, but not all the way to zero, depending on how much current it is trying to sink.
Your other problem will be that the LM3080 needs a minimum 1ma load. Quote from datasheet:
Quote
A minimum load current of 1mA is required to maintain
regulation regardless of output voltage. For true zero
voltage output operation, this 1mA load current must be
returned to a negative supply voltage.

The LM334Z in your circuit is set for apx 0.64ma with a 100 \$\Omega\$ resistor. The resistor should be less than 64 \$\Omega\$ so it sinks 1ma or more. But the other problem with the LM334Z is that it won't maintain current regulation at 1ma with less than apx 1V across it. So that'll be another problem that will crop up with that circuit.
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #4 on: December 03, 2021, 07:55:33 pm »
Thanks. I'm actually curious on how Dave's design could work then down to 0V…
What is the magic sauce that makes that possible?
ps: btw the lm358 only goes down to about 1V with "pwm" input hooked straight to gnd
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: ca
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #5 on: December 03, 2021, 11:02:41 pm »
It is possible that the LT3080 is oscillating due to layout issues, especially if you've mocked it up on a breadboard, or because the 2.2uF cap doesn't have a low enough ESR. Have you checked the LT3080 with a scope for oscillations?
One thing to try would be to remove the LT3080 from the circuit and check to see that the LM358 behaves as expected.

Dave's circuit works, but probably only down to 50-100mV or so, which is good enough for most scenarios. It would also depend if the load attached to the supply would satisfy the minimum load requirement by itself. Plus, the 1ma spec (LT3080 loading) just means that the manufacturer won't guarantee that the output will follow the input within tolerance if the load is lower. ie: It'll work, but the output voltage might be a bit higher than expected.
« Last Edit: December 03, 2021, 11:37:32 pm by Kim Christensen »
 

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #6 on: December 03, 2021, 11:19:52 pm »
It is possible that the LT3080 is oscillating due to layout issues, especially if you've mocked it up on a breadboard, or that the 2.2uF cap doesn't have a low enough ESR. Have you checked the LT3080 with a scope for oscillations?
One thing to try would be to remove the LT3080 from the circuit and check to see that the LM358 behaves as expected.
no oscillations whatsoever, the voltage is perfectly regulated. I think I remember dave also breadboarding this circuit or a variant of his, without any problems.
 

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #7 on: December 04, 2021, 09:42:51 am »
ok, adding a 1k on the output allowed me to go low enough (0.0xxV) to call it 0. Still don't know how Dave planned his version to go to 0V...
Do you think that adding a mosfet to switch in this 1k when Vprogrammed<=2V could be good? What am I missing that allowed the og design to go to 0? that's what bothers me the most

Thanks
 

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3322
  • Country: nl
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #8 on: December 04, 2021, 09:58:23 am »
Start by numbering your parts.

I have no interest of referring to "That 1k resistor on the output of the second IC from the right".

Edit.
Ah, new schematic with ReDes' included. Much better.
« Last Edit: December 04, 2021, 12:16:58 pm by Doctorandus_P »
 
The following users thanked this post: tooki, Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #9 on: December 04, 2021, 10:23:05 am »
Start by numbering your parts.

I have no interest of referring to "That 1k resistor on the output of the second IC from the right".
you're absolutely right. Low effort post. I thought it was a blatant mistake and that it would be apparent to you guys.
Regardless, I corrected the attachment in the original post, now it's a bit better

I hope you can help me now.
cheers :)
 

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3322
  • Country: nl
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #10 on: December 04, 2021, 01:00:02 pm »
I'm not very familiar with the LT3080, but a peek at it's datasheet mentions a minimum load of 0.5mA. (Reference Buffer, Page 19). I assume you added the LM334 for this, but that IC probably stops working properly when it's voltage gets too low.

Same is also true for the LM358. It also has some trouble with low output voltages. You could add a resistor between it's output and GND (or lower the impedance of R4, R5, R6) to pull it to GND "harder", but it quickly becomes a comprise between the ability to lower the minimum output voltage, and having a reasonable dissipation at the maximum output voltage.

Designing a power supply (for low output voltages) is much easier if you have an extra negative voltage available.

I also wonder why you added R3. Together with R1 it forms a voltage divider, which means that the opamp has to amplify more, and also amplifies it's input noise. (Which you partially filter out with R7 & C4).

The reason I have never used the LT1080 myself is that I do not find it a very useful IC, and it's too expensive for what it does. If you replace it with a simple NPN BJT in this circuit, (And use feedback direct from the output) then the LM358 never has to control it's output below 600mV.

You loose the current limit of the LT3080, but any decent power supply has an adjustable current limit anyway.

During power-on the LM358 is also not guaranteed to work properly. You need some kind of circuitry that prevents any spurious voltage on the output of the LT3080 during power-up of this power supply.
 

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #11 on: December 04, 2021, 01:19:47 pm »
I'm not very familiar with the LT3080, but a peek at it's datasheet mentions a minimum load of 0.5mA. (Reference Buffer, Page 19). I assume you added the LM334 for this, but that IC probably stops working properly when it's voltage gets too low.

Same is also true for the LM358. It also has some trouble with low output voltages. You could add a resistor between it's output and GND (or lower the impedance of R4, R5, R6) to pull it to GND "harder", but it quickly becomes a comprise between the ability to lower the minimum output voltage, and having a reasonable dissipation at the maximum output voltage.

Designing a power supply (for low output voltages) is much easier if you have an extra negative voltage available.

I also wonder why you added R3. Together with R1 it forms a voltage divider, which means that the opamp has to amplify more, and also amplifies it's input noise. (Which you partially filter out with R7 & C4).

The reason I have never used the LT1080 myself is that I do not find it a very useful IC, and it's too expensive for what it does. If you replace it with a simple NPN BJT in this circuit, (And use feedback direct from the output) then the LM358 never has to control it's output below 600mV.

You loose the current limit of the LT3080, but any decent power supply has an adjustable current limit anyway.

During power-on the LM358 is also not guaranteed to work properly. You need some kind of circuitry that prevents any spurious voltage on the output of the LT3080 during power-up of this power supply.
Hi.
What I'm trying to do, as I stated in my first post is to do something like a "poor man's version" of the uSupply by Dave. He uses a DAC to control the output and, iirc, he stated the product could go to 0V.

I want to try the pwm dac which was his original idea and which he implemented as the current limit circuit, and he basically has the pwm filtered so that it becomes more or less an analog voltage.
Right now I cannot see how he could manage to have this set up (the schematic is linked in the first post) go down to 0V. He doesn't use a split supply.

Idk, perhaps I should abandon this idea altogether since it seems that maybe Dave was wrong in some way, or that the "rest of the circuit" (idk how though) magically loads the output by its minimum requirements.
thanks
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: ca
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #12 on: December 04, 2021, 06:28:12 pm »
Quote
Do you think that adding a mosfet to switch in this 1k when Vprogrammed<=2V could be good?
It would work, but simply replacing the LM358 with better Op-Amp would be a more elegant solution.

Quote
What am I missing that allowed the og design to go to 0? that's what bothers me the most
The LM358 is manufactured by many vendors and has various versions (LM358A, LM358B, etc) which all perform differently, especially when pushed to their limits:
You can see this on TI's LM358 datasheet here https://www.ti.com/document-viewer/LM358/datasheet
For the B version they state that it's output can sink 50uA and the voltage shouldn't exceed 150mV.
But for the A version, they don't spec it that way at all. There they state 25mV max for RL ≤ 10 kΩ (RL is between the output and ground) so the output is not sinking any current at all for that spec.

I suspect the LM358 which Dave used was a different version/vendor than the one you have tried. Try a different one if you have one in your junk box and see what happens.
« Last Edit: December 04, 2021, 07:42:34 pm by Kim Christensen »
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #13 on: December 04, 2021, 11:36:18 pm »

It would work, but simply replacing the LM358 with better Op-Amp would be a more elegant solution.
cool, do you have a suggestion? I tried all of the op-amps in my bin but nothing gave me the expected result

Quote
The LM358 is manufactured by many vendors and has various versions (LM358A, LM358B, etc) which all perform differently, especially when pushed to their limits:
You can see this on TI's LM358 datasheet here https://www.ti.com/document-viewer/LM358/datasheet
For the B version they state that it's output can sink 50uA and the voltage shouldn't exceed 150mV.
But for the A version, they don't spec it that way at all. There they state 25mV max for RL ≤ 10 kΩ (RL is between the output and ground) so the output is not sinking any current at all for that spec.

I suspect the LM358 which Dave used was a different version/vendor than the one you have tried. Try a different one if you have one in your junk box and see what happens.

thanks, I'll try some of the others 358 I have, but I strongly suspect they're all 358N from the same manufacturer

cheers
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: ca
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #14 on: December 05, 2021, 05:31:00 am »
Ok, I mocked up your Op-Amp circuit on a breadboard with some old LM358s from my junk box. I powered it from 10Vdc and replaced the LT3080's SET input (pin 2) with a 1MΩ resistor to Vcc to simulate a 10uA source. I also tried it with a 100KΩ resistor to simulate the Lm358 sinking 100uA. The voltage measured on pin 1 of the LM358 are listed in the table below:
Part         Manufacturer    100K     1M
LM358P   TI                     0.43V    27mV
LM358N   Motorolla          0.36V    24mV
LM358N   National Sem    0.42V    42mV
M358       Mitsubishi         0.46V    21mV
So I think there is either something wrong with your OpAmp, your circuit wiring, or maybe the high reverse leakage current of D2 (unknown schottky) is messing things up...
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #15 on: December 05, 2021, 08:27:02 am »
Ok, I mocked up your Op-Amp circuit on a breadboard with some old LM358s from my junk box. I powered it from 10Vdc and replaced the LT3080's SET input (pin 2) with a 1MΩ resistor to Vcc to simulate a 10uA source. I also tried it with a 100KΩ resistor to simulate the Lm358 sinking 100uA. The voltage measured on pin 1 of the LM358 are listed in the table below:
Part         Manufacturer    100K     1M
LM358P   TI                     0.43V    27mV
LM358N   Motorolla          0.36V    24mV
LM358N   National Sem    0.42V    42mV
M358       Mitsubishi         0.46V    21mV
So I think there is either something wrong with your OpAmp, your circuit wiring, or maybe the high reverse leakage current of D2 (unknown schottky) is messing things up...
wow.
first of all thank you for going into so much trouble.
I'll re-recheck the wiring: my LM358N is from fairchild and I have a bunch of them all from fairchild. I tried putting an LM411CN from national Semi and the voltage was a bit lower but kinda the same.
I removed D2 altogether and the result did not change by a single mv. I guess it's the wiring then. I'll try and check later. Thanks for now
 

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 490
  • Country: it
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #16 on: December 05, 2021, 02:33:16 pm »
yeah, of course it was the wiring.
the resistor for the current sink was wired from + to set, and not set to -.
Now everything is good.
thanks for your patience
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1259
  • Country: ca
Re: Trying to build a supply with pwm dac, no 0 though
« Reply #17 on: December 05, 2021, 06:48:19 pm »
Quote
first of all thank you for going into so much trouble.
No problem. Actually, it didn't really take that long to breadboard and test.

Quote
Now everything is good.
Excellent! Good to hear that you got it figured out and working.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf