My try at Daves DC load? opinions - Page 1
Forum section: electronics / projects

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 08, 2013, 01:02:42 am
content: Looking for general comments on layout routing and such.

author: c4757p
author_rank: Super Contributor
timestamp: April 08, 2013, 01:12:09 am
content: Well, it looks very... small. Can you upload something bigger?

author: BravoV
author_rank: Super Contributor
timestamp: April 08, 2013, 01:18:01 am
content: Q1 position in the middle, is that intentional ? Assuming you've thought about the Q1 heatsink's mount position.

author: c4757p
author_rank: Super Contributor
timestamp: April 08, 2013, 01:30:57 am
content: One thought - pick one point to call 'ground', and try connecting everythingthere. Basically astar ground. This way, currents being carried through ground traces won't cause a voltage offset.Alternately, use a ground plane, butonlyafter you've traced out all ground paths and made sure they are decent. You still should keep the heavy current-carrying "ground" trace out of the plane.Example of what I mean is attached.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 08, 2013, 02:04:16 am
content: BravoV Q1 will be mounted separately on an external heatsink.c4757p thanks for the picture I knew the ground wasn't exactly right I looked at it for ever trying to figure a way ofdoing it different but I'm still trying to learn this layout stuff and not using the auto router in diptrace.

author: c4757p
author_rank: Super Contributor
timestamp: April 08, 2013, 02:24:43 am
content: Keep autorouters well away from analog circuits, they screw them up massively. This is a really simple circuit to lay out.Any time you need to read a small voltage drop in a sense resistor (really, a small voltage, period), you should be using something likeKelvin sensing. Don't mix current and voltage - give them separate traces. Remember that "ground" can both be a return path for current and a reference point for voltage, and you should pay close attention to how they interact.Sometimes you'll hear people advocate one grounding scheme for pretty much all purposes, but grounding is something that has to be done on a case-by-case basis most often. Note that I recommended somethingsimilarto a star ground, but didn't follow that completely in my example. If I connected the load input's ground back to the star instead of directly to the sense resistors, then the PCB traces would add to the sense resistance. With a 1 Ohm sense resistor, it would be pretty minimal (especially with those big-ass traces you're using everywhere), but still, it should be avoided.One more thing: you have the pins of Q1 ordered source-gate-drain, as far as I can tell, but the transistor itself will be gate-drain-source. I'm sure you know this, but you should try to keep the pinout consistent to minimize the chance of accidentally wiring it wrong.And another: The point where you read thetopof the sense resistors has the same problem as your grounds. Don't mix current and voltage. Run the trace out of pin 6 of U1 straight down to the sense resistors.And a third: You ought to post the schematic along with the PCB layout next time. Makes it easier to read.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 08, 2013, 02:46:58 am
content: Thanks for the reply.Should the sense resistor traces be smaller?I figured they where carrying the most current so they should be a bit bigger.I was gonna put up the schematic but I haven't back annotated a couple of changes i madewhile i was laying it out and I haven't added the fan control schematic to it ill try to get that done and add it.

author: c4757p
author_rank: Super Contributor
timestamp: April 08, 2013, 02:53:35 am
content: Quote from: ahnuts72 on April 08, 2013, 02:46:58 amMake them as big as possible. If you weren't paralleling resistors, it wouldn't really matter, as long as you separate current and sense like I said (and they're actually big enough to handle the current), but with ten resistors in parallel, the trace resistance will contribute a small amount. Best to make it as small as you can.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 08, 2013, 03:22:21 am
content: Something like this. Any better?Also how do you use a thumbnail then make it bigger when it is clicked on.

author: BravoV
author_rank: Super Contributor
timestamp: April 08, 2013, 03:28:06 am
content: Don't forget 4 mounting holes at the corners.

author: c4757p
author_rank: Super Contributor
timestamp: April 08, 2013, 03:40:31 am
content: Yes, that looks good to me!Well, except that I do have one question: what's U2? It may or may not be acceptable that its ground merges with the sense resistor ground before the star. Sorry, I'm not really familiar with Dave's load, and I'm lazy as hell so I'm not going to look it up...

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 08, 2013, 03:48:46 am
content: U2 is the transistor for the the fan.Dave's load doesn't have a fan but as this is a learning experiencefor me I thought I would try to add one.Not sure why diptrace put U instead of Q.Maybe like this or is it bad to run the ground all the way around?

author: c4757p
author_rank: Super Contributor
timestamp: April 08, 2013, 03:58:34 am
content: Quote from: ahnuts72 on April 08, 2013, 03:48:46 amAh, I should have recognized that!Looks fine to me.Quote from: ahnuts72 on April 08, 2013, 03:22:21 amStop using TinyPic and just upload it as an attachment.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 08, 2013, 04:05:29 am
content: Thanks for the help its much appreciated.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 10, 2013, 02:28:24 am
content: Here's the schematic.

author: RobB
author_rank: Contributor
timestamp: April 10, 2013, 10:02:19 am
content: At the risk of seeming to be a nazi but you really should convert your .bmp bitmap files to jpeg.For example the picture for the schematic alone is over 1 megabytes. The equivalent jpeg is just about 30 kilobytes or less than 1/30 of the size without scaling or loss of detail.Now think of how many time this posting is likely to be read and the pictures maybe downloaded you will see that the use of a .bmp has unnecessarily increased the data sent adding up to a larger bill for the forum hosting.Again not trying to be a asshole. It's just commom practice and courtesy.CheersRob

author: Dave
author_rank: Super Contributor
timestamp: April 10, 2013, 10:49:43 am
content: Converting it to JPEG will ALWAYS result in loss of detail.PNG is the way to go for images with sharp lines.

author: IanJ
author_rank: Unknown
timestamp: April 10, 2013, 11:41:44 am
content: Quote from: ahnuts72 on April 10, 2013, 02:28:24 amWhat are you doing with that unused op-amp U1,4.............best thing to do is to actually use it. Set it up as a unity gain buffer and tie the input to some part of your circuit or to a simple voltage divider.Leaving the inputs unused and floating can lead to a saturated output and can increase current consumption to the device. The inputs can also pick up electrostatic fields or noise and oscillate the output....which can then cross-talk across to the other op-amps in the device..............etc etc etc.If you tie the inputs together it doesn't actually help......both are still effectively floating.Don't simply tie both inputs to 0vdc even with resistors, it can stress the op-amp, increase current consumption etc.Ian.

author: Alana
author_rank: Frequent Contributor
timestamp: April 10, 2013, 01:57:11 pm
content: Is Q1 pins in order Drain Gate Source? Check your datasheet because you may have an error.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 10, 2013, 02:24:11 pm
content: Thanks for the tip Ian I wasn't sure of it would hurt to leave it floating.Q1 is going to an external heatsink so I wasn't worried about the pinoutSent from my Milestone X using Tapatalk 2

author: brabus
author_rank: Frequent Contributor
timestamp: April 19, 2013, 07:59:26 am
content: Quote from: Alana on April 10, 2013, 01:57:11 pmI am also worried about that.Also, provide a compensation network like the one you can see in this thread (R6-C5):https://www.eevblog.com/forum/projects/dummy-load-problem/msg203534/#msg203534The compensation network lets you control the dynamic response of the load, and easily solve stability issues.I remember having made a dummy load which seemed perfect to the multimeters measurement, but exhibited horrible instability if analysed with an oscilloscope! Be careful, and check this!

author: c4757p
author_rank: Super Contributor
timestamp: April 19, 2013, 01:33:47 pm
content: Quote from: brabus on April 19, 2013, 07:59:26 amYeah, I addressed that earlier. (Though I suspect it might be too late now,)pleasedon't depend on remembering to wire it correctly. Murphy thinks your reliance on memory ishilarious.QuoteGood point. These do tend to be unstable.Quote from: IanJ on April 10, 2013, 11:41:44 amIn the name of doing things "right", yes, this is important - but in my experience, LM324 really doesn't care all that much. It tends not to oscillate and the power consumption doesn't increase.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 22, 2013, 04:41:12 am
content: Sorry I missed everyone's comments been away from comp.Here is the board etched and almost done and the frontpanel design for the enclosure.I know the soldering isn't that great but been awhile beenusing the breadboard for everything.c4757p I can hear you yelling about the pinout alreadyIll try to incorporate your suggestions into revision 1as this was just me getting used to making my own boards again.

author: Harvs
author_rank: Super Contributor
timestamp: April 22, 2013, 10:21:27 am
content: Seriously you need to compensate the feedback network. It doesn't take much, and even if you don't etch another board, just hack it in there. How you've got it at the moment will oscillate under certain conditions, no two ways about it.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 22, 2013, 05:22:17 pm
content: OK from all the reading Ive done on compensation networksthese are the 2 Ive come up with,as I'm still learning all this stuffwhich one is best for this application.Or does it really matter?Also any chance someone could recommend a good book on op-ampspreferably in print as I hate eBooks.I'm reading Practical Electronics For Inventors right now but somethingon just op-amps would be nice to have.

author: c4757p
author_rank: Super Contributor
timestamp: April 22, 2013, 05:30:17 pm
content: Both are wrong for this application. Try this.Your first one is no good at all - no DC path for the inverting input! The second one is to compensate a capacitive load on the output by adding a resistor - not what we're trying to do (though if you're driving the gate on a huge MOSFET with a sensitive op amp, you might want to do that as well!)

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 22, 2013, 06:02:41 pm
content: Thanks for the help c4757p that's how I had originally had it laid outminusthe resistor but it worked both ways on the breadboard so ileft it out.Sorry my fault should have seen that mistake.The first one should have been like this.

author: c4757p
author_rank: Super Contributor
timestamp: April 22, 2013, 06:06:53 pm
content: Quote from: ahnuts72 on April 22, 2013, 06:02:41 pmIt will sometimes work without the resistor, as long as there'ssomeimpedance. On a breadboard, you've got impedances up to your ears.Quote from: ahnuts72 on April 22, 2013, 06:02:41 pmA shorted capacitor doesn't do anything, so that's no good either.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 22, 2013, 06:21:40 pm
content: Thanks very much for the help I really appreciate it.Would this be correct according to your drawing?

author: c4757p
author_rank: Super Contributor
timestamp: April 22, 2013, 06:35:12 pm
content: Capacitor is in the right place, resistor is not. It should replace the trace going from pin 6 down to the sense resistors. Also, remove C1. I don't know how it got there but it's just going to make this even more unstable.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 22, 2013, 06:53:26 pm
content: Thanks I almost started to put the resistor where you said but then i started second guessing my selfand put it where it is but as i look it is out of the right feed back loop where its at.I'll have to check my schematic for c1 it may have supposed to go between pin 6 and 7like you have it this is only my second board not using the auto-router so I may have routedwrong.

author: c4757p
author_rank: Super Contributor
timestamp: April 22, 2013, 06:59:05 pm
content: Quote from: ahnuts72 on April 22, 2013, 06:53:26 pmWhat are you using to route it? Most PCB software won't let you route a trace that doesn't match your schematic.Edit: It's there in your schematic too. Just take it out of both - it's no good.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 22, 2013, 07:08:57 pm
content: I'm using DipTrace.I just checked and it will let you do it if your not careful.But I may have had it wrong in the schematic I'm sure itwasoperatorerror though.

author: Harvs
author_rank: Super Contributor
timestamp: April 22, 2013, 11:58:36 pm
content: Attached is the basic compensation scheme that we've all used here.R2 serves to isolate the op-amp output from the mosfet gate capacitance so that the output drive doesn't get forced into saturation.Then the network of C1 & R3 roll off the op-amp response well below the point where the control will hit a 180 degree phase shift. Or in other words the system becomes unstable as the feedback becomes positive instead of negative as we need.I don't know if you're an LTspice user, but I've attached the spice file. It can be quite informative. If you effectively remove the compensation network, set C1 to 0.001pf and R2 to 0.1ohm, then run the simulation you're see the current levels through R1 ringing at the switch point. This is a sure sign of a network with marginal stability. Add the values back in and it'll become a nice clean transition with zero overshoot.The values can vary a little depending on what op-amp and mosfet are used. But what I've used in the simulation are a pretty safe bet for the LM324 and a generic power FET.As a good primer, this series of 5 videos from Analog Devices is quite good.

author: ahnuts72
author_rank: Regular Contributor
timestamp: April 23, 2013, 01:18:07 am
content: Thank Harvs I haven't made it to op-amps in Practical Electronics For Inventorsyet don't know if compensation is covered ill definitely checkout the videos.Ive messed around with ltspice a little ill try to run the sim files and play around with it.

author: ahnuts72
author_rank: Regular Contributor
timestamp: May 02, 2013, 12:23:11 am
content: Ok tried to take everyone's suggestions and include them.Hows version 2?

author: Harvs
author_rank: Super Contributor
timestamp: May 02, 2013, 06:05:35 am
content: Do you have a schematic you could post as well please? Makes life a lot easier for everyone.

author: ahnuts72
author_rank: Regular Contributor
timestamp: May 02, 2013, 08:19:09 am
content: Here you go.R5,R6,R7 and c2 aren't on there they are for my panel meterhaven't added them.

author: ahnuts72
author_rank: Regular Contributor
timestamp: May 08, 2013, 10:56:14 pm
content: Almost finished.Mocked up how its gonna be when finished.I still have to hook up the power switch,cut theside vents,fill some holes and sand and paintthe enclosure and make a labelfor the front panel.

author: ahnuts72
author_rank: Regular Contributor
timestamp: May 09, 2013, 03:38:04 am
content: Ok here's a shot of the waveform on the output of the op-amp.I figured i should be getting a pretty flat line.This is at .500 amps at 19 volts.Is this the output oscillating?

author: c4757p
author_rank: Super Contributor
timestamp: May 09, 2013, 03:42:56 am
content: Yes, it is. What are the plot scales on that? I can't tell from the photo.

author: Harvs
author_rank: Super Contributor
timestamp: May 09, 2013, 03:47:45 am
content: What are the values of the parts surrounding the op-amp? (i.e. the resistors that don't have values on the schematic.)

author: ahnuts72
author_rank: Regular Contributor
timestamp: May 09, 2013, 04:03:34 am
content: R4=330R20=10kR16 and R18 are both 10k

author: ahnuts72
author_rank: Regular Contributor
timestamp: May 09, 2013, 04:40:20 am
content: Sorry c4757p missed your post somehow.t/d 2mSv/d 50mV

author: Harvs
author_rank: Super Contributor
timestamp: May 09, 2013, 07:19:29 am
content: Attached is a quick plot of the closed loop freq response of the circuit. You don't have any attenuation down at the frequ you're observing.But it's surprising that this circuit would be oscillating at that sort of freq...Typically when people have these oscillate it's up in the MHz range, and pretty full on, hence rolling of the response in the 40-50kHz is pretty safe.I'd have a poke around you're circuit with the scope and see if it's being coupled in from somewhere else... What's the supply you're loading look like on the scope?

author: Rerouter
author_rank: Super Contributor
timestamp: May 09, 2013, 07:34:45 am
content: you seem to have installed your DC input where your bulk capacitance should live, and now that i look at it, your 0.1uF ceramic should have probably been put a whole lot closer to the op amp, so its very possible a good bit of noise off your supply is being coupled in, the oscillation spikes are about 240Hz, which would line up roughly with a double of the 120Hz ripple being spat out by a cheap wall wart,

author: Kevin.D
author_rank: Frequent Contributor
timestamp: May 09, 2013, 10:46:43 am
content: Look at the supply line on your scope or just unplug your fan to see if it improves .That frequency your waveform is at '200-300Hz' is about the same frequency as what the coils would switch in a brushless Fanmotor . If you haven't done so already you will need to filter the fan noise from getting into your supply rail .

author: c4757p
author_rank: Super Contributor
timestamp: May 09, 2013, 11:39:22 am
content: Quote from: ahnuts72 on May 09, 2013, 04:40:20 amQuote from: kevotronic on May 09, 2013, 10:46:43 amYes, I second this. That looks more like fan noise than oscillation. I didn't realize your horizontal sweep was so slow on that picture.

author: c4757p
author_rank: Super Contributor
timestamp: May 09, 2013, 11:43:17 am
content: I wish I caught that before when I was looking at your design, but I wasn't really paying attention to the fan section. Fans are really, really noisy and need a ton of filtering if you're putting them that close to analog stuff. You can still add filtering inline, since it's not going to fit on your PCB now. I'd say multiple capacitors of different sizes (ranging from about 10nF to 47uF-100uF or so), plus a chunky ferrite bead or choke.

author: ahnuts72
author_rank: Regular Contributor
timestamp: May 09, 2013, 02:24:02 pm
content: Ill try to unplug the fan when i get off of work and see what happens to the waveform.I was looking at the schematic and noticed I don't have a bypassing cap on the supply to the opamp either.Im using a 5volt 1amp linear wall wart to power it.

author: ahnuts72
author_rank: Regular Contributor
timestamp: May 10, 2013, 02:42:23 am
content: Sure enough it was from the fanunplugged it and straight to a flat line.Thanks for all you guys help.Gonna add some filtering try to get itright and then maybe make a new board.

author: ahnuts72
author_rank: Regular Contributor
timestamp: September 29, 2013, 09:39:34 pm
content: Ok finally got around to building a filter for the fan noise now much better.Ran it on the power supply at 1 amp for 30 min transistor and heat-sinkgot warm but worked great.Went to shut everything down and thought I would get a few pics.First one is comparison of meter and display,second one is beforethe filter third one is after.

author: Spikee
author_rank: Frequent Contributor
timestamp: September 29, 2013, 09:58:17 pm
content: You could use an isolated low power dc dc converter for your fan (also isolate the pcb space).

author: ahnuts72
author_rank: Regular Contributor
timestamp: October 02, 2013, 02:31:29 am
content: I've got rid of the noise on the supply rail and no oscillations so I think I'll leave it alone.May make a new board with the filter on it instead of spliced into the feed for the fan.Sent from my Nook HD