Author Topic: Power supply design based off #224 eevblog  (Read 3997 times)

0 Members and 1 Guest are viewing this topic.

Offline Alex30Topic starter

  • Regular Contributor
  • *
  • Posts: 197
  • Country: au
Power supply design based off #224 eevblog
« on: August 21, 2014, 02:27:28 pm »
Hey all, first post so hopefully this is the right section.

I was interested in building a power supply based off of Dave's basic design (before he added all that fancy micro controller stuff) as a basic current limiter and voltage adjust with a pot is all I need.  I have tried to reproduce Dave's circuit sketch in LTspice (project attached) but I am having some problems as the output voltage and current is incorrect and I can't work out why. I'm a bit new to these techniques and the software, so either I have misinterpreted Dave's sketch or I have not used LTspice correctly.

I had some success by using the standard default part with parameters set, instead of just typing in the desired capacitance or selecting generic opamp units. This means that some of my capacitance varies as I wasn't able to select a capacitor smaller than 1u.

Any help here would really be appreciated as I feel like I have a decent understanding of how this circuit works but I can't reproduce it.

Thanks
« Last Edit: August 21, 2014, 02:57:17 pm by Alex30 »
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Power supply design based off #224 eevblog
« Reply #1 on: August 21, 2014, 02:46:16 pm »
You can post the asc files if you zip them. This will make it easier for people to help.

Your op amps seem to have the power rails connected reverse. Maybe that will fix it.

Also IN5818?? you need a voltage ref.

« Last Edit: August 21, 2014, 02:52:37 pm by HackedFridgeMagnet »
 

Offline Alex30Topic starter

  • Regular Contributor
  • *
  • Posts: 197
  • Country: au
Re: Power supply design based off #224 eevblog
« Reply #2 on: August 21, 2014, 02:53:54 pm »
Ah, the weird way ltspice rotates and mirrors caught me out there, thanks. But it didn't seem to fix the problem. Uploaded the asc as you said.

Thanks for your help this seems like a really good community, I will probably spend some time here.

EDIT
Oh yeah those resistors meant to represent the sliders are actually not set up in an equivalent way to the example, but I don't think that should matter?
« Last Edit: August 21, 2014, 03:21:58 pm by Alex30 »
 

Offline Alex30Topic starter

  • Regular Contributor
  • *
  • Posts: 197
  • Country: au
Re: Power supply design based off #224 eevblog
« Reply #3 on: August 21, 2014, 04:09:17 pm »
Also IN5818?? you need a voltage ref.

Dave's schematic included a zener diode at that point, I assumed it was for voltage limiting so I just selected a high voltage so that it wouldn't affect my initial voltage adjustments. Do I really need a voltage ref? Can't I just sample the voltage at the output of the first opamp? If I do, how do I wire that one up considering the trim shown in the typical circuit does not exist in the same fashion with this circuit?
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Power supply design based off #224 eevblog
« Reply #4 on: August 21, 2014, 11:48:28 pm »
But IN5818 is a shottky diode not a zener.

You want a 2.5 volt reference here, to enable a comparison between it and your output voltage. A Shottky will not breakdown to provide this voltage.

I changed your sim a bit. Just to get it to sort of work, hope this helps.





 

Offline Alex30Topic starter

  • Regular Contributor
  • *
  • Posts: 197
  • Country: au
Re: Power supply design based off #224 eevblog
« Reply #5 on: August 22, 2014, 09:29:57 am »
Thanks a lot for that hacked fridge you sent me on the right track there. I managed to get it working perfectly and have modified it into a 12v 2a supply.

Some of the things that I had wrong\needed to fix
1. The LT1001 was a bad opamp to use and was giving anomalous results, I think it may be due to the 7V typical offset voltage
2. The gain resistors on the voltage adjust opamp did not provide enough gain, ie 12k resulted in 1.2V gain, so this could be changed to about 50k for a 6V supply or 110k for a 12v supply
3. I had my reference voltage all confused so thanks for fixing that for me
4. A few resistors needed slight adjustment to odd values to compensate - I think having calibration pots on the board may be a great idea for this project
5. My 20mA load was on the wrong way (doh!)
6. Set minimum current limit at ~40mA to ensure minimum 20mA loading for the LT3080 (which reminds me the load needs to be 40mA now that there is two of the 3080's)

Also I am still getting some odd behavior from setting my pots at different levels when I run the sim. For example I set my pot to deliver 12V, runs fine, then reset to deliver 1V, runs fine, then I set it to deliver 6V and the opamp refuses to deliver any power. I think its just a bug in the program as there is no logical reason why it wouldn't work.

Anyway I have attached a screenshot and the project again for anyone who is interested. Please note though that most of the caps are wrong values as I couldnt find the right package in LTspice.
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: Power supply design based off #224 eevblog
« Reply #6 on: August 22, 2014, 12:03:41 pm »
Lol Alex30.

It seems strange to me that you can deal with LTSpice which is not easy but are missing a few of the fundamentals of electronics.
I dont mean to be disparaging either, keep trying, you will learn this stuff.

Quote
LT1001 was a bad opamp to use
Yes some op amps have borked models in LTSpice but I would imagine the LT ones would be ok. But hey at least it is an opamp. LT1017 is not a useful replacement as it is a comparator and not an opamp.

The difference between these two is not always that great.
An opamp is meant to operate in it's linear region and has good linearity over it's operating range. So is used to accurately amplify differences.
Whereas a comparator is meant operate as a switch, thus has very high gain but not as good linearity.
In many places you can use one instead of the other, in many places you shouldn't.

I am guessing U1 and U2 need to go back to opamps and you may get 6 volts.

Quote
7V typical offset voltage
Better read that datasheet again. That number is too high for an offset voltage.


 

Offline Alex30Topic starter

  • Regular Contributor
  • *
  • Posts: 197
  • Country: au
Re: Power supply design based off #224 eevblog
« Reply #7 on: August 22, 2014, 12:57:05 pm »
Mate, you got me. I am actually more into micro controller programming and have done a couple of projects where I've written code from the ground up for POV LED arrays and such, so the electronics side is definitely not my expertise, which is why I'm here! I am also quite new to using opamps and using ltspice (which I picked up yesterday) so I didn't notice they were comparators as they look the same, so cheers for pointing that out.

I will keep you updated on how I go! :)

EDIT
I am guessing U1 and U2 need to go back to opamps and you may get 6 volts.
I actually want 12V :)
« Last Edit: August 22, 2014, 01:00:04 pm by Alex30 »
 

Offline MrsR

  • Regular Contributor
  • *
  • Posts: 118
  • Country: au
Re: Power supply design based off #224 eevblog
« Reply #8 on: August 22, 2014, 02:28:40 pm »
Mate, you got me. I am actually more into micro controller programming and have done a couple of projects where I've written code from the ground up for POV LED arrays and such, so the electronics side is definitely not my expertise, which is why I'm here! I am also quite new to using opamps and using ltspice (which I picked up yesterday) so I didn't notice they were comparators as they look the same, so cheers for pointing that out.

I will keep you updated on how I go! :)
Quote

Bit confused if you can write MCU instructions why not just use Daves schematic.
KISS is important and it could be simplified a far bit.
Keep at it and in spice you can just change the values of the Caps. right click on them and put in the value you want 1nf,.01nf, 100pf, all work as examples and you can put spice commands in to step the values of your pots.
Dave did a video on Temp variations IN LTSPICE IV this is a good example on simple spice commands.
HAVE FUN :-+






 

Offline Alex30Topic starter

  • Regular Contributor
  • *
  • Posts: 197
  • Country: au
Re: Power supply design based off #224 eevblog
« Reply #9 on: August 22, 2014, 02:42:06 pm »
Well that did the trick, it's really working well now in the sim - gonna start ordering parts soon.  Attached is a few graphs that I produced (for testing purposes) by isolating the voltage set and current set from the feedback loop (by driving the voltage separately)

The first two graphs shows a 6ohm load and the current limiter is turned from 0->full. The top graph shows the application of the current load and the resultant voltage changing to match the limit, the second one shows the current sense changing nicely as the current set is increased.

The last two graphs show the current limiter set at 0.75V which translates to 1.5A (as it is doubled due to the 0.5ohm reference resistor) while the voltage set is turned from 0->full. The third graph shows the load power rising nicely and being chopped off at roughly the right point. The fourth graph shows the current sense rising as the power is increased and then being shunted through the current limiter @ roughly 0.75V.

Unfortunately its a bit hard to simulate the current limiter kicking in under normal conditions as the sim just goes into an infinite feedback loop so you have to end the simulation manually (which is why it was better to isolate the voltage set and current set like I did for testing)

Pretty happy with it, who says I can't do electronics :P (Thanks to Dave)

Bit confused if you can write MCU instructions why not just use Daves schematic.
KISS is important and it could be simplified a far bit.
Keep at it and in spice you can just change the values of the Caps. right click on them and put in the value you want 1nf,.01nf, 100pf, all work as examples and you can put spice commands in to step the values of your pots.
Dave did a video on Temp variations IN LTSPICE IV this is a good example on simple spice commands.
HAVE FUN :-+

Because including the MCU units is actually more complicated than just having pots, it's adding another framework onto it (for better accuracy) that I just don't need. Plus I wanted to set myself a goal of controlling the unit with analog only (except the displays). Thanks for the info anyway mate!
« Last Edit: August 23, 2014, 02:25:39 am by Alex30 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf