Voice Coil Rail

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

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

mjkzz wrote:
Peter,

Yes, the 1K is not necessary but helps at the zero region. It keeps the op amp from bouncing around because without it the feedback loop becomes "open" around zero.

Here's a couple plots without the transistors! This is without the back to back diodes and with R2 at 1000 and 100 ohms. The OP 07 is suppling all the load current thru R2. With R2 at 1000, the OP 07 output voltage limits as shown. With R2 at 100, the output current limits as shown.

Blue trace is the error and the scale is +- 100ua.

Best,

Mike
Here's a couple plots without the transistors!
you mean without diodes, right?

I deleted my last post because I think I did not quite understand the graphs.

One (with R2=1000) seems to have steeper slopes for red and green and closer response of blue line. The other has slower slope and some gap between the blue and red/green -- the right most of blue drops to bottom, yet the red and green are still sloping, same to the left most part of blue vs red/green when R2=100

Anyways, I do not understand the graphs, I am sure you have your reasons :D
Peter,

No without the transistors!!

Best,

Mike

rjlittlefield
Site Admin
Posts: 23598
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

ray_parkhurst wrote:As I have said before, building and testing is the only sure-fire way to tell how well this system actually works.
Of course, building and testing will only show how one specific implementation works, and only under the exact conditions that were tested.

In response to build-and-test, I see a distinct possibility of a continuing stream of concerns that it wasn't tested under the proper load, or at the proper speed, or that the tester didn't look close enough, or that the tester did look close enough but at the wrong place in the output waveform due to input offset, and so on to exhaustion.

I went through an exercise rather like that a couple of years ago, when I foolishly tried to convince a fellow that magnetic fields are really smooth, not organized into discrete "lines of force" like those iron filings line up along. It turns out that if somebody is convinced that the field is discrete, it's not possible to demonstrate otherwise. No matter what you do, you just haven't looked close enough!

So rather than play with the op amp circuit myself, which otherwise would be amusing, I think I'll wait for the test report from Ray's own bench.

--Rik

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

ChrisR wrote:
Ray wrote:
ChrisR wrote:Peter - it appears in mine, that whether 741 or TL071, reducing the R to tiny, makes little or no difference.
This may be an artifact of the opamp model. If the opamp is modeled behaviorally, with high gain under all conditions, and no inherent sense of sourcing or sinking current, ..
Or it may be that it works as described, with out any such inventions?
As far as I can see, they aren't necessary.

Obviously, Op amps DO sink and source current and this resistor isn't doing sensing.

Again, can you set out why you feel the need to invoke "artifacts"?
Chris,,

This should displace any myths about artifacts, behavioral models and what not!!

Here's a really bad op amp I created while at lunch today, in fact its so bad it hardly qualifies as an "op amp". I wired it into the Voice Coil driver and ran a couple simulations. First is a sweep of Vin from -5 to 5 volts which should produce and output load current from -100ma to +100ma. The second is a PWL linear input from 0 to 5, then to -5 and back to zero volts. This should produce a load current from 0 to +100ma to -100ma and back to 0. Note the back to back diodes are present to create a really nasty non-linearity in the load.

The Blue traces in both plots are the error current computed as Ideal - Iload. This Op amp has all the bad behavior one could imagine, but the circuit still works fine. Why? I say it again this is Current Mode Feedback working as it should. Note the worst case error is about 120ppm, or 0.012%, not too bad for such a terrible example for an op amp!!

BTW, all electronic components are Behavioral Models, even the resistor. Whether we simulate or design by hand, we always use Behavioral Models for every component. That the simplest of all, the resistor is a BEHAVIORAL MODEL.

When we do a design we use the resistance, but if concerned about temperature and precision over temperature we might invoke the resistor Temp Coeff BEHAVIORAL R MODEL, if really concerned we might use the 2nd Order TC BEHAVIORAL R MODEL. If we are working at high frequencies we might use the distributed capacitance BEHAVIORAL R MODEL, and/or the series inductance BEHAVIORAL MODEL and if reallt wanted to get precise high frequency behavior well need to include the physical length electro-magnetic BEHAVIORAL MODEL. What about resistor self heating, well need to include the thermal mass BEHAVIORAL MODEL, and the physical surroundings. So the simple resistor is not so simple anymore.

However, the competent engineer will use only the Behavioral Model that is proper for the task at hand, to simply the design effort. EM resistor characteristics might not matter much in our design here, but will certainly matter at 100GHz. 2nd order TC might not matter in a simple low pass decoupling filter, but certainly will in a 16 bit ADC design!!

Now imagine the complexity of a complete Behavioral Model for a simple Capacitor, temperature coefficients (1st and 2nd order), leakage, ESR, ESL, dielectric absorbsion, voltage coefficients (1st & 2nd order). So what do we designers do, select the appropriate Behavioral Model based on the need...this is good engineering...knowing before hand what is important and what is not. Don't waste time and $ pursuing things that don't matter, focus on the important design aspects at hand, otherwise you'll draw the design task out forever and never get anything useful done...just like here!! Not understanding the aspects of the circuit nor the concepts behind the circuit, and arguing about things that don't matter just for the sake or arguing. Then creating myths about artifacts, behavioral models and so on.

All op amp concepts are behavioral models, so are transistors, diodes, resistors, capacitors and inductors. So when is one better than the other? That's when the effects in the model have an affect on the outcome. Heck we didn't behavioral model the op amp bond wire inductance, nor the package thermal mass and so on.

Understanding the design and then applying the appropriate behavioral model is the engineers task.

Anyway, as we've shown with Current Mode Feedback in this circuit and it's intended use, the op amp doesn't matter much regardless of of the behavioral model invoked.

Best,

Mike

Note that this Really Bad Op Amp is hooked up to where the OP 07 was, I didn't clean the schematic up, just wired it into the "slot" where the OP 07 was.

Image
Image
Image

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Added a pnp current source load for the second stage like in a typical GP op amp and these error results dropped to 14ppm or 0.0014% full scale worst case (Blue Trace). This improved error performance is attributed to the higher open loop gain because of the current source load in the 2nd stage of the Really Bad Op Amp!

1st plot is sweep Input from -5 to +5 volts and produces the -100ma to +100ma load current. 2nd plot is Input going from 0 to +5, then to -5, then to zero, thus current goes from 0, to 100, to -100 to 0ma.

Best,

Mike

Image
Image
Image

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

mawyatt wrote:
mjkzz wrote:
Peter,

Yes, the 1K is not necessary but helps at the zero region. It keeps the op amp from bouncing around because without it the feedback loop becomes "open" around zero.

Here's a couple plots without the transistors! This is without the back to back diodes and with R2 at 1000 and 100 ohms. The OP 07 is suppling all the load current thru R2. With R2 at 1000, the OP 07 output voltage limits as shown. With R2 at 100, the output current limits as shown.

Blue trace is the error and the scale is +- 100ua.

Best,

Mike
Here's a couple plots without the transistors!
you mean without diodes, right?

I deleted my last post because I think I did not quite understand the graphs.

One (with R2=1000) seems to have steeper slopes for red and green and closer response of blue line. The other has slower slope and some gap between the blue and red/green -- the right most of blue drops to bottom, yet the red and green are still sloping, same to the left most part of blue vs red/green when R2=100

Anyways, I do not understand the graphs, I am sure you have your reasons :D
Peter,

No without the transistors!!

Best,

Mike
OK, though I do not understand the logic why, like I said, you have your reasons. :D

ChrisR
Site Admin
Posts: 8671
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

This should displace any myths about artifacts, behavioral models and what not!!

That looks like weight to the argument - though I wasn't looking for it :).
I'm familiar enough with behavioural models, they're everywhere. So, to make one look a donkey, are Rumsfeld's unknown unknowns - things nobody though to model at all :roll: !
What we anticipate seldom occurs; what we least expect usually does.(B.D.)

Compared with most fields of engineering I've dabbled in, electronics plays by its rules really quite well, as long as you include enough of the rules.
(Try thermodynamics :smt011 - deeply unsatisfactory.)
Chris R

ray_parkhurst
Posts: 3431
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

mawyatt wrote:Added a pnp current source load for the second stage like in a typical GP op amp and these error results dropped to 14ppm or 0.0014% full scale worst case (Blue Trace). This improved error performance is attributed to the higher open loop gain because of the current source load in the 2nd stage of the Really Bad Op Amp!

1st plot is sweep Input from -5 to +5 volts and produces the -100ma to +100ma load current. 2nd plot is Input going from 0 to +5, then to -5, then to zero, thus current goes from 0, to 100, to -100 to 0ma.

Best,

Mike
That looks really good Mike. Can you simulate +/-2mA output to show there is no glitch at zero crossing?

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

ray_parkhurst wrote:
mawyatt wrote:Added a pnp current source load for the second stage like in a typical GP op amp and these error results dropped to 14ppm or 0.0014% full scale worst case (Blue Trace). This improved error performance is attributed to the higher open loop gain because of the current source load in the 2nd stage of the Really Bad Op Amp!

1st plot is sweep Input from -5 to +5 volts and produces the -100ma to +100ma load current. 2nd plot is Input going from 0 to +5, then to -5, then to zero, thus current goes from 0, to 100, to -100 to 0ma.

Best,

Mike
Ray,

That looks really good Mike. Can you simulate +/-2mA output to show there is no glitch at zero crossing?
Sure, here it is. This is with Really Bad Op Amp (using current source load for 2nd stage) and back to back diodes in series with load. Blue error trace scale is in nanoamps.

Best,

Mike

Image

ray_parkhurst
Posts: 3431
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

mawyatt wrote:
ray_parkhurst wrote:
Ray,

That looks really good Mike. Can you simulate +/-2mA output to show there is no glitch at zero crossing?
Sure, here it is. This is with Really Bad Op Amp (using current source load for 2nd stage) and back to back diodes in series with load. Blue error trace scale is in nanoamps.

Best,

Mike
OK, looks good enough to build.

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

ChrisR wrote:
This should displace any myths about artifacts, behavioral models and what not!!

That looks like weight to the argument - though I wasn't looking for it :).
I'm familiar enough with behavioural models, they're everywhere. So, to make one look a donkey, are Rumsfeld's unknown unknowns - things nobody though to model at all :roll: !
What we anticipate seldom occurs; what we least expect usually does.(B.D.)

Compared with most fields of engineering I've dabbled in, electronics plays by its rules really quite well, as long as you include enough of the rules.
(Try thermodynamics :smt011 - deeply unsatisfactory.)
Yes it does play by the rules, the trick is what rules to use and to what extent as you mention!!

Thermodynamics is a difficult area indeed, think this is where the Bessel Functions originated. Not an area I'm very much familiar with, so I'll just stay away!!

Murphy is always lurking out there somewhere, so good engineering keeps him at bay!! Even then there's always that GOTCHA!!!

Are you running LTspice on a PC or Mac? I'm using a Mac and the tool bar isn't showing and found out its not in the Mac version, so have to memorize the functions and Function keys, or keep a list around. Also wish you could plot one trace over another for comparison (make a run & plot trace, change something and plot another trace with the previous ones), but evidently that's not available. Seems like such a handy plot function, someone must have coded this up by now.
Best,

Mike

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

It is a good idea to actually build a circuit.

Just finished coding (PC and Driver) and testing. A strange thing is happening -- the Vin+ and Vin- of LM358 can mismatch yet all conditions (opamp output range, all voltage ranges, etc) indicates this should not happen. This happens when I increase load resistance to 10+33 = 43 ohms, it works fine with 10 ohms load and 10+33+33 = 76 ohm!!! Just does not work when load is set to 43 ohms.

Maybe I am cursed again with that LM358 :x I will do further testing and maybe even use another meter.

A is a surface mount 2N2222, it is desoldered now because I want to try a bigger TO-220 transistor (the B). The C are three resistors as load, 33, 33 and 10.

Image

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

fixed it, guess which one is bought from Mouser? I can not believe the bad 358 was soldered on at first place.

Image

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Peter,

Bet is was oscillating with those long wires. Place a small cap like 100pf to 1000pf from LM358 output to - input, that should stop any potential instability. If you attempt to measure the op amp - input in most circuits (except unity gain follower where output is tied to - input), you will disturb the circuit. Mouse part may have better Phase Margin.

The fundamental concept of an op amp in linear unsaturated operation is the output is the input differential plus offset times Open Loop Gain.

Vout = (Vin+ minus Vin- plus Input offset)*Open Loop Gain. The OLG for the LM358 is about 100dB (100,000) and the Input offset is about 2~5mv.

If it's a counterfeit part, not much you can do about that except control the supply chain. Great article in IEEE Spectrum about counterfeit Honda engine controllers with counterfeit ICs.

Edit. Don't know what the voice coil inductance is for various coils, or wiring parasitics. If you laying out a PCB or wiring something up, it's a good idea to leave room for some form of frequency compensation. A simple series RC combo will usually work, around the negative feedback path, may be more complex with a high speed op amp though.

Best,

Mike
Last edited by mawyatt on Sun May 07, 2017 9:09 am, edited 1 time in total.

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

Thanks Mike, it is just crapy, maybe you call it counterfeit as it has ST logo on it.

mjkzz
Posts: 1689
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

Finally ran a test of my circuit (see previous image)

This one is done without a weight on the speaker, total current change is roughly 230ma (always has problem at the end, maybe I should not have set the end point to 4095). The objective is an Olympus 10x clone and tube lens is Zhongyi 135, so actual magnification on sensor is 7.5x. From the image, we can see total travel distance is 1532 pixel, the vertical size of the sensor is 14.8mm with total of 3456 pixels. So total physical travel is (1532/3456*14.8)/7.5 = 0.8747mm!!!

Result
Image

Optical setup
Image

Stacking parameters
Image

Post Reply Previous topicNext topic