Feedback and opinions on power supply. - Page 1
Forum section: electronics / projects

author: ahnuts72
author_rank: Regular Contributor
timestamp: September 25, 2013, 01:52:45 am
content: Have been messing around with building my own adjustable supplyfor awhile and don't want to use a lm317 or the likes.Maybe you guys could point out some of the mistakes I have madeand point me in the right direction for some reading material.I have in mind to add as I learn so the next step will be current limitingbut I want to get the constant voltage part right first.Everything I can find only covers linear supplies a little bit then jumps straight to switch mode.This is what I have come up with so far.

author: c4757p
author_rank: Super Contributor
timestamp: September 25, 2013, 01:57:22 am
content: Well, one quick comment before I dig in a bit... if you use a more modern Zener diode, you can use just 5mA and then its resistor won't be so toasty.You can do even better with a bandgap reference like TL431 - smaller current and better temperature performance. But IMHO a Zener is perfectly fine for a simple power supply.OK, two more:What is your planned output current? 2N3055's gain is crap, the op amp isn't going to be able to drive it by itself beyond a modest output. You'll want to have a separate driver transistor.You're going to want a capacitor across R4 to limit the frequency response and keep it from oscillating with a difficult load. If you don't want to go about a full control loop frequency analysis, try about 100pF to start.How did you draw this? Those curved corners are weird...

author: ahnuts72
author_rank: Regular Contributor
timestamp: September 25, 2013, 02:47:20 am
content: Thanks for the reply.I knew some things would be wrong but I wanted to see if I coulddo one off the top of my head from what I could find to read up onwithout looking at a schematic.The 1N751 was the first 5 volt reference I came to I wanted around20 volts out so 5 volts made it easy to set the gain on the op-amp.The 2N3055 was one of the transistors I remembered reading aboutwhen I was reading all I could find on linear supplies.I haven't looked at any of the datasheets for anything yet.I wasn't sure if I would need compensation or not haven't found awhole lot to read about it so I'm still kinda iffy on the subject.I would like around 2 amps output current should be enough for anythingI would do for now,my 1 amp supplies will work for anything elseand if I need more later it will be an excuse to make one with more output.I learn so much better hands on and making mistakes not just reading from a book.I used circuit wizard to draw the schematic.

author: c4757p
author_rank: Super Contributor
timestamp: September 25, 2013, 02:52:06 am
content: 2N3055's gain can go as low as20- so 100mA in for 2A out. Your LM741 will either flip you the bird or blow up. Watch out - even the driver transistor will get pretty warm at that current, you'll want some sort of small heat sink for that (or just share with the 3055). You could also, of course, use a ready-to-use Darlington like a TIP120. Try a BZX85C5V1 for the Zener diode - it only needs 5 mA, so you can use a 3.3k resistor and it will only dissipate 95 mW.

author: ahnuts72
author_rank: Regular Contributor
timestamp: September 25, 2013, 03:20:34 am
content: So using the tip120 I would only need 2mA of base current to get 2 amps out correct?If I'm reading the datasheet right.I just found this while googleing(?).http://people.eecs.ku.edu/~callen/501/LinearRegulators.pdfI was just curious if you could have a look and see if the information init would be good to read to get a better understanding of linear regulators.

author: dannyf
author_rank: Super Contributor
timestamp: September 25, 2013, 10:29:16 am
content: You are essentially recreating a 3-terminal voltage regulator, without the various protection mechanism.The site linked to uses essentially the same topology as yours does. The difference is that yours is a fixed gain error amplifier and the other is a variable gain amplifier.Otherwise identical.

author: dannyf
author_rank: Super Contributor
timestamp: September 25, 2013, 11:32:32 am
content: QuoteIf you are going to use a tl431, you might as well eliminate the opamp: the tl431 is a far better error amp than the opamp anyway.

author: c4757p
author_rank: Super Contributor
timestamp: September 25, 2013, 11:37:50 am
content: True, but they are often a good bit harder to stabilize, and op amps are cheap, so I figured it would be easier for him to continue using this method.

author: KJDS
author_rank: Super Contributor
timestamp: September 25, 2013, 12:49:23 pm
content: The 2n3055 is a useful device, cheap and plentiful, however it's gain is poor. Whilst the datasheet tells you it could be as low as 20 in the headline section, and that it can be used up to 15A, it's worth noting that the current gain at 15A is 3, yes THREE, and this falls as it heats up, which it will do. Don't try and use them above 5A and circuits generally work better driven by a 2n3053 or another 2n3055 to provide some decent gain.

author: dannyf
author_rank: Super Contributor
timestamp: September 25, 2013, 12:51:48 pm
content: What about a mosfet?

author: c4757p
author_rank: Super Contributor
timestamp: September 25, 2013, 12:58:28 pm
content: I'm always a bit nervous to use them in linear applications to dissipate a lot of heat. I'm sure that's a bit unfounded, I've never really had trouble with it... but I'm usually more comfortable using a chunky BJT, since they're usually designed for that kind of thing.

author: ahnuts72
author_rank: Regular Contributor
timestamp: September 25, 2013, 01:10:28 pm
content: Thanks everyone.From what I've read so far the Darlington pair seems the way to go for now.Im trying to get to where I can make one without having to just use a pre-made schematic.Im just trying to build it a little bit at a time so I understand the theory as I go.All your replies ate appreciated.Sent from my Milestone X using Tapatalk 2

author: ahnuts72
author_rank: Regular Contributor
timestamp: September 25, 2013, 01:57:30 pm
content: Quote from: dannyf on September 25, 2013, 10:29:16 amIs one topology better than the other or is it just personal preference.Sent from my Milestone X using Tapatalk 2

author: zapta
author_rank: Super Contributor
timestamp: September 25, 2013, 04:18:34 pm
content: Quote from: dannyf on September 25, 2013, 10:29:16 amIt's like paining a sunset. Was done by others thousands of times but is still interesting.

author: dannyf
author_rank: Super Contributor
timestamp: September 25, 2013, 05:46:40 pm
content: Most 3-terminal regulators are of variable gains.1. Some opamps are not stable at low gain levels. If they are used, they have to be in a fixed gain environment;2. A fixed gain set-up allows the output voltage to go below the reference voltage. A variable gain power supply's output cannot go below the reference voltage.

author: ahnuts72
author_rank: Regular Contributor
timestamp: September 25, 2013, 06:57:37 pm
content: Thanks dannyf.Now that you mention it I seem to remember one of the supply designs I was looking at building before I decided to get help designing my own was set up as variable gain and it said it would not go below the reference voltage.That's my main problem I can read about something but if I don't use it right away I sometimes forget it.When I get home I'll try to put everyones suggestions in a new design and see if its any better.Sent from my Milestone X using Tapatalk 2

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 03, 2013, 09:29:10 pm
content: Been reading a lotand was confident enough to try the C/C side.I know its prob not exactly right or the most elegant.Any feedback would be appreciated.

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 05, 2013, 03:02:48 am
content: Obviously I need to read more on the current limiting side.Any good books on the subject?

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 05, 2013, 04:43:41 pm
content: No one has any opinions either way good or bad?Sent from my Nook HD

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 26, 2013, 02:29:45 am
content: I got the constant voltage working ok and thought I would get the arduino out and practice with it as well.Here's the supply set at 12.03 volts by my dmm and the arduino is measuring the output of the supply as well.

author: minime72706
author_rank: Frequent Contributor
timestamp: October 26, 2013, 03:05:14 am
content: I only read the first few posts before having the urge to post this general advice, so if it was already spelled out, sorry!A general rule of thumb is that beefy transistors, if they're not something like a Darlington pair or something similar, are going to have awful gain. From what I understand about semiconductor physics, this is because the device has to be physically large to have the ability to tolerate such high current. One major rule of BJT performance is that the base region has to be AS NARROW AS POSSIBLE. Making a transistor big and beefy kind of breaks that rule. The reason the length of travel of the base (and it's doping concentration) is important is that the longer a charge carrier has to spend in this region and the more dopant atoms it might encounter increases the chances that it will recombine and be lost as a current carrier. "alpha", a performance term directly related to beta, basically spells out the "base transfer efficiency" (I think that's the actual technical term), which is the probability that an electron (or "hole") flowing from collector to emitter will make it through without recombining.This might be too much information, but it's something worth knowing in general.

author: edavid
author_rank: Super Contributor
timestamp: October 26, 2013, 04:54:34 am
content: Quote from: ahnuts72 on October 03, 2013, 09:29:10 pmDon't make the current amp fight the voltage amp... you also need a diode on the voltage amp output, and a separate pullup resistor. Good time to put in the driver transistor also.

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 26, 2013, 04:58:56 am
content: The 2n3055 is what i started with I'm using a tip120 on the breadboard.I also have a tl431 to change to instead of the zener.

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 26, 2013, 05:43:00 am
content: Maybe something like this?It seems to work in the simulations anyways.

author: edavid
author_rank: Super Contributor
timestamp: October 26, 2013, 02:26:24 pm
content: Quote from: ahnuts72 on October 26, 2013, 05:43:00 amNo, the diode for the voltage amp is going the wrong way. You want either the voltage amp or the current amp to be able to reduce the output voltage (like an AND gate).

author: edavid
author_rank: Super Contributor
timestamp: October 26, 2013, 02:29:44 pm
content: Quote from: dannyf on September 25, 2013, 12:51:48 pmIt's not a good idea for this type of linear regulator, because the VGSof a MOSFET is much higher than the VBEof a bipolar. Either your dropout voltage becomes higher, or you need an additional supply voltage.

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 27, 2013, 07:54:09 pm
content: Ok I decided to scrap the current limit from scratch until I understand it more.I decided to do an earlier version of Dave's supply so I could follow the videoswhile I went through it.Some of the components have been changed to what I had on hand and thevalues for what I wanted out both voltage and current.Does it look right as of where I'm at now?

author: edavid
author_rank: Super Contributor
timestamp: October 27, 2013, 08:03:20 pm
content: Quote from: ahnuts72 on October 27, 2013, 07:54:09 pmLM324 common mode range doesn't include the positive supply... need to sense current at a lower voltage, or use a different op amp.

author: c4757p
author_rank: Super Contributor
timestamp: October 27, 2013, 08:06:53 pm
content: The inputs won't be that high, though. You only need to select the gain to put the inputsof the amplifierwithin the allowed range.

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 27, 2013, 08:37:20 pm
content: Quote from: edavid on October 27, 2013, 08:03:20 pmI'm just under the max at the worst case scenario according to the datasheet.(Unless I'm reading it wrong.)Ill see when I breadboard it up.

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 29, 2013, 08:53:06 pm
content: Another question.Would this be an acceptable way to switch between taps ona transformer to limit dissipation in the pass transistor.

author: minime72706
author_rank: Frequent Contributor
timestamp: October 29, 2013, 09:14:52 pm
content: Though it's depressing how many ICs that are found throughout a book as old as "The Art of Electronics" (1989), it also means that the book itself is still useful. There may only be a handful of pages and a couple of examples of this particular thing in the book, but it's a nice book to have around. The third edition is coming out early next year (knock on wood), but it's still worth buying the "current" edition. It's 1100 pages so they're obviously going to strip a lot out for the new book (probably almost all of it).

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 29, 2013, 10:15:34 pm
content: Ok a few changes.Changed the voltages at Q2 to lower dissipation when on.Since I will probably be below 10 volts most of the time I changed it so that Q2 was not onunless I'm above 10 volts.After some reading on using op-amps as comparators(Which doesn't seem to be recommended)I have added some things to get the inputs closer together.First pic is before the change to the inputs second id after.Did these changes help or was it ok before?

author: codeboy2k
author_rank: Super Contributor
timestamp: October 30, 2013, 03:44:22 am
content: I'm dizzy.

author: minime72706
author_rank: Frequent Contributor
timestamp: October 30, 2013, 04:02:34 am
content: I don't know if anyone has said it yet, but you should be a little more OCD about your schematics - their readability to complexity ratio is a bit off.

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 30, 2013, 04:37:26 am
content: @codeboy2kYou think your dizzy!I'm still trying to wrap my head around all the ways to use an op-amp.This any better?Ive tried to do it using the ground symbol instead of wiring all the grounds completely tokeep the wire count down but it wont simulate right if I do it that way.The main problem is I keep adding things without wanting to redraw the entire schematic.

author: Alana
author_rank: Frequent Contributor
timestamp: October 30, 2013, 05:28:26 am
content: Been there, seen that, burned few 741s but it was my main bench psu for quite a while. My schematic in attachment.Things i encountered:- it worked but had very crappy regulation- i had to use darlington configuration for this PSU and T2 liked to burn in short circut situations, adding R6 prevented it.- current limiting circut [R1 T3] its said to work but it does not, but ok - it was a "welder" anyway- LM741 burned from time to time tooBasically its crappy begginers attempt to make a PSU that would squeeze out every watt from transformer i had but it served me well for few years. If you want you may kind of "correct my design mistakes". I know what they are but if you want to learn try to debug it.

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 30, 2013, 05:56:03 am
content: I don't know alot.Im just getting to know alot of this stuff but it looks like the opamp is getting 40 volts minus the drop across the diode that seems kind of high.I tried a 741 but couldn't get it to work like I wanted it to.If I remember it wouldn't even come close to the rails so no 0 volts out.Sent from my Milestone X using Tapatalk 2

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 19, 2014, 06:16:09 am
content: Ok I think this is the final version unless any of you EEVBlog gurus find any major flaws.It seemed to work ok on the breadboard but you never know.I wanted to get some feedback before I start laying it out to make the board.

author: dannyf
author_rank: Super Contributor
timestamp: February 19, 2014, 11:55:57 am
content: QuoteThat's the way I do it, but before the rectifier (with center taps similar to yours) + a bridge.

author: edavid
author_rank: Super Contributor
timestamp: February 19, 2014, 04:48:16 pm
content: Quote from: ahnuts72 on February 19, 2014, 06:16:09 amLooks like you made a lot of progress!What is the LED supposed to do? If it's showing current limit, maybe you could just put it in series with the 2N3904 collector.Watch out for oscillation...

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 19, 2014, 11:09:31 pm
content: Thanks for the suggestion.I tried it that way in simulation and it worked OK (but not as good as the way it is now) till I put a dead short across the output and it wouldn't regulate the current down.I have it setup to current limit at 2.5 amps no matter what happens and with the led inline with the 2n3904 it just sets at a little over 2.5 amps no matter what I set the current limit to.I may look at it a bit more see what I can learn about why it behaves that way with the led inline with the 2n3904.It would be nice to do it that way as it will leave a empty opamp to switch the taps on the transformer without me having to add one more to the design.Sent from my CM11 Nook HD+

author: edavid
author_rank: Super Contributor
timestamp: February 20, 2014, 12:26:04 am
content: Quote from: ahnuts72 on February 19, 2014, 11:09:31 pmOK, that makes sense.How about adding another transistor to drive the LED (driven by the same op amp)?

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 21, 2014, 02:48:35 am
content: Ok here's my board any constructive criticism would be greatly appreciated.@edavid it still wont work that way I don't want to source to much current with the opamp if I remember its only good to about 20 ma or so.On another note I have a tl431 would it be worth using it instead of the 1n4733?

author: mariush
author_rank: Super Contributor
timestamp: February 21, 2014, 04:38:06 am
content: Where is that D3 connected in the circuit? Your second circuit shows no pads or holes for it. Oh nevermind, the holes are just far away from the actual graphic.It's not critical but I would put the 100n decoupling capacitor above the U1 marking on the pcb and a bit to the right and route the ground trace from the bottom to the right (traces to R1, R13, R4 could be closer together and under the capacitor footprint)The board just looks like a mess, parts unnecessarily moved so that you need to have several segments on traces.. the star ground technique makes sense but why put the join there when you could put it a bit lower and avoid all those traces curving around?As an exercise you could try forcing yourself to put the holes at 0.1" distances, as if you'd put this circuit on a prototyping board ... would

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 21, 2014, 05:53:10 am
content: Is this any better?.Am I going in the right direction?

author: tree
author_rank: Regular Contributor
timestamp: February 21, 2014, 06:08:08 am
content: Quote from: c4757p on September 25, 2013, 02:52:06 amc4757p, you beat me to it!You may also want to build a discrete current source for your zener so that it doesn't drift  as the rail sags at high output current.If you want a true zero output, you will want a negative rail since this op amp doesn't have rail-to-rail output. Even if it did, you would still want a negative rail.You have a gain of 5 (assuming perfectly matched resistors) which provides a maximum output of 5.1V * 5 = 25.5V. Your op amp will saturate by then. I suggest either raising your supply or lowering your gain. Speaking of supply, from where is the 24V derived?Your op amp can't drive that transistor base enough for high output current. You can try the TIP120 (I've used it before and it has a ton of current gain). I will second that heat sink on that transistor.You may also want to try a power MOSFET since that draws ~0A of current. You may run into stability issues, so be careful of how you prototype it (& design it).

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 21, 2014, 06:16:00 am
content: Quote from: tree on February 21, 2014, 06:08:08 amI've changed from the earlier schematics look at the one a couple post back for the new version.I have an tl431 if that would be better than the 1n4733.

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 21, 2014, 11:27:23 am
content: Here's try number 3.I hope it's getting better as I go I really want to at least get passable at the layout of small boards.

author: mariush
author_rank: Super Contributor
timestamp: February 21, 2014, 02:35:16 pm
content: ahnuts, I was thinking more like this:It's still quite ugly, the resistors can be arranged more nicely and the routes can be prettier, but it's just something made up in less than an hour, with very little practice in Diptrace.I only added 3 resistors... R21, R22, R23 are 0 ohm resistors, simply to route the board easier.Also attached the Diptrace project. Note though that I didn't pick the exact sizes for parts, just picked something close enough from the existing models. You'll have to draw the board layout and complete everything if you want to.

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 21, 2014, 03:48:10 pm
content: Thanks mariush I'll study your design compared to mine to see the differences but I can already see what you mean about not so many segments in the traces.I was just trying to do it with no jumpers I don't have a problem routeing the traces its just hard for me to see the optimal layout of the parts to minimize the trace lengths.Sent from my CM11 Nook HD+

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 21, 2014, 10:10:30 pm
content: Some questions on the schematic mariush.The output on the differential amplifier goes nowhere.The positive and the 0 volt side of the bridge are both the same net.And the way c1 is the op-amp wont get any power.Was that intentional or where you leaving that for me to figure out.Closer?

author: edavid
author_rank: Super Contributor
timestamp: February 22, 2014, 12:31:53 am
content: Quote from: ahnuts72 on February 21, 2014, 02:48:35 amI don't understand what you mean... if you use another 2N3904 you would only have to draw maybe 100uA of current from the current sensing op amp to drive it.Surely it's worth some effort to have the LED indicate when you are in constant current mode?

author: mariush
author_rank: Super Contributor
timestamp: February 22, 2014, 01:11:31 am
content: ahnuts72, I made that in DipTrace beta and at some point during the design there were some... let's say conflicts ... with an older DipTrace installation I had, so for some reason some traces are missing in the pictures.Also, I realize now some nets are incorrect but I was more focused on matching the visual look of your circuit, not to actually have that working.. as i said the component footprints are not accurate.I apologize if I confused you or gave you a hard time.btw.. In your last schematic there's no input voltage going into U1.

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 22, 2014, 01:30:58 am
content: Quote from: mariush on February 22, 2014, 01:11:31 amThanks for noticing U1.Not a problem I just wasn't sure if you where trying to make me think or not I don't want to be spoon fed the answers won't learn anything that way.I'm very much a hands on learner I can half way get it from reading but until I actually attempt to do it the "That's how it works" light stays a little dim.Do you have any opinions on using the tl431 for my 5 volt reference instead of the zener diode?@edavidIt already shows when I'm in current limit the way its set up now the only reason to change it is to get the op-amp free to use to switch transformer taps.This is based entirely on Dave's first design and I'm sure he had a reason for doing it that way that I can't fathom at my current knowledge level.I'm gonna leave it as it is for now as this is just a learning experience I'll change it after I have this one up and running.I'm still thinking about using a pre-regulator instead of the tap switching to limit dissipation in the pass transistor but I want to pace myself a little bit.

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 23, 2014, 02:44:54 am
content: Here's the next iteration if no one can see any glaring errors this is the one I'm gonna etch.Also would it be worth using the tl431 over the zener since I'm not using any other precision parts?

author: tautech
author_rank: Super Contributor
timestamp: February 23, 2014, 03:25:23 am
content: 5 traces coming from under a DIP.... are you confident you can etch that?

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 23, 2014, 03:32:16 am
content: Yeah I've etched them that small before just have to make sure to soak it long enoughto soften the paper enough not to lift the toner and be very gentle rubbing the paper off.All the normal stuff extra clean copper,even pressure with the heat etc.

author: tautech
author_rank: Super Contributor
timestamp: February 23, 2014, 03:38:37 am
content: C1 should always be close to VCC pln 4 on IC

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 23, 2014, 03:44:01 am
content: I think I can move it on top without to much hassle.Other than that any comments on using the tl431?any better than the zener I'm using now in this circuit.

author: tautech
author_rank: Super Contributor
timestamp: February 23, 2014, 03:59:40 am
content: I would suspect the TL431 is less noisy than a Zener and a better choice for a Ref. You might need a trimmer to adjust it.

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 23, 2014, 04:03:36 am
content: I already set the tl431 up on one of my small breadboards to see if it was good it was a pull part.I set the vref side up for 5 volts and let it run for an hour and it only changed buy a couple millivolts so it should be alright.I'll add it to the next version then.

author: tautech
author_rank: Super Contributor
timestamp: February 23, 2014, 04:11:09 am
content: Got a scope? Check each working for noise, before and after op amp and at PSU output.

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 23, 2014, 04:50:16 am
content: Yeah I have a scope it seemed alright on the breadboard I'm going to etch the board in the morning I'll give it a good once over when its assembled.Sent from my CM11 Nook HD+

author: tautech
author_rank: Super Contributor
timestamp: February 23, 2014, 06:27:01 am
content: To make your Schematic and PCB easier to follow/compare have your program display the part designator (R1,C5 etc) on the schematic.It is much easier to route a single sided board if you do it mostly as SMD and use some through hole components like/as jumpers.What AC voltage will supply the PSU?Ensure good physical separation between any components that will get warm and any that are temperature sensitive.(Electrolytics, Vref etc)

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 23, 2014, 07:23:03 am
content: Yeah I had them on there but I hid them so I could see the board better I just forgot to unhide them when Imade the picture.Changed now.I have a 15-0-15 volt main secondary with also smaller 8 and 12 volt taps from a big home theater amp gonna use itso I can power my meters from it as well.The tip 120 is going on a big heatsink I have the bridge may go on one as well depends on how warm it gets though.

author: tautech
author_rank: Super Contributor
timestamp: February 23, 2014, 07:34:22 am
content: The 30V rectified and smoothed will exceed Vmax of the op amp

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 23, 2014, 07:38:37 am
content: Yeah that dawned on me after I posted I have another that is 20 volts non center tap I think been awhile since I measured that I can use I'll just have to use one of thesmall 10 volt ones I have to power my meters.

author: tautech
author_rank: Super Contributor
timestamp: February 23, 2014, 07:47:32 am
content: Quote from: tautech on February 23, 2014, 07:34:22 amI thought you would reply with "ahnuts" :-)

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 23, 2014, 07:56:38 am
content: Quote from: tautech on February 23, 2014, 07:47:32 amThat was my comment to my self.Also finally someone gets the username you have no idea how many times someone has asked what my username means.

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 26, 2014, 11:10:10 pm
content: OK etched the board got everything populated.Voltage control works great 25V all the way down to 20mV clean no oscillations on the output of the op-amp very low noise and ripple.I'm saying great so far.Now go to check current control something is wrong very little adjustment window and it just doesn't seem right.Check the inputs of the differential amp U1.1 they are around 40-50mV of each other with no load and output voltage all the way down but the output of the op-amp is setting at around .600 volts or so which would be OK if I was drawing around a half amp but this is with no load at all.The main problem is no matter what current I set no matter how positive or negative the inputs are to each other the output is always right around .600 volts.I can have 18 volts going into the inverting side and 17 volts going into the non-inverting side which should pull the supply towards ground but I still get around .600 volts out minimum it never changes even drawing 2 amps which should give a output of around 2 volts but I still get .600 out.Any ideas?Sent from my CM11 Nook HD+

author: ajb
author_rank: Super Contributor
timestamp: February 27, 2014, 01:17:20 am
content: What are the voltages at the inputs to U1.1 referenced to the op amp's supply voltage? Looks to me like you you might be bumping up against input common-mode voltage limitations. Note that the LM324 datasheet only indicates that the device will not be damaged by inputs up to V+, it does not indicate that it will behave properly above (V+)-1.5!

author: tree
author_rank: Regular Contributor
timestamp: February 27, 2014, 01:59:43 am
content: You see how Q2 sinks Q1's base-drive current to limit current? Your current limit should not be placed on the output stage. Don't mess with your output stage; instead decrease your set voltage (input stage) to match the current limit.

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 27, 2014, 02:13:47 am
content: I was about a half a volt below the common mode limit so i changed it to a 1 ohm sense resistor and changed the 100k resistors to 10k.Inverting is around15.00 non-inverting is 14.70 or there abouts it fluctuates a little the supply is 30 volts.I checked some more I dont have a high wattage resistor so i wasnt going over 200 mA but I thought I would push it a bit and it works over .600 mA the output goes up like it should all the way to the limit of the adj pot but the op-amp output wont go below .600 mV no matter what I do so it acts like it is pulling a half amp all the time even though its not.Sent from my CM11 Nook HD+

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 27, 2014, 06:06:33 am
content: I'm using 1% resistors and I matched them to a few digits of each other and the 1 ohm resistor is about 1.09 ohms or so,I knew there might be a little error in the divider networks on the inputs but I figured the feedback would remove most of it.Or am I not right?Sent from my CM11 Nook HD+

author: dannyf
author_rank: Super Contributor
timestamp: February 27, 2014, 12:17:52 pm
content: Quoteand with sharper keen-off characteristics.However, a zener will never oscillate.So it is hard to say which is "better" without looking at the specifics.

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 27, 2014, 12:35:58 pm
content: I'm going to try both but I'm not gonna make a new board till I get this current sense amp figured out.I've been simulating it for the last hour and it seem like its critical if the resistors aren't exactly the same as to where you put them.I have 3 that are 10.01k and one that is 9.95k and if I simulate it it makes a big difference depending on where I put the 9.95k resistor.Two places don't affect the output hardly any and the other 2 places throws it way off.Sent from my CM11 Nook HD+

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 27, 2014, 11:51:41 pm
content: Ok I've got it working right except the constant .6 or .7 on the output of the differential amp which is driving me nuts.If I set it for around 900mA the minute I get to around 200mA the current limit light comes on because it thinks I'm already drawing .700 amps.Right now I have .01 more volts going into the inverting input than the non-inverting input which if I understand op-amps should pull the output down more till the inputs are the same.If I lift one leg of r12 which greatly ups the voltage going into the inverting input the output drops to a few mV.Maybe the lm324 just isn't precise enough.Would it be better to lose the lm324 and go with something like the lt1014 instead.Sent from my CM11 Nook HD+

author: ahnuts72
author_rank: Regular Contributor
timestamp: February 28, 2014, 02:13:10 pm
content: Let me rephrase the question.Is there anything anyone can see that would cause the output to constantly put out .6 or .7 volts to null out the inputs.It works perfectly in simulation and it worked ok on the breadboard just noisy I know its prob something simple I'm just not seeing it.Sent from my CM11 Nook HD+

author: megajocke
author_rank: Regular Contributor
timestamp: February 28, 2014, 06:59:08 pm
content: The LM324 output is sinking 300 uA or so. You'd need to check the datasheet but off the top of my head the output isn't guaranteed to go below 1-2 V or so if sinking more than 50 uA.

author: ahnuts72
author_rank: Regular Contributor
timestamp: March 01, 2014, 01:18:45 am
content: The datasheet says +2 at 20 mA typical and +.2 at 50uA typical 10 minimum does that mean for every 10 uA above the minimum if thats what my op-amp is getting the minimum output goes up .2 volts which would give me around the output I'm getting.I did see that the datasheet said the output would go to ground and up to vcc -1.5 so I stopped there.Shame on me.And thanks for explaining that to me some parts of the datasheet still confuse me.So I guess a better op-amp is in order.Sent from my CM11 Nook HD+

author: edavid
author_rank: Super Contributor
timestamp: March 01, 2014, 02:08:23 am
content: Quote from: ahnuts72 on March 01, 2014, 01:18:45 amIf that's the problem, you can just add a pull-down resistor. You might also consider the effect of the LM324's input offset voltage though.QuoteWho cares?

author: ahnuts72
author_rank: Regular Contributor
timestamp: March 01, 2014, 02:37:12 am
content: Thanks edavid I'll try that.Regarding the sig I'll turn it off if it bothers people that much just never thought of a sig as aggravating.

author: ahnuts72
author_rank: Regular Contributor
timestamp: March 01, 2014, 04:34:58 am
content: The pulldown worked the output is down to about 3 or 4 mV thank you very much.Another question would it also work if I removed the pulldown and increased the values of the dividers to limit the current the output is sinking

author: megajocke
author_rank: Regular Contributor
timestamp: March 01, 2014, 02:08:57 pm
content: Quote from: ahnuts72 on March 01, 2014, 01:18:45 amIt's not that linear, see figure 13 in the datasheet for a curve:http://www.ti.com/lit/ds/symlink/lm124-n.pdfSo the voltage is quite low below 50 µA (typical) sink current and then suddenly increases to 0.6 V above 50 µA, so your measurement agrees well with the typical graph. For high current above 1 mA or so the voltage starts to increase considerably, reaching 1 V typical at 10 mA and 2 V typical at 20 mA.As you have discovered it is possible to come closer to zero with a helping pulldown. It is impossible to get all the way to zero - but maybe you can get close enough for your application.I'd probably instead choose to reference the signal to the reference positive terminal rather than the reference negative terminal in this case, unless it absolutely needs to be referenced to the reference negative terminal for some reason.

author: ahnuts72
author_rank: Regular Contributor
timestamp: March 02, 2014, 12:02:20 am
content: I understand the very basics of the opamp but the nuances I'm still trying to learn but would the output have to be referenced to ground for the circuit to work as intended.The pulldown worked but now the output just stays at around 4mV min to 124mV no matter what current I'm pulling.It reads right if I measure across the sense resistor with my load attached but with the same voltage on the output all the time it messes up my current reading going to the control pot and since the output of the op-amp is also where I was going to get the reading for the meter it messes up that as well.Still I appreciate all the help

author: megajocke
author_rank: Regular Contributor
timestamp: March 02, 2014, 03:18:16 pm
content: What pulldown resistor value did you use?If it is not that the pulldown resistor value is too low, then it could be that the differential amplifier resistors are unmatched. How much are you loading the circuit and what's your DC input voltage?For each 1% error in matching of the resistors you'll get about a 0.4 A current offset error. Depending on the sign of the error it could mean the opamp output will stay bottomed out to the negative rail until the output reaches 0.4 A, assuming a 40 V DC input voltage.One alternative that might be worth considering to avoid having to use precision resistors is to use a low side shunt or one of those ICs specially made for high side current sensing.

author: ahnuts72
author_rank: Regular Contributor
timestamp: March 02, 2014, 06:35:06 pm
content: The pulldown was 100ohms.I've had it up to about 1.5 amps.I have 3 of the divider resistors that read 10.00k and one that reads 9.99k that's the highest resolution my meter goes to.The circuit is running at 30 volts.

author: ahnuts72
author_rank: Regular Contributor
timestamp: March 10, 2014, 10:24:08 pm
content: Ok it was the divider resistors feeding the diff amp got a better matched set and changed them to 100K and 1M.I can current limit down to about 30 or 40 mA and all the way up to 1.5 amps which is the limit of my load.The voltage output is pretty clean and no oscillations as of yet.I have a small oscillation at the bottom end of the current set of about 9 or 10 hertz once I get rid of thatshould be good to go.Thanks for all the help so far everyone.

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 10, 2014, 11:17:06 pm
content: Quote from: ahnuts72 on March 10, 2014, 10:24:08 pm@ahnuts72you might want to look into the "AD8217 High Resolution, Zero-Drift Current Shunt Monitor" I'm white boarding a power supply like yours that may use this family, the datasheet looks rather good, it comes in a 8-pin MSOP package so its finger nail small in size.

author: ahnuts72
author_rank: Regular Contributor
timestamp: March 10, 2014, 11:25:46 pm
content: I have looked at the current monitor chips.I wanted to do it this way to try to understand the relationship between all the partsand how they work together.When I get to the final design I am going to add a current monitor chip and a better voltage reference this was just me trying to learn more about the intricacies of op-amps.This is kind of version 1 without all the bells and whistles trying to work my way up from simple to more complicated.

author: tree
author_rank: Regular Contributor
timestamp: March 10, 2014, 11:35:10 pm
content: Keep in mind that using a current monitor IC has an input impedance that is typically less than1M, which means that it will draw current at its inputs whether it uses the current mirror architecture or the differential amplifier. If you're not going for absolute accuracy then it doesn't matter much since 1mA (or so) is almost negligible when your load is drawing a few hundred mA, but if you don't want your current monitor to draw any current (at least on the order of a few pA) then you might want to design your own instrumentation amp or buy one off the shelf and make sure that the voltage that you supply at its inputs do not exceed the common mode voltage.

author: ahnuts72
author_rank: Regular Contributor
timestamp: March 11, 2014, 12:42:18 am
content: I'm not going for perfect accuracy if I can get within 10mA or so of actual output that is alright with me.I'm not doing any low power stuff at the moment the main reason besides just learning is the highestcurrent I can go on the supplies I have now is 1 amp on one supply and 400mA on the other.So I wanted some thing in the 2-2.5 amp range and thought I could build it from parts I had on handand learn at the same time.

author: ahnuts72
author_rank: Regular Contributor
timestamp: March 12, 2014, 12:53:30 am
content: Here's the final schematic and layout.So far it's working had no oscillation problems from around 60mA up to 1.5A.The output is pretty clean it drops about a volt though when drawing 1.5A.Will current limit down to around 60 or 70 mA or so.I'll try to post some pics of the board if I can get my camera to work.