Is my current source circuit operating correctly? (w scope pics)

Thread Starter

nanok66

Joined Jul 14, 2016
62
Hi all,

I am struggling to understand if my current source circuit is working correctly. I'm not sure if I'm placing my oscilloscope probes in the correct places either. Here are some pics to illustrate what I'm talking about.

This is my current source circuit. The bottom goes to GND even if I didn't draw it perfectly. I am sending a 100kHz square wave from an arduino into the op-amp. The op-amp is connected to the gate of the MOSFET. I was hoping the circuit would create a 5V square wave through the MOSFET but I'm not sure of this when I look at my scope.
IMG_1774.JPG

Here is the scope screen when it is connected to the arduino only. GND of the probe to GND. Positive probe to the pin outputting the square wave. This would be point A (highlighted in pink) except that it is NOT connected to the op-amp yet. The square wave is obviously very clean and looks as it should.
IMG_1770.JPG

Now I connect the arduino into my circuit (point B in pink highlight) and the wave looks similar just a bit less voltage and the edges are a bit rounded. So far so good..
IMG_1771.JPG

Now this is where I get confused. I connect the scope probe to the output of the op-amp (point C in pink) and I get this:
IMG_1772.JPG

No settings have been changed on the scope. The scope has been set to DC with 1V/div.

Why is the voltage reduced so greatly? It's no longer a square wave - can anyone explain why?

Is this even a decent circuit to create a 100kHz square wave? (BTW I was using the MOSFET because I may run the circuit with less resistance and draw up to 1000mA even though I am currently drawing ~25mA)

Any help or general comments are highly appreciated!
 

crutschow

Joined Mar 14, 2008
23,487
The reason your are struggling is that the circuit shown is not a current source (what is the source node connected to?).
How did you come up with that circuit?

You need a resistor from the MOSFET source to ground with the (-) input of the op amp going to the junction of the source and resistor.
With that the current through the MOSFET will be the input voltage divided by this source resistor value.
 

Thread Starter

nanok66

Joined Jul 14, 2016
62
The rest of the circuit was omitted for clarity but there is a 10ohm resistor. Here's an updated drawing:

IMG_1775.JPG
Would the 10ohm resistor help?

Well I'm clearly no electrical engineer but from my first 5 hours of reading current source articles this seemed to be one of the simplest variations of a current source circuit that could draw currents up to 1amp.
 

Marley

Joined Apr 4, 2016
283
I don't know much about the AD8606 but at 100kHz you are asking a lot from the op-amp. How much gain does the op-amp have at that frequency? What is the phase shift?

What is the ultimate purpose of this circuit?
 

DickCappels

Joined Aug 21, 2008
5,933
It would probably help to know where those waveforms are with respect to ground and what the vertical scales are set to. It would be nice to know what power supply are used by the opamp.
 

Thread Starter

nanok66

Joined Jul 14, 2016
62
Thanks for taking a look DickCappels. Vertical scale is 1V/ division. Not sure about waveforms respect to ground.

The power supply is a 5V fixed LDO: https://www.onsemi.com/pub/Collateral/NCP1117-D.PDF
and of course powering the LDO I am using a 2A 9V "wall wart". The 5V is powering both the op-amp and the 5V for the rest of the circuit.

Marley, taking a look at the graph on the op-amp datasheet labeled "open loop gain and phase vs frequency" it looks like at 100k the gain is 40dB and the phase is 90 degrees. The ultimate purpose is to create a square wave to drive an inductor coil that is not shown but placed between the mosfet source and GND. I don't know how many amps will be necessary but I'm thinking in the range of 25mA to 1A.
 

crutschow

Joined Mar 14, 2008
23,487
The rest of the circuit was omitted for clarity but there is a 10ohm resistor. Here's an updated drawing:
Omitting the 10 ohm resistor totally de-clarified the circuit.
Now it's a current source.
The ultimate purpose is to create a square wave to drive an inductor coil that is not shown but placed between the mosfet source and GND
With that circuit you'd have to place the inductor between the voltage source and the MOSFET drain (replacing the 200 ohm resistor).
If you put the inductor in the source it will mess up the current feedback to the op amp.
 

Thread Starter

nanok66

Joined Jul 14, 2016
62
Ah thank you crutzchow. The devil is certainly in the details, my bad for leaving that out! I'll revise it as you are saying and test again.
 

Thread Starter

nanok66

Joined Jul 14, 2016
62
Ok well I'm glad you guys are interested. My main purpose is to drive an EMAT inductor coil. The EMAT coil, with help of a magnet (not drawn), will induce a vibration in the resonator (which I drew like a tuning fork). 100kHz is the approximate frequency of the resonator.

The 10ohm resistor is a current sense resistor. When the EMAT coil vibrates the resonator at its resonant frequency the impedance of the signal will drop. I want to detect that drop with a uC.

Here's a much more complete drawing of my hopeful circuit:

Current Source 1.jpg

In my quick drawing, I switched the MOSFET and the EMAT/Shunt Resistor combo as per crutzchow's suggestion. I'm not sure this would qualify as "low side sensing" anymore, as I originally read into. What do you guys think of this order of things?
 

crutschow

Joined Mar 14, 2008
23,487
You misunderstood me.
The 10 ohm resistor has to stay in series with the MOSFET source to ground.
It's the feedback voltage from that to the op amp that determines the current.

But if you want to detect the resonant frequency of the inductor than a constant current may not be what you want.
Applying a voltage and detecting the change in current at resonance may work better.
 
Last edited:

DickCappels

Joined Aug 21, 2008
5,933
The reason behind Crutschow's comment: If you drive the coil with a constant current source then theoretically the current will not change when the tuning fork resonates with the drive frequency because you are driving it with a constant current.

Pause for a moment... You plan to drive an electromagnet that will in turn magnetically drive a magnetic tuning fork and you want to see when the fork is resonating with the drive. <== Is that correct?


upload_2017-4-29_15-13-14.png
This is a 187 kHz transmitter that drives the resonant tank with constant current pulses -in your case you would not have the capacitor across the coil. No need for a high speed opamp. If you turn it upside down, using PNP transistors and grounding one end of the coil you can easily monitor the voltage across the coil with a diode peak detector.

Just an idea
 

Thread Starter

nanok66

Joined Jul 14, 2016
62
Ok thanks for the correction. Just to be totally clear I redrew it.

IMG_1778.JPG

Ah but this circuit may not work at all for current sensing because the opamp will attempt to limit the current through the circuit (because of the feedback it receives).. is that right?

Maybe nevermind the opamp current source idea. The articles I read did use pulsed MOSFET systems to excite the coil though so maybe I'm looking for a direct way to pulse a MOSFET from a microcontroller's output.

DickCappels, the EMAT principle is a bit more involved. The tuning fork doesn't have to be a magnetic, just electrically conductive. A magnetic field interacts with eddy currents induced by the coil and produces perpendicular Lorenz forces in the fork. But the take home point is the impedance of the coil changes when the correct resonance frequency is reached. You are saying replace the opamp/MOSFET combo with a combination of transistors?

There is already a diode peak detection circuit but the impedance change will be small ~50 milliohms. If the change is that low wouldn't it be best to amplify the difference with the current shunt monitor/shunt resistor circuit?
 
Last edited:

DickCappels

Joined Aug 21, 2008
5,933
(Some text removed for clarity in this post)

DickCappels, the EMAT principle is a bit more involved. The tuning fork doesn't have to be a magnetic, just electrically conductive. A magnetic field interacts with eddy currents induced by the coil and produces perpendicular Lorenz forces in the fork. But the take home point is the impedance of the coil changes when the correct resonance frequency is reached. You are saying replace the opamp/MOSFET combo with a combination of transistors?

There is already a diode peak detection circuit but the impedance change will be small ~50 milliohms. If the change is that low wouldn't it be
best to amplify the difference with the current shunt monitor/shunt resistor circuit?
Using a simple transistorized current source would be a lot simpler than doing it with an opamp .

Hard to tell whether sensing voltage or current would be better. The fractional change because of the effect would be the same.

By the way, what is the maximum inductance of the coil?
 

Thread Starter

nanok66

Joined Jul 14, 2016
62
I would say max inductance would probably be around 10 microhenries. But it's more likely to be around 1 or 2 microhenries.
 

DickCappels

Joined Aug 21, 2008
5,933
I was concerned about voltage swing across the inductor and from your reply I see that should not be a problem. A two transistor circuit should be adequate. If you don't need current regulation you can probably get by without the current sense transistor and just drive the inductor with resistor in series, depending upon the spectrum you desire.

The uncompensated current sense transistor will drift at the rate of 0.33%/°c. Do you know how tightly the current needs to be controlled, or does it even matter?
 

Thread Starter

nanok66

Joined Jul 14, 2016
62
Right now my circuit has a resistor in series to at least keep the current constant but I'm not sure how regulated it needs to be. As long as any current control didn't affect measuring the 50 milliohm difference in impedance. I think I was originally mislead on the constant current source idea. The current needs to change a bit to allow measurement to take place.

Although for measurement I don't believe I need absolute values. My goal is to detect when there is current difference so relative values will still produce a valid answer.
 
Last edited:
Top