Author Topic: Need help with bi directional constant current source (±100mA)  (Read 12826 times)

0 Members and 1 Guest are viewing this topic.

Offline OM222OTopic starter

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: Need help with bi directional constant current source (±100mA)
« Reply #25 on: November 15, 2018, 08:44:32 pm »
that made things even worse! I honestly can't explain this behavior!


Can you please run a simulation yourself and check what I'm doing wrong?
 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1041
  • Country: ca
Re: Need help with bi directional constant current source (±100mA)
« Reply #26 on: November 15, 2018, 09:45:57 pm »
OM, I didn't look too closely at what you'd presented previously.  Sorry about that.

You need another current sense resistor after or to the right of the current booster.  The INA's feedback resistors are to be connected to the new resistor, not the original R1.  R1 develops a voltage that turns on the booster transistors when more current is needed.

I can't do a sim or schematic.  I have Linux and can't seem to get the design package working.

I'm just about to head out for a few hours - observe & cogitate; I think you'll get it.

Cheers,
 

Offline OM222OTopic starter

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: Need help with bi directional constant current source (±100mA)
« Reply #27 on: November 15, 2018, 11:21:37 pm »
The LT1990 does not have a feedback output  :-// they instead went with a x10 gain functionality which is useless  :palm: I instead chose to use the AD8277 which is a 2 channel difference amplifier with a gain of 1. It's the perfect fit for the job. The only thing is it uses 40K trimmed resistors instead of 1Meg ... I'm not sure what issues if any will that cause (some advice would be nice). I think they will create an error in the output voltage which is why it's recommended to use another op amp in unity gain configuration to drive the "ref" connection.


also after running the simulations, it seems that the external voltage supply will have no effect unless the output of the op amp can reach that voltage (i.e. if I use ±12V to drive the op amp but connect the transistors to a ±48V supply, the transient response would be exactly the same!) any comments on how I can improve that?

I also ditched the idea of using transistors as they don't seem to have any SOA rating  :-//  so I went with mosfets.
also at the beginning of the transient, the voltage goes about 1.5V above the supply rails of the op amps ... can that cause an issue? if yes, is there a way to fix it?
here is a link to the falstad simulation:
http://tinyurl.com/y7294uw7
and here are the things that I was asking about
 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1041
  • Country: ca
Re: Need help with bi directional constant current source (±100mA)
« Reply #28 on: November 16, 2018, 06:14:20 pm »
OM,

1.) You are probably opening a can of worms by using FETs for the current booster.  In particular, high frequency stability and possible damage to the FETs by exceeding their gate to source voltage limits.  I'm surprised the bipolar transistors do not have a graph of the Safe Operating Area.  What devices were you using?

2.) Without going into great detail, I'd say that by not buffering the + divider, you'll get a current error in absolute terms equal to Vload / 80K.  This is because the divider is diverting some of the current pump's output to circuit common.  If you want 100 mA at 20 V, you'll get 99.75 mA.  If you want 1 mA at 20 V, you'll get 0.75 mA.  If this is used in a closed loop servo, this is most likely acceptable.  IOW, the non-linearity just gets lumped into the stiction of the actuator.  Another way to look at it is that current pumps should have infinite output impedances, ie., the current is independant of the voltage.  This will put an 80 K resistor in parallel with the current pump.

3.) if you decide to use an opamp to buffer the + divider, good design practice is to not exceed its input to supply rail voltage and current specs.  It'd probably  be acceptable to use a resistor of say, 10 K to 100 K in series with the + input of the buffer to limit current in case a greater voltage is applied.  This will introduce another error due to an offset voltage developed across this resistor by the input bias current of the opamp.  (see Final Note)

4.) If the INA is powered by +/-12 V, there won't be any real difference in the transient response.  An inductance generates a counter voltage across itself equal to the rate of change of current thru it.  Therefore, if you want to change the current faster, you need to apply a greater voltage to overcome counter voltage.  Using +/- 40 V on the current booster does not change the fact that the INA output is still limited to +/- 12 V.  The current booster has a voltage gain of almost 1 but a current gain related to the beta of the transistors.

BTW, I've been using the term INA for Instrumentation Amplifier.  It's probably not completely accurate as these parts are maybe better described as Opamps with Integrated Differencing Divider Networks - OIDDN - or something like that.

Final note: As a Jewish friend said, "Oy Gevalt!"  These things are like a game of Whack-a-mole.

Hope this makes sense and helps in some way (at least)

Cheers,
« Last Edit: November 16, 2018, 11:35:08 pm by duak »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4789
  • Country: pm
  • It's important to try new things..
Re: Need help with bi directional constant current source (±100mA)
« Reply #29 on: November 16, 2018, 08:29:33 pm »
This works somehow.. Parts chosen are from my junkbox, use yours if any, and do elaborate.. It gives you +/-102.4mA into R6 or L1 (the load)..
The signal generator is 2.048Vpp sine with DC offset +1.024V.


« Last Edit: November 16, 2018, 09:15:56 pm by imo »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Need help with bi directional constant current source (±100mA)
« Reply #30 on: November 16, 2018, 11:57:21 pm »
I tried connecting the transistors to ±24V supply separately but it had no use and there were some strange 1A current draw initially.


at this point I honestly have no idea what to do :( please help.
is it possible to use a low voltage differential amplifier, followed by the ADA4522-2ARZ-RL in unity gain to get the higher voltage range for the desired result?
That won't work because Q1 and Q2 will both turn hard on, causing lots of smoke. Look at the DC emitter currents!

Look at Q1 to start with. Its emitter is at -24V and its base is being pulled upwards to -12V via 1k, causing it to turn fully on and the same is going on with Q2.

This one of the traps with simulators: they permit things which would cause fire in real life!

This works somehow.. Parts chosen are from my junkbox, use yours if any, and do elaborate.. It gives you +/-102.4mA into R6 or L1 (the load)..
The signal generator is 2.048Vpp sine with DC offset +1.024V.
Yes it will work, but the +/-24V power supply doesn't gain you much. The common emitter follower will not increase the voltage swing of the op-amp, so nothing is gained from using a higher voltage power supply, than what the op-amp can tolerate.

Q1 and Q2 have a voltage gain of just under 1, so if the op-amp's output can only swing from +13V to -13V, the output of Q1 and Q2 won't be any better. There will also be some crossover distortion due to the dead band when neither Q1 and Q2 are on.

The LT1990 does not have a feedback output  :-// they instead went with a x10 gain functionality which is useless  :palm: I instead chose to use the AD8277 which is a 2 channel difference amplifier with a gain of 1. It's the perfect fit for the job. The only thing is it uses 40K trimmed resistors instead of 1Meg ... I'm not sure what issues if any will that cause (some advice would be nice). I think they will create an error in the output voltage which is why it's recommended to use another op amp in unity gain configuration to drive the "ref" connection.
Snip.

Before going any further. What are your requirements regarding bandwidth and slew rate, precision and offset? Sorry if you've mentioned it somewhere, I haven't read every single word of this thread yet, as I don't have time at the moment.

Have you considered using a bridged output? Doing so would enable the entire circuit to be powered by standard op-amps, with not voltage boosting, only current boosting would be required.

How about an audio amplifier IC?
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4789
  • Country: pm
  • It's important to try new things..
Re: Need help with bi directional constant current source (±100mA)
« Reply #31 on: November 17, 2018, 10:30:37 am »
This gives you nice swing (here aprox 45Vpp) on the output.
The Load is L1=3.5H with R6=5ohm in series (no idea what is the Resistance of your actuator).
Current +/-102.4mA into the Load based on input (here 2.048Vpp sine w/ DC offset +1.024V).
Not easy to simulate, however..
Mind it is a simulation only..
Needs some elaboration with R values and final components of choice..
You may add decoupling, output protection diodes, snubbers, etc. (you mess with inductive load)  :)
« Last Edit: November 17, 2018, 01:06:06 pm by imo »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Need help with bi directional constant current source (±100mA)
« Reply #32 on: November 17, 2018, 10:06:34 pm »
This gives you nice swing (here aprox 45Vpp) on the output.
The Load is L1=3.5H with R6=5ohm in series (no idea what is the Resistance of your actuator).
Current +/-102.4mA into the Load based on input (here 2.048Vpp sine w/ DC offset +1.024V).
Not easy to simulate, however..
Mind it is a simulation only..
Needs some elaboration with R values and final components of choice..
You may add decoupling, output protection diodes, snubbers, etc. (you mess with inductive load)  :)
That circuit doesn't give a voltage offset of 1.024V, but a current offset of 102.4mA.

It's a good idea but the biasing is a bit off. The quiescent current will be high, resulting in a high power dissipation, even though there's no signal. The DC current through the +/-24V power supplies is nearly 140mA, even with both inputs connected to 0V!

The power amplifier also has far too much gain and there's no frequency compensation network so it will oscillate in real life: something which not all models will show.

I've simulated it in LTSpice. Note how I've improved the presentation, using labels, to make it easier to follow.

Fortunately it can be fixed. See the schematic below.

The circuit is biased into class AB operating using a Q5 which forms a VBE multiplier. RV1 will need to be adjusted to give about 15mA through Q1 and Q2. Start off with the wiper set so the resistance is near zero and increase it until the voltage across R14 or R5 reaches 150mV. Q5 should also be thermally coupled to Q1 ans Q1, so its base voltage varies with the temperature of the output transistors.

Oscillation is avoided by keeping the open loop gain to a minimum, rather than adding capacitors. R6 and R7 provide negative feedback to the power amplifier stage, giving it a gain of just under 3.2, in reality it's 2.1, as R12, R13 and R18, R19 act as a potential divider which reduces the gain further. R16 and R17 reduce the loop gain, without actually altering the gain (figure that one out?).


 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Need help with bi directional constant current source (±100mA)
« Reply #33 on: November 17, 2018, 11:31:45 pm »
The most efficient solution is to get rid of the bipolar power supplies and replace them with a single 24V supply and use a push-pull configuration. U1 can be a decent op-amp, with low offset voltage and current, but U2 can be a generic op-amp, such as the old uA741.


 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1041
  • Country: ca
Re: Need help with bi directional constant current source (±100mA)
« Reply #34 on: November 18, 2018, 03:24:28 am »
Hero,

I'm not able to simulate yours (or anyone's) circuits.  May I have you run some simulations on your circuits first with a square wave input and then secondly a repeating plus, zero, minus, zero (tri-level) waveform?  The load voltage waveforms should be interesting, especially for the non-bridge designs.

Thx & cheers,


 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4789
  • Country: pm
  • It's important to try new things..
Re: Need help with bi directional constant current source (±100mA)
« Reply #35 on: November 18, 2018, 08:32:40 am »
This gives you nice swing (here aprox 45Vpp) on the output.
The Load is L1=3.5H with R6=5ohm in series (no idea what is the Resistance of your actuator).
Current +/-102.4mA into the Load based on input (here 2.048Vpp sine w/ DC offset +1.024V).
Not easy to simulate, however..
Mind it is a simulation only..
Needs some elaboration with R values and final components of choice..
You may add decoupling, output protection diodes, snubbers, etc. (you mess with inductive load)  :)
That circuit doesn't give a voltage offset of 1.024V, but a current offset of 102.4mA.
Nope, it is not about an output offset, but DC offset of the input signal generator used in my simulation:
Quote
Current +/-102.4mA into the Load based on input (here 2.048Vpp sine w/ DC offset +1.024V).
The OP has got 2 sources at two inputs:
1. a constant +1.024V DC, and
2. the input from a DAC -> 0..+2.048V (=1.024 + 1.024*sin(x), in my simulation).
Therefore my simulation follows his setup..

Of course, the simulation/implementation needs some tweaking, as I wrote above. The important point there is the working principle - the transfer function would be (based on my schematics):
Quote
R1/R3 = R5/R4
Iout = (Vs1-V1)/R8 * R5/R4
or something like that :)

« Last Edit: November 18, 2018, 02:11:02 pm by imo »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Need help with bi directional constant current source (±100mA)
« Reply #36 on: November 18, 2018, 09:28:50 am »
Hero,

I'm not able to simulate yours (or anyone's) circuits.  May I have you run some simulations on your circuits first with a square wave input and then secondly a repeating plus, zero, minus, zero (tri-level) waveform?  The load voltage waveforms should be interesting, especially for the non-bridge designs.

Thx & cheers,

What software did you use?

A square wave, with a decent rise/fall time, will always cause clipping with an inductive load because a very high voltage will be required to achieve such a high di/dt.

This gives you nice swing (here aprox 45Vpp) on the output.
The Load is L1=3.5H with R6=5ohm in series (no idea what is the Resistance of your actuator).
Current +/-102.4mA into the Load based on input (here 2.048Vpp sine w/ DC offset +1.024V).
Not easy to simulate, however..
Mind it is a simulation only..
Needs some elaboration with R values and final components of choice..
You may add decoupling, output protection diodes, snubbers, etc. (you mess with inductive load)  :)
That circuit doesn't give a voltage offset of 1.024V, but a current offset of 102.4mA.
Nope, it is not about an output offset, but DC offset of the input signal generator used in my simulation:
Quote
Current +/-102.4mA into the Load based on input (here 2.048Vpp sine w/ DC offset +1.024V).
The OP has got 2 sources at two inputs:
1. a constant 1.024V DC, and
2. the input from a DAC - 0..2.048V (=1.024 + 2.048*sin(x)).
Therefore my simulation follows his setup..

Oh I see what you mean, but the input is differential, so it really doesn't matter. Whether the negative input is set to 0V and the input swings from -1.024 to +1.024, or the negative input is set to +1.024V and the input swings from 0V to 2.048V, is immaterial. The output voltage will be the same and fortunately the DC bias voltages on the op-amp inputs will be within the common mode range.

I'm surprised you missed the error I made when simulating your circuit: I set the input voltage too high. I think the signal generator on your circuit shows thevoltage swing, but LTSpice uses the peak voltage, so I set it to double what it should be, causing clipping. I did realise after I uploaded the attachment, but decided not to redo it, in the hope you'd notice.
« Last Edit: November 18, 2018, 09:30:26 am by Hero999 »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4789
  • Country: pm
  • It's important to try new things..
Re: Need help with bi directional constant current source (±100mA)
« Reply #37 on: November 18, 2018, 09:32:21 am »
Fixed above:
Quote
The OP has got 2 sources at two inputs:
1. a constant +1.024V DC, and
2. the input from a DAC -> 0..+2.048V (=1.024 + 1.024*sin(x), in my simulation).
Therefore my simulation follows his setup..
OP - original poster, opamp - a device :)
« Last Edit: November 18, 2018, 09:37:51 am by imo »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4789
  • Country: pm
  • It's important to try new things..
Re: Need help with bi directional constant current source (±100mA)
« Reply #38 on: November 18, 2018, 09:48:47 am »
35y back I messed with a 5 pins chip called TDA2030 - a 14W/36V audio amplifier, basically a power opamp.. Here is the datasheet, pretty obsolete today, but may be there is something newer available today..
« Last Edit: November 18, 2018, 10:05:15 am by imo »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4789
  • Country: pm
  • It's important to try new things..
Re: Need help with bi directional constant current source (±100mA)
« Reply #39 on: November 18, 2018, 01:55:40 pm »
I'm not able to simulate yours (or anyone's) circuits. 
I've just reinstalled my LTSpice to the latest and the Hero's .asc (double click on it) simulates..
 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1041
  • Country: ca
Re: Need help with bi directional constant current source (±100mA)
« Reply #40 on: November 18, 2018, 07:24:50 pm »
re simulations:  I've been in electronics for almost 50 years - from before SPICE was developed.  It was my hobby and profession.  I'm now retired, and while I've used SPICE here and there, it wasn't how I designed and tested circuits.  I use Linux and tried the Oregano package but couldn't get it to do anything.  Right now I don't have time to fart around with simulations as I have to deal with an ill family member.

I'm asking that the circuits be simulated with stimuli that could show some problems that my experience indicates may happen.  In particular what happens when zero current is commanded after maximum current.  Some of my previous replies address this issue.

BTW, for the designs using a common emitter booster, can anyone predict what could happen when the junction temperatures of the output transistors cause the VBE to drop enough so that the idle current of the opamp is sufficient to provide base current all the time?

Cheers,
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4789
  • Country: pm
  • It's important to try new things..
Re: Need help with bi directional constant current source (±100mA)
« Reply #41 on: November 19, 2018, 09:26:03 am »
This is with squarewave input: 0/2.048V, 100ms period, 50/50, 1us rise/fall edges, and 20-140degC step 20degC.
Note: the temperature simulation depends on how the opamps/transistors' models handle the temperature, the resistor's tempco used here is 0ppm/deg. You may define the tempco for your resistors in LTSpice when interested..
« Last Edit: November 19, 2018, 10:03:07 am by imo »
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Need help with bi directional constant current source (±100mA)
« Reply #42 on: November 19, 2018, 05:27:44 pm »
Still not sure what your requirements are in terms of rise and fall times at full scale (0 to 100mA for instance), but I'll leave it as an exercise what voltage you'd need to get, say, a 100µs rise time driving a 3.2H inductor from 0 to 100mA... :scared:
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: Need help with bi directional constant current source (±100mA)
« Reply #43 on: November 20, 2018, 09:44:45 am »
re simulations:  I've been in electronics for almost 50 years - from before SPICE was developed.  It was my hobby and profession.  I'm now retired, and while I've used SPICE here and there, it wasn't how I designed and tested circuits.  I use Linux and tried the Oregano package but couldn't get it to do anything.  Right now I don't have time to fart around with simulations as I have to deal with an ill family member.

I'm asking that the circuits be simulated with stimuli that could show some problems that my experience indicates may happen.  In particular what happens when zero current is commanded after maximum current.  Some of my previous replies address this issue.
Well the maximum di/dt is dependant on the voltage swing of the amplifier and inductance.

Quote
BTW, for the designs using a common emitter booster, can anyone predict what could happen when the junction temperatures of the output transistors cause the VBE to drop enough so that the idle current of the opamp is sufficient to provide base current all the time?

Cheers,
Thermal runaway is the most likely scenario, which is why the base-emitter resistors need to be selected to ensure it won't happen. Adding emitter resistors can help to mitigate that risk somewhat, at the expense of a higher saturation voltage.

I think 100R base-emitter resistors should be safe enough with the OP07. I did make an attempt at allowing sufficient headroom. I couldn't find the quiescent current for the OP07 on the data sheet, so I derived it from the maximum power consumption figure of 120mW at a combined power supply voltage of 30V (+/-15V). P = 0.12/15 = 4mA, which would be a voltage drop or 400mV across 100R, which should be too low to bias the BJTs on, unless they're extremely hot.  I also expect the OP07's current consumption will have a negative temperature coefficient, which should make cross conduction less likely.

https://www.analog.com/media/en/technical-documentation/data-sheets/op07.pdf

Glancing at the data sheet again, I've noticed the OP07C has a maximum quiescent power consumption of 150mW, drawing a current of 5mA, so would drop 500mV across 100R, which would be a problem if the transistors got hot. I'd reduce the base-emitter resistor values to something like 82R or even 68R. It's possible to go lower, but going too low, there's an increasing risk the op-amp won't be able to produce enough drive current to turn on the transistors, especially at low temperatures.

Also note that the power and therefore current consumption figures were derived from the worst case data sheet figures, which were specified at 30V. The situation is unlikely to be that bad and at 24V, the current consumption is likely to be lower.
« Last Edit: November 20, 2018, 01:44:45 pm by Hero999 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf