## Voice Coil Rail

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: Pau, rjlittlefield, ChrisR, Chris S.

mjkzz
Posts: 1237
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:
Mike, please rethink about your replies, with your 40 years background, you will see what I am saying. :-)

mjkzz
Posts: 1237
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:
Mike, for that matter, please build an actual circuit and measure all the point of interest on the circuit and if you have a scope, watch them.

This is getting something elementary :-)

mjkzz
Posts: 1237
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:
ah, I did not see that you got a 1K resistor from the output of opamp. That will make thing different and the "forced" current works. :-)

But still, say we are stepping at 1ma at a time, from +1ma to 0, then to -1ma?

mawyatt
Posts: 2479
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater
mjkzz wrote:ah, I did not see that you got a 1K resistor from the output of opamp. That will make thing different and the "forced" current works. :-)

But still, say we are stepping at 1ma at a time, from +1ma to 0, then to -1ma?
Peter,

Think you've now discovered the 1K resistor keeps the op-amp loop from having a dead band and wandering back and forth between +- Vbe to keep the op amp - input at zero volts when no current is thru the load (the + input is set to zero volts). This is a subtle but very important aspect of the circuit.

Stepping from +1ma to 0, the op amp will supply about 0.7~0.8ma of the 1ma and the npn will supply the rest, at zero the op amp keeps the current at zero directly thru the 1k and neither transistor is conducting, at -1ma the op will sink about 0.7~0.8ma and the pnp will sink the rest of the -1ma.

Stepping from +10ma to 0, the op amp will supply about 0.8ma of the 10ma and the npn will supply the rest (~9.2ma), at zero the op amp keeps the current at zero directly thru the 1k and neither transistor is conducting, at -10ma the op will sink about 0.8ma and the pnp will sink the rest (-9.2ma) of the -10ma.

Stepping from +100ma to 0, the op amp will supply about 1ma of the 100ma and the npn will supply the rest (99ma), at zero the op amp keeps the current at zero directly thru the 1k and neither transistor is conducting, at -100ma the op will sink about 1ma and the pnp will sink the rest (-99ma) of the -100ma.

You can fill in anything in between you want.

Best,

Mike

mawyatt
Posts: 2479
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater
mjkzz wrote:Mike, for that matter, please build an actual circuit and measure all the point of interest on the circuit and if you have a scope, watch them.

This is getting something elementary :-)
Peter,

I don't need to build and test the circuit, I KNOW it works. It was built (similar fashion) in the 1970s, and used in multiple projects, some went to production and maybe still in production.

Anyway, glad you've found the found out how the current mode circuit works.

Best,

Mike

mjkzz
Posts: 1237
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:
Hahaha, I did not see that 1k resistor. With that 1k resistor, sure, at zero, the voltage of the op-amp is zero!

OK, here is something I like to fill in and both in current mode thinking and voltage mode :-)

say the gain of both BJT are huge, here is the scenario: stepping from +2ma to +1ma, the CHANGE of output voltage of op-amp is very little due to large gain of BJT. However stepping from +1ma to 0 is a different matter, the output voltage of the opamp must drop from somewhere over 0.7v (typical BJT turn-on voltage) to zero. Same from 0 to -1 ma, the voltage will swing from 0 to a little less than -0.7v (maybe -0.701V)

From your current mode point of view, current changed by 1ma, but from voltage point of view, the output of the op amp swings by at least 0.7v. And since the 1k resistor is forcing the output of the opamp to be zero, now you have two regions that causes large voltage swings (vs one large one if that 1k resistor is not there)

As I said before, this MIGHT not cause any issue as circuit reaches equilibrium very fast, but how fast? maybe there is an theoretical way to calculate this, but even that, it really depends on component selected and maybe even depends on where the components are made (made in China or US?) or simply put, theory might deviate from actual implementation. Hence my call to build an actual circuit and monitor points of interests.

mjkzz
Posts: 1237
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:
Anyway, glad you've found the found out how the current mode circuit works.
Oh no, I never said it does not work, in fact, my PCB is built with "current mode" design and it works. I just had questions about what happens to the circuit about the "voltage swing" and how fast the circuit reacts to it in your design on Page 7.

The circuit I built with my PCB does not have that 1k resistor, so the transistor is always in active region if current not set to zero. When current is set to zero, I measured that the voltage output of the opamp is kind of floating (each time I measure it, it is different, not that it is constantly changing) but below 0.63V which probably is the turn on voltage for that PARTICULAR transistor.

ChrisR
Site Admin
Posts: 8575
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK
I do feel for Mike

Here. a sawtooth generator input, with R4 giving the output a lot to do, (these transistors would need heatsinks). It also magnifies the step in the green trace to make the function obvious.
The op amp is a crummy old 741, and the transistors not high gain.
No glitch.
The 1M resistors simply allow a non-coincident trace.

Chris R

mawyatt
Posts: 2479
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater
Chris,

Very Nice. Is this a SPICE type simulator?

If you make R3 your Voice Coil load, R1 the sense resistor and remove R4 or make it large (100K) you have the current mode operation.

With the ramp generator set to +- 5 volts, R1 (Rsense) at 50 ohms for +-100ma current and R3 4 ohms (Voice Coil load). If you monitor the current thru R3 (Voice Coil Load) you will see the ramp current peaking at +-100ma.

Now change R3 to 5 ohms, the result thru current is the same, now change R3 to 0.1, 1, 2, 3, 6, 8, 10, even 20 ohms or maybe higher (within the op amp output voltage capability) and the R3 load thru current is the same!!!

How can this be, the current thru the load R3 is almost completely independent of the load value??

This is current mode operation!!!

Best,

Mike

mawyatt
Posts: 2479
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater
mjkzz wrote:Hahaha, I did not see that 1k resistor. With that 1k resistor, sure, at zero, the voltage of the op-amp is zero!

OK, here is something I like to fill in and both in current mode thinking and voltage mode :-)

say the gain of both BJT are huge, here is the scenario: stepping from +2ma to +1ma, the CHANGE of output voltage of op-amp is very little due to large gain of BJT. However stepping from +1ma to 0 is a different matter, the output voltage of the opamp must drop from somewhere over 0.7v (typical BJT turn-on voltage) to zero. Same from 0 to -1 ma, the voltage will swing from 0 to a little less than -0.7v (maybe -0.701V)

From your current mode point of view, current changed by 1ma, but from voltage point of view, the output of the op amp swings by at least 0.7v. And since the 1k resistor is forcing the output of the opamp to be zero, now you have two regions that causes large voltage swings (vs one large one if that 1k resistor is not there)

As I said before, this MIGHT not cause any issue as circuit reaches equilibrium very fast, but how fast? maybe there is an theoretical way to calculate this, but even that, it really depends on component selected and maybe even depends on where the components are made (made in China or US?) or simply put, theory might deviate from actual implementation. Hence my call to build an actual circuit and monitor points of interests.
Peter,

The "Gain" of a bipolar, if this is change in collector current vs. change in Vbe voltage, this "Gain" is dictated by solid state physics, and does not depend on any transistor characteristics. This is one of the most amazing things about bipolar devices, and good designs take advantage of this physics related feature.

Ic = Is*exp(Vbe/vt), where Is is the saturation current and highly device dependent.

However the derivative of Ic with respect to Vbe is the Current Gain and not device dependent.

This is dIc/dVbe = Ic/vt. I'll leave the calculus as an assignment :>)

vt is the "thermal voltage" or kT/q where k is Boltsman's Constant 1.38 E-23 J/k, k is temperature in Kelvin, and q is the electron charge 1.609 E-19 Coulombs. So at room temperature (300k) vt ~ 26mv

The beauty of negative feedback systems with high open loop gain (op amp for example) is that everything "inside" the loop basically doesn't matter. It can change with temperature, age, tolerance, you name it and the output results don't change much. Of course this assumes a proper design within the limits of the components and available supplies.

Regarding speed, for the intended use the op amp and transistors are plenty fast enough to not be an issue. The settling time will be in a few microseconds if you frequency bypass the Voice Coil load as shown in my schematics. Now if you want to push this into something that operates at 10KHz or higher, you will begin to see some performance deterioration. If you wish to operate at faster rates then a faster op amp will be in order and a smaller coil bypass will be required.

Settling time calculations for these systems is somewhat involved, but can be approximated closely as a second order system. You want the 2nd order dampening to be 1/root2 or higher, usually around 1 is a good design choice.

A good op amp book by Roberge from MIT covers this topic nicely. Very well written and not too involved mathematically.

https://www.amazon.com/Operational-Ampl ... 0471725854

Wow this topic has turning into an elementary analog design course!!!

Best,

Mike
Last edited by mawyatt on Mon May 01, 2017 8:57 am, edited 5 times in total.

mawyatt
Posts: 2479
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater
mjkzz wrote:
Anyway, glad you've found the found out how the current mode circuit works.
Oh no, I never said it does not work, in fact, my PCB is built with "current mode" design and it works. I just had questions about what happens to the circuit about the "voltage swing" and how fast the circuit reacts to it in your design on Page 7.

The circuit I built with my PCB does not have that 1k resistor, so the transistor is always in active region if current not set to zero. When current is set to zero, I measured that the voltage output of the opamp is kind of floating (each time I measure it, it is different, not that it is constantly changing) but below 0.63V which probably is the turn on voltage for that PARTICULAR transistor.
Peter,

Why not just solder the 1K resistor onto the board across the base emitter transistor pads? Then measure the Op amp output.

Best,

Mike

rjlittlefield
Site Admin
Posts: 21204
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:
ChrisR wrote:I do feel for Mike
Me too. And I greatly appreciate Mike's gracious and detailed replies.
mjkzz wrote:I just had questions about what happens to the circuit about the "voltage swing" and how fast the circuit reacts to it in your design on Page 7.
For me, Google search on "741 op amp slew rate" responds with the following snippet from http://hyperphysics.phy-astr.gsu.edu/hb ... 741p3.html :
One of the practical op-amp limitations is the rate at which the output voltage can change. The limiting rate of change for a device is called its "slew rate". The slew rate for the 741 is 0.5V/microsecond compared to 100V/microsecond for a high-speed op-amp.
So, I think the answer to your question is a few microseconds max, much less if you use a fast op amp. A lot faster than the mechanics can respond, at any rate. Unless of course I've missed something...

--Rik

ChrisR
Site Admin
Posts: 8575
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK
It's a thing called "Circuit Wizard".

"In my day" we used a 531 if we needed a fast slew rate, but I expect everything is faster now.

Without R4 you don't see the step that people are worried about..
I can change the simulator to the values Mike suggests. A snag is that the traces will only show voltages.
Umm - I can put a 1R in series feedback and use a diff amp across it.. ?

It's exam project submission time and I'm responding several times an hour to students trying to get their stuff done...
Chris R

mawyatt
Posts: 2479
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater
Rik,

Slew rate is one metric to describe the time domain response, another is the unity gain frequency (where the open loop gain is unity). Higher is better in either case, but not required for this application since the overall system speed is very low. The ua741, LM358 and other typical general purpose op amps are relatively slow, with Slew Rates in the volt per microsecond region as you have shown. One interesting type of distortion called Transient InterModulation Distortion, it is a direct result of Slew Rate Limiting. If you draw a simple sine wave, then draw a triangle wave with the peaks at the sine wave +-peaks and same zero crossings. You can see the sinewave has a significantly higher rate of change (d/dt) around the zero crossing than the triangle wave, in fact 2*pi times greater (if I my math correctly). With larger sinusoidal signals the slew rate limits the ability to faithfully produce the desired waveform and distortion is introduced.

As you move up in speed (frequency) other things start to become a nuisance and complicate things considerably. I'd prefer not to go there, unless someone urgently needs to know, because it's gets quite complicated!!

There are special types of high slew rate and high bandwidth op amps for those applications that need the speed, but they tend to be expensive and power hungry and should only be employed where necessary, certainly not here!!

Best,

Mike
Last edited by mawyatt on Mon May 01, 2017 1:36 pm, edited 1 time in total.

mawyatt
Posts: 2479
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater
ChrisR wrote:It's a thing called "Circuit Wizard".

"In my day" we used a 531 if we needed a fast slew rate, but I expect everything is faster now.

Without R4 you don't see the step that people are worried about..
I can change the simulator to the values Mike suggests. A snag is that the traces will only show voltages.
Umm - I can put a 1R in series feedback and use a diff amp across it.. ?

It's exam project submission time and I'm responding several times an hour to students trying to get their stuff done...
Chris,

Oh yes, the apparent cross-over distortion will disappear without R4!!

Is the simulator SPICE based, and is that shareware? Looks like you can layout PCBs and such, very nice!!

Just put a 1 ohm resistor in series with R3, this will allow the load current to be measured (R3 is the Voice coil load equivalent). Just measure the voltage drop across the 1 ohm, will be in amps directly since it's 1 ohm.

Best,

Mike