EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: engrguy42 on May 26, 2020, 09:46:39 pm

Title: Dumb Question on Current Source
Post by: engrguy42 on May 26, 2020, 09:46:39 pm
I threw together a simple constant current source shown below. I did something stupid but can't figure out what.

If I use a single power supply to power the MOSFET/OpAmp input it works fine. But if I have a separate power supply for the input and another for the MOSFET drain/source output it doesn't work. The MOSFET won't turn on.

BTW, this isn't an LTSpice question (both work fine in LTSpice), it's an actual breadboarding question. And I'm sure the breadboard wiring matches the diagrams in both cases. 

 |O

Anyone?

Thanks.
Title: Re: Dumb Question on Current Source
Post by: langwadt on May 26, 2020, 09:54:18 pm
And I'm sure the breadboard wiring matches the diagrams in both cases. 

and you are probably wrong ...
Title: Re: Dumb Question on Current Source
Post by: engrguy42 on May 26, 2020, 09:56:58 pm
And I'm sure the breadboard wiring matches the diagrams in both cases. 

and you are probably wrong ...

Really? So the two supplies should work like that? It's weird because all I did was move a couple wires to go from the dual supply to the single supply and suddenly it worked fine. So the underlying wiring should be okay...

 |O
Title: Re: Dumb Question on Current Source
Post by: schmitt trigger on May 26, 2020, 09:57:39 pm
Take readings of voltages at every opamp pin and label them in your schematic.

Which supply is powering the opamp?
Title: Re: Dumb Question on Current Source
Post by: engrguy42 on May 26, 2020, 10:01:27 pm
Take readings of voltages at every opamp pin and label them in your schematic.

Which supply is powering the opamp?

Vcc for the opamp is coming from the supply on the left.

EDIT: And for the nonworking one (2 supplies) the supply on the left is actually 12v, and the output to the gate is 7.3v, the - input is 0.11 volts, and the + input is 7.3 volts. So the MOSFET isn't going on (it has a 3 volts threshold).

And with the single 10v supply it's all as expected...load volts is 6V.

Title: Re: Dumb Question on Current Source
Post by: SiliconWizard on May 26, 2020, 10:16:42 pm
I suppose you have checked the other supply's voltage?
Title: Re: Dumb Question on Current Source
Post by: engrguy42 on May 26, 2020, 10:17:11 pm
I suppose you have checked the other supply's voltage?

Yup.
Title: Re: Dumb Question on Current Source
Post by: rfbroadband on May 26, 2020, 10:23:57 pm
measure all DC voltages with a scope and look for instabilities or oscillations...
Title: Re: Dumb Question on Current Source
Post by: langwadt on May 26, 2020, 10:26:28 pm
And I'm sure the breadboard wiring matches the diagrams in both cases. 

and you are probably wrong ...

Really? So the two supplies should work like that? It's weird because all I did was move a couple wires to go from the dual supply to the single supply and suddenly it worked fine. So the underlying wiring should be okay...

 |O

missing ground on the second supply?
Title: Re: Dumb Question on Current Source
Post by: splin on May 26, 2020, 10:31:43 pm
So, in the non-working case you are saying the gate-source voltage is 7.3V and the drain-source voltage is 10V - as measured directly at the MOSFET pins?

I have a vague recollection that some breadboards have power rails split half way along. Alternatively it may be down to dodgy contacts in the breadboard.

Can you be sure the opamp isn't oscillating? Changing the power supply connections may change parasitic capacitances enough to change the behaviour. Try adding a 100ohm resistor between the opamp output and the MOSFET gate.

Adding decoupling caps close to the opamp won't hurt either.
Title: Re: Dumb Question on Current Source
Post by: engrguy42 on May 26, 2020, 10:54:38 pm
I'm also not ruling out a dumb breadboard error like I did the other day...

 |O

Real embarassing....
Title: Re: Dumb Question on Current Source
Post by: engrguy42 on May 26, 2020, 11:09:14 pm
So, in the non-working case you are saying the gate-source voltage is 7.3V and the drain-source voltage is 10V - as measured directly at the MOSFET pins?

I have a vague recollection that some breadboards have power rails split half way along. Alternatively it may be down to dodgy contacts in the breadboard.

Can you be sure the opamp isn't oscillating? Changing the power supply connections may change parasitic capacitances enough to change the behaviour. Try adding a 100ohm resistor between the opamp output and the MOSFET gate.

Adding decoupling caps close to the opamp won't hurt either.

Yeah, measured right at the MOSFET. And I tried both a 100 ohm and a 1k ohm and no improvement. And yeah, it's got that power rails split but I have them all on one side. I even replaced both the MOSFET and the opamp and no improvement. Weird. Maybe dodgy contacts or something..
Title: Re: Dumb Question on Current Source
Post by: engrguy42 on May 26, 2020, 11:25:03 pm
measure all DC voltages with a scope and look for instabilities or oscillations...

Bingo. There's an absolute crap-ton of switching noise.
Title: Re: Dumb Question on Current Source
Post by: engrguy42 on May 26, 2020, 11:34:09 pm
Thanks all. I threw a 1uF capacitor in the mix and it works fine now.  :-+