Non-inverting op-amp - Page 1
Forum section: electronics / beginners

author: MikeK
author_rank: Super Contributor
timestamp: May 31, 2012, 03:27:18 am
content: This time I'm playing with Dave's constant current load circuit.The control voltage varies from 0 to 5V via a voltage divider. I've got two problems, though. First, I can't get more than 1.7V across the 10 ohm resistor, even with the control at the full 5V. And second, the HEXFET gets hot, even though the current through it is only 0.17A (1.7V/10ohm).

author: amspire
author_rank: Super Contributor
timestamp: May 31, 2012, 03:43:21 am
content: Quote from: MikeK on May 31, 2012, 03:27:18 amSecond question first, the HEXFET will definitely get hot without a heatsink.As for the first question, what supply voltage do you have for the LM324? If you want to take the voltage across the 10 ohms resistor to get up to 5V, you will need about a 10V supply for the LM324.The 10 ohm resistor needs to be a 3W power resistor at least.Richard.

author: MikeK
author_rank: Super Contributor
timestamp: May 31, 2012, 04:13:03 am
content: Okay, well I was only running the LM324 from 5V, so that's it. I changed it to 10V and it's fine.The 10 ohm resistor is 10W, it doesn't even get warm. I didn't think 170mA is enough to get the FET hot.If I want to PWM the control voltage, do I just make sure the LPF break frequency is well below the PWM frequency?

author: amspire
author_rank: Super Contributor
timestamp: May 31, 2012, 04:29:53 am
content: Quote from: MikeK on May 31, 2012, 04:13:03 am170mA is .17 * (8 - 1.7) watts = 1.07 W.Definitely enough to get a TO220 package hot. That is enough to get the temperature of the TO220 package to about 60 degrees above ambient - too hot to touch if you left it running long enough, but the FET will survive.With the PWM, have at least two stages of RC filters with as long a time constant that you can live with. At least a couple of hundred times the PWM period would be good.Richard.

author: MikeK
author_rank: Super Contributor
timestamp: May 31, 2012, 04:39:30 am
content: Thanks, mate.

author: MikeK
author_rank: Super Contributor
timestamp: June 01, 2012, 07:43:38 pm
content: Is it okay to use a wirewound power resistor for the current sense? I figure the inductive issues shouldn't be a problem since the current will be steady. And although the resistor is rated at 10% my meter shows it spot on. The won't be a precision device, I just want to test some Chinese camera batteries I bought.

author: ejeffrey
author_rank: Super Contributor
timestamp: June 01, 2012, 09:59:06 pm
content: A wirewound resistor is fine. As you say, at DC the inductance doesn't matter. The 10% tolerance may indicate that it is likely to age poorly or has a high tempco, so even though it is spot on now, don't expect it to stay that good forever. Since you aren't looking for precision it should be more than adequate for your needs.

author: MikeK
author_rank: Super Contributor
timestamp: June 01, 2012, 10:59:43 pm
content: I had to watch Dave's video a second time to finally understand why I wasn't getting more than 1.7V across the sense resistor. I was foolishly thinking the voltage at the sense resistor was equivalent to the op-amp output. I like this project, it's educational and useful.

author: MikeK
author_rank: Super Contributor
timestamp: June 04, 2012, 12:12:02 am
content: I'm now wondering if the IRL520N HEXFET is a poor choice. From the datasheet it looks like I can't get low current? Which defeats my use for it. It also gets really hot even when switched off. With a 1 ohm load resistor I can't get low current, the FET just stays switched off.With a 10 ohm load resistor I can get low current and the FET doesn't get hot, but I'm obviously limited to about 0.170A (1.7V across the 10 ohm resistor).Do I need to get the MTP3055 Daved used?

author: amspire
author_rank: Super Contributor
timestamp: June 04, 2012, 01:40:37 am
content: Quote from: MikeK on June 04, 2012, 12:12:02 amYou can get low current. When it is off, the IRL520N will have perhaps 25uA of leakage current flowing, which is not enough to warm it noticeably. You can then adjust from that smoothly up to the maximum current. It looks like a very good mosfet for handling an amp or two.The fact that it gets hot "even when switched off" means something is very wrong with your circuit. There is a good chance your circuit is unstable and oscillating.You can post the circuit you are using if you like.Richard.

author: MikeK
author_rank: Super Contributor
timestamp: June 04, 2012, 02:09:18 am
content: Okay, I thought it stayed hot when turned off, but it just took a while to cool down.It does oscillate, though, when using the 1 ohm load resistor. About 280kHz. I scoped it with the 10 ohm resistor and only got noise, no discernable oscillation.So the oscillation causes it to heat up?The circuit is the same as the drawing in my first post. I'm just using a smaller FET supply voltage.

author: amspire
author_rank: Super Contributor
timestamp: June 04, 2012, 02:28:15 am
content: Try this:Also the lower the shunt resistor, the easier to stabilize - but the bigger the error due to opamp offset. So it is much easier to get stability with a 0.1 ohm resistor then a 10 ohm resistor.

author: MikeK
author_rank: Super Contributor
timestamp: June 04, 2012, 03:01:22 am
content: Yeah, that nailed the oscillation. Did it matter than my shunt resistor is wirewound? I'm going to pick up an 8 ohm non-inductive resistor at RadioShack tomorrow.

author: amspire
author_rank: Super Contributor
timestamp: June 04, 2012, 03:02:34 am
content: Quote from: MikeK on June 04, 2012, 03:01:22 amI doubt it matters. 8 ohms sounds very high. That is 8V drop at 1A. Is this circuit for low currents only? I would normally use 1 ohm or less.

author: MikeK
author_rank: Super Contributor
timestamp: June 05, 2012, 01:57:09 am
content: I didn't go for the 8 ohm shunt. The suggested changes work well. I'll probably just use this for low currents, for testing batteries, but having it go up to 1A is nice.What do I need to learn to understand the values chosen for those changes? Is the 1K output resistor to deal with the FET's gate capacitance and increase its time constant? The 10K feedback resistor is for the op-amp's input capacitance?

author: IanB
author_rank: Super Contributor
timestamp: June 05, 2012, 03:01:14 am
content: Quote from: MikeK on June 05, 2012, 01:57:09 amLet me have a go, for my own edification.Firstly the values are all powers of ten, so that tells me they are picked by order of magnitude, based on engineering judgement and past experience. The exact values are not going to be critical.The 1 k resistor and the 1 nF capacitor act as a low pass filter. High frequency signals are attenuated before they reach the gate of the FET and instead are fed back to the inverting op amp input, giving it unity gain at high frequencies. Both of these together help to prevent oscillation by removing a high gain feedback path that could self-excite.The 10 k resistor is needed to buffer the 1 nF capacitor from the source/R1 junction. Without the resistor the capacitor would be rendered ineffective.