Strange Behavior With Dave's Electronic Load - Page 1
Forum section: electronics / beginners

author: nathanpc
author_rank: Unknown
timestamp: August 04, 2013, 11:28:31 pm
content: I tried building my own DIY electronic DC load based onDave's blog. The only thing that is different is that I used aFQP30N06LMOSFET. In the video he says that if you measure the voltage the voltage between the op-amp inverting input and the 1 ohm resistor you'll get the current passing though that resistor (at least that's what I assumed by the way he showed the connection to the panel meter).For a simple test I trimmed the non-inverting input to 0.180V (which should correspond to 180mA), but I got nothing on the meter between the inverting input and the 1 ohm resistor, so I tried probing other things in the circuit and I saw that every time I tried to probe the inverting input the circuit would start to "work", but I would get a random current like 347mA (I have a multimeter measuring the input current and another measuring the voltage where Dave put his panel meter). I also noticed that every time I added any value of resistor between the inverting input and the shunt resistor I would get 80mA of current.Any ideas why I'm getting this strange behavior?PS: I've been trying to fix this for the last 5 hours. I'm exhausted.

author: Odysseus
author_rank: Regular Contributor
timestamp: August 05, 2013, 10:42:39 am
content: Sounds like oscillation because the FET is too much of a capacitive load on the opamp. Judging from the datasheets, your FET has only twice the input capacitance of the one used in Dave's video (500pF vs 1nF), but it can make a difference. Add a series resistance, say 1k, between the output of the opamp and the moset gate. Then add another resistor, also 1k, between the inverting input of the opamp and the source of the mosfet. Then add a capacitor, something like 1nF to 10nF from the output of the opamp to it's inverting input. Also ensure you have some decoupling across the power rails of the opamp and the potentiometer wiper, something like 100nF or 1uF.That should eliminate any oscillation problems. I built a similar circuit and this is what I had to resort to in order to keep the circuit stable.

author: nathanpc
author_rank: Unknown
timestamp: August 05, 2013, 03:42:34 pm
content: Even with your tips I still can't get it to work. I decided to get my oscilloscope and probe a bit (after applying your suggestions).Withoutthe 100nF capacitor between the inverting input and the output this is what I get:Inverting input:Output:Non-inverting input:Nowwiththe 100nF capacitor:Inverting input:Output:Between the MOSFET source and the shunt resistor:Any ideas?

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: August 05, 2013, 04:15:30 pm
content: 1.8V+300mVpp, 60Hz square wave on the non-inverting? You said 0.18, so I'm going to guess the probe is 1x but the scope thought it was x10 at the time, and thus you have 0.18V + 30mVpp. Is that what you expect to see there, or did you expect DC? Any waveform there is certainly going to influence the stability of the current.

author: nathanpc
author_rank: Unknown
timestamp: August 05, 2013, 04:24:43 pm
content: My scope was set to x10 and I was using a x10 probe. I was expecting DC.

author: nathanpc
author_rank: Unknown
timestamp: August 06, 2013, 01:53:49 am
content: I'm using a regulated (simple 7805-based PSU) 5V from a 9V battery to power the op-amp. I'm feeding in 180mV to the non-inverting input coming from a voltage divider pot. I tried your circuit with a better op-amp, aTLV2372and it still can't stabilize.One thing that is quite consistent is that when I power the circuit up the MOSFET is completely off, but as soon as I touch the inverting input of the op-amp it starts to "work" (oscillating and drawing a random current) and it stays "working" even after I remove the probe.

author: c4757p
author_rank: Super Contributor
timestamp: August 06, 2013, 02:05:22 am
content: Any chance you could photograph your circuitwell(high resolution and good focus) so we can see what's going on?

author: Rerouter
author_rank: Super Contributor
timestamp: August 06, 2013, 02:39:01 am
content: 100nF is too high in my opinion. It only took 5nF to stabilize a large number of the other diy approaches. Same for the 1k to the gate. 47 to 100 ohm is more ideal. And remove the resistor between inverting and output and see wgat happens

author: nathanpc
author_rank: Unknown
timestamp: August 06, 2013, 01:50:11 pm
content: Sadly my desk is being replaced by a bigger one right now, so I can't test anything right now. I'll order the same transistor that Dave used in his video and try with that one (I'm desperate for this thing to work).I was wondering about one thing today. I'm putting exactly 180mV into the non-inverting input if the op-amp, but shouldn't it be the voltage threshold for the transistor to turn on + the mV for the current? For example, let's say the voltage threshold for the transistor I'm using is 1V, should I put 1V + 180mV to draw 180mA?

author: olsenn
author_rank: Frequent Contributor
timestamp: August 06, 2013, 02:07:00 pm
content: One problem that I noticed with my Itech 8511 (same as the B&K Precision 8500-series) DC electronic load is that if you operate in CV or CP mode, and the source at any point in time is incapable of delivering the voltage/power required to meet this requirement, the 8511 goes crazy, and when the source is capable again of sourcing the required voltage/power, the load does NOT reestablish itself. You actually have to switch modes to CC then back, and cycle power before it starts working properly again. Fortunately, I rarely use anything but CC mode, but it is still a major bug

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: August 06, 2013, 10:00:38 pm
content: Quote from: nathanpc on August 06, 2013, 01:50:11 pmThe Opamp will take care of that for you: It raises its output voltage for as long as the inverting input is lower than the non-inverting input and it hasn't hit its maximum output.

author: nathanpc
author_rank: Unknown
timestamp: August 06, 2013, 10:17:06 pm
content: I see. Looks like I'll order Dave's transistor tomorrow and try with it.

author: nathanpc
author_rank: Unknown
timestamp: August 23, 2013, 12:43:20 am
content: I'm completely exhausted. I give up. Tried with the MTP3055 and I got 0V on the sense resistor, it only gave some life indication when I adjusted the non-inverting input to 4V getting a reading of 450mA, which stays at that measurement even if I go up to more than 4V. Really, I've been banging my head at the desk for so long on this thing (which seemed so simple and something that everyone was doing without any issues) that I just want to give up on all this.

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 23, 2013, 01:25:42 am
content: A schematic and a picture would be worth a thousand words. I haven't built this circuit myself but I think the advice given in this thread should have fixed the problem.Specifically, a small resistor (47R to 100R) on the MOSFET's gate, a compensation cap between the op amp's output and inverting input and a cap between the pot's wiper and ground.It won't hurt to use a little higher voltage than 5V also since the LM324 isn't rail-to-rail. Also, be sure you have a bypass cap (100nF) on the op amp's power supply.

author: c4757p
author_rank: Super Contributor
timestamp: August 23, 2013, 01:31:22 am
content: Quote from: c4757p on August 06, 2013, 02:05:22 amI repeat this.... please..... I promise you this circuit works. It works for everybody else. There must be something you've missed. Can you take a clear picture of it so we can see what you've done? And try to re-capture the schematic as well,from your circuitby following the connections.

author: nathanpc
author_rank: Unknown
timestamp: August 23, 2013, 02:19:00 am
content: The schematic is the same as Dave showed in his video plus the bypass caps for the supply pins.I've tried literally everything that was suggested above and none of them worked. I'm extremely frustrated.

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 23, 2013, 02:47:48 am
content: What are you using for the source? Your source should look like a voltage source. Basically something with a fairly low impedance.Use a sacrificial AA battery, for example. Its negative terminal has to be connected to the load's ground. The positive terminal will be connected to the MOSFET's drain. If you're worried about drawing too much current then you can put a current limiting resistor in series with the battery but keep it as small as practical.

author: c4757p
author_rank: Super Contributor
timestamp: August 23, 2013, 02:50:52 am
content: Quote from: c4757p on August 06, 2013, 02:05:22 amQuote from: c4757p on August 23, 2013, 01:31:22 amQuote from: nathanpc on August 23, 2013, 02:19:00 amNo you damn well have not.

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 23, 2013, 03:20:51 am
content: I tried the circuit in a simulator and it wouldn't work for me until I used a higher supply voltage. My simulator doesn't have any MOSFETs with 'logic level' gate thresholds, though.I notice on Digikey that they actually have two different MTP3055 parts. One with a 2V Vgs(th)and another with a 4V Vgs(th). I hope you bought the 2V part. That's very important if you are using a 5V supply.Instead of feeding your 9V battery through a LM7805 just use the 9V directly. The LM324 can handle something like 36V so it won't hurt it.

author: c4757p
author_rank: Super Contributor
timestamp: August 23, 2013, 03:30:06 am
content: Good catch. It's not MTP3055, it's either MTP3055V or MTP3055VL. You want L - Logic level.

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 23, 2013, 04:03:57 am
content: Another thing I'm wondering is what the OP is doing with the unused op amps. I don't know what the LM324s do when you leave unused op amps disconnected but some ICs will do some wacky stuff--like drawing a ton of current.Be sure to configure the unused op amps as voltage followers and put the non-inverting input at 1/2 supply voltage via a voltage divider. Use something like 100k resistors. (See attached schematic.)

author: M0BSW
author_rank: Frequent Contributor
timestamp: August 23, 2013, 06:16:50 am
content: Quote from: c4757p on August 23, 2013, 02:50:52 amA picture is what is needed, surely can't be hard!!!!!!!

author: nathanpc
author_rank: Unknown
timestamp: August 23, 2013, 10:20:50 pm
content: Here are some pictures of the circuit:http://imgur.com/a/TuBV7In the picture with the multimeters the Agilent is reading the voltage in the non-inverting input and the Fluke is measuring the current from the 9V battery positive pin to the MOSFET's drain.I'm using the MTP3055VL.The schematic is exactly the same as TerminalJack505 suggested the only thing that is missing are the voltage followers with the unused op-amps (which I'm wiring up right now to test).Edit: Just wired all the voltage followers and nothing changed.

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 23, 2013, 11:09:31 pm
content: I didn't see any problems and I can't think of anything else to try.I might try building the circuit myself. I don't have the same MOSFET but should have something similar.

author: c4757p
author_rank: Super Contributor
timestamp: August 23, 2013, 11:16:39 pm
content: Quote from: nathanpc on August 23, 2013, 10:20:50 pmThat doesn't usually make a difference in practice with LM324. I've seen it used all over with unused inputs left floating.However... there is something else you could try w.r.t the other units. Have you tried moving your circuit onto one of them? It is possible that amplifier #2 is dead.

author: Unknown
author_rank: Unknown
timestamp: August 23, 2013, 11:17:09 pm
content: Try putting the bypass cap directly across the power pins of the op-amp, instead of with a few decimeters of wires between the cap and the negative pin. I wouldn't expect it to make that much of a difference with a slow op-amp like the 324, but you never know.

author: c4757p
author_rank: Super Contributor
timestamp: August 23, 2013, 11:21:49 pm
content: Quote from: alm on August 23, 2013, 11:17:09 pmI haven't heard that word since high school math class...

author: Unknown
author_rank: Unknown
timestamp: August 23, 2013, 11:41:07 pm
content: Does 1/1000th furlong sound more familiar?

author: Strada916
author_rank: Frequent Contributor
timestamp: August 24, 2013, 12:20:27 am
content: I would be getting a better source. One with more grunt. think your 9v is not up to the task. Try AAs in a 9v config. That will give you more grunt.As a short stop, try a large electro on the battery. That will also keep the battery esr low. From the dso pics. looks like the battery is giving up under load.also try monitor the supply voltage.Number 1 rule in fault finding. "You always check the power supply first loaded and unloaded"

author: JoeO
author_rank: Frequent Contributor
timestamp: August 24, 2013, 12:35:22 am
content: Quote from: Strada916 on August 24, 2013, 12:20:27 amYou are correct. This is a DC circuit. Just use a DVM and start at the beginning and go to the end, measuring the voltages.Start at the power supply. Many problems on the Arduino forum are caused by people trusting 9V batteries.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: August 24, 2013, 12:58:43 am
content: Hi,I have studied the photograph of the breadboard carefully.You will benefit by adding a 10k resistor between the sensing resistor and the negative input of the op-amp. This resistor and the capacitor between the negative input and the output of the op-amp are part of the control loop.This resistor is R3 in my schematic.Here is a schematic of the load that I built:Jay_Diddy_B

author: nathanpc
author_rank: Unknown
timestamp: August 24, 2013, 01:01:17 am
content: I can't believe this, when I tested the inverting input for continuity it was an open circuit, so I took off the wire to check if that was the culprit and that was the issue, looks like it was a broken wire.The issue now is: To get to 100mA I have to put 333mv in the non-inverting input. As I increase or decrease the voltage in the non-inverting input it appear to follow the changes. Shouldn't it be drawing 333mA if the non-inverting input is at 333mV?

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 24, 2013, 01:58:31 am
content: Quote from: nathanpc on August 24, 2013, 01:01:17 amYes, that should be the case. 9V batteries are pretty puny so I don't if you'll be able to get that much current out of them or not.

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 24, 2013, 03:02:25 am
content: I just finished building the circuit. I too had oscillation. I tried a bunch of stuff and what finally seems to have fixed it was using a 1k resistor (instead of 100R) from the op amp's output to the MOSFET's gate. (I think someone earlier in the thread suggested that. Kudos to them.)I also had some other changes on the board at the time such as a 1k resistor between the inverting input and the 1R resistor, extra bypassing, a bigger compensation cap and a small cap across the 1R resistor. So I'll have to unwind all those and see if it is still okay.I didn't see any huge discrepancy between the current and the 'set' voltage. What you're seeing might be due to oscillation.

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 24, 2013, 04:04:51 am
content: For the record, here's what I wound up with.

author: nathanpc
author_rank: Unknown
timestamp: August 24, 2013, 05:06:47 pm
content: Strange, there's no oscillation, and I'm still getting that 2.9x difference. I measured the resistor with both of my multimeters and both were spot on at 1 ohm.Any ideas of what may be causing this difference?

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 24, 2013, 05:28:28 pm
content: Jeez. This circuit is your nemesis.If the circuit seems to be pretty much working then you might switch to voltage sources that have a lower impedance than the 9V batteries. I used a couple of wall warts for both the supply and source. In a pinch, you could use the same voltage supply for both. A 12V DC wall wart would work.You might also swap out the op amp if you have a spare. Who knows, something may have happened to it from all the other fun and games.You're using an LM324, right? Those are supposed to work down to ground but it almost sounds like you might have an op amp that doesn't work down to ground.

author: nathanpc
author_rank: Unknown
timestamp: August 24, 2013, 05:57:56 pm
content: Yes I was using a LM324. I tried with my 12V adapter and got the same results as the 9V, then I decided to try theTLV2372and now I have a difference of ~3.5, but the good thing is that the difference is linear, so if I have 350mV in the non-inverting input, the MOSFET will be drawing 100mA.Any other ideas? I'm thinking about giving up and just compensating for that 3.5x offset in software when I design the prototype PCB.I never had a circuit that was so simple and gave me so much headache as this one. haha

author: c4757p
author_rank: Super Contributor
timestamp: August 24, 2013, 06:14:46 pm
content: Methinks the breadboard contact resistance is high and is adding to your sense resistance. Move the pot's ground lead directly to the bottom of the sense resistor.

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: August 24, 2013, 10:37:29 pm
content: Quote from: c4757p on August 24, 2013, 06:14:46 pmOr in the same vein, measure the voltage across the resistor and the voltage across the opamp's inverting input pin and the opamp's negative supply pin. If they're wildly different, then trace voltage drops to find out why. 1R is getting down to where 4-wire measurement can matter. However, if you measure basically 350mV across the resistor while 100mA is passing through it, then perhaps it's changing resistance with heat and you need a better 1R resistor.

author: nathanpc
author_rank: Unknown
timestamp: August 24, 2013, 10:40:56 pm
content: Measured the resistance in various points, there were all high. When I moved the ground lead to the bottom of the sense resistor... Magic! It finally worked 100%Thanks very much for everyone that helped me on this crazy issue.

author: c4757p
author_rank: Super Contributor
timestamp: August 24, 2013, 10:43:18 pm
content: It's always something simple, isn't it? It's pretty bizarre that the resistance of the breadboard was above 1 ohm, but mine is such a turd, I figured yours might be as well

author: nathanpc
author_rank: Unknown
timestamp: August 24, 2013, 10:44:57 pm
content: Quote from: c4757p on August 24, 2013, 10:43:18 pmYup. At least now I know that the resistance in my breadboard is pretty considerable haha. I'm totally going to check my other ones too so I don't run across the same issue in the future.

author: TerminalJack505
author_rank: Super Contributor
timestamp: August 24, 2013, 11:12:06 pm
content: The breadboard strikes again. They're always jacking with your circuits.Glad you got it all figured out.